/* The public landing page. The colors are the app's (apps/mobile/lib/ui/theme.dart), so moving between them feels like one
   product. Every claim on the page has to match backend/app/static/account/privacy.html: privacy is what's being sold. */

@font-face { font-family: "Roboto"; src: url("/fonts/roboto-regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("/fonts/roboto-medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("/fonts/roboto-bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  --board: #08090B;
  --island: #131418;
  --island-2: #191B20;
  --island-3: #202228;
  --line: #25272D;
  --line-strong: #43464F;
  --text: #EDEEF0;
  --muted: #9C9FA8;
  --accent: #635BFF;
  --accent-text: #9791FF;
  --accent-soft: #252347;
  --mark-a: #7C6CFF;
  --mark-b: #38D6E8;
  --mark-c: #FFFFFF;
  --shadow: 0 30px 80px rgba(0, 0, 0, .55);
  --radius: 22px;
  --gutter: clamp(20px, 3.4vw, 72px);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --board: #ECECF0;
    --island: #FFFFFF;
    --island-2: #F5F5F7;
    --island-3: #E9E9ED;
    --line: #DEDEE4;
    --line-strong: #B9BBC3;
    --text: #15161A;
    --muted: #5C5F68;
    --accent-text: #5148F0;
    --accent-soft: #E9E8FF;
    --mark-a: #6C5FF5;
    --mark-b: #0EA5B7;
    --mark-c: #12122A;
    --shadow: 0 30px 70px rgba(30, 30, 60, .16);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--board);
  color: var(--text);
  font: 400 clamp(1rem, .94rem + .16vw, 1.2rem) / 1.55 Roboto, "Segoe UI", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3, p, figure, ul { margin: 0; padding: 0; }
ul { list-style: none; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 2400px; margin-inline: auto; padding-inline: var(--gutter); }

.mark-a { stroke: var(--mark-a); }
.mark-b { stroke: var(--mark-b); }
.mark-c { stroke: var(--mark-c); }

.icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon.large { width: 30px; height: 30px; color: var(--accent-text); }

/* ------------------------------------------------------------ the bar along the top */
.top {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--board) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}
.top-row { display: flex; align-items: center; gap: 28px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 32px; height: 32px; }
.brand-name { font-size: 1.2rem; font-weight: 700; letter-spacing: -.015em; white-space: nowrap; }
.brand-name span { font-weight: 400; color: var(--muted); }
.top-nav { display: flex; gap: 26px; margin-left: 18px; }
.top-nav a { color: var(--muted); text-decoration: none; font-size: .95rem; font-weight: 500; }
.top-nav a:hover { color: var(--text); }
.top-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.link-button { font-weight: 500; font-size: .95rem; text-decoration: none; padding: 8px 12px; border-radius: 10px; white-space: nowrap; }
.link-button:hover { background: var(--island-3); }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 52px; padding: 0 24px;
  background: var(--accent); color: #fff;
  border: 1px solid transparent; border-radius: 15px;
  font-weight: 500; text-decoration: none; white-space: nowrap;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.button:hover { background: #544BF0; transform: translateY(-1px); }
.button.small { min-height: 42px; padding: 0 16px; border-radius: 12px; font-size: .95rem; }
.button.quiet { background: var(--island-2); color: var(--text); border-color: var(--line-strong); }
.button.quiet:hover { background: var(--island-3); }
.button.disabled { background: transparent; color: var(--muted); border-color: var(--line); cursor: not-allowed; }
.button.disabled:hover { transform: none; background: transparent; }

/* ------------------------------------------------------------ the top of the page */
.hero { position: relative; overflow: hidden; }
.hero-strokes {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; fill: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 30%, transparent 96%);
}
.hero-stroke-a { stroke: var(--mark-a); opacity: .075; }
.hero-stroke-b { stroke: var(--mark-b); opacity: .055; }
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 8fr);
  gap: clamp(32px, 4vw, 96px); align-items: center;
  padding-block: clamp(40px, 6vh, 110px) clamp(56px, 8vh, 130px);
}
.eyebrow { color: var(--accent-text); font-weight: 500; font-size: .95rem; margin-bottom: 18px; }
h1 { font-size: clamp(2.6rem, 1.2rem + 3.3vw, 5.6rem); line-height: 1.04; letter-spacing: -.035em; font-weight: 700; text-wrap: balance; }
.lede { margin-top: 26px; max-width: 34em; color: var(--muted); font-size: 1.14em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.promises { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; font-size: .96em; font-weight: 500; }
.promises li { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.promises .icon { width: 1.1em; height: 1.1em; stroke-width: 2.6; color: var(--mark-b); }

/* ------------------------------------------------------------ the workspace you can play with */
.demo {
  position: relative; aspect-ratio: 16 / 10.4; width: 100%;
  background: var(--board);
  border: 1px solid var(--line); border-radius: 26px;
  box-shadow: var(--shadow);
  font-size: clamp(.68rem, .42rem + .42vw, 1.1rem);
  overflow: hidden; user-select: none; -webkit-user-select: none;
}
.demo-dock {
  position: absolute; left: 1.2%; top: 1.8%; bottom: 1.8%; width: 5.4%;
  display: flex; flex-direction: column; align-items: center; gap: 9%;
  padding-block: 2%;
  background: var(--island); border: 1px solid var(--line); border-radius: 1.2em;
}
.demo-dock-mark { width: 62%; aspect-ratio: 1; margin-bottom: 4%; }
.demo-dock-icon { width: 46%; aspect-ratio: 1; fill: none; stroke: var(--muted); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.demo-dock-icon.on { stroke: var(--accent-text); }
.demo-dock-icon.last { margin-top: auto; }

.demo-island {
  position: absolute;
  display: flex; flex-direction: column;
  background: var(--island); border: 1px solid var(--line); border-radius: 1.2em;
  overflow: hidden;
  transition: left .45s cubic-bezier(.2, .8, .2, 1), top .45s cubic-bezier(.2, .8, .2, 1),
    width .45s cubic-bezier(.2, .8, .2, 1), height .45s cubic-bezier(.2, .8, .2, 1),
    box-shadow .2s ease, opacity .2s ease;
}
.demo-island[data-slot="a"] { left: 7.8%; top: 1.8%; width: 21%; height: 96.4%; }
.demo-island[data-slot="b"] { left: 30%; top: 1.8%; width: 45%; height: 96.4%; }
.demo-island[data-slot="c"] { left: 76.2%; top: 1.8%; width: 22.600%; height: 47.600%; }
.demo-island[data-slot="d"] { left: 76.2%; top: 50.600%; width: 22.600%; height: 47.600%; }
.demo-island.lifted { z-index: 5; opacity: .92; box-shadow: var(--shadow); transition: box-shadow .2s ease, opacity .2s ease; cursor: grabbing; }
.demo-island.target { border-color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent-text); }
.demo-island header {
  display: flex; align-items: center; gap: .55em;
  min-height: 3em; padding: 0 .9em;
  font-weight: 500; white-space: nowrap;
  border-bottom: 1px solid var(--line);
  cursor: grab; touch-action: pan-y;
}
.demo-island header span { overflow: hidden; text-overflow: ellipsis; }
.grip { flex: none; width: .55em; height: 1em; background-image: radial-gradient(var(--muted) 30%, transparent 34%); background-size: .275em .333em; opacity: .7; }
.demo-model { margin-left: auto; padding: .15em .7em; font-style: normal; font-size: .88em; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 99px; }
.demo-body { flex: 1; min-height: 0; padding: .7em .8em; overflow: hidden; }
.demo-new { padding: .5em .7em; margin-bottom: .6em; text-align: center; border: 1px solid var(--line-strong); border-radius: .75em; font-weight: 500; white-space: nowrap; }
.demo-label { margin: .8em .5em .25em; font-size: .86em; font-weight: 500; color: var(--muted); }
.demo-row { padding: .42em .55em; border-radius: .6em; line-height: 1.3; }
.demo-row.selected { background: var(--accent-soft); font-weight: 500; }
.demo-row small { display: block; font-size: .85em; color: var(--muted); }
.demo-chat { display: flex; flex-direction: column; gap: .65em; padding-inline: clamp(.8em, 6%, 3em); }
.demo-you { align-self: flex-end; max-width: 86%; padding: .55em .85em; background: var(--island-3); border-radius: 1em 1em .3em 1em; line-height: 1.35; }
.demo-file { align-self: flex-end; padding: .28em .75em; font-size: .9em; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 99px; }
.demo-reply { line-height: 1.45; }
.demo-reply.bullet { padding-left: 1em; position: relative; }
.demo-reply.bullet::before { content: ""; position: absolute; left: .15em; top: .62em; width: .32em; height: .32em; border-radius: 50%; background: var(--accent-text); }
.demo-compose {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding: .35em .35em .35em 1.1em;
  color: var(--muted); background: var(--island-2);
  border: 1px solid var(--line); border-radius: 1.6em; white-space: nowrap;
}
.demo-compose span { overflow: hidden; text-overflow: ellipsis; }
.demo-compose svg { flex: none; width: 2em; height: 2em; padding: .4em; border-radius: 50%; background: var(--accent); fill: none; stroke: #fff; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.demo-hint { margin-top: 12px; text-align: center; color: var(--muted); font-size: .92rem; }

/* ------------------------------------------------------------ the sections below */
.section { padding-block: clamp(56px, 8vh, 130px); }
.section.tight { padding-top: 0; }
h2 { font-size: clamp(2rem, 1.2rem + 1.9vw, 3.7rem); line-height: 1.1; letter-spacing: -.028em; font-weight: 700; text-wrap: balance; }
.section-title { margin-bottom: clamp(28px, 4vh, 56px); max-width: 22em; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 110px); align-items: end; }
.split-text { color: var(--muted); font-size: 1.1em; display: grid; gap: 16px; max-width: 40em; }
.heading-split { margin-bottom: clamp(28px, 4vh, 56px); }

.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(12px, 1vw, 18px); }
.card {
  grid-column: span 4;
  padding: clamp(22px, 1.7vw, 36px);
  background: var(--island); border: 1px solid var(--line); border-radius: var(--radius);
}
.card h3, .platform h3 { margin-top: 18px; font-size: 1.28em; line-height: 1.25; letter-spacing: -.012em; font-weight: 700; }
.card p, .platform p { margin-top: 8px; color: var(--muted); }
.card.wide { grid-column: span 8; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 56px); align-items: center; }
.card.half { grid-column: span 6; }
.card-art { display: grid; gap: 8px; }
.memory-art li { padding: 11px 15px; background: var(--island-2); border: 1px solid var(--line); border-radius: 13px; font-weight: 500; }
.memory-art small { display: block; margin-top: 1px; font-weight: 400; color: var(--muted); font-size: .85em; }
.memory-art .pending { background: var(--accent-soft); border-color: var(--accent); }
.data-art li:first-child { display: flex; flex-wrap: wrap; gap: 6px; }
.data-art span { padding: 5px 12px; font-size: .9em; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 99px; }
.data-art .data-zip { padding: 12px 15px; font-weight: 500; background: var(--accent-soft); border-radius: 13px; }

.straight {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(16px, 3vw, 56px);
  margin-top: clamp(12px, 1vw, 18px);
  padding: clamp(24px, 2.2vw, 44px);
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
}
.straight h3 { font-size: 1.5em; line-height: 1.2; letter-spacing: -.018em; font-weight: 700; }
.straight-text { display: grid; gap: 12px; max-width: 58em; color: var(--muted); }
.straight-text a { display: inline-flex; align-items: center; gap: 8px; width: fit-content; color: var(--accent-text); font-weight: 500; text-decoration: none; }
.straight-text a:hover { text-decoration: underline; }

.platforms { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(12px, 1vw, 18px); }
.platform {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: clamp(22px, 1.7vw, 36px);
  background: var(--island); border: 1px solid var(--line); border-radius: var(--radius);
}
.platform.primary { border-color: var(--accent); background: linear-gradient(var(--accent-soft), var(--island) 70%); }
.platform p { margin-bottom: 22px; }
.platform .button { margin-top: auto; width: 100%; }
.platform.soon .icon.large { color: var(--muted); }
.tag { display: inline-block; margin-left: 4px; padding: 2px 9px; vertical-align: middle; font-size: .62em; font-weight: 500; letter-spacing: 0; color: var(--muted); background: var(--island-3); border-radius: 99px; white-space: nowrap; }

.foot { border-top: 1px solid var(--line); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 32px; padding-block: 28px; }
.foot-note { color: var(--muted); font-size: .9rem; flex: 1 1 320px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: .92rem; }
.foot-nav a { color: var(--muted); text-decoration: none; }
.foot-nav a:hover { color: var(--text); text-decoration: underline; }

/* ------------------------------------------------------------ smaller windows */
@media (max-width: 1500px) {
  .platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { max-width: 46em; }
  .demo { font-size: clamp(.62rem, .3rem + .95vw, .95rem); }
  .card { grid-column: span 6; }
  .card.wide { grid-column: span 12; }
  .straight { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .top-nav { display: none; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .card, .card.half, .card.wide { grid-column: span 12; }
  .card.wide { grid-template-columns: minmax(0, 1fr); }
  .platforms { grid-template-columns: minmax(0, 1fr); }
  .hero-actions .button { width: 100%; }

  /* On a phone the preview stacks, and the page scrolls rather than the islands moving. */
  .demo { aspect-ratio: 1 / 1.12; font-size: .72rem; }
  .demo-dock, .demo-hint { display: none; }
  .demo-island header { cursor: default; }
  .demo-island[data-slot="b"] { left: 2.5%; top: 2.5%; width: 95%; height: 60%; }
  .demo-island[data-slot="a"] { left: 2.5%; top: 64%; width: 46.750%; height: 33.500%; }
  .demo-island[data-slot="c"] { left: 50.750%; top: 64%; width: 46.750%; height: 33.500%; }
  .demo-island[data-slot="d"] { display: none; }
  .demo-new { display: none; }
}
@media (hover: none) {
  .demo-hint { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .demo-island { transition: none; }
}
