/*
Theme Name: The Unofficial Guide To Being Human
Theme URI: https://example.com/the-unofficial-guide-to-being-human
Author: Patrick Stevenson
Author URI: https://example.com
Description: A dark, editorial WooCommerce theme for selling ebooks by Patrick Stevenson.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: unofficial-guide-human
Tags: e-commerce, blog, custom-menu, featured-images, full-site-width, responsive-layout
*/

@import url("https://api.fontshare.com/v2/css?f[]=neue-machina@300,400,500,700,800&f[]=satoshi@300,400,500,700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Onest:wght@300;400;500;600&family=JetBrains+Mono:wght@400;500&display=swap");

:root {
  --ugh-bg: #080c18;
  --ugh-bg-soft: #161618;
  --ugh-panel: #0f1524;
  --ugh-panel-soft: rgba(15, 21, 36, 0.72);
  --ugh-panel-strong: #05070a;
  --ugh-line: rgba(56, 189, 248, 0.14);
  --ugh-line-strong: rgba(56, 189, 248, 0.28);
  --ugh-text: #dbe7f5;
  --ugh-body: #cdd5e0;
  --ugh-muted: #8b99b0;
  --ugh-dim: #5b6b82;
  --ugh-accent: #38bdf8;
  --ugh-accent-2: #7dd3fc;
  --ugh-violet: #a78bfa;
  --ugh-warm: #fbbf24;
  --ugh-danger: #ff8b8b;
  --ugh-shadow: 0 18px 56px rgba(0, 0, 0, 0.16), 0 4px 12px rgba(0, 0, 0, 0.16);
  --ugh-radius: 8px;
  --ugh-max: 1152px;
  --ugh-font: Onest, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ugh-heading: "Neue Machina", Satoshi, sans-serif;
  --ugh-mono: "JetBrains Mono", ui-monospace, monospace;
  --ugh-name-gradient: linear-gradient(135deg, #dbe7f5 0%, #38bdf8 60%, #a78bfa 100%);
  --ugh-glow-gradient: linear-gradient(135deg, rgba(56, 189, 248, 0.3) 0%, rgba(125, 211, 252, 0.2) 50%, rgba(167, 139, 250, 0.15) 100%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ugh-bg);
  color: var(--ugh-body);
  font-family: var(--ugh-font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    radial-gradient(circle at 66% 9%, rgba(56, 189, 248, 0.18), transparent 24rem),
    radial-gradient(circle at 78% 16%, rgba(167, 139, 250, 0.12), transparent 28rem),
    linear-gradient(180deg, rgba(8, 12, 24, 0) 0%, rgba(8, 12, 24, 0.92) 58%, #080c18 100%);
}

a {
  color: inherit;
  text-decoration-color: rgba(56, 189, 248, 0.45);
  text-underline-offset: 0.18em;
}

a:hover,
a:focus {
  color: var(--ugh-accent);
}

img {
  max-width: 100%;
  height: auto;
}

button,
input,
textarea,
select {
  font: inherit;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--ugh-line);
  background: rgba(8, 12, 24, 0.86);
  backdrop-filter: blur(14px);
}

.site-header__inner,
.site-footer__inner,
.wrap {
  width: min(calc(100% - 2rem), var(--ugh-max));
  margin-inline: auto;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.68rem;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--ugh-line-strong);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 35%, rgba(219, 231, 245, 0.85), rgba(56, 189, 248, 0.42) 22%, rgba(8, 12, 24, 0.2) 56%),
    #05070a;
  box-shadow: 0 0 22px rgba(56, 189, 248, 0.45);
  color: var(--ugh-accent-2);
  font-family: var(--ugh-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0;
  margin: 0;
}

.brand__text {
  display: grid;
  gap: 0.05rem;
}

.brand__title {
  max-width: 24rem;
  font-family: var(--ugh-font);
  font-size: clamp(0.9rem, 1.3vw, 1.05rem);
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.15;
  text-transform: none;
}

.brand__title a,
.wp-block-site-title a {
  color: inherit;
  text-decoration: none;
}

.brand__byline {
  color: var(--ugh-muted);
  font-family: var(--ugh-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--ugh-line);
  border-radius: var(--ugh-radius);
  background: var(--ugh-bg-soft);
  color: var(--ugh-muted);
}

.nav-toggle span,
.nav-toggle::before,
.nav-toggle::after {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  content: "";
  background: currentColor;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.wp-block-navigation.primary-nav {
  gap: 0.35rem;
}

.wp-block-navigation.primary-nav .wp-block-navigation-item__content {
  text-decoration: none;
}

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wp-block-navigation.primary-nav .wp-block-navigation__container {
  gap: 0.35rem;
}

.primary-nav a,
.wp-block-navigation.primary-nav a,
.wp-block-navigation.primary-nav .wp-block-navigation-item__content,
.header-shop-link,
.button,
button,
input[type="submit"],
.wp-block-button__link,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.72rem 1rem;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: var(--ugh-radius);
  background: rgba(56, 189, 248, 0.08);
  color: var(--ugh-accent);
  font-family: var(--ugh-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.primary-nav a:hover,
.primary-nav a:focus,
.wp-block-navigation.primary-nav a:hover,
.wp-block-navigation.primary-nav a:focus,
.wp-block-navigation.primary-nav .wp-block-navigation-item__content:hover,
.wp-block-navigation.primary-nav .wp-block-navigation-item__content:focus,
.header-shop-link:hover,
.header-shop-link:focus,
.button:hover,
button:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover {
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.14);
  color: var(--ugh-accent-2);
  transform: translateY(-1px);
}

.header-shop-link {
  border-color: transparent;
  background: var(--ugh-accent);
  color: #ffffff;
}

.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--ugh-line);
}

.hero::after {
  position: absolute;
  top: 12%;
  right: min(6vw, 5rem);
  z-index: -1;
  width: min(34vw, 420px);
  height: min(34vw, 420px);
  content: "";
  background: var(--ugh-glow-gradient);
  border-radius: 999px;
  filter: blur(56px);
  opacity: 0.78;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  min-height: min(760px, calc(100vh - 64px));
  padding: clamp(4rem, 9vw, 8rem) 0 clamp(3rem, 7vw, 6rem);
}

.kicker,
.section-label,
.product_meta,
.posted-on,
.byline {
  color: var(--ugh-muted);
  font-family: var(--ugh-mono);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.hero h1,
.page-title,
.entry-title {
  max-width: 12ch;
  margin: 0;
  color: var(--ugh-text);
  font-family: var(--ugh-heading);
  font-size: clamp(3.1rem, 5.5vw, 5.5rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1;
}

.page-title,
.entry-title {
  max-width: 14ch;
  font-size: clamp(2.8rem, 6vw, 5rem);
}

.hero__copy {
  max-width: 40rem;
  margin: 1.45rem 0 0;
  color: var(--ugh-muted);
  font-size: clamp(1rem, 1.65vw, 1.25rem);
  font-weight: 400;
  line-height: 1.75;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.button--primary,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
  border-color: transparent;
  background: var(--ugh-accent);
  color: #ffffff;
}

.hero__panel {
  position: relative;
  min-height: clamp(420px, 48vw, 600px);
  padding: clamp(1rem, 3vw, 2rem);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  isolation: isolate;
}

.artifact {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.artifact::before {
  position: absolute;
  width: min(82%, 540px);
  aspect-ratio: 1;
  content: "";
  background:
    radial-gradient(circle at 50% 45%, rgba(219, 231, 245, 0.95), rgba(56, 189, 248, 0.55) 9%, rgba(125, 211, 252, 0.16) 22%, transparent 52%),
    var(--ugh-glow-gradient);
  border-radius: 50%;
  filter: blur(34px);
  opacity: 0.82;
}

.artifact__beam {
  position: absolute;
  top: 10%;
  width: 12%;
  height: 45%;
  background: linear-gradient(180deg, rgba(219, 231, 245, 0.98), rgba(56, 189, 248, 0.35), transparent);
  clip-path: polygon(48% 0, 62% 0, 100% 100%, 0 100%);
  filter: blur(2px);
}

.artifact__core {
  position: relative;
  width: min(68%, 430px);
  aspect-ratio: 1.25;
  border: 2px solid rgba(125, 211, 252, 0.82);
  background:
    linear-gradient(145deg, rgba(219, 231, 245, 0.32), rgba(56, 189, 248, 0.08) 42%, rgba(5, 7, 10, 0.3)),
    linear-gradient(35deg, transparent 48%, rgba(219, 231, 245, 0.85) 49%, transparent 52%);
  clip-path: polygon(50% 0, 100% 78%, 50% 100%, 0 78%);
  box-shadow: inset 0 0 34px rgba(219, 231, 245, 0.28), 0 0 54px rgba(56, 189, 248, 0.42);
}

.artifact__core::before,
.artifact__core::after {
  position: absolute;
  inset: 20% 17%;
  content: "";
  border: 4px solid rgba(219, 231, 245, 0.82);
  clip-path: polygon(50% 0, 100% 65%, 50% 100%, 0 65%);
  filter: drop-shadow(0 0 16px rgba(56, 189, 248, 0.82));
}

.artifact__core::after {
  inset: 31% 29%;
  border-width: 2px;
  opacity: 0.75;
}

.artifact__base {
  position: absolute;
  bottom: 12%;
  width: 62%;
  height: 16%;
  background: radial-gradient(ellipse at center, rgba(56, 189, 248, 0.28), transparent 70%);
  filter: blur(14px);
}

.book-stack {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1rem;
  width: 100%;
  margin-top: 1rem;
}

.book-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--ugh-line);
  border-radius: 0;
  background: rgba(5, 7, 10, 0.5);
}

.book-card__glyph {
  display: grid;
  width: 54px;
  height: 72px;
  place-items: center;
  border: 1px solid var(--ugh-line-strong);
  border-radius: 0;
  background: linear-gradient(160deg, rgba(56, 189, 248, 0.16), rgba(167, 139, 250, 0.12));
  color: var(--ugh-accent);
  font-family: var(--ugh-mono);
  font-size: 0.8rem;
}

.book-card h2,
.book-card h3 {
  margin: 0;
  color: var(--ugh-text);
  font-family: var(--ugh-heading);
  font-size: 1rem;
  font-weight: 400;
}

.book-card p {
  margin: 0.2rem 0 0;
  color: var(--ugh-muted);
  font-size: 0.9rem;
}

.content-band {
  padding: clamp(3rem, 8vw, 6rem) 0;
  border-bottom: 1px solid var(--ugh-line);
}

.section-heading {
  display: grid;
  gap: 0.6rem;
  max-width: 62rem;
  margin-bottom: 2rem;
}

.section-heading h2 {
  margin: 0;
  color: var(--ugh-text);
  font-family: var(--ugh-heading);
  font-size: clamp(2rem, 4vw, 4rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 0.98;
}

.section-heading p {
  margin: 0;
  color: var(--ugh-muted);
  font-size: 1.05rem;
}

.feature-grid,
.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.wp-block-columns.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.wp-block-columns.feature-grid > .wp-block-column {
  margin: 0;
}

.feature,
.woocommerce ul.products li.product,
.entry-card,
.comment-body {
  min-width: 0;
  padding: 1.2rem;
  border: 1px solid var(--ugh-line);
  border-radius: 0;
  background: linear-gradient(rgba(74, 163, 255, 0.1), rgba(10, 13, 18, 0.5)), var(--ugh-panel);
}

.feature__index {
  color: var(--ugh-accent);
  font-family: var(--ugh-mono);
  font-size: 0.78rem;
}

.feature h3 {
  margin: 0.7rem 0 0.4rem;
  color: var(--ugh-text);
  font-family: var(--ugh-heading);
  font-size: 1.18rem;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.feature p,
.entry-card p {
  margin: 0;
  color: var(--ugh-muted);
}

.site-main {
  min-height: 52vh;
}

.page-header {
  padding: clamp(3rem, 7vw, 6rem) 0 2rem;
  border-bottom: 1px solid var(--ugh-line);
}

.content-layout {
  width: min(calc(100% - 2rem), 840px);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) 0;
}

.entry-content > * {
  max-width: 780px;
}

.entry-content > .alignwide {
  max-width: var(--ugh-max);
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  color: var(--ugh-text);
  font-family: var(--ugh-heading);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.08;
}

.entry-content p,
.entry-content li {
  color: var(--ugh-body);
}

.entry-content blockquote {
  margin: 2rem 0;
  padding: 1.2rem 1.4rem;
  border-left: 2px solid var(--ugh-accent);
  background: rgba(56, 189, 248, 0.14);
  color: var(--ugh-text);
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
textarea,
select {
  width: 100%;
  min-height: 46px;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--ugh-line);
  border-radius: 0;
  background: rgba(5, 7, 10, 0.7);
  color: var(--ugh-text);
  font-family: var(--ugh-mono);
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

textarea {
  min-height: 140px;
}

label {
  color: var(--ugh-muted);
  font-family: var(--ugh-mono);
  font-size: 0.78rem;
  text-transform: none;
}

.woocommerce .woocommerce-breadcrumb {
  color: var(--ugh-muted);
  font-family: var(--ugh-mono);
  font-size: 0.78rem;
}

.woocommerce ul.products {
  margin: 0;
  padding: 0;
}

.woocommerce ul.products li.product {
  width: auto !important;
  margin: 0 !important;
  float: none !important;
}

.woocommerce ul.products li.product a img,
.woocommerce div.product div.images img {
  border: 1px solid var(--ugh-line);
  border-radius: 0;
  background: var(--ugh-bg-soft);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  color: var(--ugh-text);
  font-family: var(--ugh-heading);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.woocommerce ul.products li.product .price,
.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: var(--ugh-accent);
  font-family: var(--ugh-mono);
  font-weight: 400;
}

.woocommerce span.onsale {
  min-width: 0;
  min-height: 0;
  padding: 0.35rem 0.5rem;
  border-radius: 0;
  background: var(--ugh-warm);
  color: #080c18;
  font-family: var(--ugh-mono);
  font-size: 0.72rem;
  line-height: 1;
}

.woocommerce div.product {
  display: grid;
  grid-template-columns: minmax(260px, 0.86fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
}

.woocommerce div.product div.images,
.woocommerce div.product div.summary {
  width: auto;
  float: none;
}

.woocommerce div.product .product_title {
  max-width: 12ch;
  margin-top: 0;
  color: var(--ugh-text);
  font-family: var(--ugh-heading);
  font-size: clamp(2.3rem, 5vw, 5.4rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 0.92;
}

.woocommerce table.shop_table,
.woocommerce-cart .cart-collaterals .cart_totals,
.woocommerce-checkout #payment,
.woocommerce .woocommerce-ordering select {
  border: 1px solid var(--ugh-line);
  border-radius: 0;
  background: var(--ugh-panel);
  color: var(--ugh-text);
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  border-color: var(--ugh-line);
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  border-top-color: var(--ugh-accent);
  background: var(--ugh-panel-strong);
  color: var(--ugh-text);
}

.site-footer {
  padding: 3rem 0;
  border-top: 1px solid var(--ugh-line);
  color: var(--ugh-muted);
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: end;
}

.footer-title {
  margin: 0;
  color: var(--ugh-text);
  font-family: var(--ugh-heading);
  font-size: 1rem;
  font-weight: 400;
}

.footer-note {
  margin: 0.3rem 0 0;
  font-family: var(--ugh-mono);
  font-size: 0.76rem;
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-nav a {
  color: var(--ugh-muted);
  font-family: var(--ugh-mono);
  font-size: 0.76rem;
  text-decoration: none;
}

@media (max-width: 880px) {
  .nav-toggle {
    display: inline-block;
  }

  .primary-nav {
    position: absolute;
    top: 100%;
    right: 1rem;
    left: 1rem;
    display: none;
    align-items: stretch;
    padding: 0.7rem;
    border: 1px solid var(--ugh-line);
    border-radius: var(--ugh-radius);
    background: rgba(8, 11, 10, 0.96);
  }

  .primary-nav.is-open {
    display: grid;
  }

  .primary-nav ul,
  .primary-nav {
    flex-direction: column;
  }

  .primary-nav a,
  .header-shop-link {
    width: 100%;
  }

  .wp-block-columns.hero__inner,
  .hero__inner,
  .woocommerce div.product {
    flex-direction: column;
  }

  .wrap.hero__inner,
  .woocommerce div.product {
    grid-template-columns: 1fr;
  }

  .hero__inner {
    min-height: 0;
  }

  .hero__content,
  .hero__visual {
    flex-basis: auto !important;
    width: 100%;
  }

  .feature-grid,
  .wp-block-columns.feature-grid,
  .woocommerce ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero__panel {
    min-height: 280px;
  }
}

@media (max-width: 620px) {
  .site-header__inner,
  .site-footer__inner,
  .wrap {
    width: min(calc(100% - 1.2rem), var(--ugh-max));
  }

  .brand__title {
    max-width: 15rem;
    font-size: 0.88rem;
  }

  .brand__byline {
    display: none;
  }

  .hero h1,
  .page-title,
  .entry-title {
    max-width: 12ch;
    font-size: clamp(2.55rem, 13vw, 3.8rem);
  }

  .hero__actions,
  .site-footer__inner {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .hero__actions .button {
    width: 100%;
  }

  .feature-grid,
  .wp-block-columns.feature-grid,
  .woocommerce ul.products {
    grid-template-columns: 1fr;
  }

  .book-card {
    grid-template-columns: 1fr;
  }

  .hero__panel {
    min-height: 240px;
    padding: 1.2rem;
  }
}
