:root {
  --bg: #09090a;
  --text: #ededee;
  --strong: #ffffff;
  --dim: #b4b4b8;
  --line: rgba(255, 255, 255, 0.07);
  --card-top: rgba(255, 255, 255, 0.035);
  --card-bottom: rgba(255, 255, 255, 0.012);
  --card-shadow: rgba(0, 0, 0, 0.35);
  --video-shadow: rgba(0, 0, 0, 0.55);
  --glow-warm: rgba(150, 62, 18, 0.32);
  --glow-cool: rgba(40, 44, 60, 0.35);
  --caret: #ff8a1f;
  --panel: #4c4c4c;
  --editor-bg: #0f120f;
  --editor-text: #b8b8ba;
  --editor-dim: #787885;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: dark;
}

/* Light: warm paper, same orange caret */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #ffffff;
    --text: #161616;
    --strong: #000000;
    --dim: #4a4a4a;
    --line: rgba(0, 0, 0, 0.07);
    --card-top: rgba(255, 255, 255, 0.75);
    --card-bottom: rgba(255, 255, 255, 0.45);
    --card-shadow: rgba(60, 40, 20, 0.08);
    --video-shadow: rgba(40, 30, 20, 0.22);
    --glow-warm: rgba(255, 150, 70, 0);
    --glow-cool: rgba(255, 255, 255, 0);
    --caret: #e2701a;
    --panel: #efefef;
    --editor-bg: #ffffff;
    --editor-text: #262626;
    --editor-dim: #999999;
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --panel: #efefef;
  --editor-bg: #ffffff;
  --editor-text: #262626;
  --editor-dim: #999999;
  --bg: #ffffff;
  --text: #161616;
  --strong: #000000;
  --dim: #4a4a4a;
  --line: rgba(0, 0, 0, 0.07);
  --card-top: rgba(255, 255, 255, 0.75);
  --card-bottom: rgba(255, 255, 255, 0.45);
  --card-shadow: rgba(60, 40, 20, 0.08);
  --video-shadow: rgba(40, 30, 20, 0.22);
  --glow-warm: rgba(255, 150, 70, 0);
  --glow-cool: rgba(255, 255, 255, 0);
  --caret: #e2701a;
  color-scheme: light;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  /* a low warm glow, like the app icon's caret, and a faint one up top */
  background-image:
    radial-gradient(ellipse 70% 45% at 50% 108%, var(--glow-warm), transparent 70%),
    radial-gradient(ellipse 50% 35% at 15% -5%, var(--glow-cool), transparent 70%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--mono);
  font-weight: 300;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 0.3s, color 0.3s;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--strong); }
a:focus-visible, button:focus-visible { outline: 1px solid var(--caret); outline-offset: 4px; border-radius: 4px; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 40px;
}
.brand { display: flex; align-items: center; gap: 12px; color: var(--text); }
.brand img { border-radius: 7px; }
.top nav { display: flex; align-items: center; gap: 20px; }
.store-link { color: var(--dim); font-size: 13px; }
.theme-toggle {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--strong); background: var(--line); }

.caret {
  display: inline-block;
  width: 0.09em;
  height: 0.9em;
  margin-left: 0.12em;
  vertical-align: -0.08em;
  background: var(--caret);
  border-radius: 2px;
  animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

.price { text-align: center; padding: 4vh 0 14vh; color: var(--text); }
.price p { margin: 0; }

.download {
  display: inline-block;
  margin-top: 40px;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--strong);
  color: var(--bg);
}
.download:hover { color: var(--bg); opacity: 0.88; }

footer {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 28px;
  padding: 48px 24px 64px;
  color: var(--dim);
  font-size: 12px;
}

/* privacy page */
.doc { max-width: 640px; margin: 0 auto; padding: 8vh 0 12vh; }
.doc h1 { font-weight: 300; font-size: 28px; color: var(--strong); margin: 0 0 4px; }
.doc .meta { color: var(--dim); margin: 0 0 40px; }
.doc h2 { font-weight: 400; font-size: 15px; color: var(--strong); margin: 40px 0 8px; }
.doc a { color: var(--caret); }

@media (max-width: 760px) {
  .top { padding: 20px 16px; }
              }

@media (prefers-reduced-motion: reduce) {
  .caret { animation: none; }
  body { transition: none; }
}

/* ---------- app-like opening screen ---------- */
.top { position: absolute; top: 0; left: 0; right: 0; z-index: 2; }
main { padding: 0; }
.hero { height: 100vh; height: 100svh; }
.hero-video { display: none; }
/* Mac-size screens: the recorded app window under the header, as large as fits */
@media (min-width: 761px) {
  .top { position: static; }
  .hero {
    height: auto;
    display: grid;
    place-items: center;
    padding: 0 16px;
  }
  .hero-video {
    display: block;
    width: min(100%, calc((100svh - 104px) * 1.6));
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    background: var(--editor-bg);
    box-shadow: 0 24px 80px var(--video-shadow), 0 0 0 1px var(--line);
  }
  .hero .editor-hero { display: none; }
}
/* Stays on screen all the way down; dark on light, light on dark */
.sticky-download {
  position: fixed;
  left: clamp(24px, 9vw, 160px);
  bottom: clamp(24px, 6vh, 56px);
  z-index: 5;
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--strong);
  color: var(--bg);
  font-size: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  transition: transform 0.2s ease, opacity 0.7s ease, filter 0.7s ease;
}
.sticky-download:hover { color: var(--bg); transform: translateY(-1px); }
/* Dissolves away once the closing download button is on screen */
.sticky-download.gone {
  opacity: 0;
  filter: blur(8px);
  transform: scale(0.96);
  pointer-events: none;
}
.editor-hero {
  height: 100%;
  padding: 0 clamp(24px, 9vw, 160px);
  background: var(--editor-bg);
  display: flex;
  flex-direction: column;
}

.editor-header {
  display: flex;
  justify-content: space-between;
  padding-top: clamp(120px, 20vh, 200px);
  color: var(--editor-dim);
  font-size: 14px;
}
.editor-text {
  margin: clamp(56px, 10vh, 96px) 0 0;
  max-width: 22ch;
  font-weight: 300;
  font-size: clamp(26px, 4vw, 48px);
  line-height: 1.3;
  color: var(--editor-text);
}

/* ---------- features: snippet on the left, words on the right ---------- */
.features { padding: 16vh 16px 0; }
/* Each feature: a line of text, then the app itself, nearly full size */
.row {
  max-width: 1200px;
  margin: 0 auto 18vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.copy { max-width: 40ch; margin-bottom: 36px; text-align: center; }
.row video {
  display: block;
  background: var(--editor-bg);
  box-shadow: 0 30px 90px var(--video-shadow), 0 0 0 1px var(--line);
}
.row.mac video { width: 100%; aspect-ratio: 16 / 10; border-radius: 14px; }
.row.phone video { height: min(82vh, 820px); aspect-ratio: 590 / 1282; border-radius: 44px; }
.copy h2 { margin: 0 0 12px; font-weight: 400; font-size: 18px; color: var(--strong); }
.copy p { margin: 0; color: var(--text); }

@media (max-width: 760px) {
  .editor-hero { padding: 0 20px; }
  .features { padding: 10vh 12px 0; }
  .row { margin-bottom: 12vh; }
  .copy { margin-bottom: 24px; padding: 0 8px; }
  .row.mac video { border-radius: 8px; }
  .row.phone video { height: auto; width: min(78vw, 360px); border-radius: 32px; }
}

@media (max-width: 760px) {
  .sticky-download { left: 20px; bottom: 20px; }
}
