/* Shared styles for countdown.adev.in. Palette lifted from the app's own theme, so the site looks
   like part of the product. Light is the base; the dark blocks below redefine only tokens. */

:root {
  --ground:   #F6F8FB;
  --ground-2: #EEF2F8;
  --surface:  #FFFFFF;
  --ink:      #0F141B;
  --muted:    #5A6676;
  --faint:    #8994A3;
  --rule:     #DEE5EE;
  --accent:   #3B78E7;
  --accent-2: #6C9BFF;
  --amber:    #E8952F;
  --red:      #E5484D;
  --affirm:   #14937A;
  --on-accent:#FFFFFF;
  --glass:    rgba(246, 248, 251, .78);
  --shadow-sm: 0 1px 2px rgba(15, 20, 27, .06);
  --shadow:    0 1px 2px rgba(15, 20, 27, .05), 0 12px 32px -14px rgba(15, 20, 27, .22);
  --shadow-lg: 0 2px 6px rgba(15, 20, 27, .06), 0 30px 60px -24px rgba(15, 20, 27, .35);
  --halo:      rgba(59, 120, 231, .16);

  --serif: "Newsreader", ui-serif, Georgia, "Times New Roman", serif;
  --sans:  "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:  "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --gutter: clamp(1rem, 4vw, 2rem);
  --wide:   72rem;
  --narrow: 46rem;
  --radius: 18px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:   #090C11;
    --ground-2: #0D1219;
    --surface:  #121821;
    --ink:      #EDF2F7;
    --muted:    #94A1B2;
    --faint:    #6B7889;
    --rule:     #212B37;
    --accent:   #6FA0FF;
    --accent-2: #9BBEFF;
    --amber:    #F0A23F;
    --red:      #FF6369;
    --affirm:   #35D6B6;
    --on-accent:#08101E;
    --glass:    rgba(9, 12, 17, .72);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
    --shadow:    0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -14px rgba(0, 0, 0, .8);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .4), 0 30px 60px -24px rgba(0, 0, 0, .9);
    --halo:      rgba(111, 160, 255, .14);
  }
}

:root[data-theme="dark"] {
  --ground:   #090C11;
  --ground-2: #0D1219;
  --surface:  #121821;
  --ink:      #EDF2F7;
  --muted:    #94A1B2;
  --faint:    #6B7889;
  --rule:     #212B37;
  --accent:   #6FA0FF;
  --accent-2: #9BBEFF;
  --amber:    #F0A23F;
  --red:      #FF6369;
  --affirm:   #35D6B6;
  --on-accent:#08101E;
  --glass:    rgba(9, 12, 17, .72);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow:    0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -14px rgba(0, 0, 0, .8);
  --shadow-lg: 0 2px 6px rgba(0, 0, 0, .4), 0 30px 60px -24px rgba(0, 0, 0, .9);
  --halo:      rgba(111, 160, 255, .14);
}

/* ---- base ------------------------------------------------------------- */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

p { margin: 0 0 1rem; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

strong { font-weight: 600; }

code, .mono { font-family: var(--mono); font-size: .875em; }

.wrap   { max-width: var(--wide);   margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: var(--narrow); margin: 0 auto; padding: 0 var(--gutter); }

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 .875rem;
}

h1, h2, h3 { text-wrap: balance; }

h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2.5rem, 7.5vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -.025em;
  margin: 0 0 1.25rem;
}

h1 em { font-style: italic; color: var(--accent); }

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.75rem, 4.5vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -.018em;
  margin: 0 0 1rem;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 .4rem;
}

.lede {
  font-size: clamp(1.0625rem, 2.4vw, 1.25rem);
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

.section-head { max-width: 40rem; margin-bottom: 2.5rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--muted); }

/* ---- header ----------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--glass);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}

.site-header.scrolled { border-bottom-color: var(--rule); }

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  color: inherit;
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: .005em;
}

.brand img { width: 30px; height: 30px; border-radius: 8px; box-shadow: var(--shadow-sm); }

.nav { margin-left: auto; display: flex; align-items: center; gap: .25rem; }

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  padding: .45rem .75rem;
  border-radius: 999px;
  transition: color .15s, background .15s;
}

.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); background: var(--ground-2); }

.theme-toggle {
  flex: none;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  margin-left: .25rem;
}

.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}

@media (max-width: 40rem) {
  .nav .hide-sm { display: none; }
  .nav a { padding: .45rem .6rem; }
}

/* ---- buttons ---------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  min-height: 3rem;
  padding: .75rem 1.4rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: .975rem;
  text-decoration: none;
  border: 1px solid transparent;
  box-shadow: 0 8px 24px -10px var(--accent);
  transition: transform .15s, box-shadow .15s, filter .15s;
}

.button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.button svg { width: 20px; height: 20px; flex: none; }

.button.ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--rule);
  box-shadow: var(--shadow-sm);
}

.button.soon { cursor: default; color: var(--muted); }
.button.soon:hover { transform: none; filter: none; }

/* ---- cards ------------------------------------------------------------ */

.card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.icon-badge {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--tone, var(--accent)) 14%, transparent);
  color: var(--tone, var(--accent));
  margin-bottom: 1.1rem;
}

.icon-badge svg { width: 22px; height: 22px; }

/* ---- footer ----------------------------------------------------------- */

.site-footer {
  margin-top: 6rem;
  border-top: 1px solid var(--rule);
  background: var(--ground-2);
  padding: 2.5rem 0 3rem;
  font-size: .9rem;
  color: var(--muted);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}

.site-footer .brand { font-size: 1rem; color: var(--ink); }
.site-footer .brand img { width: 24px; height: 24px; border-radius: 6px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer .small { margin-left: auto; font-family: var(--mono); font-size: .75rem; }

@media (max-width: 40rem) {
  .site-footer .small { margin-left: 0; width: 100%; }
}

/* ---- reveal on scroll ------------------------------------------------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
