/* Colors follow the app's palette (src/theme/palette.ts in the app repo). */
:root {
  color-scheme: light dark;
  --background: #f4f2ee;
  --surface: #ffffff;
  --text: #1b1d22;
  --muted: #6b6f7a;
  --border: #dedad2;
  --accent: #4263eb;
  --link: #3552d0;
  --pale: #e5eafc;
  --soft: #dde4fc;
  --deep: #283b8d;
  --rounded: ui-rounded, 'SF Pro Rounded', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #0f1114;
    --surface: #1c1f25;
    --text: #f1f3f5;
    --muted: #9ba1ac;
    --border: #2c3038;
    --accent: #748ffc;
    --link: #91a7ff;
    --pale: #2e3550;
    --soft: #2b3455;
    --deep: #465697;
  }
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 17px/1.6 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-text-size-adjust: 100%;
}
a {
  color: var(--link);
}
h1,
h2,
h3,
.brand {
  font-family: var(--rounded);
  line-height: 1.2;
}

.site-header,
main,
.site-footer {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px;
}
.site-header,
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
}
.site-header {
  padding-top: 20px;
  padding-bottom: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.brand img {
  border-radius: 8px;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
}
nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 6px 0;
}
nav a:hover {
  color: var(--text);
}
.site-footer {
  margin-top: 64px;
  padding-top: 20px;
  padding-bottom: 32px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 15px;
}
.site-footer p {
  margin: 0;
}

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 40px;
  padding: 40px 0 56px;
}
.hero h1 {
  font-size: clamp(32px, 6vw, 46px);
  margin: 0 0 16px;
}
.lead {
  font-size: 19px;
  color: var(--muted);
  margin: 0 0 20px;
  max-width: 34em;
}
.soon {
  display: inline-block;
  margin: 0;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--soft);
  font-weight: 600;
}

.demo {
  text-align: center;
}
.counter {
  --progress: 0;
  position: relative;
  width: 240px;
  height: 240px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  background: none;
  color: var(--text);
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
/* The ring: a track with the progress drawn over it. */
.counter::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--progress) * 360deg), var(--soft) 0);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 8px), #000 calc(100% - 7px));
  mask: radial-gradient(closest-side, transparent calc(100% - 8px), #000 calc(100% - 7px));
}
/* The raised face. */
.counter::after {
  content: '';
  position: absolute;
  inset: 16px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 18%, rgb(255 255 255 / 0.25), transparent 70%), var(--pale);
  box-shadow: 0 8px 14px rgb(27 29 34 / 0.18);
  transition:
    transform 0.08s,
    box-shadow 0.08s,
    background-color 0.2s;
}
.counter:active::after {
  transform: scale(0.955);
  box-shadow: 0 3px 6px rgb(27 29 34 / 0.12);
}
.counter:focus-visible {
  outline: 3px solid var(--link);
  outline-offset: 4px;
}
.counter[data-state='active']::after {
  background-color: var(--accent);
}
.counter[data-state='ended']::after {
  background-color: var(--deep);
}
.counter > * {
  position: relative;
  z-index: 1;
}
.counter .arrow {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.counter .count {
  font: 700 76px/1.1 var(--rounded);
  font-variant-numeric: tabular-nums;
}
.counter .detail {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
}
.counter:not([data-state='new']) {
  color: #fff;
}
.counter:not([data-state='new']) .detail {
  color: rgb(255 255 255 / 0.8);
}
.counter:not([data-state='new']) .arrow {
  stroke: rgb(255 255 255 / 0.8);
}
.demo-caption {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
}
.link {
  border: 0;
  background: none;
  padding: 6px;
  font: inherit;
  color: var(--link);
  text-decoration: underline;
  cursor: pointer;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.features > div {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px;
}
.features h2 {
  font-size: 19px;
  margin: 0 0 6px;
}
.features p {
  margin: 0;
  color: var(--muted);
}

.prose {
  max-width: 680px;
  padding: 24px 0;
}
.prose h1 {
  font-size: 36px;
  margin: 0 0 8px;
}
.prose h2 {
  font-size: 23px;
  margin: 36px 0 8px;
}
.prose h3 {
  font-size: 18px;
  margin: 24px 0 4px;
}
.prose p {
  margin: 0 0 14px;
}
.meta {
  color: var(--muted);
}

@media (max-width: 680px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 16px;
  }
}
