/* Brand colours: brand/identity/README.md (Ink, Paper, Paper on dark).
   The other values here are website-only: brand/design-system/tokens.md, Website. */
:root {
  --bg: #F6F4EF;          /* Paper */
  --surface: #FFFFFF;
  --text: #1D2A38;        /* Ink */
  --text-2: #4F5A66;
  --line: #E3DFD7;
  --button: #1D2A38;
  --button-text: #F6F4EF;
  --high: #FF3B30;        /* system red, the app's .concern */
  --glow-1: rgba(29, 42, 56, 0.10);
  --glow-2: rgba(90, 130, 175, 0.18);
  --radius: 12px;
  --radius-nested: 8px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10161D;
    --surface: #18212B;
    --text: #E9E5DE;      /* Paper on dark */
    --text-2: #A7B0BA;
    --line: #2A3440;
    --button: #E9E5DE;
    --button-text: #1D2A38;
    --high: #FF453A;
    --glow-1: rgba(90, 130, 175, 0.24);
    --glow-2: rgba(233, 229, 222, 0.09);
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Two soft glows drifting behind the page. Transform only, so it stays cheap to animate. */
body::before, body::after {
  content: "";
  position: fixed;
  z-index: -1;
  width: 90vmax;
  height: 90vmax;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}
body::before {
  top: -45vmax;
  left: -30vmax;
  background: radial-gradient(closest-side, var(--glow-1), transparent);
  animation: drift-a 36s ease-in-out infinite alternate;
}
body::after {
  bottom: -50vmax;
  right: -30vmax;
  background: radial-gradient(closest-side, var(--glow-2), transparent);
  animation: drift-b 44s ease-in-out infinite alternate;
}
@keyframes drift-a { to { transform: translate(55vw, 40vh) scale(1.15); } }
@keyframes drift-b { to { transform: translate(-55vw, -50vh) scale(0.9); } }
@media (prefers-reduced-motion: reduce) {
  body::before, body::after { animation: none; }
}

a { color: inherit; }
code { font: 0.9em ui-monospace, "SF Mono", Menlo, monospace; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.01em; }
h1 { font-size: clamp(30px, 5vw, 46px); font-weight: 700; }
h2 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 650; }
h3 { font-size: 17px; font-weight: 600; }
p { margin: 0 0 12px; }

.top, main, footer {
  max-width: 1040px;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 650; font-size: 19px; }
.brand img { display: block; }
.top .early-access { font-size: 15px; font-weight: 600; text-decoration: none; }
.top .early-access:hover { text-decoration: underline; }

section { padding: 56px 0; }
.faq { max-width: 680px; }
.closing { padding-top: 0; }

.hero { padding-top: 48px; padding-bottom: 0; }
.hero h1 { max-width: 820px; margin: 0 0 16px; }
.lead { color: var(--text-2); font-size: 19px; max-width: 680px; }
.hero .lead { margin: 0 0 28px; }
.meta { color: var(--text-2); font-size: 14px; margin-top: 16px; }
.small { color: var(--text-2); font-size: 14px; }

#email { scroll-margin-top: 160px; }
.signup { max-width: 520px; }
.signup .row { display: flex; gap: 8px; }
.signup input[type=email] {
  flex: 1;
  min-width: 0;
  font: inherit;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-nested);
  background: var(--surface);
  color: var(--text);
}
.signup input[type=email]:focus { outline: 2px solid var(--text); outline-offset: 1px; }
.consent { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; color: var(--text-2); margin-top: 10px; }
.consent input { margin-top: 2px; width: 16px; height: 16px; flex: none; accent-color: var(--text); }
.status { font-size: 15px; margin: 10px 0 0; min-height: 1.4em; }
.status.error { color: var(--high); }

button, .button {
  display: inline-block;
  text-decoration: none;
  font: inherit;
  font-weight: 600;
  padding: 11px 18px;
  border-radius: var(--radius-nested);
  border: 1px solid var(--button);
  background: var(--button);
  color: var(--button-text);
  cursor: pointer;
  white-space: nowrap;
}
button:hover, .button:hover { opacity: 0.88; }
button:disabled { opacity: 0.5; cursor: default; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* The app window, full-bleed: tilted back and fading off the bottom, over a faint dot grid. */
.stage {
  position: relative;
  width: 100vw;
  height: clamp(420px, 56vw, 760px);
  margin: -24px 0 0 calc(50% - 50vw);
  overflow: hidden;
  perspective: 2400px;
  background: radial-gradient(var(--line) 1px, transparent 1.4px) 0 0 / 22px 22px;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 62%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 62%, transparent);
}
.stage img {
  position: absolute;
  top: 7%;
  left: 50%;
  width: min(1320px, 92vw);
  height: auto;
  margin-left: calc(min(1320px, 92vw) / -2);
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
  transform: rotateX(24deg) rotateZ(-5deg);
  transform-origin: 50% 20%;
}

.privacy ul { list-style: none; padding: 0; margin: 20px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px 32px; }
.privacy li { color: var(--text-2); }
.privacy strong { color: var(--text); }
.privacy .small { margin: 16px 0 0; }

.faq details { border-top: 1px solid var(--line); padding: 14px 0; }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 8px; height: 8px; margin-top: 7px; border-right: 2px solid var(--text-2); border-bottom: 2px solid var(--text-2); transform: rotate(45deg); transition: transform 0.15s; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 11px; }
.faq details p { color: var(--text-2); margin: 10px 0 0; }

.legal { max-width: 720px; }
.legal h2 { font-size: 20px; margin-top: 28px; }
.legal p, .legal li { color: var(--text-2); }

footer { display: flex; gap: 20px; padding-top: 28px; padding-bottom: 40px; font-size: 14px; color: var(--text-2); }
footer a { text-decoration: none; }
footer a[href="/imprint"] { margin-left: auto; }
footer a:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .stage { width: auto; height: auto; margin: 16px 0 0; perspective: none; background: none; -webkit-mask-image: none; mask-image: none; }
  .stage img { position: static; display: block; width: 100%; margin: 0; transform: none; }
}

@media (max-width: 560px) {
  .privacy ul { grid-template-columns: 1fr; }
  section { padding: 40px 0; }
}

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s ease-out, transform 0.9s ease-out; }
.reveal.visible { opacity: 1; transform: none; }

[hidden] { display: none !important; }
