/* Ours Only public pages (M5.3). Colours are the app's own theme
   (Assets.xcassets: AccentColor, ThemeBackground, ThemeSurface, ThemeText*). */
:root {
  color-scheme: light dark;
  --bg: #fbf7f5;
  --surface: #ffffff;
  --text: #2b2129;
  --muted: #6b5f6b;
  --accent: #c93a5f;
  --on-accent: #ffffff;
  --border: #eadfe2;
  --focus: #2b2129;
  --ok: #2f6b4f;
  --warn: #8a5a00;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141015;
    --surface: #221b23;
    --text: #f5eef2;
    --muted: #b7abb5;
    --accent: #f2849a;
    --on-accent: #2a0e16;
    --border: #3a2f3b;
    --focus: #f5eef2;
    --ok: #8fd3ae;
    --warn: #f0c36b;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 4.5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.55 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--surface); color: var(--text); padding: 0.75rem 1rem; border-radius: 0 0 0.75rem 0;
}
.skip:focus { left: 0; }
header.site, footer.site { max-width: 42rem; margin: 0 auto; padding: 1.25rem 1rem; }
header.site { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; letter-spacing: -0.01em; }
header.site .mark { color: var(--accent); }
main { display: block; max-width: 42rem; margin: 0 auto; padding: 0 1rem 2.5rem; }
h1 { font-size: 1.75rem; line-height: 1.2; letter-spacing: -0.02em; margin: 0.5rem 0 1rem; }
h2 { font-size: 1.25rem; line-height: 1.3; margin: 2rem 0 0.5rem; }
h3 { font-size: 1.0625rem; margin: 1.5rem 0 0.25rem; }
p, ul, ol { margin: 0 0 1rem; }
li { margin: 0.25rem 0; }
a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 1.25rem;
  padding: 1.25rem; margin: 0 0 1rem;
}
.muted, .note { color: var(--muted); font-size: 0.9375rem; }
.banner {
  border: 1px solid var(--warn); color: var(--text); background: var(--surface);
  border-radius: 0.75rem; padding: 0.75rem 1rem; margin: 0 0 1.5rem; font-size: 0.9375rem;
}
.banner strong { color: var(--warn); }
button.primary {
  appearance: none; -webkit-appearance: none;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.875rem; min-width: 2.875rem; width: 100%;
  padding: 0.75rem 1.25rem; border: 0; border-radius: 0.875rem;
  background: var(--accent); color: var(--on-accent);
  font: inherit; font-weight: 650; cursor: pointer;
}
button.primary[disabled] { opacity: 0.6; cursor: progress; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 0.5rem; }
button.primary:focus-visible { outline-offset: 4px; }
.result h2 { margin-top: 0; }
.result.ok h2 { color: var(--ok); }
[hidden] { display: none !important; }
nav.site ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
footer.site { color: var(--muted); font-size: 0.875rem; border-top: 1px solid var(--border); }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media (min-width: 40rem) { h1 { font-size: 2rem; } button.primary { width: auto; } }

/* ---------------------------------------------------------------------------
   M5.5 polish and the landing page. No inline styles anywhere (the CSP allows
   stylesheets from 'self' only); no web fonts (the system font, SF Pro on
   Apple devices); no JavaScript (scroll reveals use CSS scroll-driven
   animations where supported and stay static elsewhere).
   --------------------------------------------------------------------------- */
.card > h2:first-child, .card > h3:first-child, .card > p:first-child { margin-top: 0; }

:root { --accent-ink: #a8294b; --blush: #f8e1e6; --cream: #fff8f3; --lavender: #ece4f6; --ink-soft: #4a3a46; --shadow: 201 58 95; --radius-phone: 2.4rem; }
@media (prefers-color-scheme: dark) {
  :root { --accent-ink: #f2849a; --blush: #2a1b22; --cream: #1a1418; --lavender: #211c29; --ink-soft: #d9ccd5; --shadow: 0 0 0; }
}
body.landing {
  background:
    radial-gradient(120% 60% at 85% 0%, var(--lavender) 0%, transparent 60%),
    radial-gradient(100% 50% at 0% 10%, var(--blush) 0%, transparent 55%),
    var(--bg);
  background-attachment: scroll;
  overflow-x: hidden;
}
.landing main { max-width: 72rem; padding: 0 1.25rem 3rem; }
.site-bar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.75rem max(1.25rem, env(safe-area-inset-left)) 0.75rem max(1.25rem, env(safe-area-inset-right));
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(14px); backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.wordmark { color: var(--text); text-decoration: none; font-weight: 750; letter-spacing: -0.01em; font-size: 1.0625rem; }
.wordmark .mark { color: var(--accent); }
.site-bar ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.25rem 1rem; flex-wrap: wrap; justify-content: flex-end; }
.site-bar a:not(.wordmark) { color: var(--muted); text-decoration: none; font-size: 0.9375rem; font-weight: 550; padding: 0.5rem 0.125rem; }
.site-bar a:not(.wordmark):hover { color: var(--accent); }
@media (max-width: 30rem) { .site-bar li:nth-child(2) { display: none; } .site-bar ul { gap: 0.75rem; } }

.eyebrow, .kicker { color: var(--accent); font-weight: 700; letter-spacing: 0.02em; margin: 0 0 0.5rem; }
.eyebrow { font-size: 1.0625rem; }
.kicker { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.12em; }
/* Small uppercase text on the tinted bands needs a darker accent for 4.5:1 (M5.5 review M5). */
.eyebrow, .kicker { color: var(--accent-ink); }

.hero { display: grid; gap: 2.5rem; align-items: center; padding: clamp(1.5rem, 5svh, 4.5rem) 0 clamp(2rem, 6svh, 4rem); }
.hero h1 { font-size: clamp(2.25rem, min(9vw, 11svh), 4.5rem); line-height: 1.02; letter-spacing: -0.035em; margin: 0 0 1.1rem; text-wrap: balance; }
.hero .lead { font-size: clamp(1.0625rem, 2.6vw, 1.25rem); font-weight: 400; color: var(--ink-soft); max-width: 34rem; margin: 0 0 1.5rem; }
.soon {
  display: inline-flex; align-items: center; gap: 0.6rem; margin: 0 0 1rem;
  padding: 0.65rem 1.1rem; border-radius: 999px; font-weight: 650; color: var(--text);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 6px 20px -10px rgb(var(--shadow) / 0.35);
  white-space: nowrap; font-size: clamp(0.9375rem, 3.6vw, 1rem);
}
.soon-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.hero-more a { font-weight: 600; text-decoration: none; }
.hero-more a:hover { text-decoration: underline; }
.hero-art { position: relative; justify-self: center; width: min(72vw, 22rem); margin-top: 0.5rem; }
.phone { margin: 0; }
.phone img {
  display: block; width: 100%; height: auto; border-radius: var(--radius-phone);
  border: 1px solid color-mix(in srgb, var(--border) 80%, transparent);
  box-shadow: 0 2px 6px rgb(var(--shadow) / 0.08), 0 30px 60px -24px rgb(var(--shadow) / 0.38);
  background: var(--surface);
}
.phone-crop img { border-radius: 1.75rem; }
.hero-otters { position: absolute; left: -22%; bottom: -6%; width: 52%; filter: drop-shadow(0 14px 18px rgb(var(--shadow) / 0.22)); }
.hero-otters img { width: 100%; height: auto; display: block; }
.float-heart { position: absolute; color: var(--accent); opacity: 0.75; font-size: 1.4rem; animation: float 7s ease-in-out infinite; }
.float-heart.h1 { right: -6%; top: 8%; }
.float-heart.h2 { left: -10%; top: 30%; font-size: 1rem; animation-delay: -2.5s; opacity: 0.55; }
.float-heart.h3 { right: 6%; top: -4%; font-size: 0.9rem; animation-delay: -4.5s; opacity: 0.5; }
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-12px) rotate(6deg); } }

.features { display: grid; gap: clamp(3.5rem, 10vw, 7rem); padding: clamp(2.5rem, 8vw, 5rem) 0; }
.feature { display: grid; gap: 2rem; align-items: center; }
.feature h2, .band h2, .faq h2, .closing h2 { font-size: clamp(1.6rem, min(5.5vw, 8svh), 2.75rem); line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 1rem; text-wrap: balance; }
.feature-copy p:not(.kicker) { color: var(--ink-soft); font-size: 1.0625rem; max-width: 32rem; }
.feature-art { position: relative; justify-self: center; width: min(70vw, 20rem); }
.art-pair { padding-bottom: 2.5rem; }
.widget { display: block; }
.widget img { display: block; width: 100%; height: auto; filter: drop-shadow(0 18px 26px rgb(var(--shadow) / 0.25)); }
.widget-hero { width: min(62vw, 17rem); justify-self: center; transform: rotate(-3deg); }
.overlap { position: absolute; z-index: 1; }
.widget-medium.overlap { width: 88%; right: -6%; bottom: -1.5rem; }
.widget-small.overlap { width: 44%; right: -5%; bottom: -1.5rem; }
.phone-back { display: none; }

.band { margin: clamp(1rem, 4vw, 2rem) calc(50% - 50vw); padding: clamp(3rem, 9vw, 5.5rem) 1.25rem;
        background: linear-gradient(180deg, transparent, var(--blush) 18%, var(--blush) 82%, transparent); }
.band-soft { background: linear-gradient(180deg, transparent, var(--lavender) 18%, var(--lavender) 82%, transparent); }
.band-inner { max-width: 60rem; margin: 0 auto; text-align: center; }
.band-lead { color: var(--ink-soft); font-size: 1.0625rem; max-width: 36rem; margin: 0 auto 2.25rem; }
.widget-grid { list-style: none; padding: 0; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 1.5rem 1.25rem; }
.widget-grid li { width: min(40vw, 10.5rem); display: grid; gap: 0.6rem; justify-items: center; font-weight: 600; color: var(--muted); font-size: 0.9375rem; }
.widget-grid li.wide { width: min(86vw, 22.5rem); }
.promise { list-style: none; padding: 0; margin: 0 auto 1.5rem; max-width: 40rem; text-align: left; display: grid; gap: 0.9rem; }
.promise li { position: relative; padding: 1rem 1.1rem 1rem 3rem; background: var(--surface); border: 1px solid var(--border); border-radius: 1.1rem; color: var(--ink-soft); }
.promise li::before { content: "♥"; position: absolute; left: 1.15rem; top: 1rem; color: var(--accent); }
.promise strong { color: var(--text); }
.band-foot { color: var(--muted); }

.faq { max-width: 44rem; margin: 0 auto; padding: clamp(3rem, 8vw, 5rem) 0 1rem; }
.faq h2 { text-align: center; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; align-items: center;
  padding: 1.1rem 0.25rem; font-weight: 650; font-size: 1.0625rem; min-height: 2.875rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.5rem; font-weight: 400; line-height: 1; transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--ink-soft); margin: 0 0.25rem 1.25rem; }

.closing { text-align: center; padding: clamp(3rem, 9vw, 6rem) 0 2rem; }
.closing-otters { display: block; width: min(46vw, 12rem); margin: 0 auto 1rem; }
.closing-otters img { width: 100%; height: auto; display: block; }
.site-footer { max-width: 72rem; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 1.5rem; }
.site-footer p { margin: 0; }

@media (min-width: 48rem) {
  .hero { grid-template-columns: 1.08fr 0.92fr; gap: 3rem; }
  .hero-art { width: min(21.5rem, 36vw); }
  .feature { grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); }
  .feature.reverse .feature-copy { order: 2; }
  .feature-art { width: min(19rem, 34vw); }
  .widget-hero { width: 16rem; }
  .widget-medium.overlap { right: -18%; }
  .widget-small.overlap { right: -16%; }
  .hero-otters { left: -30%; bottom: -8%; }
  .phone-back { display: block; position: absolute; width: 62%; right: -30%; bottom: 0; z-index: -1; transform: rotate(5deg); }
}
/* Short landscape screens: keep the headline at the top, beside a smaller phone (M5.5 review M4). */
@media (min-width: 48rem) and (max-height: 32rem) {
  .hero { align-items: start; }
  .hero-art { width: min(36vw, 52svh); }
}
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .feature, .band-inner, .faq details, .closing {
      animation: rise linear both; animation-timeline: view(); animation-range: entry 0% cover 28%;
    }
    @keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
  }
}
@media (prefers-reduced-motion: reduce) { .float-heart { animation: none; } }
@media (prefers-contrast: more) {
  :root { --muted: var(--text); --ink-soft: var(--text); --border: var(--text); }
  .phone img, .promise li, .soon { border-width: 2px; }
}
.wordmark { display: inline-flex; gap: 0.35rem; align-items: center; }
header.site .wordmark { color: var(--text); text-decoration: none; }
.doc h2 { scroll-margin-top: 1rem; }
.toc ul { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; font-size: 0.9375rem; }

/* ---------------------------------------------------------------------------
   /auth/callback: where email links land when the app didn't open. A calm
   blush page with the approved otters and one card. No animation.
   --------------------------------------------------------------------------- */
body.auth-page { background: linear-gradient(180deg, var(--blush) 0, var(--bg) 24rem) no-repeat, var(--bg); min-height: 100svh; }
main.auth { max-width: 32rem; padding-top: 0.25rem; text-align: center; }
.auth-otters { display: block; width: clamp(7.5rem, 34vw, 10rem); margin: 0 auto -0.9rem; position: relative; z-index: 1; }
.auth-otters img { display: block; width: 100%; height: auto; }
.auth-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 1.5rem;
  padding: 2rem 1.25rem 1.5rem; text-align: left;
  box-shadow: 0 18px 44px -26px rgb(var(--shadow) / 0.5);
}
.auth-card h1 { text-align: center; font-size: clamp(1.625rem, 6.5vw, 2rem); margin: 0 0 0.75rem; text-wrap: balance; }
.auth-card .lead { text-align: center; color: var(--ink-soft); max-width: 26rem; margin: 0 auto 1.25rem; text-wrap: pretty; }
.auth-card > p:not(.lead):not(.note) { text-align: center; }
.auth-steps { background: var(--cream); border: 1px solid var(--border); border-radius: 1rem; padding: 1rem 1.1rem 0.25rem; margin: 0 0 1.25rem; }
.auth-steps h2 { font-size: 1rem; margin: 0 0 0.5rem; }
.auth-steps ol { padding-left: 1.3rem; margin: 0 0 0.75rem; }
.auth-steps li { margin: 0.35rem 0; }
.auth-card .note { text-align: center; margin: 0; }
.auth-store { margin: 1.75rem 0 0; color: var(--muted); font-size: 0.9375rem; }
.auth-store .soon { display: inline-flex; margin: 0.5rem 0 0; white-space: normal; }
@media (min-width: 40rem) { .auth-card { padding: 2.25rem 2rem 1.75rem; } }
/* Very narrow (small phones with large text or zoom): give the words the room. */
@media (max-width: 22rem) {
  main.auth { padding-left: 0.75rem; padding-right: 0.75rem; }
  .auth-card { padding: 1.75rem 0.9rem 1.25rem; border-radius: 1.25rem; }
  .auth-steps { padding: 0.85rem 0.8rem 0.25rem; }
  .auth-steps ol { padding-left: 1.1rem; }
}
@media (prefers-contrast: more) { .auth-card, .auth-steps { border-width: 2px; } }
