/* OMNILY landing. Colours match the App (app/lib/theme/app_theme.dart):
   one blue for the action, the App's own surfaces, nothing decorative. */
:root {
  --bg: #F7F9FC;
  --surface: #FFFFFF;
  --ink: #182230;
  --ink-2: #4A5565;
  --ink-3: #6B7685;
  --line: #DDE4ED;
  --accent: #0066CC;
  --on-accent: #FFFFFF;
  --paper: #FAF8F4;
  --radius: 14px;
  --wrap: 1120px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121416;
    --surface: #1D2024;
    --ink: #F7F9FC;
    --ink-2: #B9C2CE;
    --ink-3: #8C96A3;
    --line: #363E49;
    --accent: #81B8FF;
    --on-accent: #0B1A2C;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.lang-pending body { visibility: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2 { margin: 0; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.12; }
h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.2; }
/* Chinese headings break at punctuation, never inside a phrase. */
:lang(zh) h1, :lang(zh) h2 { word-break: keep-all; overflow-wrap: anywhere; }
p { margin: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 12px; z-index: 10; background: var(--surface); padding: 8px 12px; border-radius: 8px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); }
.nav-row { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; letter-spacing: 0.02em; }
.nav-end { display: flex; align-items: center; gap: 8px; }
.lang { background: none; border: 0; color: var(--ink-2); font: inherit; font-size: 15px; padding: 10px 12px; min-height: 44px; cursor: pointer; border-radius: 10px; }
.lang:hover { color: var(--ink); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; background: var(--accent); color: var(--on-accent); text-decoration: none; font-weight: 600; border-radius: var(--radius); }
.btn:hover { filter: brightness(1.06); }
.btn:focus-visible, .lang:focus-visible, summary:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: 2px; }
.btn-small { font-size: 15px; padding: 0 16px; min-height: 40px; }
.btn-large { font-size: 17px; padding: 0 28px; min-height: 54px; }

/* Hero */
.hero { padding: 56px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero-grid > *, .story-grid > * { min-width: 0; }
.hero-copy h1 { max-width: 12em; }
.lead { margin-top: 20px; font-size: 19px; line-height: 1.65; color: var(--ink-2); max-width: 30em; }
.hero-copy .btn { margin-top: 32px; }
.fine { margin-top: 12px; font-size: 14px; color: var(--ink-3); }
/* The home as it looks on an iPhone: its screen inside a thin dark bezel. */
.phone { margin: 0; justify-self: center; width: min(360px, 100%); padding: 9px; border-radius: 58px; background: #0E0F11; box-shadow: 0 0 0 1px var(--line); }
.phone picture, .phone img { display: block; width: 100%; border-radius: 49px; overflow: hidden; }

/* Stories: a drawing on its own paper, with the App's real part laid over it. */
.story { padding: 72px 0; }
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.story-flip .story-copy { order: 2; }
.story-copy p { margin-top: 18px; font-size: 18px; color: var(--ink-2); max-width: 30em; }
.story-copy .aside { font-size: 16px; color: var(--ink-3); }
.story-art { position: relative; padding-bottom: 32px; }
.paper { width: 52%; aspect-ratio: 1; object-fit: cover; border-radius: 28px; background: var(--paper); }
.story-flip .paper { margin-left: auto; }
.shot { position: absolute; right: 0; bottom: 0; width: 82%; }
.story-flip .shot { right: auto; left: 0; }
.shot img { width: 100%; }

/* Privacy and questions: plain reading. */
.plain { padding: 64px 0; border-top: 1px solid var(--line); }
.plain p { margin-top: 16px; color: var(--ink-2); }
.links { display: flex; gap: 20px; flex-wrap: wrap; font-size: 15px; }
.links a { color: var(--accent); text-decoration: none; }
.links a:hover { text-decoration: underline; }
details { border-bottom: 1px solid var(--line); }
details:first-of-type { margin-top: 20px; border-top: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; padding: 18px 32px 18px 0; font-weight: 600; position: relative; min-height: 44px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-weight: 400; color: var(--ink-3); font-size: 22px; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { margin: 0 0 18px; color: var(--ink-2); }

/* Closing */
.closing { padding: 72px 0 88px; text-align: center; border-top: 1px solid var(--line); }
.paper-small { width: 120px; margin: 0 auto 24px; border-radius: 22px; }
.closing .btn { margin-top: 28px; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: 14px; color: var(--ink-3); }
.footer-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }

@media (max-width: 860px) {
  .hero { padding: 28px 0 24px; }
  .hero-grid, .story-grid { grid-template-columns: 1fr; gap: 36px; }
  .story { padding: 48px 0; }
  .story-flip .story-copy { order: 0; }
  /* The App's part is the picture here: full width, the drawing small beside the heading's rhythm. */
  .story-art { max-width: 520px; padding-bottom: 0; display: flex; flex-direction: column; gap: 20px; }
  .paper { width: 112px; border-radius: 22px; }
  .story-flip .paper { margin-left: 0; }
  .shot, .story-flip .shot { position: static; width: 100%; }
  .lead { font-size: 18px; }
}
@media (max-width: 420px) {
  .wrap { padding: 0 16px; }
  .phone { border-radius: 50px; padding: 8px; }
  .phone picture, .phone img { border-radius: 42px; }

}
