/* 3D Device Kit for Figma — Obra shadcn base brand (shadcn/ui neutral, Geist).
   Tokens from brand/tokens.css (Obra shadcn). Depictions keep their own look:
   [data-depiction="figma"] → depictions/figma/figma.css, [data-depiction="tll-app"] → below. */

@font-face {
  font-family: "Geist";
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  src: url("fonts/Geist-Variable.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  --background: #ffffff;
  --foreground: #0a0a0a;
  --strong: #0a0a0a;
  --card: #ffffff;
  --muted: #f5f5f5;
  --muted-foreground: #737373;
  --text-on-muted: #525252;
  --border: #e5e5e5;
  --frame: #cecece;
  --primary: #171717;
  --primary-foreground: #fafafa;
  --ring: #717171;
  --announce: #0a0a0a;
  --stage: #fafafa;
  --shadow-sm: 0 1px 2px rgb(10 10 10 / 0.05);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 14px;
  --font: "Geist", ui-sans-serif, system-ui, sans-serif;
  --col: min(1200px, 100% - 24px);
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: #121212;
    --foreground: #aeaeae;
    --strong: #e8e8e8;
    --card: #171717;
    --muted: #262626;
    --muted-foreground: #a1a1a1;
    --text-on-muted: #a1a1a1;
    --border: #262626;
    --frame: #262626;
    --primary: #e5e5e5;
    --primary-foreground: #171717;
    --ring: #fafafa;
    --announce: #262626;
    --stage: #171717;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.3);
  }
}

*, ::before, ::after { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
  background: var(--background);
}
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font: 400 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; color: var(--strong); text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: var(--radius-sm); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip {
  position: absolute; top: 8px; left: -999px; z-index: 100;
  background: var(--primary); color: var(--primary-foreground);
  padding: 8px 12px; border-radius: var(--radius-md); font-size: 14px; font-weight: 500;
}
.skip:focus { left: 8px; }

/* ---------- Page frame: centred column with 1px lines at its edges ---------- */
.page { position: relative; }
.page::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: 50%; z-index: 1;
  width: var(--col); transform: translateX(-50%);
  border-inline: 1px solid var(--frame);
  pointer-events: none;
}
.wrap { width: var(--col); margin-inline: auto; padding-inline: 32px; position: relative; z-index: 2; }
@media (width <= 640px) { .wrap { padding-inline: 16px; } }

/* ---------- Announcement bar ---------- */
.announce {
  background: var(--announce); color: #fafafa;
  font-size: 13px; line-height: 20px; text-align: center;
  padding: 8px 16px;
}
.announce a { font-weight: 600; text-decoration: none; white-space: nowrap; margin-left: 6px; }
.announce a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Header ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--background) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-in { display: flex; align-items: center; gap: 24px; height: 64px; }
.nav-in::before { /* the frame lines continue through the sticky header */
  content: ""; position: absolute; inset: 0; border-inline: 1px solid var(--frame); pointer-events: none;
}
.logo { display: inline-flex; align-items: center; gap: 12px; margin-right: auto; text-decoration: none; color: var(--strong); }
.logo img { height: 34px; width: auto; }
.logo-name { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; padding-left: 12px; border-left: 1px solid var(--border); white-space: nowrap; }
.nav-links { display: flex; gap: 4px; }
.nav-links a {
  font-size: 14px; font-weight: 500; text-decoration: none; color: var(--muted-foreground);
  padding: 6px 12px; border-radius: 999px; transition: color .15s, background .15s;
}
.nav-links a:hover { color: var(--strong); background: var(--muted); }
@media (width <= 860px) { .nav-links { display: none; } }
@media (width <= 480px) { .logo-name { display: none; } }

/* ---------- Buttons (shadcn) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 20px; border-radius: 999px;
  font: 500 14px/1 var(--font); white-space: nowrap; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s;
}
.btn--primary { background: var(--primary); color: var(--primary-foreground); }
.btn--primary:hover { background: color-mix(in srgb, var(--primary) 90%, var(--background)); }
.btn--ghost { background: var(--background); color: var(--strong); border-color: var(--border); box-shadow: var(--shadow-sm); }
.btn--ghost:hover { background: var(--muted); }
.btn--small { height: 36px; padding: 0 16px; }

/* Figma logo on buttons that lead to the Figma file: 16px, left of the label.
   Single colour (currentColor) on dark grounds, full colour on light grounds. */
.fig-logo { width: 16px; height: 16px; flex: none; }
.btn--ghost .fig-logo { --fl-1: #f24e1e; --fl-2: #ff7262; --fl-3: #a259ff; --fl-4: #1abcfe; --fl-5: #0acf83; }
@media (prefers-color-scheme: dark) {
  /* Dark mode flips the grounds: the filled button turns light, the outlined one sits on dark. */
  .btn--primary .fig-logo { --fl-1: #f24e1e; --fl-2: #ff7262; --fl-3: #a259ff; --fl-4: #1abcfe; --fl-5: #0acf83; }
  .btn--ghost .fig-logo { --fl-1: currentColor; --fl-2: currentColor; --fl-3: currentColor; --fl-4: currentColor; --fl-5: currentColor; }
}

/* ---------- Badges, labels ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--background);
  font-size: 13px; font-weight: 500; color: var(--strong);
}
.eyebrow {
  font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted-foreground);
}
.lede { font-size: 18px; line-height: 28px; color: var(--muted-foreground); max-width: 60ch; }

/* ---------- Sections ---------- */
.section { padding: 96px 0; border-top: 1px solid var(--border); }
.section-head { display: grid; gap: 12px; justify-items: center; text-align: center; margin: 0 auto 48px; max-width: 720px; }
.section-head h2 { font-size: 36px; line-height: 40px; font-weight: 700; letter-spacing: -0.02em; }
.section-head .lede { font-size: 16px; line-height: 26px; }
@media (width <= 640px) {
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 32px; }
  .section-head h2 { font-size: 28px; line-height: 32px; }
}

/* ---------- Hero ---------- */
.hero { padding: 72px 0 64px; }
.h-copy { display: grid; justify-items: center; text-align: center; gap: 20px; }
.h-copy h1 { font-size: 60px; line-height: 64px; font-weight: 700; letter-spacing: -0.025em; }
.h-copy .lede { max-width: 44ch; }
.cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 4px; }
@media (width <= 640px) {
  .hero { padding: 48px 0 40px; }
  .h-copy h1 { font-size: 38px; line-height: 42px; }
  .h-copy .lede { font-size: 16px; line-height: 26px; }
}

/* Stage: a card holding the Figma canvas (the depiction stays light in dark mode). */
.stage {
  margin-top: 48px;
  border: 1px solid var(--border); border-radius: var(--radius-xl);
  background: var(--card); box-shadow: var(--shadow-sm);
  overflow: hidden;
}
@media (prefers-color-scheme: dark) { .stage { padding: 24px; } .stage > .fd-canvas { border-radius: var(--radius-md); } }
.h-tool {
  position: relative; display: flex; align-items: center; justify-content: center;
  gap: 64px; padding: 64px 32px 56px;
}
.h-tool > .flat { --fw: 420px; }
.h-tool .duo-wrap { padding: 0 66px 0 80px; margin-block: -56px; display: grid; place-items: center; }
.h-tool .hero-phone { --k: 1; }
.h-foot {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 6px 18px;
  margin-top: 20px; font-size: 13px; color: var(--muted-foreground);
}
.up {
  font: inherit; color: var(--strong); background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--border); text-underline-offset: 3px;
}
.up:hover { text-decoration-color: currentColor; }
.up--reset { display: none; }
html.has-shot .up--reset { display: inline; }
@media (width <= 1000px) {
  .h-tool { flex-direction: column; gap: 48px; padding: 56px 16px 48px; }
}
@media (width <= 640px) {
  .stage { margin-top: 32px; }
  .h-tool > .flat { --fw: 296px; }
  .h-tool .hero-phone { --k: 0.56; }
  .h-tool .duo-wrap { padding: 0 40px 0 48px; margin-block: -30px; }
}
@media (width <= 640px) and (prefers-color-scheme: dark) { .stage { padding: 12px; } }

/* Flat frame = a selected main component on the Figma canvas (figma depiction). */
.flat.fd-node { position: relative; flex: none; width: var(--fw); aspect-ratio: 951 / 669; }
.flat .fd-frame { background: #fff; z-index: 0; }
[data-dst] { pointer-events: none; }
.shot {
  position: absolute; inset: 0; z-index: 2; display: none; pointer-events: none;
  background: #0a0a0a var(--shot) center / cover no-repeat;
}
html.has-shot .shot { display: block; }

/* ---------- 3D phones (p3d, driven by the kit script) ---------- */
.hero-phone .p3d-shadow { transition: inset .9s, bottom .9s, opacity .9s; }
.hero-phone.is-open .p3d-shadow { left: -14%; right: -10%; bottom: 7%; opacity: .7; }
/* Inner screens of the open iPhone Duo: a second 3D layer over the canvas, kept in step with the
   model by assets/kit.js (same perspective, rotation and fold maths as the kit script). */
.duo-inner { pointer-events: none; z-index: 1; }
.duo-inner .p3d-body { will-change: transform; }
.duo-pane {
  position: absolute; top: 0; left: 0; transform-origin: 0 0; overflow: hidden;
  backface-visibility: hidden; opacity: 0;
}
.duo-pane--l { width: 476px; height: 678px; border-radius: 50px 0 0 50px; }
.duo-pane--r { width: 480px; height: 678px; border-radius: 0 50px 50px 0; }

/* Screens inside the phones: real TLL captures. */

/* ---------- At a glance ---------- */
.strip { border-top: 1px solid var(--border); }
.strip-in { display: grid; grid-template-columns: repeat(4, 1fr); padding-inline: 0; }
.strip-in > div { display: grid; gap: 6px; align-content: start; padding: 32px; }
.strip-in > div + div { border-left: 1px solid var(--border); }
.strip b { font-size: 36px; line-height: 1; font-weight: 700; letter-spacing: -0.025em; color: var(--strong); font-variant-numeric: tabular-nums; }
.strip span { font-size: 14px; color: var(--muted-foreground); max-width: 22ch; }
@media (width <= 860px) {
  .strip-in { grid-template-columns: 1fr 1fr; }
  .strip-in > div { padding: 24px 16px; }
  .strip-in > div:nth-child(3) { border-left: 0; }
  .strip-in > div:nth-child(n+3) { border-top: 1px solid var(--border); }
  .strip b { font-size: 30px; }
}

/* ---------- How it works ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: s; }
.steps li {
  counter-increment: s; display: grid; gap: 8px; align-content: start;
  border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--card);
  padding: 8px 8px 24px; box-shadow: var(--shadow-sm);
}
.steps h3 { font-size: 16px; font-weight: 600; line-height: 22px; padding: 12px 16px 0; }
.steps h3::before { content: counter(s) ". "; color: var(--muted-foreground); }
.steps p { font-size: 14px; color: var(--muted-foreground); padding: 0 16px; }
@media (prefers-color-scheme: dark) { .steps li { padding: 24px 24px 28px; } .steps h3 { padding: 16px 0 0; } .steps p { padding: 0; } }
@media (width <= 860px) { .steps { grid-template-columns: 1fr; } }

.ill { position: relative; height: 216px; border-radius: var(--radius-md); overflow: hidden; display: grid; place-items: center; }
/* Figma's chrome is drawn at its real 11px size; zoom re-lays it out crisply for the small cards. */
.ill .fd-panel { width: auto; zoom: 1.2; }
.ill--pages .fd-panel { width: 190px; padding-bottom: 6px; zoom: 1.05; }
.ill--frame { place-items: start center; }
/* Canvas zoomed in on the frame: its top part, label included; the rest runs off the canvas. */
.ill--frame .fd-node { position: relative; width: 132px; height: 287px; margin-top: 38px; }
.ill--frame .fd-frame img { width: 100%; height: 100%; object-fit: cover; }
.ill--xyz .fd-panel { width: 236px; }
.ill--xyz .fd-section { padding-block: 4px; }
.ill--xyz .fd-row { gap: 6px; }

/* ---------- Angles ---------- */
.ang { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.ang .section-head { justify-items: start; text-align: left; margin: 0 0 28px; }
.ang-stage {
  position: relative; display: grid; place-items: end center; min-height: 680px; padding-bottom: 48px;
  border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--stage);
  overflow: hidden;
}
.ang-stage .p3d { z-index: 1; --k: .86; }
/* Figma's Design panel readout sits on the stage, next to the phone it describes. */
.rot-wrap { position: absolute; top: 20px; left: 20px; z-index: 2; }
.rot-wrap .rot { display: inline-block; background: transparent; } /* beats figui3's :scope fill on the depiction root */
.rot .fd-panel { width: 252px; border: 1px solid var(--figma-color-border); box-shadow: none; }
.rot .fd-section { padding-bottom: 8px; }
@media (width <= 900px) {
  .ang { grid-template-columns: 1fr; gap: 32px; }
  .ang-stage { min-height: 600px; place-items: end center; padding-bottom: 24px; }
  .ang-stage .p3d { --k: .8; }
}
@media (width <= 640px) { .ang-stage { min-height: 540px; } .ang-stage .p3d { --k: .66; } .rot-wrap { left: 50%; transform: translateX(-50%); top: 16px; } }

/* Chips: toggle buttons (presets, filters). */
.chips, .filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  height: 32px; padding: 0 14px; border-radius: 999px; cursor: pointer;
  font: 500 13px/1 var(--font); color: var(--strong);
  background: var(--background); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
  transition: background .15s, color .15s, border-color .15s;
}
.chip:hover { background: var(--muted); }
.chip[aria-pressed="true"] { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }

/* ---------- Devices ---------- */
#devices .section-head + .filters { justify-content: center; margin-bottom: 32px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.grid [hidden] { display: none; }
.dev {
  display: grid; grid-template-rows: auto 1fr; overflow: hidden; text-decoration: none;
  border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--card);
  box-shadow: var(--shadow-sm); transition: border-color .2s;
}
.dev:hover { border-color: var(--ring); }
.dev-stage { position: relative; height: 290px; display: grid; place-items: center; padding-bottom: 6px; background: var(--stage); }
.dev-stage .tag { position: absolute; top: 12px; left: 12px; z-index: 2; }
.dev-meta { border-top: 1px solid var(--border); padding: 12px 16px 14px; display: grid; gap: 2px; }
.dev-meta h3 { font-size: 14px; font-weight: 600; line-height: 20px; }
.dev-meta p { font-size: 13px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.tag {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 500; line-height: 1;
  border: 1px solid var(--border); background: var(--background); color: var(--strong);
}
.tag--free { background: var(--primary); border-color: var(--primary); color: var(--primary-foreground); }
@media (width <= 520px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .grid .p3d { --k: .72; }
  .grid .dev-stage { height: 215px; }
}

/* ---------- Pricing ---------- */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 880px; margin: 0 auto; }
.plan {
  display: flex; flex-direction: column; gap: 4px; padding: 32px;
  border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--card); box-shadow: var(--shadow-sm);
}
.plan--full { border-color: var(--strong); box-shadow: 0 0 0 1px var(--strong), var(--shadow-sm); }
.plan h3 { font-size: 18px; font-weight: 600; }
.price { font-size: 48px; line-height: 52px; font-weight: 700; letter-spacing: -0.025em; color: var(--strong); margin-top: 12px; }
.plan-note { font-size: 14px; color: var(--muted-foreground); }
.plan ul { list-style: none; margin: 24px 0 28px; padding: 24px 0 0; border-top: 1px solid var(--border); display: grid; gap: 12px; font-size: 14px; color: var(--strong); }
.plan li { display: flex; gap: 10px; align-items: flex-start; line-height: 21px; }
.plan li svg { width: 16px; height: 16px; flex: none; margin-top: 3px; color: var(--strong); }
.plan li.no { color: var(--muted-foreground); }
.plan li.no svg { color: var(--muted-foreground); }
.plan .btn { align-self: flex-start; margin-top: auto; }
@media (width <= 720px) { .plans { grid-template-columns: 1fr; } .plan { padding: 24px; } }

/* ---------- FAQ ---------- */
.faq { max-width: 660px; margin: 0 auto; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--card); overflow: hidden; }
.faq details + details { border-top: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 16px;
  padding: 20px 24px; font-size: 16px; font-weight: 500; line-height: 22px; color: var(--strong);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font: inherit; letter-spacing: 0; }
.faq summary::before {
  content: ""; flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: var(--primary) center / 14px 14px no-repeat;
  -webkit-mask: none;
  background-image: var(--faq-plus);
  --faq-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fafafa' stroke-width='2.25' stroke-linecap='round'%3E%3Cpath d='M5 12h14M12 5v14'/%3E%3C/svg%3E");
  transition: transform .2s;
}
.faq details[open] summary::before { transform: rotate(45deg); }
.faq details p { padding: 0 24px 22px 64px; color: var(--muted-foreground); font-size: 15px; }
@media (prefers-color-scheme: dark) {
  .faq summary::before { --faq-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23171717' stroke-width='2.25' stroke-linecap='round'%3E%3Cpath d='M5 12h14M12 5v14'/%3E%3C/svg%3E"); }
}
@media (width <= 640px) { .faq summary { padding: 16px; } .faq details p { padding: 0 16px 18px 56px; } }

/* ---------- Final CTA ---------- */
.final { background: var(--muted); border-top: 1px solid var(--border); padding: 96px 0; }
@media (prefers-color-scheme: dark) { .final { background: var(--card); } }
.final-in { display: grid; justify-items: center; text-align: center; gap: 28px; }
.final h2 { font-size: 36px; line-height: 40px; font-weight: 700; letter-spacing: -0.02em; max-width: 18em; }
@media (width <= 640px) { .final { padding: 64px 0; }
  .final h2 { font-size: 28px; line-height: 32px; } }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--border); padding: 48px 0 56px; font-size: 14px; }
.foot-in { display: grid; grid-template-columns: 1.2fr auto; gap: 24px 48px; align-items: start; }
.foot-name { font-weight: 600; color: var(--strong); }
.foot-small { color: var(--muted-foreground); margin-top: 4px; max-width: 52ch; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot nav a { color: var(--muted-foreground); text-decoration: none; }
.foot nav a:hover { color: var(--strong); }
.foot-made { grid-column: 1 / -1; color: var(--strong); }
.foot-made a { text-decoration: none; font-weight: 500; }
.foot-made a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot-legal { grid-column: 1 / -1; color: var(--muted-foreground); font-size: 12px; max-width: 72ch; }
@media (width <= 640px) { .foot-in { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
