/* Worth Applying? landing page.
   Layout: one centered column with a two-part hero (copy left, the real popup right) that stacks on phones.
   Palette follows the extension: white and ink, with its orange as the only accent. */
:root {
  --paper: #ffffff;
  --tint: #fff7ed;
  --tint-line: #fed7aa;
  --ink: #1f2937;
  --ink-2: #4b5563;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #f97316;
  --accent-dark: #c2410c;
  --display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 18px; line-height: 1.6; }
img { max-width: 100%; }
a { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.wrap { max-width: 1080px; margin: 0 auto; padding-inline: 24px; }
.narrow { max-width: 680px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 6.5vw, 4.6rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
.label { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-dark); }

/* Header */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.brand { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { width: 30px; height: 30px; border-radius: 9px; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 1.05rem; }
.head-link { font-size: 0.95rem; color: var(--ink-2); text-decoration: none; }
.head-link:hover { color: var(--ink); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--body); font-weight: 600; font-size: 1rem; text-decoration: none; border-radius: 12px; padding: 13px 22px; transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease; }
.btn-primary { background: var(--ink); color: #fff; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(31, 41, 55, 0.22); }
.btn-primary .arrow { transition: transform 160ms ease; }
.btn-primary:hover .arrow { transform: translateX(3px); }
.btn-primary:hover .arrow.down { transform: translateY(2px); }
.btn-quiet { color: var(--ink); border: 1px solid var(--line); background: var(--paper); }
.btn-quiet:hover { border-color: var(--ink-2); }

/* Hero. Top-aligned, so the headline sits high on short laptop screens. */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 56px; align-items: start; padding-block: 40px 96px; }
.hero-copy { display: grid; gap: 24px; }
.hero-copy > * { animation: rise 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: 90ms; }
.hero-copy > :nth-child(3) { animation-delay: 180ms; }
.hero-copy > :nth-child(4) { animation-delay: 270ms; }
.hero-copy > :nth-child(5) { animation-delay: 360ms; }
.lede { font-size: 1.25rem; color: var(--ink-2); max-width: 32ch; }
.fine { font-size: 0.92rem; color: var(--muted); max-width: 44ch; }
.hero-visual { display: grid; gap: 16px; justify-items: center; animation: rise 800ms 220ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }

/* Sample picker above the popup. Hidden without JavaScript, since it does nothing then. */
.picker { display: grid; gap: 10px; justify-items: center; }
.picker-label { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.picker-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.picker button { font: 600 0.9rem/1.2 var(--body); color: var(--ink-2); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; cursor: pointer; transition: border-color 160ms ease, background 160ms ease, color 160ms ease; }
.picker button:hover { border-color: var(--ink-2); color: var(--ink); }
.picker button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
html:not(.js) .picker { display: none; }

/* The real popup, captured by scripts/popup-shots.mjs at its actual size. The samples sit stacked and fade into each other. */
.popup-frame { display: grid; width: min(100%, 330px); background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: 0 24px 60px rgba(124, 45, 18, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04); }
.shot { grid-area: 1 / 1; align-self: start; display: block; width: 100%; height: auto; opacity: 0; transition: opacity 240ms ease; }
.shot.is-on { opacity: 1; }
.caption { font-size: 0.85rem; color: var(--muted); text-align: center; }

/* Sections */
section.band { padding-block: 96px; border-top: 1px solid var(--line); }
section.band.tinted { background: var(--tint); border-top: 0; }
.section-head { display: grid; gap: 14px; margin-bottom: 40px; }
.section-head p:not(.label) { color: var(--ink-2); font-size: 1.12rem; max-width: 60ch; }

/* Steps */
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; }
.steps li { counter-increment: step; display: grid; gap: 8px; align-content: start; }
.steps li::before { content: counter(step); font-family: var(--mono); font-size: 0.85rem; color: var(--accent-dark); border: 1px solid var(--tint-line); background: var(--tint); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; }
.steps p { color: var(--ink-2); }

.dims { margin-top: 64px; display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 48px; align-items: start; }
.dims-list { margin: 0; display: grid; gap: 0; }
.dims-list div { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 16px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.dims-list div:first-child { border-top: 1px solid var(--line); }
.dims-list dt { font-weight: 700; }
.dims-list dd { margin: 0; color: var(--ink-2); }
.dims-note { color: var(--ink-2); display: grid; gap: 14px; }

/* Numbers */
.numbers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 8px; }
.number { display: grid; gap: 6px; padding-top: 18px; border-top: 3px solid var(--ink); }
.number b { font-family: var(--display); font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1; letter-spacing: -0.03em; }
.number span { color: var(--ink-2); }
.footnote { margin-top: 36px; font-size: 0.95rem; color: var(--muted); max-width: 70ch; }

/* Demo */
.demo video { width: 100%; border-radius: 16px; border: 1px solid var(--line); background: #000; aspect-ratio: 16 / 9; }

/* Install */
.install { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.install .section-head { margin-bottom: 0; }
.install ol { margin: 0; padding-left: 1.3em; display: grid; gap: 12px; color: var(--ink-2); }
code { font-family: var(--mono); font-size: 0.88em; background: var(--tint); border: 1px solid var(--tint-line); border-radius: 6px; padding: 1px 6px; color: var(--ink); }
.perms { width: 100%; border-collapse: collapse; color: var(--ink-2); }
.perms th, .perms td { text-align: left; vertical-align: top; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--line); }
.perms th { color: var(--ink); font-weight: 700; font-size: 0.92rem; }
.perms td:first-child { white-space: nowrap; }
.install-side { display: grid; gap: 22px; }
.privacy-line { color: var(--ink-2); }

/* Footer */
.site-foot { border-top: 1px solid var(--line); padding-block: 32px 48px; font-size: 0.92rem; color: var(--muted); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
.site-foot a { color: var(--ink-2); }

/* Privacy page */
.doc { padding-block: 32px 96px; display: grid; gap: 28px; }
.doc h2 { font-size: 1.4rem; margin-top: 12px; }
.doc ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; color: var(--ink-2); }
.doc p { color: var(--ink-2); }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Side by side, the popup shrinks on short screens so all of it fits in the first view. */
@media (min-width: 861px) {
  .popup-frame { width: min(100%, clamp(260px, 60vh - 160px, 330px)); }
}
@media (min-width: 861px) and (max-height: 700px) {
  .hero { padding-top: 16px; }
}
@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 48px; padding-block: 16px 72px; }
  .steps, .numbers { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .dims, .install { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  section.band { padding-block: 72px; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .dims-list div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .install .actions .btn { flex: 1 1 100%; justify-content: center; }
  .perms td:first-child { white-space: normal; }
  /* Keeps the three sample buttons on one row down to 375px wide. */
  .picker-buttons { gap: 6px; }
  .picker button { padding-inline: 12px; }
}
/* Touch-size sample buttons on phones and touch screens. */
@media (max-width: 560px), (pointer: coarse) {
  .picker button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
