/* ClockZone website. Same design tokens as the mobile app (clockzone-app/lib/theme/app_colors.dart),
   light and dark following the visitor's system. No scripts, no inline styles: the content security
   policy forbids both. Font: Nunito, SIL Open Font License (see /fonts/OFL.txt). */

@font-face {
  font-family: "Nunito";
  src: url("/fonts/Nunito-Variable.ttf") format("truetype");
  font-weight: 200 1000;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #f6f3ff;
  --card: #ffffff;
  --ink: #1e1a4d;
  --muted: #6f6b93;
  --line: #e6e1fa;
  --primary: #5b4bff;
  --on-primary: #ffffff;
  --soft: #e9e6ff;
  --soft-ink: #3a2fd0;
  --sun: #ffc83d;
  --on-sun: #4a3600;
  --sun-soft: #fff1c9;
  --sun-ink: #7a5600;
  --mint: #12b886;
  --mint-soft: #d8f5ea;
  --mint-ink: #08704f;
  --coral-soft: #ffe0e0;
  --coral-ink: #a12b2b;
  --shadow: 0 24px 48px -24px rgba(30, 26, 77, 0.35);
  --radius: 28px;
  --radius-sm: 18px;
  --wrap: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12102b;
    --card: #1d1a42;
    --ink: #f4f2ff;
    --muted: #a9a5d4;
    --line: #2d2a5c;
    --primary: #6b5cff;
    --soft: #2b2670;
    --soft-ink: #cfc9ff;
    --sun: #ffd25e;
    --sun-soft: #3a3010;
    --sun-ink: #ffd25e;
    --mint: #3ddc9a;
    --mint-soft: #173b33;
    --mint-ink: #7cf0c0;
    --coral-soft: #3f1d26;
    --coral-ink: #ffb3b3;
    --shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.7);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-weight: 500;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--soft-ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 6px; }

h1, h2, h3 { line-height: 1.15; font-weight: 800; margin: 0 0 0.5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 3.75rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }
.narrow { width: min(100% - 40px, 760px); margin-inline: auto; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: 999px; font-weight: 800;
}
.skip:focus { top: 12px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 1.25rem; text-decoration: none; }
.brand img { width: 36px; height: 36px; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 700; padding: 8px 14px; border-radius: 999px; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { background: var(--soft); color: var(--soft-ink); }

.menu { display: none; }
.menu summary { list-style: none; cursor: pointer; padding: 10px 16px; border-radius: 999px; background: var(--soft); color: var(--soft-ink); font-weight: 800; }
.menu summary::-webkit-details-marker { display: none; }
.menu nav { position: absolute; right: 20px; top: 64px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px; display: grid; gap: 4px; min-width: 220px; box-shadow: var(--shadow); }
.menu nav a { color: var(--ink); text-decoration: none; font-weight: 700; padding: 10px 14px; border-radius: 12px; }
.menu nav a:hover { background: var(--soft); }

@media (max-width: 820px) {
  .nav { display: none; }
  .menu { display: block; }
}

/* ---------- buttons, pills, cards ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 26px; border-radius: 999px; font-weight: 800; text-decoration: none; border: 2px solid transparent; font-size: 1rem; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-soft { background: var(--soft); color: var(--soft-ink); }
.btn-soft:hover { filter: brightness(0.97); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-sun { background: var(--sun); color: var(--on-sun); }
.btn-small { padding: 9px 18px; font-size: 0.95rem; }

.pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 0.85rem; font-weight: 800; background: var(--soft); color: var(--soft-ink); }
.pill-mint { background: var(--mint-soft); color: var(--mint-ink); }
.pill-sun { background: var(--sun-soft); color: var(--sun-ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); display: inline-block; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card h3 { margin-bottom: 0.35em; }
.card p:last-child { margin-bottom: 0; }
.icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--soft); color: var(--soft-ink); margin-bottom: 16px; }
.icon svg { width: 26px; height: 26px; }
.icon-sun { background: var(--sun-soft); color: var(--sun-ink); }
.icon-mint { background: var(--mint-soft); color: var(--mint-ink); }

/* ---------- hero ---------- */
.hero { background: var(--primary); color: var(--on-primary); border-radius: 0 0 56px 56px; overflow: hidden; position: relative; }
.hero::before, .hero::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.hero::before { width: 380px; height: 380px; right: -120px; top: -140px; background: rgba(255, 255, 255, 0.1); }
.hero::after { width: 260px; height: 260px; left: -110px; bottom: -130px; background: rgba(255, 200, 61, 0.25); }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; padding-block: 72px 0; }
.hero p.lead { font-size: 1.25rem; opacity: 0.92; max-width: 34em; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 28px 8px; }
.hero .btn-primary { background: var(--sun); color: var(--on-sun); }
.hero .btn-ghost { border-color: rgba(255, 255, 255, 0.5); color: var(--on-primary); }
.hero .note { font-size: 0.95rem; opacity: 0.85; margin-bottom: 40px; }
.hero-art { display: flex; justify-content: center; align-items: flex-end; gap: 18px; }
.hero-art .phone:first-child { transform: translateY(26px) rotate(-3deg); }
.hero-art .phone:last-child { transform: translateY(70px) rotate(3deg); }
.hero-art .phone { width: min(44%, 250px); }

.page-hero { background: var(--primary); color: var(--on-primary); border-radius: 0 0 44px 44px; padding-block: 56px 60px; position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; width: 300px; height: 300px; border-radius: 50%; right: -100px; top: -120px; background: rgba(255, 255, 255, 0.1); }
.page-hero .wrap, .page-hero .narrow { position: relative; }
.page-hero h1 { font-size: clamp(2rem, 4.6vw, 3rem); margin-bottom: 0.3em; }
.page-hero p { font-size: 1.15rem; opacity: 0.92; margin: 0; max-width: 40em; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 52px; }
  .hero-art { margin-top: 8px; }
}

/* ---------- phones ---------- */
.phone { border-radius: 30px; overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--card); }
.phone img { width: 100%; }

/* ---------- sections ---------- */
section { padding-block: 56px; }
section + section { padding-top: 0; }
.section-head { max-width: 40em; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.eyebrow { display: inline-block; font-weight: 800; color: var(--soft-ink); background: var(--soft); border-radius: 999px; padding: 5px 14px; font-size: 0.85rem; margin-bottom: 14px; }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } section { padding-block: 40px; } .band { padding: 28px 22px; } }

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 0; list-style: none; margin: 0; }
.steps li { counter-increment: step; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; position: relative; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--sun); color: var(--on-sun); font-weight: 800; font-size: 1.2rem; margin-bottom: 16px; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.reverse .split-art { order: -1; }
.split-art { display: flex; justify-content: center; }
.split-art .phone { width: min(100%, 290px); }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; gap: 28px; } .split.reverse .split-art { order: 0; } }

.ticks { list-style: none; padding: 0; margin: 0 0 1.2em; display: grid; gap: 12px; }
.ticks li { padding-left: 38px; position: relative; }
.ticks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 24px; height: 24px; border-radius: 50%; background: var(--mint-soft); }
.ticks li::after { content: ""; position: absolute; left: 8px; top: 8px; width: 8px; height: 12px; border: solid var(--mint-ink); border-width: 0 3px 3px 0; transform: translate(0, -3px) rotate(45deg) scale(0.75); transform-origin: center; }
.ticks strong { font-weight: 800; }

.band { background: var(--soft); border-radius: var(--radius); padding: 44px; }
.band-sun { background: var(--sun-soft); color: var(--sun-ink); }
.band-primary { background: var(--primary); color: var(--on-primary); text-align: center; padding: 56px 28px; }
.band-primary p { opacity: 0.92; max-width: 34em; margin-inline: auto; }
.band-primary .btn-primary { background: var(--sun); color: var(--on-sun); }
.band h2 { margin-bottom: 0.4em; }
.band .eyebrow { background: var(--card); }

.stores { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 22px; }
.band-primary .btn-ghost { border-color: rgba(255, 255, 255, 0.5); color: var(--on-primary); }

/* ---------- FAQ ---------- */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 12px; padding: 4px 22px; }
.faq summary { cursor: pointer; font-weight: 800; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--soft-ink); }
.faq details[open] summary::after { content: "–"; }
.faq details > *:not(summary) { color: var(--muted); }
.faq details p:last-child { margin-bottom: 18px; }

/* ---------- long text (privacy, terms) ---------- */
.prose { padding-block: 48px 72px; }
.prose h2 { font-size: 1.6rem; margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.45em; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0 1.6em; font-size: 0.97rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; }
.table-scroll { overflow-x: auto; }
.meta { color: var(--muted); font-size: 0.95rem; }
.notice { background: var(--sun-soft); color: var(--sun-ink); border-radius: var(--radius-sm); padding: 16px 20px; font-weight: 700; margin-bottom: 28px; }
.todo { background: var(--coral-soft); color: var(--coral-ink); border-radius: 6px; padding: 0 6px; font-weight: 800; }
.toc { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 24px; margin-bottom: 28px; }
.toc ol { margin: 0.4em 0 0; padding-left: 1.2em; columns: 2; column-gap: 32px; }
@media (max-width: 640px) { .toc ol { columns: 1; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 44px 36px; color: var(--muted); font-size: 0.95rem; }
.foot { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot h2 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-bottom: 0.8em; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot a { color: var(--ink); text-decoration: none; font-weight: 700; }
.foot a:hover { text-decoration: underline; }
.fine { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.88rem; }
@media (max-width: 700px) { .foot { grid-template-columns: 1fr; } }

/* ---------- 404 and friends ---------- */
.empty { text-align: center; padding-block: 96px; }
.empty .icon { margin-inline: auto; width: 72px; height: 72px; border-radius: 50%; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
@media print { .site-header, .site-footer, .skip { display: none; } body { background: #fff; color: #000; } }
.download-box { text-align: center; }
.checksum { display: block; overflow-wrap: anywhere; word-break: break-all; padding: 12px 14px; border-radius: 12px; background: var(--soft); color: var(--soft-ink); font-size: 0.9rem; }
