/*
Theme Name:   Understanding No-thing
Description:  Companion-site theme for the book Understanding No-thing. Mobile first, self-hosted fonts, no external requests, no tracking. Styles the [no_thing_companion] plugin from the theme so the plugin's own stylesheet never needs editing.
Author:       Wakefield Website Design
Version:      1.1.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain:  no-thing-theme
*/

/* ==========================================================================
   Fonts (self-hosted — no Google Fonts request, so no IP leaves the site)
   ========================================================================== */
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: normal; font-display: swap; src: url(assets/fonts/cormorant-garamond-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 500; font-style: italic; font-display: swap; src: url(assets/fonts/cormorant-garamond-latin-500-italic.woff2) format("woff2"); }
@font-face { font-family: "Cormorant Garamond"; font-weight: 600; font-style: normal; font-display: swap; src: url(assets/fonts/cormorant-garamond-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "EB Garamond"; font-weight: 400; font-style: normal; font-display: swap; src: url(assets/fonts/eb-garamond-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "EB Garamond"; font-weight: 400; font-style: italic; font-display: swap; src: url(assets/fonts/eb-garamond-latin-400-italic.woff2) format("woff2"); }
@font-face { font-family: "EB Garamond"; font-weight: 500; font-style: normal; font-display: swap; src: url(assets/fonts/eb-garamond-latin-500-normal.woff2) format("woff2"); }

/* ==========================================================================
   Tokens
   ========================================================================== */
:root {
  --bg: #0a0908;
  --bg-raised: #12100d;
  --ink: #ece4d2;          /* body text            — 15.6:1 on --bg */
  --ink-soft: #bdb29c;     /* secondary text       —  9.4:1 on --bg */
  --gold: #d9ae5b;         /* accents / headings   —  9.3:1 on --bg */
  --gold-light: #f0d38a;
  --gold-dim: #b78f43;
  --heart: #b3202a;
  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --body: "EB Garamond", "Iowan Old Style", Georgia, serif;
  --measure: 38rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: clamp(1.125rem, 1.05rem + .35vw, 1.3rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { color: var(--gold-light); }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 3px; }
[hidden] { display: none !important; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: .6rem 1rem; background: var(--gold); color: #14100a; text-decoration: none; font-weight: 500;
}
.skip-link:focus { top: 1rem; }

/* ==========================================================================
   Shared type + ornament
   ========================================================================== */
.display, h1, h2, h3 { font-family: var(--display); font-weight: 600; color: var(--gold); line-height: 1.15; margin: 0; }
.page-title {
  font-size: clamp(1.7rem, 1.2rem + 2.6vw, 3rem);
  letter-spacing: .14em;
  text-transform: uppercase;
  text-align: center;
  text-wrap: balance;
}
.rule {
  display: flex; align-items: center; justify-content: center; gap: .9rem;
  margin: 1.4rem auto 0; max-width: 22rem; color: var(--gold-dim);
}
.rule::before, .rule::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-dim));
}
.rule::after { transform: scaleX(-1); }
.rule i { width: .55rem; height: .55rem; border: 1px solid var(--gold); transform: rotate(45deg); }

/* ==========================================================================
   Site chrome
   ========================================================================== */
.site-header { padding: 1.1rem var(--gutter); }
.site-mark {
  display: inline-flex; align-items: center; gap: .7rem;
  font-family: var(--display); font-weight: 600; font-size: 1.05rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--gold); text-decoration: none;
}
.site-mark img { width: 1.9rem; height: 1.9rem; border-radius: .4rem; }
.site-mark:hover { color: var(--gold-light); }

.site-main { flex: 1; width: 100%; }

.site-footer {
  padding: 2.2rem var(--gutter) 2.6rem;
  text-align: center;
  font-size: .95rem;
  color: var(--ink-soft);
}
.site-footer .rule { margin-bottom: 1.4rem; }
.footer-nav ul { list-style: none; margin: 0 0 .9rem; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem 1.6rem; }
.footer-nav a {
  display: inline-block; padding: .45rem .2rem;           /* 44px-ish tap target */
  font-family: var(--display); font-weight: 600; font-size: 1rem;
  letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--gold);
}
.footer-nav a:hover { color: var(--gold-light); text-decoration: underline; }
.site-footer p { margin: 0; }

/* ==========================================================================
   Inner pages (About / Privacy / Contact / Further pieces)
   ========================================================================== */
.page-wrap { padding: clamp(1.5rem, 4vw, 3.5rem) var(--gutter) 4rem; }
.page-head { max-width: var(--measure); margin: 0 auto 2.2rem; }
.prose { max-width: var(--measure); margin: 0 auto; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 1.7rem; margin-top: 2em; }
.prose h3 { font-size: 1.35rem; margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose blockquote { margin-left: 0; padding-left: 1.2rem; border-left: 2px solid var(--gold-dim); font-style: italic; color: var(--ink-soft); }
.prose hr { border: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold-dim), transparent); margin: 2.4rem 0; }
.back-link { display: inline-block; max-width: var(--measure); margin: 0 auto 1.4rem; font-family: var(--display); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: .95rem; text-decoration: none; }
.back-wrap { max-width: var(--measure); margin: 0 auto; }

/* ==========================================================================
   Home
   ========================================================================== */
.home { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; min-height: 100svh; }
.home .site-main { display: flex; flex: 1; }
.hero-media { position: absolute; inset: 0; z-index: -2; background: var(--bg) center/cover no-repeat; }
.hero-media video { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.6s ease; }
.hero-media video.is-playing { opacity: .55; }
.hero-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 90% at 30% 40%, rgba(10,9,8,.55), rgba(10,9,8,.9) 70%),
    linear-gradient(180deg, rgba(10,9,8,.55), rgba(10,9,8,.2) 40%, rgba(10,9,8,.85));
}
.hero {
  width: 100%; max-width: 72rem; margin: 0 auto;
  padding: clamp(1.5rem, 5vh, 3rem) var(--gutter) clamp(2rem, 6vh, 4rem);
  display: grid; gap: clamp(2rem, 5vw, 4rem); align-content: center;
}
.hero-copy { display: grid; gap: 1.2rem; text-align: center; justify-items: center; }
.hero-emblem { width: clamp(64px, 14vw, 92px); filter: drop-shadow(0 0 18px rgba(217,174,91,.25)); }
.hero-title { font-size: clamp(1.9rem, 1.1rem + 4.2vw, 3.6rem); letter-spacing: .13em; text-transform: uppercase; text-wrap: balance; text-shadow: 0 2px 24px rgba(0,0,0,.7); }
.hero-strap { margin: 0; font-style: italic; font-size: clamp(1.2rem, 1.05rem + .8vw, 1.55rem); color: var(--ink); text-wrap: balance; }
.hero-cover { display: none; }

.routes { display: grid; gap: 2.4rem; width: 100%; max-width: 30rem; margin-top: .6rem; text-align: left; }
.route {
  display: block; position: relative; text-decoration: none; color: var(--ink);
  padding: 1.15rem 3.4rem 1.15rem 1.5rem;
  border: 16px solid transparent;
  border-image: url(assets/frame.svg) 16 fill / 16px stretch;
  margin: -16px;                       /* the frame sits in the gap, not in the layout */
}
.routes { padding: 16px; }
.route:hover, .route:focus-visible {
  border-image-source: url(assets/frame-bright.svg);
  color: var(--ink);
}
.route:focus-visible { outline-offset: 6px; }
.route-title { display: block; font-family: var(--display); font-weight: 600; font-size: 1.3rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.route-text { display: block; margin-top: .25rem; font-style: italic; color: var(--ink-soft); line-height: 1.45; }
.route::after {
  content: ""; position: absolute; right: 1.35rem; top: 50%; width: .62rem; height: .62rem;
  border-top: 1.5px solid var(--gold); border-right: 1.5px solid var(--gold);
  transform: translateY(-50%) rotate(45deg); transition: transform .25s ease;
}
.route:hover::after { transform: translate(4px, -50%) rotate(45deg); }

.home .site-footer { padding-top: 0; padding-bottom: 1.4rem; background: none; }
.home-extra { max-width: var(--measure); margin: 0 auto; padding: 0 var(--gutter) 3rem; }

@media (min-width: 62em) {
  .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; }
  .hero-copy { text-align: left; justify-items: start; }
  .hero-emblem { display: none; }
  .hero-title { font-size: clamp(2.2rem, 1rem + 2.4vw, 3.5rem); letter-spacing: .1em; }
  .hero-cover { display: block; justify-self: center; width: min(100%, 24rem); }
  .hero-cover img { width: 100%; border: 1px solid rgba(217,174,91,.35); box-shadow: 0 30px 80px rgba(0,0,0,.7), 0 0 80px rgba(217,174,91,.12); }
}

/* ==========================================================================
   Further reading
   ========================================================================== */
.pieces { max-width: var(--measure); margin: 2.4rem auto 0; display: grid; gap: 2.4rem; }
.piece a {
  display: block; text-decoration: none; color: var(--ink);
  padding: 1.3rem 1.5rem; border: 16px solid transparent; margin: -16px;
  border-image: url(assets/frame.svg) 16 fill / 16px stretch;
}
.pieces { padding: 16px; max-width: calc(var(--measure) + 32px); }
.piece a:hover, .piece a:focus-visible { border-image-source: url(assets/frame-bright.svg); color: var(--ink); }
.piece h2 { font-size: 1.5rem; letter-spacing: .04em; }
.piece p { margin: .4rem 0 0; color: var(--ink-soft); line-height: 1.5; }
.piece .more { display: inline-block; margin-top: .7rem; font-family: var(--display); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: .9rem; color: var(--gold); }
.pieces-empty { max-width: var(--measure); margin: 2.4rem auto 0; text-align: center; font-style: italic; color: var(--ink-soft); }

/* ==========================================================================
   Books
   ========================================================================== */
.books { max-width: 46rem; margin: 2.4rem auto 0; display: grid; gap: 3.2rem; }
.book { display: grid; gap: 1.4rem; justify-items: center; text-align: center; }
.book-cover { width: min(12rem, 60%); }
.book-cover img, .book-cover .book-cover-ph { display: block; width: 100%; aspect-ratio: 701 / 1055; border: 1px solid rgba(217,174,91,.35); box-shadow: 0 20px 50px rgba(0,0,0,.6); object-fit: cover; }
.book-cover-ph { display: grid; place-items: center; align-content: center; gap: .8rem; padding: 1rem; background: var(--bg-raised); font-family: var(--display); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); font-size: .95rem; }
.book-cover-ph img { width: 3rem; height: auto; aspect-ratio: auto; border: 0; box-shadow: none; }
.book-body { max-width: 28rem; }
.book-title { font-size: 1.6rem; }
.book-sub { margin: .2rem 0 0; font-style: italic; color: var(--ink-soft); }
.book-desc { margin: .9rem 0 0; line-height: 1.6; }
.book-buy { display: inline-block; margin-top: 1.1rem; padding: .55rem 1.5rem; border: 1px solid var(--gold-dim); color: var(--gold); font-family: var(--display); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; font-size: .95rem; text-decoration: none; }
a.book-buy:hover, a.book-buy:focus-visible { border-color: var(--gold-light); color: var(--gold-light); }
.book-buy.is-soon { border-style: dashed; color: var(--ink-soft); }
@media (min-width: 46em) {
  .book { grid-template-columns: 12rem 1fr; text-align: left; justify-items: start; align-items: center; gap: 2.4rem; }
  .book-cover { width: 12rem; }
}

/* ==========================================================================
   Continue the Conversation — the [no_thing_companion] plugin, styled from
   the theme (never edit assets/companion.css inside the plugin).
   Selectors are prefixed with .site-main to outrank the plugin's own sheet.
   ========================================================================== */
.continue-intro { max-width: var(--measure); margin: 0 auto; text-align: center; }
.continue-intro p { margin: 0 0 1em; text-wrap: pretty; }

body .ntc { max-width: 36rem; margin: 2.4rem auto 0; color: var(--ink); text-align: left; }

/* Emblem sits above the input: tree over the horizon, heart pointing down into the frame. */
body .ntc::before {
  content: ""; display: block; margin: 0 auto .5rem;
  width: clamp(88px, 24vw, 120px); aspect-ratio: 120 / 136;
  background: url(assets/emblem.svg) center / contain no-repeat;
  filter: drop-shadow(0 0 16px rgba(217,174,91,.22));
}
body .ntc__label {
  display: block; text-align: center; margin: 0 0 .9rem;
  font-family: var(--display); font-weight: 600; font-size: 1.15rem;
  letter-spacing: .2em; text-transform: uppercase; color: var(--gold);
}
/* The frame: a 9-slice SVG border-image — chamfered corners, edges stretch, so it
   holds at any width (phone → desktop) and only ever surrounds the input. */
body .ntc__input {
  display: block; width: 100%; min-height: 7.5rem; resize: vertical;
  padding: .6rem .5rem; font: inherit; font-size: max(1.1rem, 16px);   /* ≥16px stops iOS zoom-on-focus */
  line-height: 1.55; color: var(--ink); caret-color: var(--gold-light);
  background: transparent;
  border: 16px solid transparent;
  border-image: url(assets/frame.svg) 16 fill / 16px stretch;
  border-radius: 0;
}
body .ntc__input::placeholder { color: var(--ink-soft); opacity: 1; font-style: italic; }
body .ntc__input:hover { border-image-source: url(assets/frame-bright.svg); }
body .ntc__input:focus, body .ntc__input:focus-visible {
  outline: none; border-image-source: url(assets/frame-bright.svg);
}
/* The textarea has no outline of its own, so focus is carried by the bright frame (not colour alone: it also thickens). */

body .ntc__button {
  display: block; margin: 1rem auto 0; min-width: 9.5rem; min-height: 3rem;
  padding: .55rem 1.6rem; cursor: pointer;
  font-family: var(--display); font-weight: 600; font-size: 1.15rem; letter-spacing: .2em; text-transform: uppercase;
  color: #15100a; background: linear-gradient(180deg, var(--gold-light), var(--gold)); background-clip: padding-box;
  border: 10px solid transparent;
  border-image: url(assets/frame.svg) 16 / 10px stretch;
  border-radius: 0; transition: filter .2s ease;
}
body .ntc__button:hover:not([disabled]) { filter: brightness(1.1); border-image-source: url(assets/frame-bright.svg); }
body .ntc__button:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 4px; }
body .ntc__button[disabled] { opacity: .55; cursor: default; }

/* The answer is deliberately NOT framed: answers run from 3 to 8 paragraphs, so it sits in clean type. */
body .ntc__answer { margin: 2.2rem 0 0; padding-top: 1.6rem; border-top: 1px solid rgba(183,143,67,.35); font-size: 1.05em; line-height: 1.7; color: var(--ink); text-align: left; }
body .ntc__answer p { margin: 0 0 1em; }
body .ntc__sources { text-align: left; margin-top: 1.2rem; font-size: .92em; font-style: italic; color: var(--gold); opacity: 1; }
body .ntc__privacy, body .ntc__note { opacity: 1; color: var(--ink-soft); font-size: .88rem; line-height: 1.55; text-align: center; }
body .ntc__privacy { margin-top: 1.8rem; }
body .ntc__note { margin-top: .9rem; }

/* ==========================================================================
   Elementor. Pages built with Elementor render full-width inside .site-main--elementor.
   Optional utility classes: add in an Elementor widget/container's "CSS Classes" field.
     ntt-frame  — the chamfered gold frame (hover brightens)      ntt-display — Cormorant caps heading look
   ========================================================================== */
.site-main--elementor { padding: 0; }
.elementor-page .site-main { max-width: none; }
.ntt-frame { border: 16px solid transparent !important; border-image: url(assets/frame.svg) 16 fill / 16px stretch !important; border-radius: 0 !important; margin: 0; }
.ntt-frame:hover { border-image-source: url(assets/frame-bright.svg) !important; }
.ntt-display, .ntt-display .elementor-heading-title { font-family: var(--display); font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.site-main--elementor .elementor-widget-shortcode .ntc { padding: 0 var(--gutter); }

/* ==========================================================================
   Motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .hero-media video { display: none; }
}
@media print { .hero-media, .hero-shade, .site-header { display: none; } body { background: #fff; color: #000; } }
