/* Hallmark · macrostructure: Photographic (Apple product-page convention) · genre: modern-minimal
 * nav: N9 Edge-aligned minimal · footer: Ft2 Inline single line
 * theme: custom · vibe: "Apple product page — quiet, near-white, one confident deep-green accent"
 * display: Geist 700 · body: Geist 400 · axes: light / geometric-sans / chromatic-other (chromatic-green ~152°)
 * studied: no · context: user picked "Apple Clean" from a 5-concept comparison gallery · v3.0.0
 * pre-emit critique: P5 H5 E5 S5 R5 V5
 */

*, *::before, *::after { box-sizing: border-box; }
html { overflow-x: clip; scroll-behavior: smooth; }
body { overflow-x: clip; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--color-paper);
  color: var(--color-ink);
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0;
  overflow-wrap: anywhere;
  min-width: 0;
}

p { margin: 0; }

a { color: inherit; text-decoration: none; }

::selection {
  background: var(--color-accent);
  color: var(--color-accent-ink);
}

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 3px;
}

.muted { color: var(--color-muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 150ms !important;
    transition-duration: 150ms !important;
  }
}

/* ---------- App Store badge — official Apple mark, self-hosted SVG ---------- */

.store-badge {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  border-radius: 8px;
  transition: transform var(--dur-micro) var(--ease-out), opacity var(--dur-short) var(--ease-out);
}
.store-badge:hover { transform: translateY(-1.5px); opacity: 0.82; }
.store-badge:active { transform: translateY(0); }
.store-badge img { height: 42px; width: auto; display: block; }
.store-badge--sm { padding-block: 6px; }
.store-badge--sm img { height: 30px; }
.store-badge--lg img { height: 50px; }

/* ---------- Typographic link (Photographic's "button tucked under caption") ---------- */

.link-cta {
  display: inline-block;
  font-weight: 600;
  color: var(--color-accent);
  border-bottom: 1px solid color-mix(in oklch, var(--color-accent) 45%, transparent);
  transition: border-color var(--dur-short) var(--ease-out);
}
.link-cta:hover { border-color: var(--color-accent); }

/* ---------- Nav — N9 edge-aligned minimal ---------- */

.nav-edge {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--page-gutter);
  background: color-mix(in oklch, var(--color-paper) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: var(--rule-hair) solid var(--color-rule-2);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}
.wordmark__mark { height: 22px; width: auto; }
.wordmark__name {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--color-ink);
}

/* ---------- Folds — a huge image dominates, text is small annotation ---------- */

.fold {
  max-width: 40rem;
  margin: 0 auto;
  padding: var(--space-3xl) var(--page-gutter) var(--space-md);
  text-align: center;
}

.fold__text h1 {
  font-size: var(--text-display);
  max-width: 16ch;
  margin-inline: auto;
}
.fold__text h2 {
  font-size: var(--text-2xl);
  max-width: 18ch;
  margin-inline: auto;
}
.fold__sub {
  margin-top: var(--space-md);
  color: var(--color-ink-2);
  font-size: var(--text-md);
  font-weight: 350;
  max-width: 36ch;
  margin-inline: auto;
}

.fold__image {
  display: flex;
  justify-content: center;
  padding-top: var(--space-2xl);
}
.fold__image--single img {
  width: min(58%, 15rem);
  margin-inline: auto;
  filter: drop-shadow(0 30px 40px oklch(20% 0.006 145 / 0.16));
}
.fold__image--pair {
  align-items: flex-end;
  gap: var(--space-lg);
}
.fold__image--pair img {
  filter: drop-shadow(0 24px 32px oklch(20% 0.006 145 / 0.14));
}
.fold__image--pair img { width: min(42%, 11.5rem); }

.fold__caption { margin-top: var(--space-lg); }

/* ---------- Carousel — native scroll-snap, no JS ---------- */

.carousel {
  display: flex;
  gap: var(--space-lg);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--page-gutter);
  padding: var(--space-2xl) var(--page-gutter) var(--space-sm);
  margin-inline: calc(var(--page-gutter) * -1);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.carousel img {
  flex: 0 0 auto;
  scroll-snap-align: center;
  width: min(62%, 15rem);
  filter: drop-shadow(0 24px 32px oklch(20% 0.006 145 / 0.16));
}
.carousel::-webkit-scrollbar { height: 6px; }
.carousel::-webkit-scrollbar-thumb { background: var(--color-rule); border-radius: var(--radius-pill); }

/* Narrow text-only folds — the alternation partner to the photo folds. */
.fold--text {
  max-width: 32rem;
  padding-block: var(--space-xl);
}
.fold--text p {
  color: var(--color-ink-2);
  font-size: var(--text-md);
  font-weight: 350;
}
.fold--text strong { color: var(--color-ink); font-weight: 600; }

.fold--list ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-lg);
  text-align: left;
}
.fold--list li {
  display: flex;
  gap: var(--space-sm);
  align-items: flex-start;
  color: var(--color-ink-2);
  font-size: var(--text-sm);
  line-height: 1.65;
}
.dot {
  flex-shrink: 0;
  width: 7px;
  height: 7px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* ---------- Final CTA fold ---------- */

.fold--cta {
  padding-block: var(--space-2xl) var(--space-3xl);
  display: grid;
  gap: var(--space-lg);
  justify-items: center;
}
.fold--cta p {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  max-width: 22ch;
}

/* Signature moment — the one dark band on an otherwise near-white page,
   where the full glossy wordmark (built for dark) finally gets to be itself. */
.fold--dark {
  position: relative;
  max-width: none;
  padding-block: var(--space-3xl) var(--space-2xl);
  background: var(--color-dark);
  overflow: clip;
}
.fold--dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 50% 30%, color-mix(in oklch, var(--color-accent-2) 22%, transparent), transparent 70%);
  pointer-events: none;
}
.fold--dark p {
  position: relative;
  color: var(--color-on-dark);
}
.cta-logo {
  position: relative;
  width: min(70%, 20rem);
  margin-inline: auto;
}
/* Black badge on a near-black band needs its own edge to read as a button. */
.fold--dark .store-badge {
  position: relative;
  box-shadow: 0 0 0 1px color-mix(in oklch, var(--color-on-dark) 20%, transparent);
}

/* ---------- Legal — plain prose page (privacy policy) ---------- */

.legal {
  max-width: 38rem;
  margin: 0 auto;
  padding: var(--space-2xl) var(--page-gutter) var(--space-3xl);
}
.legal h1 {
  font-size: var(--text-2xl);
  max-width: 20ch;
}
.legal__updated {
  margin-top: var(--space-sm);
  color: var(--color-muted);
  font-size: var(--text-sm);
}
.legal__lede {
  margin-top: var(--space-xl);
  color: var(--color-ink-2);
  font-size: var(--text-md);
  font-weight: 350;
}
.legal__summary {
  margin-top: var(--space-xl);
  padding: var(--space-lg);
  background: var(--color-paper-2);
  border-radius: var(--radius-md);
}
.legal__summary-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-sm);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.legal__summary ul {
  list-style: none;
  margin: var(--space-md) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-sm);
}
.legal__summary li {
  position: relative;
  padding-left: var(--space-lg);
  color: var(--color-ink-2);
  font-size: var(--text-sm);
  line-height: 1.6;
}
.legal__summary li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}
.legal h2 {
  margin-top: var(--space-2xl);
  font-size: var(--text-lg);
}
.legal p:not(.legal__lede, .legal__updated) {
  margin-top: var(--space-sm);
  color: var(--color-ink-2);
  font-size: var(--text-base);
  line-height: 1.65;
}
.legal .link-cta { font-weight: 600; }

/* ---------- Footer — Ft2 inline single line ---------- */

.foot-line {
  max-width: 40rem;
  margin: 0 auto;
  padding: var(--space-lg) var(--page-gutter) var(--space-2xl);
  text-align: center;
  border-top: var(--rule-hair) solid var(--color-rule-2);
}
.foot-line p {
  color: var(--color-muted);
  font-size: var(--text-sm);
}
.foot-line__links {
  margin-top: var(--space-sm);
}
.foot-line__links .link-cta {
  font-size: var(--text-sm);
  font-weight: 500;
}

/* ---------- Responsive — 320 / 375 / 414 / 768 ---------- */

@media (min-width: 960px) {
  .fold--photo { max-width: 52rem; }
  .fold__image--single img { width: min(42%, 16.5rem); }
}
