/* Landing page only. The legal pages keep style.css. Colours are the app's
   editor palette (src/theme/palettes.ts, darkPalette) + the logo's yellow. */
@font-face {
  font-family: "Nunito";
  src: url("/fonts/Nunito_500Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Nunito";
  src: url("/fonts/Nunito_700Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono_500Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  --bg: #0b0b0c;
  --surface: #141416;
  --card: #1d1d1f;
  --line: rgba(255, 255, 255, 0.08);
  --text: #f2f2f2;
  --muted: rgba(255, 255, 255, 0.64);
  --faint: rgba(255, 255, 255, 0.42);
  --accent: #f5c542;
  --accent-ink: #1a1608;
  --radius: 20px;
  --max: 1160px;
  --sans:
    "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
}
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}
.eyebrow {
  font: 500 13px/1 var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.muted {
  color: var(--muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font: 700 16px/1 var(--sans);
  text-decoration: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease;
}
.btn svg {
  flex: none;
}
.btn[hidden] {
  display: none;
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-primary:hover {
  background: #ffd25c;
}
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.24);
}
.btn:focus-visible,
.nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(11, 11, 12, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  white-space: nowrap;
}
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 15px;
}
.nav a {
  text-decoration: none;
  color: var(--muted);
}
.nav a:hover {
  color: var(--text);
}
.nav .btn {
  flex: none;
  white-space: nowrap;
  min-height: 40px;
  padding: 0 18px;
  font-size: 14px;
  color: var(--accent-ink);
}
.nav .btn-ghost {
  color: var(--text);
}

/* Hero */
.hero {
  padding: 88px 0 72px;
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
}
.hero h1 {
  margin: 18px 0 20px;
  font-size: clamp(44px, 6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 700;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero .lede {
  max-width: 34ch;
  margin: 0 0 32px;
  font-size: 19px;
  color: var(--muted);
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 40px;
  margin: 48px 0 0;
  padding: 24px 0 0;
  border-top: 1px solid var(--line);
  list-style: none;
}
.stats li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stats strong {
  font-size: 28px;
  letter-spacing: -0.02em;
}
.stats span {
  font: 500 12px/1.2 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}

/* The phones are sized in % of this box (and their corners in cqw), so the
   pair scales with the column instead of overflowing it. */
.phones {
  position: relative;
  width: 100%;
  max-width: 540px;
  margin-left: auto;
  aspect-ratio: 540 / 690;
  container-type: inline-size;
  isolation: isolate;
}
.phones::before {
  content: "";
  position: absolute;
  inset: 8% -6% 4%;
  z-index: -1;
  background: radial-gradient(
    closest-side,
    rgba(245, 197, 66, 0.16),
    rgba(245, 197, 66, 0)
  );
  animation: glow-drift 12s ease-in-out infinite alternate;
}
.phone {
  position: absolute;
  padding: 1.7cqw;
  border-radius: 8.6cqw;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.55);
}
.phone img {
  width: 100%;
  height: auto;
  aspect-ratio: 1290 / 2796;
  object-fit: cover;
  border-radius: 7cqw;
}
.phone-back {
  left: 3%;
  top: 7%;
  width: 50%;
  opacity: 0.9;
  transform: rotate(-6deg);
  animation: float-back 7s ease-in-out -2s infinite alternate;
}
.phone-front {
  right: 0;
  top: 0;
  width: 54%;
  animation: float-front 6s ease-in-out infinite alternate;
}
@keyframes float-front {
  to {
    transform: translateY(-12px);
  }
}
@keyframes float-back {
  from {
    transform: rotate(-6deg);
  }
  to {
    transform: rotate(-6deg) translateY(10px);
  }
}
@keyframes glow-drift {
  from {
    transform: translate(-4%, 2%) scale(0.95);
  }
  to {
    transform: translate(4%, -3%) scale(1.05);
  }
}

.hero-note {
  margin: 14px 0 0;
  font-size: 14px;
  color: var(--faint);
}

/* Sections */
.section {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}
.section-head {
  max-width: 640px;
  margin: 0 0 56px;
}
.section-head h2 {
  margin: 14px 0 14px;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.04;
  letter-spacing: -0.03em;
}
.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

/* Feature rows */
.features {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  overflow: hidden;
}
.feature-copy {
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.feature-copy h3 {
  margin: 14px 0 12px;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.feature-copy p {
  margin: 0 0 20px;
  color: var(--muted);
}
.feature-copy ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.feature-copy li {
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.feature-copy li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: var(--accent);
  transform: translateY(-3px);
}
.feature-art {
  position: relative;
  min-height: 440px;
  background: var(--card);
  overflow: hidden;
}
.feature:nth-child(even) .feature-art {
  order: -1;
}

/* Feature art: Remove BG */
/* The photo and its cutout share dimensions, so the same cover crop lines
   them up exactly. */
.art-cutout .photo,
.art-cutout .cut {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 8%;
}
.art-cutout .half-checker {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 50%);
  background: repeating-conic-gradient(#2a2a2e 0 25%, #1d1d1f 0 50%) 0 0 / 28px
    28px;
}
.art-cutout .split {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent);
}
.art-cutout .cut {
  clip-path: inset(0 0 0 50%);
}
.tag {
  position: absolute;
  bottom: 20px;
  padding: 7px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.6);
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
}

/* Feature art: Motion Track */
/* A box with the photo's own aspect ratio, so the overlays are placed in
   photo coordinates (%) and stay on the face at any width. */
.art-track .frame {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  aspect-ratio: 339 / 676;
  transform: translateY(-9%);
}
.art-track .frame img {
  width: 100%;
  height: 100%;
}
.art-track svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.art-track .box {
  position: absolute;
  left: 43%;
  top: 17.5%;
  width: 19%;
  height: 10%;
}
.art-track .box i {
  position: absolute;
  width: 22%;
  height: 22%;
  border: 0 solid var(--accent);
}
.art-track .box i:nth-child(1) {
  left: 0;
  top: 0;
  border-width: 4px 0 0 4px;
}
.art-track .box i:nth-child(2) {
  right: 0;
  top: 0;
  border-width: 4px 4px 0 0;
}
.art-track .box i:nth-child(3) {
  right: 0;
  bottom: 0;
  border-width: 0 4px 4px 0;
}
.art-track .box i:nth-child(4) {
  left: 0;
  bottom: 0;
  border-width: 0 0 4px 4px;
}
.art-track .sticker {
  position: absolute;
  left: 64%;
  top: 11%;
  transform: rotate(7deg);
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-size: 22px;
  line-height: 0.95;
  border: 3px solid #fff;
}

/* Feature art: Effects & filters grid */
.art-looks {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 28px;
  align-content: center;
}
.art-looks figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.art-looks img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: 50% 25%;
  border-radius: 14px;
}
.art-looks figcaption {
  font: 500 12px/1 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.art-looks .on img {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.art-looks .on figcaption {
  color: var(--accent);
}

/* Feature art: Captions */
.art-captions img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 12%;
}
.art-captions .cap {
  position: absolute;
  left: 50%;
  bottom: 13%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 86%;
  text-align: center;
  font-weight: 700;
  font-size: 26px;
  line-height: 1.3;
  color: #fff;
}
.art-captions .cap span {
  background: rgba(0, 0, 0, 0.78);
  padding: 4px 10px;
  border-radius: 8px;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.art-captions .cap b {
  color: var(--accent);
}

/* Tools grid */
.tools {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tools li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 0;
  border-top: 1px solid var(--line);
  font-size: 16px;
}
.tools svg {
  flex: none;
  width: 22px;
  height: 22px;
  stroke: var(--accent);
}

/* Promise cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.card {
  padding: 32px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
}
.card h3 {
  margin: 18px 0 8px;
  font-size: 22px;
  letter-spacing: -0.01em;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}
.card svg {
  width: 28px;
  height: 28px;
  stroke: var(--accent);
}
.langs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}
.langs li {
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 15px;
  color: var(--muted);
}

/* Desktop editor */
.browser {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.8);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
}
.browser-bar i {
  width: 11px;
  height: 11px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
}
.browser-bar span {
  margin: 0 auto;
  padding: 4px 16px;
  border-radius: 8px;
  background: var(--card);
  font: 500 12px/1.2 var(--mono);
  color: var(--muted);
  transform: translateX(-24px);
}
.browser img {
  width: 100%;
  height: auto;
}
.desktop-foot {
  display: flex;
  align-items: center;
  gap: 24px 48px;
  margin-top: 40px;
}
/* Three even columns; each point wraps inside its own column. */
.desktop-points {
  flex: 1;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 32px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.5;
}
.nowrap {
  white-space: nowrap;
}
.desktop-foot .btn {
  flex: none;
}
.desktop-ctas {
  flex: none;
  margin: 0;
}
.desktop-points li {
  display: flex;
  gap: 12px;
  align-items: baseline;
}
.desktop-points li::before {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 3px;
  background: var(--accent);
  transform: translateY(-3px);
}
/* Desktop app installers, one per platform; the visitor's is marked. */
.downloads {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.downloads-title,
.downloads-all {
  font: 500 12px/1.2 var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.downloads ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.downloads li a {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 15px;
  color: var(--text);
  text-decoration: none;
}
.downloads li a small {
  font-size: 13px;
  color: var(--faint);
}
.downloads li a:hover,
.downloads li a.current {
  border-color: rgba(255, 255, 255, 0.24);
}
.downloads li a.current small {
  color: var(--accent);
}
.downloads-all {
  margin-left: auto;
  text-decoration: none;
}
.downloads-all:hover {
  color: var(--text);
}
.downloads a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Final CTA */
.final {
  padding: 112px 0;
  border-top: 1px solid var(--line);
  text-align: center;
}
.final img {
  width: 72px;
  height: 72px;
  margin: 0 auto 24px;
  border-radius: 18px;
}
.final h2 {
  margin: 0 0 14px;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1;
  letter-spacing: -0.035em;
}
.final p {
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 18px;
}
.final .cta-row {
  justify-content: center;
}

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  font-size: 14px;
  color: var(--faint);
}
.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}
.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}
.footer a {
  color: var(--muted);
  text-decoration: none;
}
.footer a:hover {
  color: var(--text);
}

/* Responsive */
@media (max-width: 960px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1fr);
  }
  .phones {
    max-width: 480px;
    margin: 8px auto 0;
  }
  .feature {
    grid-template-columns: minmax(0, 1fr);
  }
  .feature:nth-child(even) .feature-art {
    order: 0;
  }
  .feature-art {
    min-height: 380px;
  }
  .tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cards {
    grid-template-columns: minmax(0, 1fr);
  }
  .desktop-foot {
    flex-direction: column;
    align-items: flex-start;
  }
  .desktop-points {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 640px) {
  .nav a:not(.btn) {
    display: none;
  }
  .downloads-all {
    margin-left: 0;
  }
  .hero {
    padding: 56px 0 48px;
  }
  /* 2×2 so the fourth stat doesn't wrap onto a row of its own. */
  .stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 24px;
  }
  .stats strong {
    font-size: 24px;
  }
  .footer nav {
    gap: 10px 20px;
  }
  .feature-copy {
    padding: 32px 24px;
  }
  .section {
    padding: 72px 0;
  }
  .tools {
    column-gap: 20px;
  }
  .tools li {
    padding: 18px 0;
    font-size: 15px;
  }
}
/* Sections fade up as they scroll in. Scroll-driven, no JS; browsers
   without animation-timeline just show them. */
@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(32px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .section-head,
    .browser,
    .feature,
    .tools,
    .card,
    .final .wrap {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 35%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .phones::before,
  .phone-back,
  .phone-front {
    animation: none;
  }
}
