/* Tokens copied from the design reference (design/styles/tokens.css). Keep values in sync with it. */
@font-face {
  font-family: 'Source Sans 3';
  src: url('fonts/SourceSans3VF-Upright.otf') format('opentype');
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  /* Neutral materials. The same semantic tokens drive every screen and popup. */
  --paper: #eeede9;
  --ink: #292a27;
  --muted: #64665f;
  --line: #d4d3cd;
  --surface: #f7f6f2;
  --surface-high: #fffefa;
  --surface-low: #e2e1db;
  --white: var(--surface);
  --stone: #deddd6;
  --silver: #e4e4df;
  --sand: #e2ded5;
  --accent: #51554b;
  --on-accent: #fffefa;
  --positive: #4c5943;
  --control-on: #656b5d;
  --attention: #75603f;
  --attention-surface: #e9e3d8;
  --focus-color: #5b6253;
  --canvas: #deddd7;
  --toolbar: #e9e8e3;
  --surface-gradient: linear-gradient(145deg, #fcfbf8, #efeee8);
  --button-gradient: linear-gradient(180deg, #faf9f6, #e9e8e1);
  --accent-gradient: linear-gradient(180deg, #5f6358, #45483f);
  --thumb-gradient: linear-gradient(145deg, #fffefa, #dbdad3);
  --dial-gradient: radial-gradient(circle at 36% 28%, #fffefa, #e6e4dc);
  --surface-shadow: 4px 5px 12px #28291f12, -3px -3px 10px #ffffff70, inset 0 1px 0 #ffffffcc;
  --button-shadow: 0 2px 3px #28291f1c, inset 0 1px 0 #ffffffdd;
  --inset-shadow: inset 2px 2px 5px #28291f20, inset -2px -2px 5px #ffffffb3;
  --accent-shadow: 0 3px 5px #28291f22, inset 0 1px 0 #ffffff26;
  --frame-shadow: 8px 12px 32px #28291f16, -5px -5px 18px #ffffff55;
  --alarm-surface: linear-gradient(150deg, #f6f5ef, #dfddd5);
  --alarm-ink: var(--ink);
  --alarm-muted: #62645b;
  --alarm-line: #cbc9c0;
  --alarm-accent: #53594a;
  --on-dark-muted: var(--alarm-muted);
  --line-dark: var(--alarm-line);
  --overlay: #1b1c1766;
  --font-body: 'Source Sans 3', ui-sans-serif, system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Consolas, monospace;
  --text-xs: 0.8125rem;
  --text-sm: 0.875rem;
  --text-body: 1rem;
  --text-label: 0.9375rem;
  --text-section: 1.0625rem;
  --text-dialog: 1.625rem;
  --text-title: 2rem;
  --weight-body: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --leading-body: 1.5;
  --leading-heading: 1.2;
  --tracking-heading: -0.02em;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 1.625rem;
  --space-7: 2rem;
  --radius-sm: 0.75rem;
  --radius-md: 1.125rem;
  --radius-card: 1.375rem;
  --radius-lg: 1.625rem;
  --content-width: 37.5rem;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #242522;
  --ink: #eeede7;
  --muted: #b5b6ac;
  --line: #42443d;
  --surface: #2e302b;
  --surface-high: #383a34;
  --surface-low: #1d1f1b;
  --stone: #42443b;
  --silver: #3d423c;
  --sand: #48443c;
  --accent: #d4d7c8;
  --on-accent: #25281f;
  --positive: #bac5a6;
  --control-on: #737e65;
  --attention: #d4c19e;
  --attention-surface: #3a352b;
  --focus-color: #c2c9b2;
  --canvas: #1a1c18;
  --toolbar: #262823;
  --surface-gradient: linear-gradient(145deg, #343630, #292b26);
  --button-gradient: linear-gradient(180deg, #3b3e35, #2d3028);
  --accent-gradient: linear-gradient(180deg, #e1e3d7, #c4c9b6);
  --thumb-gradient: linear-gradient(145deg, #e9eade, #b1b7a2);
  --dial-gradient: radial-gradient(circle at 36% 28%, #3b3f33, #262920);
  --surface-shadow: 4px 5px 12px #00000040, -3px -3px 10px #ffffff03, inset 0 1px 0 #ffffff12;
  --button-shadow: 0 2px 4px #00000055, inset 0 1px 0 #ffffff14;
  --inset-shadow: inset 2px 2px 5px #00000066, inset -2px -2px 5px #ffffff08;
  --accent-shadow: 0 3px 6px #00000055, inset 0 1px 0 #ffffff66;
  --frame-shadow: 8px 12px 32px #00000066, -5px -5px 18px #ffffff02;
  --alarm-surface: linear-gradient(150deg, #35392f, #24271f);
  --alarm-ink: #f0f0e7;
  --alarm-muted: #bfc4b2;
  --alarm-line: #4c5143;
  --alarm-accent: #d2dac0;
  --overlay: #05060599;
}

/* Site layout. Mirrors the design reference's materials: paper, raised surfaces, outline notes. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; font-family: var(--font-body); font-weight: var(--weight-body); font-synthesis: none; font-optical-sizing: auto; color: var(--ink); background: var(--paper); font-size: var(--text-body); line-height: var(--leading-body); }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { overflow-wrap: anywhere; text-wrap: balance; }
strong { font-weight: var(--weight-semibold); }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus-color); outline-offset: 3px; border-radius: 4px; }
svg { flex-shrink: 0; }
.icon { width: 24px; height: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 16px; top: -48px; z-index: 2; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--ink); color: var(--paper); }
.skip-link:focus { top: 12px; }
.eyebrow { color: var(--muted); font-size: var(--text-xs); line-height: 1.4; font-weight: var(--weight-semibold); letter-spacing: 0.06em; text-transform: uppercase; }
.muted { color: var(--muted); }

.wrap { width: 100%; max-width: 64rem; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: calc(var(--content-width) + 48px); }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: var(--weight-semibold); text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--button-gradient); border: 1px solid var(--line); box-shadow: var(--button-shadow); }
.brand-mark .icon { width: 22px; height: 22px; }
.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 999px; color: var(--muted); font-size: var(--text-sm); text-decoration: none; }
.site-nav a:hover { color: var(--ink); background: var(--surface-low); }
.site-nav a[aria-current="page"] { color: var(--ink); font-weight: var(--weight-semibold); }
.theme-button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); cursor: pointer; }
.theme-button:hover { color: var(--ink); background: var(--surface-low); }
.theme-button .icon { width: 20px; height: 20px; }

main { flex: 1; }

/* Hero */
.hero { padding: 56px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 1fr; align-items: center; gap: 48px; }
.hero-copy { display: flex; flex-direction: column; gap: 18px; }
.hero h1 { font-size: clamp(2.25rem, 6vw, 3.5rem); font-weight: var(--weight-semibold); line-height: 1.08; letter-spacing: -0.03em; }
.lede { color: var(--muted); font-size: 1.1875rem; line-height: 1.55; max-width: 32rem; }

/* Store and source links */
/* 16px gap keeps the badges' required clear space (a quarter of their 48px height). */
.get-links { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 10px; }
.store-badge { display: block; border-radius: 9px; line-height: 0; }
.store-badge img { display: block; height: 48px; width: auto; }
.store-badge[aria-disabled="true"] { cursor: default; }
/* Matches the store badges' black, grey-bordered shape; GitHub permits its logo only in white or black. */
.github-badge { display: flex; flex-direction: column; justify-content: center; gap: 3px; height: 48px; padding: 0 14px; border: 1px solid #a6a6a6; border-radius: 9px; background: #000; color: #fff; text-decoration: none; }
.github-badge small { font-size: 0.6875rem; line-height: 1; letter-spacing: 0.01em; }
.github-badge img { display: block; height: 18px; width: auto; }
.get-note { color: var(--muted); font-size: var(--text-sm); }
.get-note + .get-note { margin-top: -10px; }

/* App preview card (invented data, mirrors the Home screen's next-alarm card) */
.preview { position: relative; display: grid; place-items: center; }
.preview-frame { width: min(100%, 360px); padding: 22px; border-radius: 34px; background: var(--canvas); border: 1px solid var(--line); box-shadow: var(--frame-shadow); display: flex; flex-direction: column; gap: 14px; }
.next-alarm { background: var(--alarm-surface); color: var(--alarm-ink); border: 1px solid var(--alarm-line); box-shadow: var(--surface-shadow); border-radius: 22px; padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.next-alarm-clock { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.alarm-time { font-size: 3.25rem; line-height: 1.05; letter-spacing: -0.035em; font-variant-numeric: lining-nums tabular-nums; }
.alarm-caption { color: var(--alarm-muted); font-size: var(--text-sm); margin-top: 6px; }
.signal-dial { color: var(--alarm-accent); width: 80px; height: 80px; border-radius: 50%; background: var(--dial-gradient); border: 1px solid var(--alarm-line); box-shadow: var(--inset-shadow); padding: 9px; }
.next-alarm-meeting { border-top: 1px solid var(--alarm-line); padding-top: 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.next-alarm-meeting h3 { font-size: 1.0625rem; font-weight: var(--weight-semibold); line-height: 1.4; }
.next-alarm-meeting p { margin-top: 2px; color: var(--alarm-muted); font-size: var(--text-sm); }
.pill { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; font-size: var(--text-xs); font-weight: var(--weight-medium); white-space: nowrap; background: var(--surface); }
.agenda-list { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: var(--surface-shadow); }
.agenda-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.agenda-row:last-child { border-bottom: 0; }
.agenda-row > strong { flex: 0 0 44px; font-variant-numeric: tabular-nums; font-size: var(--text-sm); }
.agenda-row > span { display: flex; flex-direction: column; min-width: 0; font-size: var(--text-label); font-weight: var(--weight-semibold); }
.agenda-row small { color: var(--muted); font-size: var(--text-xs); font-weight: var(--weight-body); }
.preview-caption { margin-top: 14px; color: var(--muted); font-size: var(--text-xs); text-align: center; }

/* Sections */
.section { padding: 56px 0; border-top: 1px solid var(--line); }
.section-head { display: flex; flex-direction: column; gap: 8px; margin-bottom: 28px; max-width: 36rem; }
.section-head h2 { font-size: var(--text-title); font-weight: var(--weight-semibold); line-height: var(--leading-heading); letter-spacing: var(--tracking-heading); }
.section-head p { color: var(--muted); }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.feature { display: flex; align-items: flex-start; gap: 14px; padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-gradient); box-shadow: var(--surface-shadow); }
.feature-icon { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; background: var(--stone); }
.feature-icon .icon { width: 22px; height: 22px; }
.feature h3 { font-size: var(--text-section); font-weight: var(--weight-semibold); margin-bottom: 4px; }
.feature p { color: var(--muted); font-size: var(--text-label); line-height: 1.6; }
.platform-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.outline-note { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.outline-note h3 { font-size: var(--text-section); font-weight: var(--weight-semibold); }
.outline-note p { color: var(--muted); font-size: var(--text-label); line-height: 1.6; }
.outline-note.is-attention { background: var(--attention-surface); border-color: transparent; }

/* Documents (privacy, license) */
.doc { padding: 48px 0 64px; }
.doc-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; }
.doc-head h1 { font-size: clamp(2rem, 5vw, 2.5rem); font-weight: var(--weight-semibold); line-height: var(--leading-heading); letter-spacing: var(--tracking-heading); }
.summary { padding: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-gradient); box-shadow: var(--surface-shadow); margin-bottom: 8px; }
.prose { display: flex; flex-direction: column; gap: 14px; font-size: 1.0625rem; line-height: 1.65; }
.prose h2 { margin-top: 22px; font-size: 1.25rem; font-weight: var(--weight-semibold); line-height: var(--leading-heading); }
.prose ul { margin: 0; padding-left: 1.25rem; display: flex; flex-direction: column; gap: 8px; }
.prose address { font-style: normal; }
.license-text { display: flex; flex-direction: column; gap: 12px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface-low); box-shadow: var(--inset-shadow); font-size: var(--text-label); line-height: 1.6; }
.license-text p:first-child { font-weight: var(--weight-semibold); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 36px; color: var(--muted); font-size: var(--text-sm); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.legal { flex-basis: 100%; font-size: var(--text-xs); line-height: 1.5; }

@media (max-width: 760px) {
  .hero { padding: 32px 0 48px; }
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .feature-grid, .platform-grid { grid-template-columns: 1fr; }
  .section { padding: 44px 0; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 16px; }
  .site-nav .nav-optional { display: none; }
  .preview-frame { padding: 16px; border-radius: 28px; }
  .alarm-time { font-size: 2.75rem; }
  .signal-dial { width: 66px; height: 66px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }
