/* Clementina — shared styles. Light, calm, editorial. */

/* ---------- fonts (self-hosted, SIL Open Font License) ---------- */
@font-face { font-family: Fraunces; font-style: normal; font-weight: 300; font-display: swap; src: url(/assets/fonts/fraunces-latin-300-normal.woff2) format('woff2'); }
@font-face { font-family: Fraunces; font-style: italic; font-weight: 300; font-display: swap; src: url(/assets/fonts/fraunces-latin-300-italic.woff2) format('woff2'); }
@font-face { font-family: Karla; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/assets/fonts/karla-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Karla; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/assets/fonts/karla-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

/* ---------- tokens ---------- */
:root {
  --cream: #FBF5EC;
  --paper: #FFFCF7;
  --ink: #23402B;
  --ink-soft: rgba(35, 64, 43, 0.74);
  --ink-faint: rgba(35, 64, 43, 0.56);
  --sage: #5F6E4B;
  --amber: #8F5D0C;
  --orange: #F9A72B;
  --line: rgba(35, 64, 43, 0.14);
  --sky: linear-gradient(180deg, #CCD8E2 0%, #DCE2E7 24%, #ECE2DB 44%, #F6DBC6 60%, #FAE6D4 74%, #FBEFE3 100%);
  --serif: Fraunces, 'Iowan Old Style', Georgia, serif;
  --sans: Karla, system-ui, -apple-system, sans-serif;
  --gutter: clamp(20px, 5vw, 64px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--cream); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; }
img { max-width: 100%; display: block; }
input, button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 6px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Paper grain over the whole page, like the app. */
body::after { content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; background: url(/assets/grain.png) repeat; background-size: 180px; opacity: 0.075; mix-blend-mode: multiply; }

.serif { font-family: var(--serif); font-weight: 300; font-variation-settings: "SOFT" 50; }
.wrap { max-width: 1160px; margin: 0 auto; }
.kicker { font-size: 12.5px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sage); }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* ---------- header ---------- */
.top { position: absolute; z-index: 5; top: 0; left: 0; right: 0; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 18px var(--gutter); }
.top-links { display: flex; gap: 22px; font-size: 14px; }
.top-links a { text-decoration: none; color: var(--ink-soft); }
.top-links a:hover { color: var(--ink); }
.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; }
.brand img { width: 26px; height: 26px; }
.brand span { font-family: var(--serif); font-weight: 300; font-size: 23px; letter-spacing: -0.01em; line-height: 1; }
.lang { justify-self: end; display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255, 252, 247, 0.5); border: 1px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.lang a { padding: 5px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; letter-spacing: 0.06em; text-decoration: none; color: var(--ink-faint); }
.lang a:hover { color: var(--ink); }
.lang a[aria-current="page"] { background: var(--ink); color: var(--paper); }
@media (max-width: 760px) { .top-links { display: none; } .top { grid-template-columns: 1fr auto; } .brand { justify-self: start; } }

/* ---------- dawn hero ---------- */
.dawn { position: relative; overflow: hidden; isolation: isolate; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; background: var(--sky); }
.dawn-art { position: absolute; z-index: -2; inset: 0; }
.dawn-art picture { display: block; width: 100%; height: 100%; }
.dawn-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; animation: dawn-reveal 2.2s var(--ease-out) 0.1s both; }
.dawn-mist { position: absolute; z-index: -1; left: -20%; right: -20%; bottom: 16%; height: 30%; background: radial-gradient(40% 50% at 30% 60%, rgba(255, 249, 240, 0.55), transparent 70%), radial-gradient(35% 45% at 72% 50%, rgba(255, 249, 240, 0.45), transparent 70%); animation: mist-drift 60s ease-in-out infinite alternate, fade-in 3s ease 1s both; }
/* Soft hand-off from the grove into the cream page. */
.dawn::before { content: ""; position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: 8%; background: linear-gradient(180deg, transparent, var(--cream)); }
.dawn-inner { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; text-align: center; padding: clamp(128px, 24vh, 240px) var(--gutter) 21vh; }
.dawn .kicker { margin-bottom: 20px; animation: rise 1.4s var(--ease-out) 0.45s both; }
.dawn .kicker::before { content: ""; display: inline-block; width: 6px; height: 6px; margin: 0 9px 1px 0; border-radius: 999px; background: var(--orange); vertical-align: middle; }
.dawn h1 { margin: 0; max-width: 13em; font-family: var(--serif); font-weight: 300; font-size: clamp(38px, 5.4vw, 74px); line-height: 1.05; letter-spacing: -0.02em; text-wrap: balance; animation: rise 1.4s var(--ease-out) 0.6s both; }
.dawn h1 em { font-style: italic; }
.dawn-lead { margin: 18px auto 0; max-width: 31em; font-size: clamp(16px, 1.5vw, 19px); line-height: 1.55; color: var(--ink-soft); text-wrap: pretty; animation: rise 1.4s var(--ease-out) 0.75s both; }
.dawn .signup { animation: rise 1.4s var(--ease-out) 0.9s both; }

@media (max-aspect-ratio: 4/5) {
  .dawn-inner { padding-bottom: 34vh; }
}
@media (max-height: 700px) and (max-aspect-ratio: 4/5) {
  .dawn-inner { padding-top: 104px; padding-bottom: 17vh; }
  .dawn h1 { font-size: clamp(32px, 9vw, 40px); }
  .dawn-lead { margin-top: 12px; font-size: 15.5px; }
}

@keyframes dawn-reveal { from { opacity: 0; filter: blur(24px); transform: scale(1.04); } to { opacity: 1; filter: blur(0); transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes mist-drift { from { transform: translateX(-4%); } to { transform: translateX(4%); } }

/* ---------- sign-up ---------- */
.signup { width: 100%; max-width: 460px; margin: 30px auto 0; }
.signup form { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pill { display: flex; width: 100%; padding: 5px; border-radius: 999px; background: rgba(255, 252, 247, 0.72); border: 1px solid rgba(35, 64, 43, 0.16); box-shadow: 0 10px 40px rgba(120, 84, 50, 0.08); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: border-color .3s, box-shadow .3s; }
.pill:focus-within { border-color: rgba(35, 64, 43, 0.4); box-shadow: 0 10px 40px rgba(120, 84, 50, 0.12); }
.pill input { flex: 1; min-width: 0; padding: 12px 8px 12px 18px; border: 0; background: transparent; font-size: 16px; outline: none; }
.pill input::placeholder { color: var(--ink-faint); }
.pill button { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border: 0; border-radius: 999px; background: var(--ink); color: var(--paper); font-size: 15px; font-weight: 600; cursor: pointer; transition: background .25s; }
.pill button:hover { background: #1A3221; }
.pill button:disabled { opacity: .7; cursor: default; }
.pill button svg { width: 14px; height: 14px; }
.device { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--ink-soft); }
.device-toggle { display: flex; padding: 3px; border-radius: 999px; background: rgba(255, 252, 247, 0.5); border: 1px solid var(--line); }
.device-toggle button { padding: 5px 14px; border: 0; border-radius: 999px; background: transparent; font-size: 13.5px; font-weight: 600; color: var(--ink-faint); cursor: pointer; transition: background .25s, color .25s; }
.device-toggle button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 4px rgba(35, 64, 43, 0.12); }
.fine { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-faint); text-wrap: balance; }
.fine a { text-underline-offset: 2px; }
.form-error { margin: 0; padding: 10px 14px; border-radius: 12px; background: rgba(251, 228, 224, 0.85); font-size: 14px; line-height: 1.45; color: #7A2A18; }
.sent { padding: 8px 0; animation: rise 1s var(--ease-out) both; }
.sent-title { font-family: var(--serif); font-weight: 300; font-style: italic; font-size: clamp(30px, 3.4vw, 40px); line-height: 1.1; }
.sent p { margin: 10px auto 0; max-width: 24em; font-size: 16.5px; color: var(--ink-soft); }
@media (max-width: 380px) {
  .pill input { padding-left: 14px; font-size: 15.5px; }
  .pill button { padding: 11px 15px; font-size: 14.5px; }
  .pill button svg { display: none; }
}

/* ---------- story sections ---------- */
.section { padding: clamp(56px, 8vw, 112px) var(--gutter); }
.section + .section { padding-top: 0; }
.statement { margin: 18px 0 0; max-width: 22em; font-family: var(--serif); font-weight: 300; font-size: clamp(28px, 3.6vw, 50px); line-height: 1.16; letter-spacing: -0.018em; text-wrap: pretty; }
.statement em { font-style: italic; color: var(--amber); }
.h2 { margin: 16px 0 0; max-width: 18em; font-family: var(--serif); font-weight: 300; font-size: clamp(28px, 3.2vw, 44px); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
.lead { margin: 18px 0 0; max-width: 34em; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.6; color: var(--ink-soft); text-wrap: pretty; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 28px 48px; margin-top: clamp(48px, 6vw, 80px); padding-top: 28px; border-top: 1px solid var(--line); }
.steps h3 { margin: 10px 0 0; font-size: 18px; font-weight: 600; }
.steps p { margin: 8px 0 0; font-size: 16px; line-height: 1.55; color: var(--ink-soft); text-wrap: pretty; }
.num { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: 22px; color: var(--amber); }

/* A look inside: three phones */
.phones { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 4vw, 64px); align-items: start; margin-top: clamp(32px, 4vw, 56px); }
.phones figure { margin: 0; }
.phones figure:nth-child(2) { margin-top: clamp(24px, 3.5vw, 56px); }
.phones figure:nth-child(3) { margin-top: clamp(12px, 1.8vw, 28px); }
.phone { position: relative; aspect-ratio: 9 / 19.5; max-width: 260px; margin: 0 auto; padding: 9px; border-radius: 44px; background: #1F2A22; box-shadow: 0 40px 80px -30px rgba(80, 60, 40, 0.35), 0 12px 30px -12px rgba(35, 64, 43, 0.25); }
.phone::before { content: ""; position: absolute; z-index: 2; top: 20px; left: 50%; width: 30%; height: 22px; transform: translateX(-50%); border-radius: 999px; background: #1F2A22; }
.phone-screen { height: 100%; overflow: hidden; border-radius: 36px; background: linear-gradient(180deg, #F6DFCB 0%, #FBF1E6 40%, #FBF5EC 100%); }
.phone-screen > img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
/* Real app screenshots (status bar cropped): a band in the screen's own top colour holds the notch. */
.phone-screen.shot { display: flex; flex-direction: column; justify-content: flex-end; background: var(--top, #F4E8D8); }
.phone-screen.shot > img { height: auto; flex: 0 0 auto; }
.phones figcaption { max-width: 300px; margin: 22px auto 0; text-align: center; }
.phones figcaption strong { display: block; font-family: var(--serif); font-weight: 300; font-size: 22px; line-height: 1.2; }
.phones figcaption span { display: block; margin-top: 6px; font-size: 15px; color: var(--ink-soft); }
@media (max-width: 760px) {
  .phones { display: flex; gap: 18px; margin-left: calc(var(--gutter) * -1); margin-right: calc(var(--gutter) * -1); padding: 0 var(--gutter) 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .phones::-webkit-scrollbar { display: none; }
  .phones figure { flex: 0 0 68%; scroll-snap-align: center; margin-top: 0 !important; }
}

/* How Clementina talks to you: one quote at a time */
.voice { position: relative; padding: clamp(48px, 7vw, 96px) var(--gutter); background: linear-gradient(180deg, var(--cream) 0%, #F7E8DA 50%, var(--cream) 100%); text-align: center; }
.quotes { display: grid; max-width: 900px; margin: 34px auto 0; }
.quote { grid-area: 1 / 1; margin: 0; opacity: 0; transform: translateY(8px); transition: opacity 1.4s ease, transform 1.4s var(--ease-out); }
.quote.is-active { opacity: 1; transform: none; }
.quote p { margin: 0; font-family: var(--serif); font-weight: 300; font-style: italic; font-size: clamp(24px, 3.2vw, 42px); line-height: 1.16; letter-spacing: -0.015em; text-wrap: balance; }
.quote p::before { content: "\201C"; } .quote p::after { content: "\201D"; }
:lang(es) .quote p::before { content: "\00AB"; } :lang(es) .quote p::after { content: "\00BB"; }
.quote cite { display: block; margin-top: 20px; font-style: normal; font-size: 12.5px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sage); }
.voice-note { margin: 24px auto 0; max-width: 34em; font-size: 15px; color: var(--ink-faint); }

/* Privacy */
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 40px clamp(40px, 7vw, 110px); }
.points { list-style: none; margin: 0; padding: 0; }
.points li { padding: 22px 0; border-top: 1px solid var(--line); }
.points li:last-child { border-bottom: 1px solid var(--line); }
.points h3 { margin: 0; font-family: var(--serif); font-weight: 300; font-size: 23px; line-height: 1.25; }
.points p { margin: 6px 0 0; font-size: 16px; line-height: 1.55; color: var(--ink-soft); }

/* Who it's for */
.who { margin: 30px 0 0; max-width: 52em; font-family: var(--serif); font-weight: 300; font-size: clamp(20px, 2vw, 26px); line-height: 1.6; color: var(--ink-soft); text-wrap: pretty; }
.who span { white-space: nowrap; }
@media (max-width: 420px) { .who span { white-space: normal; } }
.who span:not(:last-child)::after { content: "·"; margin: 0 .5em; color: var(--orange); }

/* Questions */
.qa { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 32px clamp(40px, 6vw, 96px); align-items: start; }
.qa .lead { font-size: 16px; }
@media (max-width: 860px) { .qa { grid-template-columns: 1fr; } }
.faq { border-top: 1px solid var(--line); }
.faq-points { list-style: none; margin: 0; padding: 0 0 26px; max-width: 42em; }
.faq-points li { position: relative; padding: 6px 0 6px 18px; font-size: 16px; line-height: 1.55; color: var(--ink-soft); }
.faq-points li::before { content: ""; position: absolute; left: 0; top: 15px; width: 6px; height: 6px; border-radius: 999px; background: var(--orange); }
.faq-points b { font-weight: 600; color: var(--ink); }
.faq details > p + .faq-points { margin-top: -12px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 20px 0; cursor: pointer; list-style: none; font-family: var(--serif); font-weight: 300; font-size: clamp(20px, 2vw, 25px); line-height: 1.3; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: 0 0 auto; width: 11px; height: 11px; margin-right: 4px; border-right: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg) translateY(-3px); transition: transform .35s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq details p { margin: -4px 0 0; padding: 0 0 22px; max-width: 42em; font-size: 17px; line-height: 1.65; color: var(--ink-soft); text-wrap: pretty; }

/* Closing dawn strip */
.closing { position: relative; overflow: hidden; isolation: isolate; padding: clamp(56px, 8vw, 104px) var(--gutter) clamp(200px, 24vw, 330px); text-align: center; background: linear-gradient(180deg, var(--cream) 0%, #F5E1CF 45%, #EFD3BE 100%); }
.closing-art { position: absolute; z-index: -1; left: 0; right: 0; bottom: 0; height: clamp(300px, 36vw, 520px); }
.closing-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 55%); mask-image: linear-gradient(180deg, transparent 0%, #000 55%); }
.closing .h2 { margin-left: auto; margin-right: auto; }
.closing .lead { margin-left: auto; margin-right: auto; }

/* Footer */
.foot { padding: 36px var(--gutter) 44px; background: #53613F; color: rgba(255, 252, 247, 0.8); font-size: 14px; }
.foot .wrap { display: flex; flex-direction: column; gap: 22px; }
.foot p { margin: 0; max-width: 60em; line-height: 1.6; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 26px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--paper); text-decoration: underline; text-underline-offset: 3px; }
.foot .brand span { color: var(--paper); }

/* ---------- standalone sign-up page (QR) ---------- */
.solo .dawn-inner { justify-content: center; padding-top: 120px; padding-bottom: 30vh; }
.solo .dawn h1 { font-size: clamp(36px, 4.9vw, 66px); }
@media (max-height: 700px) and (max-aspect-ratio: 4/5) { .solo .dawn-inner { padding-top: 96px; padding-bottom: 17vh; } }
.solo-foot { position: absolute; z-index: 2; left: 0; right: 0; bottom: 14px; text-align: center; font-size: 12.5px; color: rgba(255, 252, 247, 0.85); }
.solo-foot a { text-decoration: none; }
.solo-foot a:hover { text-decoration: underline; }

/* ---------- privacy pages ---------- */
.doc-top { position: relative; padding-bottom: 0; }
.doc-head { padding: 120px var(--gutter) 48px; background: var(--sky); }
.doc-head h1 { margin: 14px 0 0; font-family: var(--serif); font-weight: 300; font-size: clamp(38px, 5vw, 64px); line-height: 1.05; letter-spacing: -0.02em; }
.doc { max-width: 760px; margin: 0 auto; padding: 56px var(--gutter) 96px; }

/* ---------- motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* Small text over the photo: a soft light halo keeps it readable on leaves and mist. */
.dawn .fine, .dawn .device > span { color: var(--ink-soft); text-shadow: 0 0 6px rgba(255, 250, 242, 0.95), 0 0 14px rgba(255, 250, 242, 0.9), 0 0 24px rgba(255, 250, 242, 0.7); }
.dawn .fine a { color: var(--ink); }
@media (max-width: 420px) { .wide-only { display: none; } }
