/* ==========================================================================
   QuillCraft — the landing page
   --------------------------------------------------------------------------
   Loaded only on the landing page, so none of this weight lands on the rest of
   the site.

   SCOPED ON PURPOSE. Every token below is set on `.landing`, never on :root.
   The site theme (Wave 8) still owns the header, the footer and every other
   page; this is a poster hung inside it. Without the scope, choosing a light
   landing style would repaint the whole site including the admin panel.
   ========================================================================== */

.landing {
  /* Defaults, overridden per style below. */
  --lp-bg:        #0b0d11;
  --lp-bg-alt:    #12151b;
  --lp-ink:       #ece5d8;
  --lp-ink-soft:  #a8a091;
  --lp-accent:    #7fb69b;
  --lp-accent-2:  #c8a86a;
  --lp-on-accent: #0a0d10;
  --lp-line:      rgba(236, 229, 216, .14);

  --lp-radius:    16px;
  --lp-pad:       clamp(56px, 8vw, 116px);
  --lp-measure:   66ch;
  --lp-display:   Georgia, "Iowan Old Style", "Times New Roman", serif;
  --lp-body:      inherit;
  --lp-h1:        clamp(2.1rem, 5.4vw, 4rem);
  --lp-h2:        clamp(1.6rem, 3.4vw, 2.6rem);
  --lp-eyebrow-transform: uppercase;
  --lp-eyebrow-spacing:   .16em;

  background: var(--lp-bg);
  color: var(--lp-ink);
  font-family: var(--lp-body);
  /* Pull out of the site's centred column: the landing page runs edge to edge. */
  margin: -28px calc(50% - 50vw) -56px;
  width: 100vw;
  max-width: 100vw;
  overflow-x: clip;
}

/*
 * The full-bleed trick above uses 100vw, and 100vw includes the width of a
 * classic desktop scrollbar while the page's usable width does not. On any
 * browser that still draws one, that is a few pixels of sideways scroll on
 * every section. `clip` rather than `hidden` on purpose: `hidden` would make
 * the body a scroll container and break the site header's sticky positioning.
 */
body.has-landing { overflow-x: clip; }

.lp-wrap { width: min(1140px, 100% - 40px); margin-inline: auto; }

/* The site header is sticky, so an anchor jump would otherwise land with the
   section's heading hidden underneath it. */
.lp-section { padding-block: var(--lp-pad); position: relative; scroll-margin-top: 80px; }
.lp-section + .lp-section { border-top: 1px solid var(--lp-line); }

/* Banded rhythm: alternate sections sit on the secondary background. */
.landing[data-rhythm="banded"] .lp-section:nth-child(even) { background: var(--lp-bg-alt); }
.landing[data-rhythm="banded"] .lp-section + .lp-section { border-top: 0; }

/* --- type ---------------------------------------------------------------- */

.lp-eyebrow {
  /* .82rem, not .78: uppercase with .16em of tracking is already hard work at
     small sizes, and at .78rem it measured 12.5px on a phone — below the size
     at which most people can read a tracked-out label comfortably. */
  font-size: .82rem; font-weight: 700;
  text-transform: var(--lp-eyebrow-transform);
  letter-spacing: var(--lp-eyebrow-spacing);
  color: var(--lp-accent);
  margin: 0 0 14px;
}
.lp-heading {
  font-family: var(--lp-display);
  font-size: var(--lp-h2);
  line-height: 1.12;
  margin: 0 0 16px;
  color: var(--lp-ink);
  font-weight: 700;
  text-wrap: balance;
}
.lp-section--hero .lp-heading { font-size: var(--lp-h1); }
.lp-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  color: var(--lp-ink-soft);
  margin: 0 0 22px;
  max-width: var(--lp-measure);
  text-wrap: pretty;
}
.lp-para {
  font-size: 1.03rem; line-height: 1.75;
  color: var(--lp-ink-soft);
  max-width: var(--lp-measure);
  margin: 0 0 1.1em;
}
.lp-para:last-child { margin-bottom: 0; }

/* --- buttons ------------------------------------------------------------- */

.lp-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.lp-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  border-radius: var(--lp-radius);
  border: 2px solid transparent;
  font-size: 1rem; font-weight: 650; line-height: 1;
  text-decoration: none;
  transition: transform .12s ease, opacity .12s ease, background .12s ease;
}
.lp-btn:hover { text-decoration: none; transform: translateY(-1px); }
.lp-btn--primary { background: var(--lp-accent); color: var(--lp-on-accent); border-color: var(--lp-accent); }
.lp-btn--primary:hover { background: var(--lp-accent-2); border-color: var(--lp-accent-2); color: var(--lp-on-accent); }
.lp-btn--ghost { color: var(--lp-ink); border-color: var(--lp-line); }
.lp-btn--ghost:hover { border-color: var(--lp-accent); color: var(--lp-accent); }

/* --- hero ---------------------------------------------------------------- */

.lp-hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.lp-hero__text { min-width: 0; }
.lp-hero__media { min-width: 0; }

/* --- split feature sections ---------------------------------------------- */

.lp-split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.lp-split__text { min-width: 0; }
.landing[data-rhythm="zigzag"] .lp-section.is-flipped .lp-split { direction: rtl; }
.landing[data-rhythm="zigzag"] .lp-section.is-flipped .lp-split > * { direction: ltr; }
/* Stacked rhythm centres everything and drops the artwork below the words. */
.landing[data-rhythm="stacked"] .lp-split { grid-template-columns: 1fr; text-align: center; }
.landing[data-rhythm="stacked"] .lp-split .lp-sub,
.landing[data-rhythm="stacked"] .lp-split .lp-para { margin-inline: auto; }
.landing[data-rhythm="stacked"] .lp-ctas { justify-content: center; }
.landing[data-rhythm="stacked"] .lp-intro { text-align: center; }
.landing[data-rhythm="stacked"] .lp-intro .lp-sub,
.landing[data-rhythm="stacked"] .lp-intro .lp-para { margin-inline: auto; }

/* --- artwork ------------------------------------------------------------- */

.lp-figure { margin: 0; }
.lp-figure img {
  display: block; width: 100%; height: auto;
  border-radius: var(--lp-radius);
  border: 1px solid var(--lp-line);
}
.lp-figure--band { margin-top: 40px; }
.lp-figure--band img { max-height: 300px; object-fit: cover; }

/* --- video facade -------------------------------------------------------- */

.lp-video { position: relative; border-radius: var(--lp-radius); overflow: hidden; border: 1px solid var(--lp-line); }
.lp-video__poster { display: block; width: 100%; height: auto; }
.lp-video__play {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: rgba(0, 0, 0, .34);
  border: 0; cursor: pointer; width: 100%;
  color: #fff; font: inherit; font-weight: 650;
  transition: background .15s ease;
}
.lp-video__play:hover { background: rgba(0, 0, 0, .2); }
.lp-video__triangle {
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--lp-accent);
  position: relative;
  box-shadow: 0 6px 26px rgba(0, 0, 0, .4);
}
.lp-video__triangle::after {
  content: ""; position: absolute; top: 50%; left: 54%; transform: translate(-50%, -50%);
  border-style: solid; border-width: 15px 0 15px 24px;
  border-color: transparent transparent transparent var(--lp-on-accent);
}
.lp-video__label { font-size: .95rem; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.lp-video iframe, .lp-video video { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; }

/* --- tiles --------------------------------------------------------------- */

.lp-intro { margin-bottom: 40px; }
.lp-tiles {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px;
}
.lp-tiles--tight { grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 14px; }
.lp-tile {
  background: var(--lp-bg-alt);
  border: 1px solid var(--lp-line);
  border-radius: var(--lp-radius);
  padding: 24px;
}
.landing[data-rhythm="banded"] .lp-section:nth-child(even) .lp-tile { background: var(--lp-bg); }
.lp-tile__title { font-family: var(--lp-display); font-size: 1.14rem; margin: 0 0 8px; color: var(--lp-ink); }
.lp-tile__body  { margin: 0; font-size: .95rem; line-height: 1.65; color: var(--lp-ink-soft); }

/* --- pricing ------------------------------------------------------------- */

.lp-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.lp-plan {
  border: 1px solid var(--lp-line); border-radius: var(--lp-radius);
  padding: 30px; background: var(--lp-bg-alt);
}
.lp-plan--paid { border-color: var(--lp-accent); }
.lp-plan__title { font-family: var(--lp-display); font-size: 1.4rem; margin: 0 0 18px; }
.lp-plan--paid .lp-plan__title { color: var(--lp-accent); }
.lp-plan__list { list-style: none; margin: 0; padding: 0; }
.lp-plan__list li {
  padding: 9px 0 9px 26px; position: relative;
  color: var(--lp-ink-soft); font-size: .96rem; line-height: 1.5;
  border-bottom: 1px solid var(--lp-line);
}
.lp-plan__list li:last-child { border-bottom: 0; }
.lp-plan__list li::before {
  content: "→"; position: absolute; left: 0; top: 9px;
  color: var(--lp-accent); font-weight: 700;
}

/* --- faq ----------------------------------------------------------------- */

.lp-faq { display: grid; gap: 12px; max-width: 900px; }
.lp-faq__item {
  border: 1px solid var(--lp-line); border-radius: var(--lp-radius);
  background: var(--lp-bg-alt);
}
.lp-faq__q {
  cursor: pointer; padding: 20px 24px;
  font-weight: 650; font-size: 1.03rem; color: var(--lp-ink);
  list-style: none; display: flex; justify-content: space-between; gap: 16px;
  min-height: 44px; align-items: center;
}
.lp-faq__q::-webkit-details-marker { display: none; }
.lp-faq__q::after { content: "+"; color: var(--lp-accent); font-size: 1.5rem; line-height: 1; flex-shrink: 0; }
.lp-faq__item[open] .lp-faq__q::after { content: "−"; }
.lp-faq__a { padding: 0 24px 22px; }

/* --- founder and final --------------------------------------------------- */

.lp-founder { display: grid; grid-template-columns: 280px 1fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.lp-final { text-align: center; }
.lp-final .lp-sub, .lp-final .lp-para { margin-inline: auto; }
.lp-final .lp-ctas { justify-content: center; }
.lp-section--cta { background: var(--lp-bg-alt); }

/* --- mobile -------------------------------------------------------------- */

@media (max-width: 860px) {
  .lp-hero, .lp-split, .lp-founder { grid-template-columns: 1fr; }
  /* The picture always follows the words it belongs to, whichever side the
     zigzag put it on at desktop width. */
  .landing[data-rhythm="zigzag"] .lp-section.is-flipped .lp-split { direction: ltr; }

  /* The headline owns the first screen. Only a video outranks it — see the
     comment on lp-hero--video in includes/landing-render.php. */
  .lp-hero--video .lp-hero__media { order: -1; }
  .lp-hero:not(.lp-hero--video) .lp-hero__media { margin-top: 32px; }

  .lp-founder__media { max-width: 220px; }

  /* 860 rather than 560: a tablet is held in the hands too, and the tracked-out
     label is the hardest thing on the page to read at a small size. */
  .lp-eyebrow { font-size: .875rem; letter-spacing: .12em; }
}

@media (max-width: 560px) {
  .landing { margin-inline: calc(50% - 50vw); }
  .lp-wrap { width: calc(100% - 32px); }
  .lp-tiles, .lp-tiles--tight { grid-template-columns: 1fr; }
  .lp-btn { width: 100%; }
  .lp-plan, .lp-tile { padding: 20px; }

  /* Body copy at 16px on a phone. Below that, reading twenty sections of sales
     copy on a handset stops being comfortable and starts being work — and 16px
     is also the size at which iOS stops offering to zoom the page. */
  .lp-tile__body,
  .lp-plan__list li,
  .lp-video__label { font-size: 1rem; }

  /* Two stacked full-width buttons need real separation, or the second reads as
     part of the first and gets tapped by accident. */
  .lp-ctas { gap: 14px; }

  /* The first screen is the only one every visitor sees. The generic section
     padding put roughly a third of it above the headline; the hero gets a
     tighter top so the promise and the first button both land above the fold
     on a normal handset. Only the top — the space below still separates it
     from what follows. */
  .lp-section--hero { padding-top: 24px; }

  /* A phone is held in one hand: the paid plan should not be the one that is
     harder to reach. Free first, paid second, as in the desktop order — but
     with the band between them wide enough to register as two choices. */
  .lp-plans { gap: 18px; }
}

/* ==========================================================================
   The six styles
   --------------------------------------------------------------------------
   Each one is a palette plus a few typographic decisions. Nothing below changes
   layout structure — the rhythm attribute does that — so a style cannot break
   the page, only recolour and re-voice it.
   ========================================================================== */

/* --- 1. Midnight Quill — dark, patient, literary ------------------------- */
.landing[data-landing="midnight-quill"] {
  --lp-bg:        #0b0d11;
  --lp-bg-alt:    #12161c;
  --lp-ink:       #ece5d8;
  --lp-ink-soft:  #a49c8d;
  --lp-accent:    #7fb69b;
  --lp-accent-2:  #c8a86a;
  --lp-on-accent: #0a0d10;
  --lp-line:      rgba(236, 229, 216, .13);
  --lp-radius:    14px;
}

/* --- 2. Parchment — warm, bookish, unhurried ----------------------------- */
.landing[data-landing="parchment"] {
  --lp-bg:        #fdf6ea;
  --lp-bg-alt:    #f7ecd9;
  --lp-ink:       #2b2320;
  --lp-ink-soft:  #6a5a50;
  --lp-accent:    #b4471f;
  --lp-accent-2:  #216f76;
  --lp-on-accent: #fffdf9;
  --lp-line:      rgba(43, 35, 32, .14);
  --lp-radius:    18px;
  --lp-h1:        clamp(2.2rem, 5.6vw, 4.2rem);
  --lp-eyebrow-transform: none;
  --lp-eyebrow-spacing:   .05em;
}
.landing[data-landing="parchment"] .lp-eyebrow { font-style: italic; font-weight: 600; }

/* --- 3. Ledger — sharp, businesslike, terms first ------------------------ */
.landing[data-landing="ledger"] {
  --lp-bg:        #ffffff;
  --lp-bg-alt:    #f3f5f7;
  --lp-ink:       #12161b;
  --lp-ink-soft:  #48515e;
  --lp-accent:    #23496f;
  --lp-accent-2:  #3d5a68;
  --lp-on-accent: #ffffff;
  --lp-line:      rgba(18, 22, 27, .14);
  --lp-radius:    3px;
  --lp-display:   -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --lp-h1:        clamp(2rem, 4.6vw, 3.4rem);
  --lp-eyebrow-spacing: .12em;
}
.landing[data-landing="ledger"] .lp-heading { letter-spacing: -.02em; }
.landing[data-landing="ledger"] .lp-btn:hover { transform: none; }

/* --- 4. Neon Press — loud, modern, high contrast ------------------------- */
.landing[data-landing="neon-press"] {
  --lp-bg:        #0a0a0f;
  --lp-bg-alt:    #111119;
  --lp-ink:       #f4f4f8;
  --lp-ink-soft:  #a0a0b4;
  --lp-accent:    #6ee7ff;
  --lp-accent-2:  #ff7ad9;
  --lp-on-accent: #08080c;
  --lp-line:      rgba(110, 231, 255, .22);
  --lp-radius:    4px;
  --lp-display:   -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --lp-h1:        clamp(2.4rem, 7vw, 5.2rem);
  --lp-h2:        clamp(1.8rem, 4.4vw, 3.2rem);
  --lp-eyebrow-spacing: .2em;
}
.landing[data-landing="neon-press"] .lp-heading { letter-spacing: -.035em; font-weight: 800; }
.landing[data-landing="neon-press"] .lp-tile,
.landing[data-landing="neon-press"] .lp-plan { border-width: 2px; }
.landing[data-landing="neon-press"] .lp-btn--primary { box-shadow: 0 0 34px rgba(110, 231, 255, .3); }

/* --- 5. Atelier — quiet, spacious, craft-first --------------------------- */
.landing[data-landing="atelier"] {
  --lp-bg:        #f7f6f2;
  --lp-bg-alt:    #eeece5;
  --lp-ink:       #2f3330;
  --lp-ink-soft:  #666c66;
  --lp-accent:    #5f7a6b;
  --lp-accent-2:  #a9714b;
  --lp-on-accent: #f7f6f2;
  --lp-line:      rgba(47, 51, 48, .13);
  --lp-radius:    22px;
  --lp-pad:       clamp(72px, 10vw, 150px);
  --lp-measure:   58ch;
  --lp-h1:        clamp(2rem, 4.8vw, 3.5rem);
  --lp-eyebrow-transform: none;
  --lp-eyebrow-spacing:   .03em;
}
.landing[data-landing="atelier"] .lp-heading { font-weight: 600; }
.landing[data-landing="atelier"] .lp-tile { border: 0; background: var(--lp-bg-alt); }

/* --- 6. Broadsheet — newspaper, heavy serif, hairline rules -------------- */
.landing[data-landing="broadsheet"] {
  --lp-bg:        #faf9f6;
  --lp-bg-alt:    #f2f0ea;
  --lp-ink:       #1a1a1a;
  --lp-ink-soft:  #4a4a4a;
  --lp-accent:    #8c2f21;
  --lp-accent-2:  #1a1a1a;
  --lp-on-accent: #faf9f6;
  --lp-line:      rgba(26, 26, 26, .22);
  --lp-radius:    0px;
  --lp-display:   Georgia, "Iowan Old Style", "Times New Roman", serif;
  --lp-h1:        clamp(2.4rem, 6.4vw, 4.6rem);
  --lp-h2:        clamp(1.7rem, 3.8vw, 2.9rem);
  --lp-eyebrow-spacing: .18em;
}
.landing[data-landing="broadsheet"] .lp-heading { font-weight: 700; letter-spacing: -.01em; }
.landing[data-landing="broadsheet"] .lp-section + .lp-section { border-top: 2px solid var(--lp-ink); }
.landing[data-landing="broadsheet"] .lp-eyebrow {
  border-bottom: 2px solid var(--lp-accent); display: inline-block; padding-bottom: 5px;
}
.landing[data-landing="broadsheet"] .lp-tile { border-width: 0 0 0 3px; border-left-style: solid; background: transparent; padding-left: 18px; }
.landing[data-landing="broadsheet"] .lp-figure img { border-radius: 0; }
