/* ZENREI public site: overview page. */
img { max-width: 100%; }

/* Layout: one dark, centered column paced like a product film. Each screen holds a single statement and a single image. The enso (one brush stroke, left open) is the brand mark; kanji are set as monuments. */
:root { --code-ink: #ece9e12b; --sand: #ece9e13d; --code-key: #d98a6866; --on-ai: #14132b; --glow: #993d1c2b; --stage: #0e0f19; --pane: #181a2b; --stage-line: #2c2f4a; --stage-muted: #8f94b8; --stage-ok: #8fd9b0; --app: #ffffff; --app-text: #20243b; --app-muted: #6a7089; --app-line: #e3e5ef; --app-soft: #eeedfd; --app-accent: #4338ca; --wrap: 1120px; }
.wrap { max-width: var(--wrap); }
.note { font-size: .82rem; color: var(--mist); }
.wordmark { font-family: var(--display); font-size: 1.2rem; font-weight: 600; letter-spacing: .14em; text-decoration: none; display: block; color: var(--washi); }
.wordmark i { font-style: normal; color: var(--ai); }
.site-header .button { margin-left: auto; }
.button { border: 1px solid var(--washi); font: inherit; font-size: .98rem; font-weight: 600; cursor: pointer; transition: background-color .2s, border-color .2s; }
.button:hover { border-color: var(--ai); }
.button-ghost { min-height: 40px; padding: 4px 18px; font-size: .86rem; background: transparent; color: var(--washi); border-color: var(--line); }
.button-ghost:hover { color: var(--ink); }

/* Hero */
.hero .wrap { display: grid; justify-items: center; text-align: center; gap: 30px; padding-block: 12px 120px; position: relative; }
.enso-box { position: relative; width: min(460px, 100%); aspect-ratio: 1; display: grid; place-items: center; }
.enso-box::before { content: ""; position: absolute; inset: -18%; background: radial-gradient(closest-side, var(--glow), transparent 72%); }
.enso-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.tate { position: relative; writing-mode: vertical-rl; font-size: clamp(1.25rem, 3.6vw, 1.9rem); font-weight: 500; letter-spacing: .22em; line-height: 2.1; text-align: start; }
.hero h1 { font-size: clamp(2.2rem, 4.5vw, 3.9rem); }
.hero-lead { color: var(--mist); font-size: 1.08rem; max-width: 30em; }

/* Sections */
.section > .wrap { display: grid; gap: 56px; padding-block: clamp(84px, 12vw, 150px); }
.section h2 { font-size: clamp(2.1rem, 5vw, 3.9rem); text-align: center; }
.head { display: grid; gap: 18px; justify-items: center; text-align: center; }
.head p { color: var(--mist); max-width: 32em; }

/* Demo */
.stage { width: 100%; max-width: 900px; justify-self: center; background: var(--stage); border: 1px solid var(--stage-line); border-radius: 24px; }
.talk { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; padding: 40px 40px 20px; align-items: center; }
.talk-said { display: grid; gap: 12px; justify-items: start; }
.talk-label { font-family: var(--mono); font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--stage-muted); }
.step { min-height: 48px; padding: 11px 16px; border: 1px solid var(--stage-line); border-radius: 16px 16px 16px 4px; background: var(--pane); color: var(--washi); font: inherit; font-size: .95rem; line-height: 1.45; text-align: left; cursor: pointer; transition: opacity .35s, border-color .2s; }
.step:disabled { cursor: default; }
.step:hover, .step[aria-pressed="true"] { border-color: var(--ai); }
.step-replay { margin-top: 8px; min-height: 36px; padding: 4px 14px; border-radius: 999px; background: transparent; color: var(--stage-muted); font-size: .8rem; }
/* Which requests have not been made yet is decided in landing.js; one it marks as not reached is dimmed here. */
.step[data-reached="false"] { opacity: .35; }
.phone-wrap { position: relative; display: grid; gap: 14px; justify-items: center; }
.phone-wrap::before { content: "→"; position: absolute; left: -38px; top: 50%; color: var(--ai); font-family: var(--mono); }
.phone { width: 100%; max-width: 260px; padding: 10px; border-radius: 30px; background: var(--stage-line); }
.screen { display: grid; padding: 16px; border-radius: 21px; background: var(--app); color: var(--app-text); font-size: .84rem; line-height: 1.5; text-align: left; }
.screen h3 { font-size: 1rem; padding-bottom: 10px; }
.rain { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; padding: 9px 11px; border-radius: 11px; background: var(--app-soft); color: var(--app-accent); font-weight: 600; }
.switch { width: 30px; height: 18px; border-radius: 9px; background: var(--app-accent); position: relative; flex: none; }
.switch::after { content: ""; position: absolute; right: 2px; top: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--app); }
.screen li { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--app-line); }
.pill { padding: 1px 10px; border-radius: 999px; font-size: .72rem; border: 1px solid var(--app-line); color: var(--app-muted); white-space: nowrap; }
.pill.yes { background: var(--app-accent); border-color: var(--app-accent); color: var(--app); }
.duty { margin-top: 10px; padding: 9px 11px; border: 1px dashed var(--app-accent); border-radius: 11px; display: flex; justify-content: space-between; gap: 8px; }
.duty span { color: var(--app-muted); }
.kept { font-family: var(--mono); font-size: .76rem; color: var(--stage-ok); }
.stage-note { padding: 0 40px 22px; font-size: .74rem; color: var(--stage-muted); }
.s2, .s3 { transition: opacity .5s ease; }
.grow { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .5s ease, opacity .5s ease; }
.grow > * { min-height: 0; overflow: hidden; }
/* Which parts a request has not reached yet is decided in landing.js; a part it marks hidden is folded away here. */
.stage :is(.s2, .s3)[aria-hidden="true"] { opacity: 0; grid-template-rows: 0fr; }

/* After the weekly list: what is left */
.after { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px; }
.after li { display: grid; gap: 14px; align-content: start; padding-top: 22px; border-top: 1px solid var(--washi); padding-bottom: 6px; }
.after b { font-family: var(--display); font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.15; }
.after p { color: var(--mist); font-size: .98rem; }

/* Three kanji */
.kanji { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 40px; text-align: center; }
.kanji li { display: grid; gap: 12px; justify-items: center; align-content: start; }
.kanji b { font-family: var(--mincho); font-size: clamp(3.2rem, 7.4vw, 5.8rem); white-space: nowrap; font-weight: 500; line-height: 1.1; letter-spacing: .06em; }
.kanji p { color: var(--mist); max-width: 17em; font-size: .98rem; }
.enso-line { justify-self: center; max-width: 34em; text-align: center; font-size: 1.12rem; }
.enso-line b { font-family: var(--mincho); font-weight: 500; font-size: 1.4em; margin-right: .3em; }

/* Comparison table */
.versus-scroll { overflow-x: auto; max-width: 100%; position: relative; }
.versus { width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 0; font-size: .94rem; }
.versus th, .versus td { padding: 18px 12px; text-align: center; border-bottom: 1px solid var(--line); }
.versus thead th { font-size: .82rem; font-weight: 500; color: var(--mist); vertical-align: bottom; line-height: 1.35; }
.versus tbody th { text-align: left; font-weight: 500; padding-left: 0; }
.versus td { font-size: 1.3rem; color: var(--washi); line-height: 0; position: relative; }
.versus td.no { color: var(--mist); }
.versus .us { background: var(--soft); color: var(--ai); }
.versus thead .us { font-family: var(--display); font-size: 1.05rem; font-weight: 600; letter-spacing: .1em; border-radius: 16px 16px 0 0; }
.versus thead .us small { display: block; font-family: var(--mono); font-size: .62rem; font-weight: 400; letter-spacing: .08em; }
.versus tbody tr:last-child .us { border-radius: 0 0 16px 16px; border-bottom-color: transparent; }

/* Tree rings */
.grow-sec > .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
.grow-sec h2 { text-align: left; }
.grow-copy { display: grid; gap: 20px; }
.grow-copy p:not(.label) { color: var(--mist); max-width: 26em; }
.rings { width: 100%; max-width: 460px; height: auto; justify-self: center; }
.rings .ring { fill: none; stroke: var(--washi); stroke-width: 1.3; }
.rings .next { fill: none; stroke: var(--mist); stroke-width: 1.1; stroke-dasharray: 3 6; }
.rings .core { fill: var(--ai); }
.rings .lead-line { stroke: var(--line); stroke-width: 1; }
.rings text { fill: var(--washi); font-family: var(--sans); font-size: 12px; }
.rings text.dim { fill: var(--mist); }
.how { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; counter-reset: how; text-align: center; position: relative; }
.how li { display: grid; gap: 8px; justify-items: center; align-content: start; counter-increment: how; }
.how li::before { font-family: var(--mincho); font-size: 1.1rem; color: var(--ai); width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--ai); border-radius: 50%; margin-bottom: 10px; content: none; }
.how h3 { font-family: var(--display); font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
.how p { color: var(--mist); }
.scenes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.scenes li { display: grid; gap: 8px; align-content: start; padding: 26px 22px; background: var(--ink); }
.scenes svg { width: 26px; height: 26px; fill: none; stroke: var(--ai); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }
.scenes h3 { font-size: 1rem; font-weight: 600; }
.scenes span { font-size: .8rem; color: var(--mist); }
.center { text-align: center; justify-self: center; }
.closing .wrap { justify-items: center; text-align: center; gap: 30px; }
.closing .ja { font-size: clamp(1.9rem, 5.6vw, 4.4rem); font-weight: 500; letter-spacing: .08em; line-height: 1.5; }
.closing h2 { font-size: clamp(1.4rem, 2.6vw, 2rem); color: var(--mist); letter-spacing: -.02em; }
.faq { width: 100%; max-width: 760px; justify-self: center; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; gap: 16px; padding: 20px 0; font-weight: 500; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--mono); color: var(--mist); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: 22px; color: var(--mist); font-size: .96rem; }
.site-footer .wrap { flex-wrap: wrap; padding-block: 30px 44px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--mist); display: grid; gap: 18px; justify-content: stretch; }
@media (max-width: 480px) {
  .wrap { padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); }
  body { font-size: 16px; }
}

/* The idea: garden and three statements */
.manifesto > .wrap { justify-items: center; gap: 52px; }
.hero .label { color: var(--ai); }

/* Brand logo: the existing ZENREI wordmark and its seal */
.logo { display: block; height: 26px; width: auto; }
.seal-box { fill: none; stroke: var(--seal); stroke-width: 1; }
.seal-ink { fill: var(--seal); }
.rakkan { position: absolute; right: 7%; bottom: 9%; width: clamp(38px, 11%, 54px); height: auto; }
.rakkan .seal-box { stroke-width: 1.4; }

/* Signature under the depth diagram */
.sig { display: grid; gap: 14px; justify-items: center; justify-self: center; max-width: 30em; text-align: center; padding-top: 44px; border-top: 1px solid var(--line); color: var(--mist); font-size: .96rem; }
.sig-code { font-family: var(--mono); font-size: clamp(1.2rem, 2.6vw, 1.7rem); letter-spacing: .04em; color: var(--washi); }
.sig-code span { font-size: 1.05em; }
.sig a { color: var(--ai); }

/* Hero: what it is, at a glance */
.hero .hero-grid { grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); justify-items: start; text-align: left; align-items: center; gap: 40px; padding-block: 30px 110px; }
.hero-copy { display: grid; gap: 26px; justify-items: start; min-width: 0; }
.hero .enso-box { justify-self: center; width: min(500px, 100%); }
.prompt { display: flex; align-items: center; gap: 14px; width: 100%; max-width: 520px; padding: 8px 8px 8px 20px; border: 1px solid var(--stage-line); border-radius: 18px; background: var(--ink-2); text-decoration: none; transition: border-color .2s; }
.prompt:hover { border-color: var(--ai); }
.prompt-text { flex: 1; min-width: 0; font-size: 1rem; color: var(--washi); }
.prompt-text::before { content: "›"; margin-right: 12px; font-family: var(--mono); color: var(--ai); }
.prompt-text::after { content: ""; display: inline-block; width: 2px; height: 1.1em; margin-left: 4px; vertical-align: -.18em; background: var(--ai); }
.prompt-go { flex: none; padding: 9px 18px; border-radius: 12px; background: var(--ai); color: var(--ink); font-size: .9rem; font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; }

/* ZENREI-lang, written out faintly behind the hero */
.hero { position: relative; overflow: hidden; }
.lang-bg { position: absolute; margin: 0; font-family: var(--mono); font-size: 12.5px; color: var(--code-ink); white-space: pre; pointer-events: none; user-select: none; column-count: 2; column-gap: 72px; left: 50%; right: auto; transform: translateX(-50%); width: min(1180px, 100%); padding-inline: 24px; top: 58px; line-height: 2.75; -webkit-mask-image: linear-gradient(90deg, transparent, rgba(0,0,0,.36) 9%, rgba(0,0,0,.36) 44%, #000 60%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, rgba(0,0,0,.36) 9%, rgba(0,0,0,.36) 44%, #000 60%, #000 90%, transparent); }
.lang-bg b { font-weight: 400; color: var(--code-key); }
.lang-bg .ln { display: block; animation: write .45s steps(44, end) backwards; animation-delay: calc(var(--n) * .075s + .1s); break-inside: avoid; overflow: hidden; }
@keyframes write { from { clip-path: inset(0 100% 0 0); } }
.lang-cap { position: absolute; font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--mist); white-space: nowrap; right: auto; left: 50%; transform: translateX(-50%); bottom: 44px; }
@media (prefers-reduced-motion: reduce) {
  .s2, .s3, .grow, .step, .button { transition: none; }
  .lang-bg .ln { animation: none; }
}

/* Garden and depth drawings */
.garden { width: 100%; height: auto; display: block; border-radius: 20px; background: var(--ink-2); border: 1px solid var(--line); aspect-ratio: 2240 / 760; }
.creed3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 36px; text-align: left; }
.creed3 li { display: grid; gap: 10px; align-content: start; }
.creed3 b { font-family: var(--display); font-size: 1.25rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.25; }
.creed3 p { color: var(--mist); font-size: .96rem; }
.depth { display: grid; justify-items: center; width: 100%; }
.surface { display: flex; align-items: center; gap: 28px; padding: 16px 20px; border-radius: 16px; background: var(--app); color: var(--app-accent); font-weight: 600; font-size: 1.02rem; }
.depth-field { position: relative; width: 100%; }
.depth-field canvas { display: block; width: 100%; height: auto; -webkit-mask-image: linear-gradient(#000 62%, transparent); mask-image: linear-gradient(#000 62%, transparent); aspect-ratio: 2240 / 1040; }
.strata li { position: absolute; left: 0; transform: translateY(-50%); padding: 2px 10px 2px 0; background: var(--ink-2); font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mist); }
.depth .sig { border-top: 0; padding-top: 0; margin-top: -24px; position: relative; }

/* Screen-reader text, comparison marks, steps */
#week .after { text-align: center; }
#week .after li { border-top: 0; padding-top: 0; }
#week .after b { color: var(--ai); font-size: clamp(1.25rem, 2.1vw, 1.7rem); }
.dot { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid currentColor; vertical-align: middle; }
.dot.full { background: currentColor; }
.dot.half { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.dot.none { opacity: .4; }
.legend .dot { width: 11px; height: 11px; margin: 0 4px 0 10px; }
.legend .dot:first-child { margin-left: 0; }
.how svg { width: 84px; height: 84px; padding: 16px; margin-bottom: 12px; border: 1px solid var(--ai); border-radius: 50%; fill: none; stroke: var(--washi); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }

/* Shown only on narrow screens */
.swipe { display: none; }
@media (max-width: 860px) {
  .talk { grid-template-columns: minmax(0, 1fr); gap: 56px; padding: 26px 20px 16px; }
  .phone-wrap::before { content: "↓"; left: 50%; top: -40px; }
  .stage-note { padding: 0 20px 18px; }
  .after, .kanji, .how, .grow-sec > .wrap { grid-template-columns: minmax(0, 1fr); }
  .grow-sec h2 { text-align: center; }
  .grow-copy { justify-items: center; text-align: center; }
  .scenes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; padding-block: 16px 80px; }
  .lang-bg { width: 100%; font-size: 11px; column-count: 1; opacity: .32; }
  .creed3 { grid-template-columns: minmax(0, 1fr); }
  .strata li { font-size: .58rem; letter-spacing: .06em; }
  .garden { aspect-ratio: auto; height: 270px; }
  .swipe { display: block; text-align: center; }
  .versus { min-width: 640px; }
  .depth-field canvas { aspect-ratio: auto; height: 340px; }
  .strata { display: none; }
  .depth .sig { margin-top: 4px; }
}

/* Grid children must be allowed to shrink, or a wide table widens the whole page */
.hero .wrap > * { min-width: 0; }
.site-header .lang-pick { margin-left: auto; }
.site-header .lang-pick + .button { margin-left: 0; }

/* Language picker, top right */
.site-header .back { margin-left: auto; }

/* Waiting list is not open yet: say so, and give the address */
.soon { display: grid; gap: 10px; justify-items: center; }
.soon-line { font-family: var(--display); font-size: 1.2rem; font-weight: 500; }

/* The weekly tangle: one list. On wide screens each item's "before" and "after" sit either side of the threads. */
.untangle { width: 100%; border-top: 1px solid var(--line); }
.untangle > li { display: grid; gap: 6px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.untangle .was { display: grid; gap: 4px; }
.untangle s { color: var(--mist); font-size: .9rem; line-height: 1.35; }
.untangle b { font-family: var(--display); font-size: 1.18rem; font-weight: 500; letter-spacing: -.02em; line-height: 1.25; }
.untangle .threads { display: none; }

/* Where we are: two labelled groups, so the state of each item is in words at every width */
.track { display: grid; gap: 28px; width: 100%; }
.track h3 { padding-bottom: 12px; margin-bottom: 20px; border-bottom: 1px dashed var(--mist); font-family: var(--mono); font-size: .7rem; font-weight: 400; letter-spacing: .16em; text-transform: uppercase; color: var(--mist); }
.track .done h3 { border-bottom: 1px solid var(--washi); color: var(--washi); }
.track li { position: relative; padding: 0 0 26px 36px; font-size: .92rem; line-height: 1.4; color: var(--mist); }
.track li::before { content: ""; position: absolute; top: 3px; left: 0; width: 16px; height: 16px; border-radius: 50%; border: 1.5px dashed var(--mist); background: var(--ink-2); z-index: 1; }
.track li::after { content: ""; position: absolute; top: 12px; left: 7px; height: 100%; border-left: 1.5px dashed var(--mist); }
.track li:last-child::after { content: none; }
.track .done li { color: var(--washi); }
.track .done li::before { border: 0; background: var(--washi); }
.track .done li::after { border-left: 1.5px solid var(--washi); }
@media (min-width: 861px) {
  .untangle { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr) minmax(0, 1fr); grid-template-rows: repeat(5, 84px); column-gap: 20px; border-top: 0; }
  .untangle > li, .untangle .threads { display: contents; }
  .untangle .was { grid-column: 1; align-content: center; justify-items: end; text-align: right; }
  .untangle b { grid-column: 3; align-self: center; }
  .untangle > li:nth-child(1) > * { grid-row: 1; }
  .untangle > li:nth-child(2) > * { grid-row: 2; }
  .untangle > li:nth-child(3) > * { grid-row: 3; }
  .untangle > li:nth-child(4) > * { grid-row: 4; }
  .untangle > li:nth-child(5) > * { grid-row: 5; }
  .untangle canvas { grid-column: 2; grid-row: 1 / span 5; display: block; width: 100%; height: 100%; }
  .track { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .track h3 { text-align: center; }
  .track ol { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .track li { padding: 40px 10px 0; text-align: center; }
  .track li::before { top: 4px; left: 50%; margin-left: -8px; }
  .track li::after { left: 50%; width: 100%; height: 0; border-left: 0; border-top: 1.5px dashed var(--mist); }
  .track .done li::after { border-left: 0; border-top: 1.5px solid var(--washi); }
}
