/* The site about Astrid. The tokens are the app's own (web/src/styles/base.css), so both look the same. */
:root {
  --bg: #f2f6fb;
  --surface: #ffffff;
  --text: #1f2328;
  --muted: #6b6f76;
  --border: #dbe4ef;
  --accent: #1d4ed8;
  --accent-text: #ffffff;
  --user-bubble: #1d4ed8;
  --user-text: #ffffff;
  --assistant-bubble: #ffffff;
  --notice-bg: #fff4e0;
  --notice-text: #7a4b00;
  --chart-track: #d9e5fb;

  --fs-caption: 0.75rem;
  --fs-meta: 0.8125rem;
  --fs-label: 0.9375rem;
  --fs-body: 1rem;
  --fs-title: 1.05rem;
  --fs-heading: 1.3rem;
  --fs-stat: 1.75rem;
  --fs-hero: 3rem;

  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --r-pill: 999px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11161d;
    --surface: #1a212b;
    --text: #e8eaed;
    --muted: #9aa0a6;
    --border: #2a3441;
    --accent: #60a5fa;
    --accent-text: #0a1a33;
    --user-bubble: #1e40af;
    --user-text: #eff6ff;
    --assistant-bubble: #1a212b;
    --notice-bg: #3a2c12;
    --notice-text: #f5d9a8;
    --chart-track: #1b3358;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.55;
}

/* One language at a time: site.js sets data-lang on <html>. */
html[data-lang='en'] [data-da],
html[data-lang='da'] [data-en] {
  display: none !important;
}

a {
  color: var(--accent);
}

.wrap {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Top bar */
.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.top .wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--fs-title);
  margin-right: auto;
}

.brand img {
  width: 32px;
  height: 32px;
}

.lang {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  overflow: hidden;
}

.lang button {
  min-height: 36px;
  min-width: 44px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: var(--fs-meta);
  font-weight: 600;
  cursor: pointer;
}

.lang button[aria-pressed='true'] {
  background: var(--accent);
  color: var(--accent-text);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--r-pill);
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  font-size: var(--fs-label);
  text-decoration: none;
  white-space: nowrap;
}

.button.quiet {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 56px;
}

.eyebrow {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--r-pill);
  background: var(--chart-track);
  color: var(--accent);
  font-size: var(--fs-meta);
  font-weight: 600;
}

h1 {
  font-size: var(--fs-hero);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 16px 0;
}

.lead {
  font-size: var(--fs-title);
  color: var(--muted);
  max-width: 34em;
  margin: 0 0 28px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* The phone in the hero: a few bubbles in the app's own look. */
.phone {
  justify-self: center;
  width: 100%;
  max-width: 340px;
  padding: 18px 14px;
  border-radius: 36px;
  background: var(--bg);
  border: 1px solid var(--border);
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.35);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: var(--r-xl);
  font-size: var(--fs-label);
  line-height: 1.4;
}

.bubble.me {
  align-self: flex-end;
  background: var(--user-bubble);
  color: var(--user-text);
  border-bottom-right-radius: 6px;
}

.bubble.astrid {
  align-self: flex-start;
  background: var(--assistant-bubble);
  border: 1px solid var(--border);
  border-bottom-left-radius: 6px;
}

.chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  padding: 6px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: var(--fs-meta);
  font-weight: 600;
}

/* Sections */
section {
  padding: 56px 0;
  border-top: 1px solid var(--border);
  /* Clear of the sticky top bar when a link jumps here. */
  scroll-margin-top: 60px;
}

h2 {
  font-size: var(--fs-stat);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.intro {
  color: var(--muted);
  max-width: 40em;
  margin: 0 0 32px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
}

.card h3 {
  font-size: var(--fs-title);
  margin: 12px 0 6px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: var(--fs-label);
}

.card .say {
  display: block;
  margin-top: 10px;
  font-size: var(--fs-meta);
  color: var(--accent);
  font-style: italic;
}

.icon {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: var(--chart-track);
  color: var(--accent);
  display: grid;
  place-items: center;
}

.icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.checks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.checks li {
  padding-left: 30px;
  position: relative;
}

.checks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--chart-track);
}

.checks li::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 7px;
  width: 5px;
  height: 9px;
  border: solid var(--accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.cta {
  text-align: center;
}

.cta .actions {
  justify-content: center;
}

/* Terms and privacy */
.doc {
  max-width: 760px;
  padding-top: 40px;
  padding-bottom: 56px;
}

.doc h1 {
  font-size: var(--fs-stat);
  margin: 0 0 4px;
}

.doc .updated {
  color: var(--muted);
  font-size: var(--fs-meta);
  margin: 0 0 24px;
}

.doc h2 {
  font-size: var(--fs-heading);
  margin: 32px 0 8px;
}

.doc p,
.doc li {
  font-size: var(--fs-body);
}

.doc ul {
  padding-left: 22px;
}

.doc li + li {
  margin-top: 6px;
}

.note {
  background: var(--notice-bg);
  color: var(--notice-text);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  font-size: var(--fs-label);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-label);
  margin: 8px 0 16px;
}

.table th,
.table td {
  text-align: left;
  vertical-align: top;
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
}

.table th {
  color: var(--muted);
  font-weight: 600;
  font-size: var(--fs-meta);
}

.table code {
  font-size: var(--fs-meta);
  word-break: break-word;
}

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: var(--fs-meta);
}

footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
}

footer nav {
  display: flex;
  gap: 4px 20px;
  flex-wrap: wrap;
  margin-left: auto;
}

footer a {
  color: var(--muted);
  display: inline-block;
  padding: 10px 0;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 40px;
    padding-bottom: 40px;
  }

  h1 {
    font-size: 2.25rem;
  }

  .grid {
    grid-template-columns: 1fr 1fr;
  }

  .split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .top .open {
    display: none;
  }

  footer nav {
    margin-left: 0;
  }
}
