/* Homepage layout v1 (2026-10-15): Kevin's desktop arrangement from the layout tuner, made into
   real layout instead of nudges. Loaded after type-v1.css.
   - One left/right gutter for the whole page: the header logo's edge.
   - Section 2 and the ending share one column system (art left, copy right against the gutter);
     section 3 mirrors it. Spacing comes from section padding, not moved boxes.
   - The paintings are the way into the samples: a short call to action sits under each one,
     and each copy column ends in a single main button.
   - The two three-point lists share one rhythm. */

/* the logo's left edge: 5.68% of the page up to 1672px wide, then centred with the header */
:root { --gutter: max(5.68%, calc(50% - 741px)); }
@media (min-width:901px) and (min-height:541px) {
  .header-inner { padding-inline: min(5.68%, 94.97px); }
}

/* ---------- Hero (reference layout): copy sits lower, art a little smaller ---------- */
:root[data-reference="true"] .hero h1 { top: 26.96%; }
:root[data-reference="true"]:lang(en) .hero h1 { font-size: 6.175cqw; }
:root[data-reference="true"] .hero .intro { top: 54.13%; }
:root[data-reference="true"]:lang(en) .hero .intro { font-size: 1.754cqw; width: 36.7%; }
:root[data-reference="true"] .hero .droplet { top: 75.03%; }
/* secondary links are one size across the page: 18px at 1440 */
:root[data-reference="true"] .hero .sample-link { top: 87.25%; font-size: 1.263cqw; }
:root[data-reference="true"]:not(:lang(en)) .hero h1 { font-family: var(--font); font-weight: 600; font-size: 4.8cqw; line-height: 1.32; letter-spacing: 0; width: 44%; }
:root[data-reference="true"]:lang(ko) .hero h1 { font-size: 4.5cqw; }
:root[data-reference="true"]:not(:lang(en)) .hero .intro { font-size: 1.6cqw; line-height: 1.75; width: 32%; text-wrap: pretty; }
:root[data-reference="true"]:lang(ja) .hero .intro { width: 37.5%; }
/* phrase-only breaks in the intro (phrase-break.js) are for the wide Hero; on narrow screens a long
   Japanese phrase would be cut mid-word, so the phrases flow as ordinary text there */
@media (max-width:900px), (max-height:540px) { .hero .intro .cjk-phrase { display: inline; } }
:root[data-reference="true"] .hero .reference-master image { scale: .85; translate: 25px -30px; transform-box: fill-box; transform-origin: center; }

/* ---------- shared type ---------- */
.free-reading .reading-eyebrow, .qimen-dawn .qd-eyebrow { font-size: 14px; }
:root:lang(en) .free-reading h2, :root:lang(en) .qimen-dawn h2, :root:lang(en) .ending-day h2 {
  font-size: clamp(36px, 3.125vw, 48px); font-weight: 500; max-width: 10.8em; white-space: pre-line; text-wrap: wrap;
}
:root:lang(en) .qimen-dawn h2 { max-width: 12em; }
@media (min-width:1101px) {
  :root:lang(en) .free-reading .reading-lead, :root:lang(en) .qimen-dawn .qd-lead, :root:lang(en) .ending-day p { font-size: 20px; max-width: 24em; }
  :root:lang(en) .qimen-dawn .qd-lead { max-width: 26.25em; }
}

/* ---------- the two three-point lists: one rhythm ---------- */
.free-reading .reading-details, .qimen-dawn .qd-points { display: grid; gap: 24px; }
.free-reading .reading-benefit + .reading-benefit { margin-top: 0; padding-top: 0; border-top: 0; }
@media (min-width:1101px) {
  .free-reading .reading-benefit, .qimen-dawn .qd-points li { display: grid; grid-template-columns: 30px minmax(0,1fr); column-gap: 15px; align-items: start; }
  .free-reading .reading-benefit-icon, .qimen-dawn .qd-icon { grid-row: 1 / 3; margin-top: -2px; }
}
.free-reading .reading-benefit-icon, .qimen-dawn .qd-icon { width: 28px; height: 28px; }
@media (max-width:1100px) { .free-reading .reading-benefit-icon, .qimen-dawn .qd-icon { margin: 0 0 8px; } }
.free-reading .reading-benefit-icon svg, .qimen-dawn .qd-icon svg { width: 28px; height: 28px; }
.free-reading .reading-benefit h3, .qimen-dawn .qd-points h3 { font-size: 16px; line-height: 1.5; margin: 0 0 3px; }
.free-reading .reading-benefit p, .qimen-dawn .qd-points p { font-size: 15px; line-height: 1.7; }
.free-reading .reading-actions { margin-top: 36px; }

/* ---------- the call to action under each painting ---------- */
.free-reading .reading-art figcaption, .qimen-dawn .qd-art figcaption { display: flex; justify-content: center; margin: 14px 0 0; }
.art-cta {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 4px; border: 0; background: none;
  color: #234b3b; font: inherit; font-size: 18px; line-height: 1.4; text-align: left; cursor: pointer;
  text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; text-decoration-color: #46685370;
}
/* the dawn scene's square leaves empty paper under the painting: lift the call to action */
.qimen-dawn .qd-art figcaption { margin-top: -5.5%; position: relative; }
.art-cta-icon { flex: none; width: 22px; height: 22px; fill: none; stroke: #6b816c; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.art-cta-tap { display: none; }
@media (max-width:600px) { .art-cta { font-size: 15px; gap: 8px; } .art-cta-icon { width: 20px; height: 20px; } }
@media (hover:none) { .art-cta-click { display: none; } .art-cta-tap { display: inline; } }
.art-cta:focus-visible { outline: 2px solid #ba8645; outline-offset: 3px; border-radius: 6px; }
/* both paintings answer the pointer the same way: the whole painting lifts, the cursor is a
   hand everywhere on it, and the call to action underneath darkens. No part of either painting
   reacts on its own (section 2's pages used a magnifier, section 3's scrolls a glow). */
.free-reading .reading-art .book-window-scene, .free-reading .reading-art .reading-sheet, .qimen-dawn .qd-scene, .qimen-dawn .qd-scrolls { cursor: pointer; }
.qimen-dawn .qd-scrolls:hover { background: transparent; }
@media (hover:hover) {
  .free-reading .book-window-scene, .qimen-dawn .qd-scene { transition: translate .35s ease; }
  .free-reading .reading-art:hover .book-window-scene, .qimen-dawn .qd-art:hover .qd-scene { translate: 0 -4px; }
  .art-cta:hover, .reading-art:hover .art-cta, .qd-art:hover .art-cta { text-decoration-color: currentColor; }
}
/* on touch screens the eye gives one soft nudge the first time the painting comes into view */
@keyframes art-cta-nudge { 0%, 100% { scale: 1; } 40% { scale: 1.22; } }
@media (hover:none) and (prefers-reduced-motion:no-preference) { .art-cta.is-nudged .art-cta-icon { animation: art-cta-nudge 1.1s ease 2; } }
@media (prefers-reduced-motion:reduce) { .free-reading .book-window-scene, .qimen-dawn .qd-scene { transition: none; } }

/* ---------- desktop: one column system ---------- */
@media (min-width:1101px) {
  .free-reading, .qimen-dawn, .ending-day { max-width: none; padding-inline: var(--gutter); }
  /* section 2 and the ending: art 57.3%, gap 4.3%, copy 38.4% (the 1440 layout: copy 490px) */
  .free-reading .reading-grid, .ending-day .ed-grid {
    grid-template-columns: minmax(0,1fr) max(400px, 38.4%); column-gap: 4.3%; row-gap: 0; align-items: center;
  }
  .free-reading:has(.book-window-scene[data-c3='drawn']) .reading-grid { column-gap: 4.3%; }
  .free-reading .reading-copy, .ending-day .ed-copy { max-width: none; padding-top: 0; align-self: center; }
  /* the book scene paints about 7.5% past its box on each side: the box is sized so the
     painting itself spans the column */
  .free-reading .reading-art { align-self: center; justify-self: center; width: 87%; max-width: none; }
  /* section 3: copy 42%, gap 2.7%, art 55.3% */
  .qimen-dawn .qd-grid { grid-template-columns: max(420px, 42%) minmax(0,1fr); column-gap: 2.7%; align-items: center; }
  .qimen-dawn .qd-art { max-width: none; width: 100%; }
  .ending-day .ed-art { margin: 0 0 0 -.55%; }
  /* spacing between sections (the boxes include the paintings' paper margins) */
  .free-reading { padding-block: 6.67vw 3.9vw; }
  .qimen-dawn { padding-block: 4.44vw 4.44vw; }
  .ending-day { padding-block: 4.86vw 7.64vw; }
  .qimen-dawn .qd-actions .droplet, .free-reading .reading-start-button { margin: 0; }
}

/* the ending's button matches the other section buttons (it used to shrink with the window) */
.ending-day .ed-actions .droplet { display: inline-grid; place-items: center; width: min(100%,320px); aspect-ratio: 40 / 9; height: auto; min-height: 0; padding: 12px 22px; font-size: 20px; font-weight: 600; line-height: 1.5; }
@media (max-width:600px) { .ending-day .ed-actions .droplet { width: min(100%,280px); font-size: 18px; } }

/* the ending's two choices are capsules of the same size, stacked */
.ending-day .ed-actions { gap: 14px; }
.ending-day .ed-actions .ed-qimen-button { margin: 0; }

/* ---------- Qimen capsules: same paper and light, their own colour ----------
   Human Design keeps the amber capsule (the Hero's); every Qimen action uses wisteria, the dawn colour
   from section 3's painting (chosen 10-15 over slate and indigo, kept in make-qimen-tones.py). The colour is a duotone filter over the shared capsule
   (filters in home-c3.html, made by tools/make-qimen-tones.py). */
.qimen-capsule { --capsule-text: #3b2d4a; }
.qimen-capsule .reference-capsule { filter: url(#am-tone-wisteria); }

/* the ending breathes more than the sections above it (Kevin, 10-15): a closing line, read slowly.
   Title, text and buttons sit further apart, and the copy sits a little higher beside the
   painting: margin-bottom on the copy lifts the centred block by half its value. */
@media (min-width:1101px) {
  :root .ending-day .ed-copy h2 { margin-bottom: 37px; }
  :root .ending-day .ed-copy p { margin-bottom: 45px; }
  .ending-day .ed-actions { gap: 31px; }
  .ending-day .ed-copy { margin-bottom: 47px; }
}
