/* Ember Clock site. Amber on near-black, like the app's night screen. Always dark.
   Structure follows featherfoot.app's stylesheet so the sister sites stay easy to maintain together. */
:root {
  color-scheme: dark;
  --bg: #0b0907;
  --surface: #15110c;
  --surface-2: #1f1910;
  --line: #2e261b;
  --text: #f1e9dc;
  --muted: #b5a893;
  --primary: #ffb000;
  --on-primary: #241800;
  --ember: #ff7a1a;
  --radius: 16px;
  --max: 1080px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--font);
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 7vw, 4rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.7rem, 4.2vw, 2.4rem); font-weight: 750; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; text-wrap: pretty; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 32px; } }

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

/* 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: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 750; font-size: 1.1rem; }
.brand img { width: 30px; height: 30px; }
.nav { display: flex; gap: 20px; font-size: .95rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); }
@media (max-width: 560px) { .nav .hide-sm { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 700; text-decoration: none; border: 1px solid transparent;
}
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: #ffc444; }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-static, .btn-static:hover { border-color: var(--line); cursor: default; }

/* Hero */
.hero { padding: 56px 0 72px; }
.hero .wrap { display: grid; gap: 48px; align-items: center; }
@media (min-width: 880px) { .hero .wrap { grid-template-columns: 1.15fr .85fr; } .hero { padding: 88px 0 104px; } }
.eyebrow { color: var(--primary); font-weight: 700; font-size: .9rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.lede { font-size: clamp(1.1rem, 2.4vw, 1.3rem); color: var(--muted); max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 16px; }
.fine { color: var(--muted); font-size: .9rem; }

/* Phone mock-up of the night screen: amber digits on true black, drifting slowly (the app's pixel shift) */
.phone {
  width: min(320px, 100%); margin: 0 auto;
  background: #000; border: 1px solid var(--line); border-radius: 40px; padding: 14px;
  box-shadow: 0 30px 80px -30px rgba(255, 176, 0, .28);
}
.screen { background: #000; border-radius: 28px; aspect-ratio: 9 / 17; display: grid; place-items: center; overflow: hidden; }
.night { text-align: center; animation: drift 24s ease-in-out infinite; }
.night-time { font-size: 5.2rem; font-weight: 300; line-height: 1; color: var(--primary); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; opacity: .85; }
.night-next { margin-top: 14px; font-size: .8rem; color: #8a6300; }
@keyframes drift {
  0%, 100% { transform: translate(0, 0); }
  25%      { transform: translate(6px, -10px); }
  50%      { transform: translate(-5px, 8px); }
  75%      { transform: translate(4px, 12px); }
}
@media (prefers-reduced-motion: reduce) { .night { animation: none; } }

/* Sections */
section { padding: 72px 0; border-top: 1px solid var(--line); }
@media (min-width: 880px) { section { padding: 96px 0; } }
.section-head { max-width: 40em; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 1.1rem; }

.features { display: grid; gap: 16px; }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .features { grid-template-columns: repeat(3, 1fr); } }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature p { color: var(--muted); margin: 0; }
.feature .icon { width: 40px; height: 40px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; margin-bottom: 14px; color: var(--primary); }
.feature .icon svg { width: 22px; height: 22px; }

/* Screenshots (none yet): a swipeable row on phones, four across on wide screens */
.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(62vw, 240px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px;
  margin: 0 -16px; padding-left: 16px; padding-right: 16px; scroll-padding: 0 16px;
  scrollbar-color: var(--line) transparent; scrollbar-width: thin;
}
@media (min-width: 640px) { .shots { margin: 0 -32px; padding-left: 32px; padding-right: 32px; scroll-padding: 0 32px; } }
@media (min-width: 960px) { .shots { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; margin: 0; padding: 0; } }
.shots figure { margin: 0; scroll-snap-align: start; }
.shots img { width: 100%; height: auto; background: #000; border: 1px solid var(--line); border-radius: 30px; padding: 8px; }
.shots figcaption { color: var(--muted); font-size: .9rem; text-align: center; margin-top: 12px; }

/* Tables */
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; min-width: 520px; font-variant-numeric: tabular-nums; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--line); }
tbody tr:last-child td { border-bottom: 0; }
thead th { background: var(--surface); font-size: .85rem; color: var(--muted); font-weight: 600; }
.note { color: var(--muted); font-size: .95rem; margin-top: 16px; }

/* Callouts */
.callout {
  display: grid; gap: 8px; background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--ember); border-radius: var(--radius); padding: 22px 24px;
}
.callout p { margin: 0; color: var(--muted); }
.callout strong { color: var(--text); }
.callout.ok { border-left-color: var(--primary); }
.callout + .callout { margin-top: 16px; }

.privacy-points { display: grid; gap: 16px; padding: 0; margin: 0; list-style: none; }
@media (min-width: 760px) { .privacy-points { grid-template-columns: repeat(3, 1fr); } }
.privacy-points li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; color: var(--muted); }
.privacy-points strong { display: block; color: var(--text); margin-bottom: 4px; }

/* Get the app */
.install { display: grid; gap: 32px; }
@media (min-width: 880px) { .install { grid-template-columns: 1fr 1fr; gap: 64px; } }

/* Long-form pages (privacy, terms, support, 404) */
.prose { max-width: 42em; padding: 56px 0 80px; }
.prose h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.prose h2 { font-size: 1.4rem; margin-top: 2em; }
.prose h3 { margin-top: 1.5em; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--text); }
.prose ul { padding-left: 1.2em; }
.prose table { min-width: 0; }

/* Draft marker for scaffold pages. Remove from each page when its copy is final. */
.draft { display: inline-block; background: var(--surface-2); color: var(--ember); border: 1px dashed var(--ember); border-radius: 8px; padding: 2px 10px; font-size: .85rem; font-weight: 700; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 48px; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { color: var(--muted); }
.family-line { flex-basis: 100%; margin: 0; }

/* Collapsible FAQ groups (support page) */
.faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-top: 12px; }
.faq:first-of-type { margin-top: 28px; }
.faq summary { display: flex; align-items: center; gap: 12px; padding: 18px 22px; cursor: pointer; list-style: none; border-radius: var(--radius); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h2 { flex: 1; margin: 0; font-size: 1.2rem; }
.faq summary:hover h2 { color: var(--primary); }
.faq-count { color: var(--muted); font-size: .9rem; white-space: nowrap; }
.faq summary::after {
  content: ""; flex: none; width: 9px; height: 9px; margin: -5px 2px 0 4px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
  transform: rotate(45deg); transition: transform .2s;
}
.faq[open] summary { border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.faq[open] summary::after { transform: rotate(225deg); margin-top: 5px; }
.faq-body { padding: 4px 22px 8px; }
.faq-body h3:first-child { margin-top: 1em; }
@media (prefers-reduced-motion: reduce) { .faq summary::after { transition: none; } }
