/* Delecto — landing page
   Mirrors the app's "Shell & Marble" theme (Views/Theme/Theme.swift):
   still dawn backdrop, serif headings, Botticelli palette, colorless shadows,
   one glass layer per stack, nothing animated. */

:root {
  color-scheme: light dark;

  /* Palette */
  --ink:          light-dark(#2B2622, #F1EBE1);
  --ivory:        light-dark(#FAF6F0, #EDE6DA);
  --shell:        light-dark(#F1DCD4, #4A3A3A);
  --gold:         light-dark(#B08D45, #D4B46A);
  --primary-fill: light-dark(#1C1C1E, #F5F5F7);
  --primary-text: light-dark(#FFFFFF, #111111);
  --celadon:      light-dark(#8DB3A0, #6F9C89);
  --madder:       light-dark(#C9827E, #B8726F);
  --ochre:        light-dark(#D3A45A, #C99F58);
  --slate:        light-dark(#8B98A5, #7C8894);
  --stage:        light-dark(#F1F1F1, #2B2B2B);

  /* Derived */
  --text:    var(--ink);
  --text-2:  color-mix(in srgb, var(--ink) 64%, transparent);
  --text-3:  color-mix(in srgb, var(--ink) 46%, transparent);
  --rim:     light-dark(rgb(43 38 34 / .10), rgb(237 230 218 / .12));
  --rim-strong: light-dark(rgb(43 38 34 / .18), rgb(237 230 218 / .20));
  --rim-hover: color-mix(in srgb, var(--gold) 60%, transparent);
  --glass-base:  light-dark(rgb(250 246 240 / .55), rgb(42 36 38 / .48));
  --glass-tint:  color-mix(in srgb, var(--shell) 22%, transparent);
  --glass-tint-hover: color-mix(in srgb, var(--shell) 40%, transparent);
  --glass-warning: color-mix(in srgb, var(--ochre) 30%, transparent);
  --chip-bg:   rgb(250 246 240 / .78);
  --keycap-bg: rgb(250 246 240 / .92);          /* ivory, fixed: keys are always light with dark text */
  --keycap-border: rgb(43 38 34 / .15);
  --on-pale: #2B2622;                            /* text on pale chips/keys, both themes */
  --code-bg: color-mix(in srgb, var(--ink) 9%, transparent);

  /* Dawn backdrop (DawnBackground.swift) */
  --dawn: linear-gradient(180deg,
    light-dark(#EEF2EE, #16191B) 0%,
    light-dark(#F9F5EF, #201D1C) 50%,
    light-dark(#F1DCD4, #2E2426) 100%);

  /* Radii (Theme.Radius) */
  --r-card: 14px; --r-panel: 18px; --r-bar: 12px; --r-photo: 16px; --r-thumb: 8px; --r-key: 5px; --r-pill: 999px;

  /* Shadows (Theme.Glow), colorless */
  --shadow-soft:  0 4px 12px rgb(0 0 0 / .08);
  --shadow-hover: 0 8px 18px rgb(0 0 0 / .14);
  --shadow-shot:  0 10px 30px rgb(0 0 0 / .12);

  /* Type */
  --font-serif: ui-serif, "New York", "Iowan Old Style", "Palatino", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --fs-display: clamp(2.5rem, 1.4rem + 4vw, 4.5rem);
  --fs-title:   clamp(1.75rem, 1.25rem + 1.7vw, 2.5rem);
  --fs-h3:      1.25rem;
  --fs-lead:    clamp(1.125rem, 1rem + .5vw, 1.375rem);
  --fs-body:    1.0625rem;
  --fs-small:   .9375rem;
  --fs-caption: .75rem;

  /* Layout */
  --w-page: 1120px; --w-prose: 640px;
  --gutter: 24px; --gap: 16px;
  --section-y: clamp(64px, 6vw + 32px, 128px);
}
@media (max-width: 640px) { :root { --gutter: 16px; } }

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0; min-height: 100vh;
  background: var(--dawn) fixed;
  color: var(--text);
  font: 400 var(--fs-body)/1.55 var(--font-sans);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
@media (max-width: 800px), (hover: none) { body { background-attachment: scroll; } }
img, picture, svg { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; letter-spacing: -.01em; line-height: 1.12; margin: 0; text-wrap: balance; }
h1 { font-size: var(--fs-display); line-height: 1.02; letter-spacing: -.015em; }
h2 { font-size: var(--fs-title); }
h3 { font-size: var(--fs-h3); }
p { margin: 0; }
p + p { margin-top: .9em; }
.lead { font-size: var(--fs-lead); line-height: 1.45; color: var(--text-2); text-wrap: pretty; }
.small { font-size: var(--fs-small); color: var(--text-2); }
.muted { color: var(--text-2); }
.prose { max-width: var(--w-prose); text-wrap: pretty; }
.prose p + p { margin-top: 1em; }
strong { font-weight: 600; }
kbd { font: inherit; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Layout */
.wrap { max-width: var(--w-page); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: calc(var(--section-y) * .6); }
.section-head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 { margin-top: 10px; }
.section-head .lead { margin-top: 16px; }
.center { text-align: center; }
.center .section-head { margin-inline: auto; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.split--rev > :first-child { order: 2; }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } .split--rev > :first-child { order: 0; } }
@media (max-width: 560px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* Eyebrow (GlassStyles.eyebrow) */
.eyebrow { font: 600 var(--fs-caption)/1.3 var(--font-sans); text-transform: uppercase; letter-spacing: .09em; color: var(--text-2); }
.eyebrow--gold { color: var(--gold); }

/* Glass surfaces — one layer per stack, never nested */
.glass {
  background: linear-gradient(var(--glass-tint), var(--glass-tint)), var(--glass-base);
  -webkit-backdrop-filter: blur(24px) saturate(1.3); backdrop-filter: blur(24px) saturate(1.3);
  border-radius: var(--r-card);
  box-shadow: inset 0 0 0 1px var(--rim), var(--shadow-soft);
}
.glass--panel { border-radius: var(--r-panel); }
.glass--bar { border-radius: var(--r-bar); }
.glass--warning { background: linear-gradient(var(--glass-warning), var(--glass-warning)), var(--glass-base); }
.glass--interactive { transition: box-shadow .15s ease, background-color .15s ease; }
.glass--interactive:hover { background: linear-gradient(var(--glass-tint-hover), var(--glass-tint-hover)), var(--glass-base); box-shadow: inset 0 0 0 1px var(--rim-hover), var(--shadow-hover); }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: light-dark(rgb(250 246 240 / .94), rgb(42 36 38 / .94)); }
}
.card { padding: 22px 22px 24px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-2); font-size: var(--fs-small); line-height: 1.5; }
.card .num { font: 600 1.75rem/1 var(--font-serif); color: var(--gold); margin-bottom: 14px; font-variant-numeric: lining-nums; }

/* Solid chips (StatusPill), safe inside glass */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: var(--r-pill); background: var(--chip-bg); box-shadow: inset 0 0 0 .5px var(--rim-strong); font: 600 .8125rem/1.4 var(--font-sans); color: var(--on-pale); white-space: nowrap; }
.chip--mono { font-family: var(--font-mono); font-weight: 500; font-size: .75rem; letter-spacing: .02em; }
.chip--celadon { background: var(--celadon); }
.prose code, .small code { font: .9em var(--font-mono); background: var(--code-bg); padding: 1px 5px; border-radius: 4px; color: var(--text); }
.chip--ochre { background: var(--ochre); }
.chip--slate { background: var(--slate); }

/* Key caps (KeyHint) */
.key { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 6px; font: 600 .75rem/1 var(--font-sans); font-variant-numeric: tabular-nums; color: var(--on-pale); background: var(--keycap-bg); border: .5px solid var(--keycap-border); border-radius: var(--r-key); vertical-align: middle; white-space: nowrap; }
.key-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-top: 22px; font-size: var(--fs-small); color: var(--text-2); }
.key-row span { display: inline-flex; align-items: center; gap: 6px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 22px; border-radius: var(--r-pill); font: 600 var(--fs-body)/1 var(--font-sans); text-decoration: none; white-space: nowrap; cursor: pointer; border: 0; transition: box-shadow .15s ease, background-color .15s ease; }
.btn-primary { background: var(--primary-fill); color: var(--primary-text); box-shadow: var(--shadow-soft); }
.btn-primary:hover { box-shadow: var(--shadow-hover); }
.btn--lg { height: 56px; padding: 0 30px; font-size: 1.125rem; }
.btn--sm { height: 36px; padding: 0 16px; font-size: var(--fs-small); }
.btn-glass { color: var(--text); background: linear-gradient(var(--glass-tint), var(--glass-tint)), var(--glass-base); -webkit-backdrop-filter: blur(24px) saturate(1.3); backdrop-filter: blur(24px) saturate(1.3); box-shadow: inset 0 0 0 1px var(--rim), var(--shadow-soft); }
.btn-glass:hover { background: linear-gradient(var(--glass-tint-hover), var(--glass-tint-hover)), var(--glass-base); box-shadow: inset 0 0 0 1px var(--rim-hover), var(--shadow-hover); }
.btn .apple { width: 15px; height: 18px; fill: currentColor; margin-top: -2px; }
.textlink { color: var(--text); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--rim-strong); padding-bottom: 1px; }
.textlink:hover { border-bottom-color: var(--gold); }
.cta-note { margin-top: 12px; font-size: var(--fs-small); color: var(--text-2); }

/* Availability: says "coming soon" without posing as a button (no fill, a gold rim, a gold dot) */
.soon { display: inline-flex; align-items: center; gap: 10px; margin: 0; height: 56px; padding: 0 26px; border-radius: var(--r-pill); font: 600 1.125rem/1.2 var(--font-sans); color: var(--text); box-shadow: inset 0 0 0 1px var(--rim-hover); white-space: nowrap; }
.soon::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.soon--sm { height: 36px; padding: 0 14px; gap: 8px; margin-left: 6px; font-size: var(--fs-small); }
.soon--sm::before { width: 6px; height: 6px; }
.center .soon { margin-inline: auto; }
@media (max-width: 420px) { .soon:not(.soon--sm) { height: auto; padding: 14px 20px; white-space: normal; text-wrap: balance; text-align: left; } }

/* Product shots — bare, on the stage, never inside glass */
.shot { margin: 0; border-radius: var(--r-photo); overflow: hidden; background: var(--stage); box-shadow: inset 0 0 0 1px var(--rim), var(--shadow-shot); }
.shot img { width: 100%; height: auto; }
.shot--crop { border-radius: var(--r-card); }
.shot-caption { margin-top: 12px; font-size: var(--fs-small); color: var(--text-2); text-align: center; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 10; padding: 10px var(--gutter); }
.nav-inner { max-width: var(--w-page); margin-inline: auto; height: 52px; padding: 0 8px 0 14px; display: flex; align-items: center; gap: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 1.0625rem/1 var(--font-serif); color: var(--text); }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav-links a:not(.btn) { padding: 8px 12px; border-radius: var(--r-pill); font-size: var(--fs-small); font-weight: 500; color: var(--text-2); text-decoration: none; }
.nav-links a:not(.btn):hover { color: var(--text); }
.nav-links .btn { margin-left: 6px; }
@media (max-width: 760px) { .nav-links a:not(.btn) { display: none; } }

/* Hero */
.hero { padding-top: clamp(40px, 7vw, 96px); padding-bottom: clamp(48px, 6vw, 80px); text-align: center; }
.hero .eyebrow { margin-bottom: 20px; }
.hero h1 { max-width: 14ch; margin-inline: auto; }
.hero .lead { max-width: 640px; margin: 22px auto 0; }
.hero .actions { margin-top: 32px; display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px 24px; }
.hero .shot { margin-top: clamp(40px, 5vw, 64px); }

/* Pull line */
.pull { max-width: var(--w-prose); margin: clamp(28px, 4vw, 40px) 0 0; padding-left: 20px; border-left: 2px solid var(--gold); font: italic 500 1.25rem/1.4 var(--font-serif); color: var(--text); text-wrap: pretty; }

/* Fact list (AI section) */
.facts { display: grid; gap: 18px; margin-top: 8px; }
.facts .fact strong { display: block; font-family: var(--font-serif); font-size: 1.125rem; margin-bottom: 4px; }
.facts .fact p { color: var(--text-2); font-size: var(--fs-small); }

/* Formats */
.format-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }

/* Download block */
.download { padding: clamp(36px, 5vw, 64px) clamp(20px, 4vw, 56px); text-align: center; }
.download .icon { width: 96px; height: 96px; margin: 0 auto 20px; border-radius: 22px; box-shadow: var(--shadow-hover); }
.download h2 { margin-bottom: 10px; }
.download .actions { margin-top: 26px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.launch-note { margin: 28px auto 0; max-width: 620px; text-align: left; padding: 16px 18px; }
.launch-note h3 { font-size: 1.0625rem; margin-bottom: 6px; }
.launch-note p, .launch-note li { font-size: var(--fs-small); color: var(--text-2); }
.launch-note ol { margin: 8px 0 0; padding-left: 20px; }
.launch-note li + li { margin-top: 4px; }
.download .links { margin-top: 22px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; font-size: var(--fs-small); color: var(--text-2); }


/* FAQ */
.faq { display: grid; gap: 10px; max-width: 800px; margin-inline: auto; }
.faq details { padding: 0; }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; font: 600 1.0625rem/1.35 var(--font-serif); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; font: 500 1rem/1 var(--font-sans); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--rim-strong); }
.faq details[open] summary::after { content: "–"; }
.faq .answer { padding: 0 20px 18px; font-size: var(--fs-small); color: var(--text-2); max-width: 66ch; }
.faq .answer p + p { margin-top: .7em; }
.faq code { font: .85em var(--font-mono); background: var(--code-bg); padding: 1px 5px; border-radius: 4px; color: var(--text); }

/* Founder note */
.note { max-width: 680px; margin-inline: auto; text-align: center; }
.note p { font: italic 400 clamp(1.2rem, 1rem + .8vw, 1.5rem)/1.5 var(--font-serif); text-wrap: pretty; }
.note .sig { margin-top: 18px; font: 600 var(--fs-small)/1.4 var(--font-sans); font-style: normal; color: var(--text-2); }

/* Footer */
.footer { padding: 40px var(--gutter) 48px; }
.footer-inner { max-width: var(--w-page); margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; font-size: var(--fs-small); color: var(--text-2); }
.footer .brand { font-size: 1rem; }
.footer .brand img { width: 24px; height: 24px; border-radius: 6px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.footer nav a { text-decoration: none; color: var(--text-2); }
.footer nav a:hover { color: var(--text); }
.footer .legal { width: 100%; font-size: var(--fs-caption); color: var(--text-3); }

/* Sub pages (privacy, support, 404) */
.page { max-width: 760px; margin-inline: auto; padding-block: clamp(40px, 6vw, 80px) var(--section-y); }
.page header { margin-bottom: 36px; }
.page header h1 { font-size: var(--fs-title); margin-top: 10px; }
.page header .lead { margin-top: 12px; }
.page h2 { font-size: 1.375rem; margin-top: 36px; margin-bottom: 8px; }
.page p, .page li { color: var(--text-2); text-wrap: pretty; }
.page ul { padding-left: 20px; margin: 8px 0 0; }
.page li + li { margin-top: 6px; }
.page a:not(.btn) { color: var(--text); }
.page code { font: .9em var(--font-mono); background: var(--code-bg); padding: 1px 5px; border-radius: 4px; color: var(--text); }
.page .faq { max-width: none; margin-top: 16px; }
.hr { height: 1px; background: var(--rim-strong); margin: 36px 0; border: 0; }
