/* Landing page. Same tile system as the app and styles.css: stone tiles on a dark wall,
   Martian Mono headings, JetBrains Mono body, teal = primary/AI, orange = time-critical. */

:root {
  --wall: #232421;
  --tile: #f1f0eb;
  --field: #e6e5de;
  --divider: #dcdbd3;
  --text: #191a17;
  --text2: #5e6058;
  --primary: #0a6e6d;
  --primary-soft: #d5e8e6;
  --accent: #f97316;
  --accent-soft: #fde4d0;
  --on-color: #f1f0eb;
  --seam: 8px;
  --radius: 22px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --wall: #0c0d0b;
    --tile: #1d1e1b;
    --field: #2a2c27;
    --divider: #33352f;
    --text: #f1f0eb;
    --text2: #9a9c93;
    --primary: #3fd0cf;
    --primary-soft: #133433;
    --accent: #fb923c;
    --accent-soft: #3a2414;
    --on-color: #0c0d0b;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--wall);
  color: var(--text);
  font: 400 16px/1.6 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  overflow-x: hidden;
}

img,
video {
  display: block;
  max-width: 100%;
}

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

h1,
h2,
h3 {
  font-family: 'Martian Mono', ui-monospace, monospace;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

h2 {
  font-size: clamp(26px, 4.4vw, 46px);
}

h3 {
  font-size: 18px;
}

p {
  margin: 0;
}

.wall {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--seam);
  display: flex;
  flex-direction: column;
  gap: var(--seam);
}

.tile {
  background: var(--tile);
  border-radius: var(--radius);
  padding: clamp(22px, 3.4vw, 40px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 18px;
}

.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2.2s infinite;
}

.lead {
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--text2);
  max-width: 60ch;
  margin-top: 16px;
}

/* ---------- Top bar ---------- */

.topbar {
  position: sticky;
  top: var(--seam);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px 12px 20px;
  transition: box-shadow 0.3s, transform 0.3s var(--ease);
}

.topbar.scrolled {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Martian Mono', ui-monospace, monospace;
  font-weight: 700;
  font-size: 17px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  border-radius: 8px;
}

.topbar nav {
  display: flex;
  gap: 4px;
}

.topbar nav a,
.foot nav a {
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  transition: background 0.2s, color 0.2s;
}

.topbar nav a:hover,
.foot nav a:hover {
  background: var(--field);
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 700;
  text-decoration: none;
  border-radius: 14px;
  padding: 14px 20px;
  transition: transform 0.2s var(--ease), filter 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.btn-small {
  padding: 10px 16px;
  font-size: 13px;
  white-space: nowrap;
}

.btn-accent {
  background: var(--accent);
  color: #fff;
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: var(--seam);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(28px, 5vw, 64px);
}

.hero h1 {
  font-size: clamp(34px, 5.6vw, 68px);
  font-weight: 800;
  line-height: 1.05;
}

.hero h1 .hl {
  display: block;
  color: var(--primary);
}

.hero .lead {
  margin-top: 22px;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.stores-center {
  justify-content: center;
}

/* The stores' own badges, as Apple and Google give them (their guidelines: no
   restyling). Google's PNG carries its clear space, so it's scaled and pulled in
   until both badges look the same height. */
.store {
  display: block;
  line-height: 0;
  transition: transform 0.25s var(--ease);
}

.store:hover {
  transform: translateY(-3px);
}

.store-apple {
  height: 48px;
  width: auto;
}

.store-google {
  height: 71px;
  width: auto;
  margin: -11.5px -12px;
}

.stores {
  align-items: center;
  gap: 16px;
}

.fine {
  margin-top: 16px;
  font-size: 13px;
  color: var(--text2);
}

.hero-stage {
  position: relative;
  min-height: 600px;
  overflow: hidden;
  background: var(--primary);
  display: grid;
  place-items: center;
  perspective: 1200px;
}

@media (prefers-color-scheme: dark) {
  .hero-stage {
    background: #0e4d4c;
  }
}

.grid-bg {
  position: absolute;
  inset: -40px;
  background-image: linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 30%, transparent 75%);
  animation: grid-drift 18s linear infinite;
}

.phone {
  position: relative;
  aspect-ratio: 1320 / 2868;
  border-radius: 40px;
  padding: 7px;
  background: #121311;
  box-shadow: 0 0 0 1.5px #3a3c36 inset, 0 40px 80px -20px rgba(0, 0, 0, 0.55), 0 12px 24px rgba(0, 0, 0, 0.25);
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 33px;
}

.phone::before {
  content: '';
  position: absolute;
  top: 16px;
  left: 50%;
  width: 28%;
  height: 22px;
  transform: translateX(-50%);
  background: #000;
  border-radius: 20px;
  z-index: 2;
}

.phone-hero {
  width: min(270px, 62%);
  transform-style: preserve-3d;
  transition: transform 0.4s var(--ease);
}

.chip-card {
  position: absolute;
  z-index: 3;
  background: var(--tile);
  color: var(--text);
  border-radius: 16px;
  box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.45);
}

.search-demo {
  left: 6%;
  bottom: 13%;
  width: min(300px, 70%);
  padding: 10px;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--field);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  min-height: 42px;
}

.search-bar svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: var(--primary);
  stroke-width: 2.4;
  stroke-linecap: round;
}

.caret {
  width: 2px;
  height: 16px;
  background: var(--primary);
  animation: blink 1s steps(1) infinite;
}

.answer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 4px 2px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s, transform 0.35s var(--ease);
}

.answer.show {
  opacity: 1;
  transform: none;
}

.answer-img {
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--field);
}

.answer-text {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.answer-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

.answer-title {
  font-size: 14px;
}

.answer-loc {
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
}

/* A card AI has just made: the photo, then what it wrote. */
.ai-chip {
  right: 5%;
  top: 10%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px 10px 10px;
  font-size: 13px;
  max-width: min(300px, 76%);
}

.ai-chip img {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
}

.ai-chip strong {
  display: block;
  margin-top: 2px;
}

.ai-chip-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.spark {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 6px;
  background: var(--primary);
  color: var(--on-color);
  font-size: 11px;
  animation: spin-pop 3.2s var(--ease) infinite;
}

.tags {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

.tags i,
.mini-tags i {
  font-style: normal;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
}

/* ---------- Marquee ---------- */

.marquee {
  padding: 16px 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  gap: 10px;
  width: max-content;
  animation: marquee 50s linear infinite;
}

.marquee-track span {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  white-space: nowrap;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--field);
}

.marquee-track b {
  color: var(--primary);
}

.marquee-track b.warn {
  color: var(--accent);
}

/* ---------- Sections ---------- */

.section {
  display: flex;
  flex-direction: column;
  gap: var(--seam);
  margin-top: 40px;
}

.section-head {
  padding: clamp(28px, 5vw, 56px);
}

.pains {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--seam);
}

.pain {
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.3s var(--ease);
}

.pain:hover {
  transform: translateY(-4px);
}

.pain-num {
  font-family: 'Martian Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
}

.pain p {
  color: var(--text2);
  font-size: 15px;
}

.answer-tile {
  background: var(--accent);
  color: #fff;
}

.answer-tile p {
  font-family: 'Martian Mono', monospace;
  font-size: clamp(18px, 2.4vw, 28px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.01em;
  max-width: 40ch;
}

.hl-inv {
  background: #fff;
  color: var(--accent);
  padding: 0 8px;
  border-radius: 8px;
}

@media (prefers-color-scheme: dark) {
  .answer-tile {
    color: #1a0c02;
  }
  .hl-inv {
    background: #1a0c02;
  }
}

/* Steps */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--seam);
}

.step {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.step-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.step-n {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--primary);
  color: var(--on-color);
  font-family: 'Martian Mono', monospace;
  font-weight: 800;
}

.step p {
  color: var(--text2);
  font-size: 15px;
}

.step-visual {
  margin-top: auto;
  padding-top: 12px;
  height: 230px;
  display: grid;
  place-items: center;
}

.viewfinder {
  position: relative;
  width: 240px;
  height: 182px;
  border-radius: 18px;
  overflow: hidden;
}

.viewfinder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.viewfinder i {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 3px solid #fff;
  z-index: 1;
}

.viewfinder i:nth-of-type(1) { top: 12px; left: 12px; border-right: 0; border-bottom: 0; border-radius: 6px 0 0 0; }
.viewfinder i:nth-of-type(2) { top: 12px; right: 12px; border-left: 0; border-bottom: 0; border-radius: 0 6px 0 0; }
.viewfinder i:nth-of-type(3) { bottom: 12px; left: 12px; border-right: 0; border-top: 0; border-radius: 0 0 0 6px; }
.viewfinder i:nth-of-type(4) { bottom: 12px; right: 12px; border-left: 0; border-top: 0; border-radius: 0 0 6px 0; }

.in .viewfinder i {
  animation: focus 3s var(--ease) infinite;
}

.flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
}

.in .flash {
  animation: flash 3s ease-out infinite;
}

.mini-card {
  width: 220px;
  padding: 16px;
  border-radius: 16px;
  background: var(--field);
  display: grid;
  gap: 9px;
}

.mini-card .line {
  height: 10px;
  border-radius: 6px;
  background: var(--text);
  opacity: 0.85;
  transform-origin: left;
  transform: scaleX(0);
}

.mini-card .l1 { width: 80%; height: 14px; }
.mini-card .l2 { width: 100%; opacity: 0.25; }
.mini-card .l3 { width: 64%; opacity: 0.25; }

.mini-tags {
  display: flex;
  gap: 5px;
}

.mini-tags i,
.mini-loc {
  opacity: 0;
  transform: translateY(6px);
}

.mini-loc {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.in .mini-card .line { animation: write 4s var(--ease) infinite; }
.in .mini-card .l2 { animation-delay: 0.25s; }
.in .mini-card .l3 { animation-delay: 0.5s; }
.in .mini-tags i { animation: pop 4s var(--ease) infinite; }
.in .mini-tags i:nth-child(1) { animation-delay: 0.8s; }
.in .mini-tags i:nth-child(2) { animation-delay: 0.95s; }
.in .mini-tags i:nth-child(3) { animation-delay: 1.1s; }
.in .mini-loc { animation: pop 4s var(--ease) 1.4s infinite; }

.ask {
  align-content: center;
  gap: 10px;
  justify-items: stretch;
  width: 100%;
}

.bubble {
  max-width: 85%;
  padding: 12px 14px;
  border-radius: 16px;
  font-size: 14px;
  opacity: 0;
  transform: translateY(10px) scale(0.96);
}

.bubble.q {
  justify-self: end;
  background: var(--primary);
  color: var(--on-color);
  border-bottom-right-radius: 4px;
}

.bubble.a {
  justify-self: start;
  background: var(--field);
  border-bottom-left-radius: 4px;
  display: grid;
}

.bubble.a span {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.in .bubble.q { animation: bubble 4.5s var(--ease) infinite; }
.in .bubble.a { animation: bubble 4.5s var(--ease) 0.9s infinite; }

.video-tile {
  padding: 0;
  overflow: hidden;
  background: #0d0e0c;
}

.video-tile video {
  width: 100%;
  aspect-ratio: 1600 / 686;
  object-fit: cover;
}

/* The 9:16 cut on a phone: no taller than about 70% of the screen, so it
   fits whole with room around it; centred on the tile's dark ground. */
.video-tile:has(video.tall) {
  padding-block: 16px;
}

.video-tile video.tall {
  aspect-ratio: 720 / 1280;
  width: auto;
  max-width: 100%;
  height: min(70svh, calc((100vw - 44px) * 1280 / 720));
  margin-inline: auto;
  border-radius: 14px;
}

/* Use cases */

.cases {
  padding: clamp(16px, 2.6vw, 28px);
}

.case-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.case-tabs::-webkit-scrollbar {
  display: none;
}

.case-tabs button {
  flex: none;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 0;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--field);
  color: var(--text2);
  transition: background 0.25s, color 0.25s, transform 0.2s;
}

.case-tabs button:hover {
  transform: translateY(-1px);
}

.case-tabs button[aria-selected='true'] {
  background: var(--primary);
  color: var(--on-color);
}

.case-body {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 32px;
  align-items: center;
  margin-top: 18px;
  padding: clamp(8px, 2vw, 24px);
}

.case-panel h3 {
  font-size: clamp(24px, 3.2vw, 38px);
  line-height: 1.15;
}

.case-panel.is-active {
  animation: panel-in 0.5s var(--ease);
}

.case-pain {
  margin-top: 14px;
  color: var(--accent);
  font-weight: 700;
}

.case-panel ul {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.case-panel li {
  position: relative;
  padding: 12px 14px 12px 42px;
  border-radius: 12px;
  background: var(--field);
  font-size: 15px;
}

.case-panel li::before {
  content: '✓';
  position: absolute;
  left: 14px;
  top: 12px;
  color: var(--primary);
  font-weight: 700;
}

.case-phone-wrap {
  display: grid;
  place-items: center;
  padding: 12px 0;
  background: var(--primary-soft);
  border-radius: 18px;
  min-height: 560px;
}

.phone-case {
  width: 240px;
}

.phone-case img {
  position: absolute;
  inset: 7px;
  width: calc(100% - 14px);
  height: calc(100% - 14px);
  opacity: 0;
  transform: translateX(24px) scale(0.98);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.phone-case img.is-active {
  opacity: 1;
  transform: none;
}

/* Features bento */

.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--seam);
}

.feat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.3s var(--ease);
}

.feat:hover {
  transform: translateY(-4px) rotate(-0.4deg);
}

.feat p {
  color: var(--text2);
  font-size: 14px;
}

.feat-wide {
  grid-column: span 2;
}

.feat-ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 20px;
  font-weight: 700;
}

.feat-teal {
  background: var(--primary);
  color: var(--on-color);
}

.feat-teal p {
  color: var(--on-color);
  opacity: 0.85;
}

.feat-orange {
  background: var(--accent);
  color: #fff;
}

.feat-orange p {
  color: #fff;
  opacity: 0.92;
}

@media (prefers-color-scheme: dark) {
  .feat-orange,
  .feat-orange p {
    color: #1a0c02;
  }
}

.where {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
}

.where i {
  font-style: normal;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.16);
}

/* Pricing */

.plans {
  display: grid;
  grid-template-columns: 1fr 1.15fr 1fr;
  gap: var(--seam);
}

.price small {
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.8;
}

.plan-lead {
  color: var(--text2);
  font-size: 15px;
  margin: 12px 0 18px;
}

.pack {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--field);
  transition: transform 0.25s var(--ease);
}

.pack + .pack {
  margin-top: 8px;
}

.pack:hover {
  transform: translateX(4px);
}

.pack strong {
  font-family: 'Martian Mono', monospace;
  font-size: 15px;
}

.pack span {
  grid-row: 2;
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
}

.pack b {
  grid-row: 1 / span 2;
  grid-column: 2;
  font-family: 'Martian Mono', monospace;
  font-size: 18px;
}

.price-note {
  font-size: 13px;
  color: #9a9c93;
  padding: 4px 8px 0;
}

/* Why AI: by hand vs with AI */

.ai-tile {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 48px;
  align-items: center;
  padding: clamp(28px, 5vw, 56px);
}

.ai-copy h2 {
  font-size: clamp(24px, 3.4vw, 38px);
}

.race {
  display: grid;
  gap: 14px;
}

.lane {
  padding: 16px;
  border-radius: 16px;
  background: var(--field);
}

.lane-ai {
  background: var(--primary-soft);
}

.lane-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  font-size: 13px;
}

.lane-head strong {
  font-family: 'Martian Mono', monospace;
  font-size: 15px;
}

.lane-head span {
  color: var(--text2);
}

.lane-ai .lane-head strong,
.lane-ai .lane-head span {
  color: var(--primary);
  font-weight: 700;
}

.lane-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 12px 0;
}

.lane-steps i {
  font-style: normal;
  font-size: 12px;
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--tile);
  opacity: 0.35;
}

.lane-bar {
  height: 8px;
  border-radius: 8px;
  background: var(--tile);
  overflow: hidden;
}

.lane-bar span {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 8px;
  transform-origin: left;
  transform: scaleX(0);
}

.lane-manual .lane-bar span {
  background: var(--text2);
}

.lane-ai .lane-bar span {
  background: var(--primary);
}

.in .lane-manual .lane-bar span { animation: fill 9s linear infinite; }
.in .lane-ai .lane-bar span { animation: fill-fast 9s var(--ease) infinite; }
.in .lane-manual .lane-steps i { animation: tick 9s linear infinite; animation-delay: calc(var(--i) * 1.3s); }
.in .lane-ai .lane-steps i { animation: tick-fast 9s var(--ease) infinite; animation-delay: calc(var(--i) * 0.35s); }

.race-total {
  font-size: 15px;
}

.race-total b {
  color: var(--accent);
}

.ai-note {
  grid-column: 1 / -1;
  font-size: 14px;
  color: var(--text2);
  border-top: 1px solid var(--divider);
  padding-top: 18px;
}

@keyframes fill {
  0% { transform: scaleX(0); }
  88% { transform: scaleX(1); }
  100% { transform: scaleX(1); }
}

@keyframes fill-fast {
  0% { transform: scaleX(0); }
  14% { transform: scaleX(1); }
  100% { transform: scaleX(1); }
}

@keyframes tick {
  0% { opacity: 0.35; }
  2%, 90% { opacity: 1; }
  100% { opacity: 0.35; }
}

@keyframes tick-fast {
  0% { opacity: 0.35; }
  3%, 90% { opacity: 1; }
  100% { opacity: 0.35; }
}

/* Language menu */

.topbar-end {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang {
  position: relative;
}

.lang summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text2);
  transition: background 0.2s;
}

.lang summary::-webkit-details-marker {
  display: none;
}

.lang summary:hover,
.lang[open] summary {
  background: var(--field);
  color: var(--text);
}

.lang svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
}

.lang ul {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  list-style: none;
  margin: 0;
  padding: 6px;
  min-width: 170px;
  background: var(--tile);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
  animation: panel-in 0.25s var(--ease);
}

.lang a {
  display: block;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--text);
  text-decoration: none;
}

.lang a:hover {
  background: var(--field);
}

.lang a[aria-current] {
  color: var(--primary);
  font-weight: 700;
}

.faq h2 {
  font-size: clamp(24px, 3.4vw, 38px);
  margin-bottom: 18px;
}

.plan h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 22px;
}

.badge {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
}

.price {
  font-family: 'Martian Mono', monospace;
  font-size: 34px;
  font-weight: 800;
  margin: 12px 0 18px;
}

.plan ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
}

.plan li {
  padding-left: 26px;
  position: relative;
  font-size: 15px;
}

.plan li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

.plan-pro {
  background: var(--primary);
  color: var(--on-color);
}

.plan-pro li::before {
  color: var(--on-color);
}

/* FAQ */

.faq details {
  border-top: 1px solid var(--divider);
}

.faq details:last-child {
  border-bottom: 1px solid var(--divider);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 40px 18px 0;
  position: relative;
  font-family: 'Martian Mono', monospace;
  font-weight: 700;
  font-size: 16px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  color: var(--primary);
  transition: transform 0.3s var(--ease);
}

.faq details[open] summary::after {
  transform: translateY(-50%) rotate(45deg);
}

.faq details p {
  color: var(--text2);
  padding: 0 0 18px;
  max-width: 70ch;
  animation: panel-in 0.35s var(--ease);
}

/* CTA */

.cta {
  margin-top: 40px;
  text-align: center;
  background: var(--wall);
  border: 1px solid #3a3c36;
  color: #f1f0eb;
  padding: clamp(40px, 7vw, 88px) 24px;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 120%, rgba(249, 115, 22, 0.35), transparent 60%),
    radial-gradient(circle at 50% -20%, rgba(10, 110, 109, 0.5), transparent 55%);
  pointer-events: none;
}

.cta > * {
  position: relative;
}

.cta-icon {
  margin: 0 auto 24px;
  border-radius: 22px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  animation: bob 5s ease-in-out infinite;
}

.cta h2 {
  font-size: clamp(26px, 4.4vw, 48px);
}

/* Footer */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 20px;
  padding: 18px 24px;
  font-size: 13px;
  color: var(--text2);
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
}

/* ---------- Motion ---------- */

.enter {
  animation: tile-in 0.9s var(--ease) both;
  animation-delay: calc(var(--d, 0) * 0.12s);
}

.reveal {
  opacity: 0;
  transform: translateY(28px) scale(0.985);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: calc(var(--d, 0) * 0.08s);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

.no-js .reveal {
  opacity: 1;
  transform: none;
}

.float { animation: bob 6s ease-in-out infinite; }
.float-b { animation: bob 7s ease-in-out -2s infinite; }
.float-c { animation: bob 6.5s ease-in-out -4s infinite; }

@keyframes tile-in {
  from { opacity: 0; transform: translateY(40px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes bob {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.6); }
  70% { box-shadow: 0 0 0 10px rgba(249, 115, 22, 0); }
  100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0); }
}

@keyframes blink {
  50% { opacity: 0; }
}

@keyframes grid-drift {
  to { transform: translate(44px, 44px); }
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

@keyframes spin-pop {
  0%, 70%, 100% { transform: none; }
  80% { transform: rotate(90deg) scale(1.15); }
}

@keyframes focus {
  0%, 100% { transform: scale(1.25); opacity: 0.4; }
  25%, 60% { transform: scale(1); opacity: 1; }
}

@keyframes flash {
  0%, 55% { opacity: 0; }
  58% { opacity: 0.85; }
  75%, 100% { opacity: 0; }
}

@keyframes write {
  0% { transform: scaleX(0); }
  25%, 85% { transform: scaleX(1); }
  100% { transform: scaleX(0); }
}

@keyframes pop {
  0% { opacity: 0; transform: translateY(6px); }
  12%, 80% { opacity: 1; transform: none; }
  95%, 100% { opacity: 0; transform: translateY(6px); }
}

@keyframes bubble {
  0% { opacity: 0; transform: translateY(10px) scale(0.96); }
  12%, 82% { opacity: 1; transform: none; }
  95%, 100% { opacity: 0; transform: translateY(-6px); }
}

@keyframes panel-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .reveal,
  .mini-card .line,
  .mini-tags i,
  .mini-loc,
  .bubble,
  .lane-steps i,
  .lane-bar span {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 1020px) {
  .topbar nav {
    display: none;
  }
  .pains {
    grid-template-columns: 1fr 1fr;
  }
  .bento {
    grid-template-columns: 1fr 1fr;
  }
  .plans {
    grid-template-columns: 1fr 1fr;
  }
  .plan-tokens {
    grid-column: 1 / -1;
  }
  .case-body {
    grid-template-columns: 1fr 280px;
  }
  .phone-case {
    width: 210px;
  }
  .case-phone-wrap {
    min-height: 490px;
  }
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .hero-stage {
    min-height: 540px;
  }
  .steps {
    grid-template-columns: 1fr;
  }
  .step-visual {
    height: 210px;
  }
  .case-body {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .case-phone-wrap {
    order: -1;
    min-height: 460px;
  }
  .phone-case {
    width: 200px;
  }
  .plans {
    grid-template-columns: 1fr;
  }
  .ai-tile {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  :root {
    --seam: 6px;
    --radius: 18px;
  }
  .topbar {
    padding: 10px 10px 10px 14px;
  }
  .brand {
    font-size: 15px;
  }
  .brand img {
    width: 28px;
    height: 28px;
  }
  .pains,
  .bento {
    grid-template-columns: 1fr;
  }
  .feat-wide {
    grid-column: auto;
  }
  .hero-stage {
    min-height: 500px;
  }
  .phone-hero {
    width: 220px;
  }
  .search-demo {
    left: 4%;
    bottom: 6%;
    width: 78%;
  }
  .ai-chip {
    right: 4%;
    top: 6%;
  }
  .section {
    margin-top: 24px;
  }
}
