/* Koyomi landing page. Identity from the prototype (poc/Laque2.dc.html, Lumiere.dc.html):
   silk ground, ink text, gold for selections and hairlines, beni only for period data and the seal,
   square corners, 1px hairlines, no cards, uppercase labels tracked 0.42em, 850 ms motion. */
@font-face { font-family: 'Zen Old Mincho'; src: url('/fonts/mincho-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Zen Old Mincho'; src: url('/fonts/mincho-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Zen Kaku Gothic New'; src: url('/fonts/gothic-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Zen Kaku Gothic New'; src: url('/fonts/gothic-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  --silk: #F5EFE9; --raised: #FBF7F3; --ink: #2A2320; --mute: #77695F; --line: #E3D8CE;
  --beni: #9E3B3B; --on-beni: #FFF8F2; --gold: #B39367; --sakura: #EBCFCB;
  --l-silk: #0F0E0D; --l-ink: #ECE4D0; --l-mute: #A39A86; --l-line: #2A2621; --l-gold: #C9A55A;
  --ease: cubic-bezier(.2, .8, .2, 1); --slow: 850ms;
  --mincho: 'Zen Old Mincho', 'Hiragino Mincho ProN', 'Yu Mincho', Georgia, serif;
  --gothic: 'Zen Kaku Gothic New', 'Hiragino Sans', system-ui, -apple-system, sans-serif;
  --gutter: 24px;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--silk); color: var(--ink); font-family: var(--gothic); font-weight: 400; font-size: 16px; line-height: 1.75; overflow-x: hidden; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1px; text-decoration-color: var(--gold); transition: opacity var(--slow) var(--ease); }
a:hover { opacity: .7; }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--mincho); font-weight: 400; margin: 0; }
p { margin: 0; }
.m { font-family: var(--mincho); }
.g { font-family: var(--gothic); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 20; background: var(--ink); color: var(--silk); padding: 10px 16px; text-decoration: none; }
.skip:focus { top: 8px; }
.label { font-size: 11px; letter-spacing: .42em; text-transform: uppercase; color: var(--mute); line-height: 1.6; }
.numeral { font-family: var(--mincho); color: var(--gold); letter-spacing: 0; margin-right: 14px; font-size: 14px; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter); background: var(--silk); border-bottom: 1px solid var(--line); }
.mark { display: flex; align-items: baseline; gap: 12px; text-decoration: none; }
.mark .kanji { font-family: var(--mincho); font-size: 20px; color: var(--gold); }
.mark .word { font-size: 11px; letter-spacing: .42em; text-transform: uppercase; }
.top-cta { font-size: 11px; letter-spacing: .32em; text-transform: uppercase; text-decoration: none; min-height: 44px; display: flex; align-items: center; border-bottom: 1px solid var(--gold); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 56px; padding: 0 28px 0 calc(28px + .32em); border: 0; border-radius: 0; background: var(--ink); color: var(--silk); font: inherit; font-size: 12px; font-weight: 500; letter-spacing: .32em; text-transform: uppercase; text-decoration: none; cursor: pointer; text-align: center; line-height: 1.5;
  transition: background-color var(--slow) var(--ease), color var(--slow) var(--ease), transform var(--slow) var(--ease), opacity var(--slow) var(--ease); }
.btn:hover { opacity: 1; background: #3B322D; }
.btn:active { transform: scale(.97); }
.btn.gold { background: var(--gold); color: var(--ink); }
.btn.gold:hover { background: #C2A57C; }
.btn[disabled] { opacity: .55; cursor: progress; }

/* Hero */
.hero { min-height: calc(100svh - 64px); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 22px; padding: 28px var(--gutter) 56px; }
.hairline { width: 1px; height: 56px; background: var(--gold); transform-origin: top; }
.bloom { position: relative; width: min(74vw, 320px); aspect-ratio: 1; }
.flower { width: 100%; height: 100%; display: block; overflow: visible; }
.bloom-day { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; pointer-events: none; }
.bloom-day .label { font-size: 11px; }
.bloom-day .num { font-family: var(--mincho); font-size: clamp(44px, 13vw, 60px); line-height: 1; }
.hero h1 { font-size: clamp(25px, 6.6vw, 44px); line-height: 1.45; max-width: 19em; text-wrap: balance; }
.hero .btn { margin-top: 6px; }

/* Feature sections with a phone */
.feature { display: grid; gap: 40px; justify-items: center; padding: 72px var(--gutter); border-top: 1px solid var(--line); }
.copy { max-width: 30em; width: 100%; display: flex; flex-direction: column; gap: 16px; }
.copy h2, .night h2, .soin h2, .liste h2 { font-size: clamp(24px, 6vw, 34px); line-height: 1.45; text-wrap: balance; }
.copy p:not(.label), .night p:not(.label) { color: var(--mute); }
.phone { margin: 0; width: min(76vw, 300px); aspect-ratio: 390 / 844; border: 6px solid var(--ink); border-radius: 44px; overflow: hidden; background: var(--silk); }
.screen { display: block; width: 100%; height: 100%; }

/* Night (black lacquer, gold) */
.night { background: var(--l-silk); color: var(--l-ink); padding: 88px var(--gutter); }
.night-in { max-width: 30em; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.night .label { color: var(--l-mute); }
.night .numeral { color: var(--l-gold); }
.night p:not(.label) { color: var(--l-mute); }
.curve { width: 100%; height: auto; margin-top: 18px; border-top: 1px solid var(--l-gold); padding-top: 22px; }

/* Soin */
.soin { padding: 80px var(--gutter); max-width: calc(36em + 2 * var(--gutter)); margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.soin-head { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.seal { width: 40px; height: 40px; border-radius: 50%; background: var(--beni); color: var(--on-beni); display: inline-flex; align-items: center; justify-content: center; font-family: var(--mincho); font-size: 18px; line-height: 1; flex-shrink: 0; }
.soin-head .seal { margin-bottom: 8px; }
.perks { margin: 0; border-bottom: 1px solid var(--line); }
.perks div { padding: 16px 0; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.perks dt { font-family: var(--mincho); font-size: 18px; line-height: 1.5; }
.perks dd { margin: 0; color: var(--mute); font-size: 15px; line-height: 1.65; }
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; border: 0; padding: 0; margin: 0; min-width: 0; }
.plan { display: flex; flex-direction: column; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: 0; }
.plan-name, .plan-note { font-size: 13px; color: var(--mute); line-height: 1.5; }
.plan-price { font-family: var(--mincho); font-size: 24px; line-height: 1.3; }
.notice { font-size: 15px; line-height: 1.7; border-left: 1px solid var(--gold); padding-left: 16px; }
.soin .btn { align-self: flex-start; }

/* Waitlist */
.liste { border-top: 1px solid var(--gold); padding: 80px var(--gutter) 96px; }
.step { max-width: 30em; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.step[hidden] { display: none; }
.step > p:not(.label) { color: var(--mute); }
form { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.field-label { font-size: 11px; letter-spacing: .42em; text-transform: uppercase; color: var(--mute); }
input[type=email] { width: 100%; height: 56px; border: 1px solid var(--line); border-radius: 0; background: var(--raised); color: var(--ink); font: inherit; font-size: 17px; padding: 0 16px; transition: border-color var(--slow) var(--ease); }
input[type=email]:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
input[type=email][aria-invalid=true] { border-color: var(--beni); }
.check { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; font-size: 15px; line-height: 1.6; padding: 6px 0; }
.check input { appearance: none; -webkit-appearance: none; margin: 2px 0 0; width: 22px; height: 22px; flex-shrink: 0; border: 1px solid var(--gold); border-radius: 0; background: transparent; cursor: pointer; display: grid; place-content: center; transition: background-color var(--slow) var(--ease); }
.check input::after { content: ''; width: 10px; height: 5px; border-left: 1.4px solid var(--ink); border-bottom: 1.4px solid var(--ink); transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.check input:checked { background: var(--gold); }
.check input:checked::after { opacity: 1; }
.check input:focus-visible { outline: 1px solid var(--ink); outline-offset: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.error { color: var(--beni); font-size: 14px; min-height: 0; }
.error:empty { display: none; }
.fine { font-size: 13px; color: var(--mute); }
.pick { position: relative; cursor: pointer; transition: border-color var(--slow) var(--ease), background-color var(--slow) var(--ease); }
.pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pick:has(input:checked) { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.pick:has(input:focus-visible) { outline: 1px solid var(--ink); outline-offset: 3px; }
.step h2:focus { outline: none; }

/* Footer and legal pages */
.foot { border-top: 1px solid var(--line); padding: 36px var(--gutter) 48px; display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; font-size: 13px; color: var(--mute); }
.foot .kanji { font-family: var(--mincho); color: var(--gold); font-size: 18px; margin-right: auto; }
.foot a { min-height: 44px; display: inline-flex; align-items: center; }
.doc { max-width: 40em; margin: 0 auto; padding: 56px var(--gutter) 72px; display: flex; flex-direction: column; gap: 16px; }
.doc h1 { font-size: clamp(26px, 6vw, 34px); line-height: 1.4; margin-bottom: 12px; }
.doc p { line-height: 1.75; overflow-wrap: anywhere; }
.doc strong { font-weight: 500; }

@media (min-width: 860px) {
  :root { --gutter: 48px; }
  .feature { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; max-width: 1080px; margin: 0 auto; padding: 112px var(--gutter); gap: 64px; }
  .feature.alt .copy { order: 2; }
  .feature .copy { justify-self: end; }
  .feature.alt .copy { justify-self: start; }
  .phone { width: 320px; }
  .night { padding: 120px var(--gutter); }
}

/* Motion: once on load, slow, and only when the visitor allows it. */
@keyframes k-line { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes k-ring { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes kp-in { from { opacity: 0; transform: scale(.25); } to { opacity: 1; transform: none; } }
@keyframes kp-gold { 0% { stroke-width: 1; } 35% { stroke-width: 2.6; } 100% { stroke-width: 1; } }
@keyframes kroll { from { opacity: 0; transform: translateY(60%); } to { opacity: 1; transform: none; } }
@keyframes k-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes kstamp { 0% { opacity: 0; transform: scale(1.7) rotate(-8deg); } 30% { opacity: 1; transform: scale(.94) rotate(-3deg); } 45%, 100% { opacity: 1; transform: scale(1) rotate(-3deg); } }
@media (prefers-reduced-motion: no-preference) {
  .hairline { animation: k-line 1800ms cubic-bezier(.6, 0, .2, 1) both; }
  .ring { stroke-dasharray: 1; animation: k-ring 2400ms 200ms cubic-bezier(.4, 0, .2, 1) both; }
  .kp { transform-box: fill-box; transform-origin: center; animation: kp-in 900ms var(--ease) both; }
  .kp-now { animation: kp-in 900ms var(--ease) both, kp-gold 2400ms 2200ms ease-out both; }
  .roll { display: inline-block; animation: kroll 1100ms 1500ms var(--ease) both; }
  .bloom-day .label { animation: k-in 850ms 1500ms var(--ease) both; }
  .step:not([hidden]) { animation: k-in 850ms var(--ease) both; }
  .stamp { animation: kstamp 1900ms var(--ease) both; }
}
@media (prefers-reduced-motion: no-preference) {
.petals g:nth-child(1) .kp{animation-delay:348ms}
.petals g:nth-child(2) .kp{animation-delay:396ms}
.petals g:nth-child(3) .kp{animation-delay:444ms}
.petals g:nth-child(4) .kp{animation-delay:492ms}
.petals g:nth-child(5) .kp{animation-delay:540ms}
.petals g:nth-child(6) .kp{animation-delay:588ms}
.petals g:nth-child(7) .kp{animation-delay:636ms}
.petals g:nth-child(8) .kp{animation-delay:684ms}
.petals g:nth-child(9) .kp{animation-delay:732ms}
.petals g:nth-child(10) .kp{animation-delay:780ms}
.petals g:nth-child(11) .kp{animation-delay:828ms}
.petals g:nth-child(12) .kp{animation-delay:876ms}
.petals g:nth-child(13) .kp{animation-delay:924ms}
.petals g:nth-child(14) .kp{animation-delay:972ms}
.petals g:nth-child(15) .kp{animation-delay:1020ms}
.petals g:nth-child(16) .kp{animation-delay:1068ms}
.petals g:nth-child(17) .kp{animation-delay:1116ms}
.petals g:nth-child(18) .kp{animation-delay:1164ms}
.petals g:nth-child(19) .kp{animation-delay:1212ms}
.petals g:nth-child(20) .kp{animation-delay:1260ms}
.petals g:nth-child(21) .kp{animation-delay:1308ms}
.petals g:nth-child(22) .kp{animation-delay:1356ms}
.petals g:nth-child(23) .kp{animation-delay:1404ms}
.petals g:nth-child(24) .kp{animation-delay:1452ms}
.petals g:nth-child(25) .kp{animation-delay:1500ms}
.petals g:nth-child(26) .kp{animation-delay:1548ms}
.petals g:nth-child(27) .kp{animation-delay:1596ms}
.petals g:nth-child(28) .kp{animation-delay:1644ms}
.petals g .kp.kp-now{animation-delay:876ms, 2200ms}
}
