/*
 * GrabNConvert landing page. Same "Studio" system as the app: colour tokens come from
 * styles/tokens.css (generated from the app), Manrope for UI, IBM Plex Mono for paths,
 * dashed panels with header bars, glass cards that fill violet on hover, one rise-in motion.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition:
    background-color 0.35s ease,
    color 0.35s ease;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
p {
  margin: 0;
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}
[hidden] {
  display: none !important;
}
.mono {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}
.tnum {
  font-variant-numeric: tabular-nums;
}
.muted {
  color: var(--muted-foreground);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.wrap {
  width: min(1200px, 100% - 40px);
  margin-inline: auto;
}
@media (max-width: 640px) {
  .wrap {
    width: calc(100% - 32px);
  }
}

/* ---------- shapes shared with the app ---------- */

.tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--tile);
  color: var(--tile-foreground);
  transition:
    background-color 0.2s,
    color 0.2s;
}
.tile svg {
  width: 20px;
  height: 20px;
}

.glass {
  background: color-mix(in oklab, var(--card) 70%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.panel {
  border: 1px dashed color-mix(in oklab, var(--border) 100%, transparent);
  border-radius: 20px;
  background: color-mix(in oklab, var(--card) 35%, transparent);
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px dashed var(--border);
}
.panel-head h2,
.panel-head h3 {
  font-size: 15px;
  font-weight: 700;
}
.panel-head .count {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted-foreground);
  margin-left: 10px;
}
.panel-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.row {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
}
.row > div {
  min-width: 0;
}
.row-title {
  font-size: 14px;
  font-weight: 700;
}
.row-detail {
  font-size: 12px;
  color: var(--muted-foreground);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition:
    transform 0.15s,
    box-shadow 0.2s,
    color 0.2s,
    border-color 0.2s,
    background-color 0.2s;
}
.btn svg {
  width: 18px;
  height: 18px;
}
.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 10px 24px -10px var(--primary);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -10px var(--primary);
}
.btn-outline {
  background: color-mix(in oklab, var(--card) 60%, transparent);
  border-color: var(--border);
}
/* origin fill, like the app: a circle grows from the pointer */
.btn-outline::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--primary);
  clip-path: circle(0 at var(--x, 50%) var(--y, 50%));
  transition: clip-path 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-outline:hover {
  color: var(--primary-foreground);
  border-color: var(--primary);
}
.btn-outline:hover::after {
  clip-path: circle(150% at var(--x, 50%) var(--y, 50%));
}
.btn[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
  box-shadow: none;
}
.btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 10px;
}
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--card) 60%, transparent);
  color: var(--muted-foreground);
}
.btn-icon:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
}
.btn-icon svg {
  width: 18px;
  height: 18px;
}

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 60px;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--sidebar) 86%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.topbar .wrap {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.brand .mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--tile);
  color: var(--tile-foreground);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.brand .mark svg {
  width: 20px;
  height: 20px;
}
.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 8px;
  padding: 4px;
  border-radius: 12px;
  background: var(--muted);
}
.nav a {
  padding: 7px 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted-foreground);
  transition:
    color 0.2s,
    background-color 0.2s;
}
.nav a:hover {
  color: var(--foreground);
  background: color-mix(in oklab, var(--card) 70%, transparent);
}
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
@media (max-width: 760px) {
  .nav {
    display: none;
  }
  .topbar-right .btn-primary span {
    display: none;
  }
  .topbar-right .btn-primary {
    width: 40px;
    padding: 0;
  }
}
body {
  overflow-x: hidden;
}

/* ---------- hero (the app's Stage) ---------- */

.hero {
  margin-top: 28px;
}
.stage {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: clamp(28px, 4vw, 52px);
  background:
    radial-gradient(900px 420px at 15% -10%, color-mix(in oklab, var(--primary) 22%, transparent), transparent 60%),
    radial-gradient(600px 300px at 100% 0%, color-mix(in oklab, var(--primary) 10%, transparent), transparent 60%), color-mix(in oklab, var(--card) 55%, var(--background));
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.hero-grid > * {
  min-width: 0;
}
@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--card) 70%, transparent);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-foreground);
}
.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--success) 25%, transparent);
}
.hero h1 {
  margin-top: 18px;
  font-size: clamp(38px, 5.2vw, 62px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.hero h1 .accent {
  color: var(--link);
}
.hero .lede {
  margin-top: 16px;
  max-width: 54ch;
  font-size: 16px;
  color: var(--muted-foreground);
}
.hero-actions {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.hero-note {
  margin-top: 12px;
  font-size: 12px;
  color: var(--muted-foreground);
}
.hero-note a {
  color: var(--link);
  font-weight: 700;
}
.facts {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 13px;
  color: var(--muted-foreground);
}
.facts span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.facts svg {
  width: 14px;
  height: 14px;
  color: var(--primary);
}

/* The status LCD, as on the app's top bar */
.lcd {
  margin-top: 26px;
  min-width: 0;
  max-width: 100%;
  height: 52px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--lcd, color-mix(in oklab, var(--sidebar) 92%, black 8%));
  display: flex;
  align-items: center;
  padding: 0 14px;
  overflow: hidden;
  position: relative;
}
.lcd::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(color-mix(in oklab, var(--foreground) 6%, transparent) 1px, transparent 1.2px);
  background-size: 6px 6px;
  pointer-events: none;
}
.lcd svg {
  display: block;
  flex-shrink: 0;
  height: 28px;
  width: auto;
  max-width: none;
  fill: var(--primary);
  filter: drop-shadow(0 0 6px color-mix(in oklab, var(--primary) 60%, transparent));
}
.lcd .scroller {
  will-change: transform;
}

.shot {
  position: relative;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow:
    0 40px 80px -40px color-mix(in oklab, var(--primary) 45%, transparent),
    0 20px 40px -30px rgb(0 0 0 / 0.5);
  overflow: hidden;
}
.shot .chrome {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--sidebar);
}
.shot .chrome i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--muted-foreground);
  opacity: 0.35;
}
.shot img {
  width: 100%;
}
/* The promo film on Home: the same frame as the screenshots, the player's own controls. */
.shot.film {
  width: min(1040px, 100%);
  margin: 0 auto;
  overflow: hidden;
}
.shot video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: var(--card);
}

/* ---------- sections ---------- */

section {
  margin-top: 72px;
}
.section-head {
  margin-bottom: 22px;
}
.section-head h2 {
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: -0.025em;
}
.section-head p {
  margin-top: 8px;
  color: var(--muted-foreground);
  max-width: 62ch;
}

.cards3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
@media (max-width: 860px) {
  .cards3 {
    grid-template-columns: minmax(0, 1fr);
  }
}
.action {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  border-radius: 20px;
  border: 1px solid var(--border);
  text-align: left;
  color: inherit;
  transition:
    background-color 0.2s,
    border-color 0.2s,
    color 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
}
.action h3 {
  font-size: 17px;
  font-weight: 800;
}
.action p {
  margin-top: 6px;
  font-size: 13px;
  color: var(--muted-foreground);
  transition: color 0.2s;
}
.action:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--primary-foreground);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -14px var(--primary);
}
.action:hover p {
  color: color-mix(in oklab, var(--primary-foreground) 80%, transparent);
}
.action:hover .tile {
  background: color-mix(in oklab, white 18%, transparent);
  color: var(--primary-foreground);
}

.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 760px) {
  .features {
    grid-template-columns: minmax(0, 1fr);
  }
}

.segmented {
  display: inline-flex;
  position: isolate;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  background: var(--muted);
  position: relative;
}
.segmented .pill {
  position: absolute;
  top: 3px;
  bottom: 3px;
  border-radius: 8px;
  background: var(--primary);
  transition:
    left 0.35s cubic-bezier(0.16, 1, 0.3, 1),
    width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.segmented button {
  position: relative;
  z-index: 1;
  background: none;
  border: 0;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--muted-foreground);
  transition: color 0.25s;
}
.segmented button[aria-selected="true"] {
  color: var(--primary-foreground);
}
.shots {
  padding: 10px;
}
.shots .shot {
  box-shadow: none;
}
.shots img {
  display: none;
}
.shots img.on {
  display: block;
}
.shot-caption {
  padding: 12px 14px 6px;
  font-size: 13px;
  color: var(--muted-foreground);
}

.privacy {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 860px) {
  .privacy {
    grid-template-columns: minmax(0, 1fr);
  }
}
.privacy .row {
  align-items: flex-start;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  font-size: 13px;
  font-weight: 600;
}

.downloads {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
@media (max-width: 860px) {
  .downloads {
    grid-template-columns: minmax(0, 1fr);
  }
}
.dl {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--card);
}
.dl header {
  display: flex;
  align-items: center;
  gap: 12px;
}
.dl h3 {
  font-size: 16px;
  font-weight: 800;
}
.dl .meta {
  font-size: 12px;
  color: var(--muted-foreground);
}
.dl .btn {
  margin-top: auto;
}
.dl.recommended {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in oklab, var(--primary) 14%, transparent);
}
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in oklab, var(--primary) 15%, transparent);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  margin-left: auto;
}
.fineprint {
  padding: 12px 16px 14px;
  font-size: 12px;
  color: var(--muted-foreground);
}
.fineprint a {
  color: var(--link);
  font-weight: 700;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
}
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  font-size: 18px;
  color: var(--muted-foreground);
  transition: transform 0.25s;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq .answer {
  padding: 0 16px 16px;
  font-size: 13.5px;
  color: var(--muted-foreground);
  max-width: 72ch;
}

footer {
  margin-top: 80px;
  padding: 28px 0 40px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted-foreground);
}
footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
}
footer a:hover {
  color: var(--foreground);
}

.pricing {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 860px;
}
@media (max-width: 760px) {
  .pricing {
    grid-template-columns: minmax(0, 1fr);
  }
}
.price-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card);
}
.price-card.featured {
  border-color: var(--primary);
  box-shadow:
    0 0 0 4px color-mix(in oklab, var(--primary) 14%, transparent),
    0 20px 40px -30px var(--primary);
}
.price-name {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}
.price-amount {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.price-amount span:last-child {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted-foreground);
  letter-spacing: 0;
}
.price-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
}
.price-list li::before {
  content: "✓";
  color: var(--primary);
  font-weight: 800;
  margin-right: 8px;
}
.price-card .btn {
  margin-top: auto;
}
.price-note {
  font-size: 12px;
  color: var(--muted-foreground);
}

/* ---------- motion: the one move ---------- */

.rise {
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.rise.in {
  opacity: 1;
  transform: none;
}
.stagger > * {
  transition-delay: calc(var(--i, 0) * 45ms);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .rise {
    opacity: 1;
    transform: none;
  }
}
