/* Components. Values come from tokens.css; light sections re-theme via .theme-light. */

/* ---- In-development ribbon --------------------------------------------------*/
.dev-ribbon {
  position: relative;
  z-index: 60;
  background: linear-gradient(90deg, var(--frame-blue), var(--frame-orange), var(--frame-purple), var(--frame-red));
  color: #0b1118;
  font-size: var(--text-xs);
  font-weight: var(--weight-strong);
  text-align: center;
  padding: 6px var(--gutter);
  letter-spacing: 0.01em;
}
.dev-ribbon a { font-weight: var(--weight-heading); }
@media (max-width: 760px) {
  .ribbon-long { display: none; }
}

/* ---- Navigation --------------------------------------------------------------*/
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-height);
  background: var(--bg-glass);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}
.brand img { width: 34px; height: 34px; }
.wordmark {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  white-space: nowrap;
}
.wordmark b { color: var(--accent); font-weight: inherit; }
.nav-links {
  display: flex;
  gap: var(--space-5);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-muted);
  white-space: nowrap;
  transition: color var(--dur-fast);
}
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--text); }
.nav-toggle { display: none; }

/* Five menu items and the button fit in one row from 1080 px; below, the menu button. */
@media (max-width: 1079px) {
  .nav-links,
  .nav .btn { display: none; }
  .nav-toggle {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-s);
    background: transparent;
    cursor: pointer;
  }
  .nav.open .nav-links {
    display: grid;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    padding: var(--space-5) var(--gutter) var(--space-6);
    background: var(--bg-elev);
    border-bottom: 1px solid var(--line);
    gap: var(--space-4);
  }
  .nav.open .nav-links { gap: var(--space-1); }
  .nav.open .nav-links a { display: block; padding-block: 10px; font-size: var(--text-lg); color: var(--text); }
  .nav.open .nav-menu-only { display: list-item; }
  .nav.open .nav-menu-only a { color: var(--accent); font-weight: var(--weight-strong); }
}
/* In the phone menu only; the header button covers it on wider screens. */
.nav-menu-only { display: none; }

/* ---- Buttons -----------------------------------------------------------------*/
.btn {
  --btn-bg: var(--accent);
  --btn-fg: var(--accent-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 1.25rem;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: var(--weight-strong);
  font-size: var(--text-sm);
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast), border-color var(--dur-fast);
  white-space: nowrap;
}
.btn:hover { --btn-bg: var(--accent-hover); transform: translateY(-1px); }
.btn-lg { min-height: 54px; padding: 0 1.75rem; font-size: var(--text-base); }
.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { --btn-bg: var(--line); }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.center .btn-row { justify-content: center; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: var(--weight-strong);
  color: var(--accent);
  text-decoration: none;
}
.link-arrow::after { content: "→"; transition: transform var(--dur-fast) var(--ease-out); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---- Tags ----------------------------------------------------------------------*/
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  font-size: var(--text-xs);
  font-weight: var(--weight-strong);
  color: var(--text-muted);
  background: var(--bg-glass);
  backdrop-filter: blur(8px);
}
.tag-illustrative::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--frame-orange);
}
.tag-soon::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--frame-purple);
}

/* ---- Patent-pending badge (D66) -------------------------------------------------------
   Its own line, sized to its text. The seal is drawn by a mask so the markup stays one span. */
.patent-badge {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--accent);
  background: var(--accent-soft);
  color: var(--text);
  font-size: var(--text-xs);
  font-weight: var(--weight-heading);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.patent-badge::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='6.5' r='4.75'/%3E%3Ccircle cx='8' cy='6.5' r='2' fill='black'/%3E%3Cpath d='M5.4 10.5 4.5 15l3.5-1.7 3.5 1.7-.9-4.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='black' stroke-width='1.5' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='6.5' r='4.75'/%3E%3Ccircle cx='8' cy='6.5' r='2' fill='black'/%3E%3Cpath d='M5.4 10.5 4.5 15l3.5-1.7 3.5 1.7-.9-4.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.hero .patent-badge { margin-bottom: var(--space-4); }
.footer .patent-badge { margin-top: var(--space-4); }

/* ---- Viewfinder corners (logo motif) ----------------------------------------------
   Wrap any media in .vf to frame it with the four brand-coloured corners. */
.vf {
  position: relative;
  padding: var(--vf-gap);
}
.vf::before,
.vf::after,
.vf > .vf-b::before,
.vf > .vf-b::after {
  content: "";
  position: absolute;
  width: var(--vf-size);
  height: var(--vf-size);
  pointer-events: none;
  z-index: 2;
}
.vf::before { top: 0; left: 0; border-top: var(--vf-thick) solid var(--frame-blue); border-left: var(--vf-thick) solid var(--frame-blue); }
.vf::after { top: 0; right: 0; border-top: var(--vf-thick) solid var(--frame-orange); border-right: var(--vf-thick) solid var(--frame-orange); }
.vf > .vf-b::before { bottom: 0; left: 0; border-bottom: var(--vf-thick) solid var(--frame-purple); border-left: var(--vf-thick) solid var(--frame-purple); }
.vf > .vf-b::after { bottom: 0; right: 0; border-bottom: var(--vf-thick) solid var(--frame-red); border-right: var(--vf-thick) solid var(--frame-red); }

/* A painting presented on the page */
.art {
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  box-shadow: var(--shadow-art);
  background: var(--bg-elev-2);
}
.art img { width: 100%; }

.caption {
  margin-top: var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-faint);
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.caption em { font-style: normal; color: var(--text-muted); }

/* ---- Before / after slider (js: ba-slider) -------------------------------------------*/
.ba {
  --pos: 50%;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-art);
  user-select: none;
  touch-action: pan-y;
  background: var(--bg-elev-2);
}
.ba img {
  width: 100%;
  pointer-events: none;
}
.ba .ba-after {
  position: absolute;
  inset: 0;
  clip-path: inset(0 0 0 var(--pos));
}
.ba .ba-after img { height: 100%; object-fit: cover; }
.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 0 1px rgb(0 0 0 / 0.15);
  pointer-events: none;
}
.ba-handle::after {
  content: "⟷";
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #111;
  font-size: 18px;
  font-weight: 700;
  box-shadow: var(--shadow-m);
}
.ba input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  margin: 0;
}
.ba-label {
  position: absolute;
  top: var(--space-4);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgb(10 15 22 / 0.7);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: var(--weight-heading);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(6px);
  pointer-events: none;
}
.ba-label.left { left: var(--space-4); }
.ba-label.right { right: var(--space-4); }
.ba .tag { position: absolute; bottom: var(--space-4); left: var(--space-4); }

/* ---- Lift-off stage (js: lift-off) ------------------------------------------------------*/
.liftoff {
  position: relative;
  height: 260vh;
}
.liftoff-sticky {
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  display: grid;
  grid-template-rows: auto 1fr;
  gap: var(--space-5);
  padding-block: var(--space-6);
  overflow: hidden;
}
.liftoff-stage {
  position: relative;
  min-height: 0;
}
.liftoff-photo,
.liftoff-art {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform, opacity;
}
.liftoff-photo { border-radius: var(--radius-m); box-shadow: var(--shadow-l); }
.liftoff-art { box-shadow: var(--shadow-art); }
.liftoff-steps {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-4);
}
.liftoff-step {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  background: var(--bg-glass);
  border: 1px solid var(--line);
  font-size: var(--text-sm);
  color: var(--text-faint);
  backdrop-filter: blur(10px);
  transition: color var(--dur), border-color var(--dur);
}
.liftoff-step::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid currentColor;
}
.liftoff-step.done { color: var(--text); border-color: var(--line-strong); }
.liftoff-step.done::before { background: var(--pass); border-color: var(--pass); }

/* ---- Cards and tiles -------------------------------------------------------------*/
.card {
  position: relative;
  padding: clamp(1.4rem, 2.6vw, 2.2rem);
  border-radius: var(--radius-l);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  overflow: hidden;
}
.card h3 { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.card p { color: var(--text-muted); font-size: var(--text-sm); }
.card .icon {
  width: 44px;
  height: 44px;
  margin-bottom: var(--space-5);
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
}
.card .icon svg { width: 22px; height: 22px; }
.card-media {
  margin: calc(-1 * clamp(1.4rem, 2.6vw, 2.2rem));
  margin-bottom: var(--space-5);
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-elev-2);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; }

.pain {
  padding: var(--space-6);
  border-left: 3px solid var(--c, var(--accent));
  background: var(--bg-elev);
  border-radius: 0 var(--radius-m) var(--radius-m) 0;
}
.pain h3 { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.pain p { color: var(--text-muted); font-size: var(--text-sm); }

/* ---- Steps ----------------------------------------------------------------------------*/
.steps {
  counter-reset: step;
  display: grid;
  gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.step {
  counter-increment: step;
  position: relative;
  padding-top: var(--space-7);
  border-top: 1px solid var(--line-strong);
}
.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: var(--space-4);
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: var(--text-sm);
  color: var(--c, var(--accent));
}
.step h3 { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.step p { color: var(--text-muted); font-size: var(--text-sm); }
.step .where { margin-top: var(--space-3); font-size: var(--text-xs); color: var(--text-faint); }

/* ---- Accuracy card mock ----------------------------------------------------------------*/
.acc-card {
  background: #fdfcf9;
  color: #1a2530;
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-l);
  overflow: hidden;
  font-size: var(--text-sm);
  max-width: 520px;
  margin-inline: auto;
}
.acc-head {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-5);
  border-bottom: 1px solid #e6e1d8;
}
.acc-head img { width: 76px; height: 76px; object-fit: cover; border-radius: 3px; }
.acc-head h4 { font-size: var(--text-base); }
.acc-head p { color: #66717c; font-size: var(--text-xs); }
.acc-rows { margin: 0; padding: var(--space-2) var(--space-5) var(--space-4); list-style: none; }
.acc-rows li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: var(--space-4);
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px dashed #e3ded4;
}
.acc-rows li:last-child { border-bottom: 0; }
.acc-rows .v { font-family: var(--font-mono); font-size: var(--text-xs); color: #3b4651; }
.mark {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
}
.mark.pass { background: #e1f4ea; color: #1d7a50; }
.mark.info { background: #e3f0f8; color: #2a6688; }
.acc-foot { padding: var(--space-3) var(--space-5); background: #f4f1ea; color: #76808a; font-size: var(--text-xs); }
.acc-score {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-1) var(--space-4);
  padding: var(--space-5) var(--space-5) var(--space-2);
}
.acc-score-label { grid-column: 1 / -1; color: #66717c; font-size: var(--text-xs); letter-spacing: 0.04em; text-transform: uppercase; }
.acc-score-num { font-family: var(--font-display); font-weight: var(--weight-display); font-size: var(--text-3xl); line-height: 1; color: #1a2530; }
.acc-score-num small { font-size: 0.42em; color: #66717c; font-weight: var(--weight-medium); }
.acc-score .mark { font-size: 0.8rem; padding: 4px 12px; }
.acc-print { margin: 0; padding: 0 var(--space-5) var(--space-4); color: #3b4651; font-size: var(--text-sm); }
.acc-details { border-top: 1px solid #e6e1d8; }
.acc-details summary {
  cursor: pointer;
  padding: var(--space-3) var(--space-5);
  font-weight: var(--weight-strong);
  font-size: var(--text-sm);
  color: #2a6688;
}
.acc-details[open] summary { border-bottom: 1px dashed #e3ded4; }

/* ---- Device frames (generic, CSS-drawn) ---------------------------------------------------*/
.device { position: relative; }
.device img { width: 100%; display: block; }
/* The base is wider than the screen; the screen is inset rather than the base
   pushed out, so the drawing stays inside its box and never widens the page. */
.device-mac .screen {
  margin-inline: 6.5%;
  border: clamp(6px, 1vw, 12px) solid #0d0f12;
  border-radius: clamp(10px, 1.4vw, 18px) clamp(10px, 1.4vw, 18px) 4px 4px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 1px #2c3036, var(--shadow-l);
}
.device-mac .base {
  height: clamp(10px, 1.4vw, 18px);
  border-radius: 0 0 14px 14px;
  background: linear-gradient(#c9ccd1, #8d9198);
}
.device-tablet .screen,
.device-phone .screen {
  overflow: hidden;
  background: #000;
  box-shadow: 0 0 0 2px #2a2e34, var(--shadow-l);
}
.device-tablet .screen { border: clamp(8px, 1.2vw, 14px) solid #0d0f12; border-radius: clamp(18px, 2.2vw, 30px); }
.device-phone .screen { border: clamp(6px, 0.9vw, 10px) solid #0d0f12; border-radius: clamp(26px, 3.4vw, 46px); }
.device-placeholder {
  aspect-ratio: var(--ratio, 16 / 10);
  display: grid;
  place-items: center;
  color: var(--text-faint);
  font-size: var(--text-sm);
  background: repeating-linear-gradient(45deg, var(--bg-elev), var(--bg-elev) 12px, var(--bg-elev-2) 12px, var(--bg-elev-2) 24px);
}

.devices {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
  align-items: end;
}
@media (min-width: 960px) {
  .devices { grid-template-columns: 2.6fr 1.25fr 0.62fr; }
}

/* ---- Feature rows ---------------------------------------------------------------------*/
.feature-list {
  display: grid;
  gap: var(--space-4);
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
}
.feature-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: var(--space-3);
  color: var(--text-muted);
}
.feature-list li::before {
  content: "";
  width: 18px;
  height: 18px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23dc6b2c' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.feature-list strong { color: var(--text); font-weight: var(--weight-strong); }

/* ---- Big statement / quote ---------------------------------------------------------------*/
.statement {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: var(--text-3xl);
  letter-spacing: var(--tracking-display);
  line-height: 1.12;
  max-width: 22ch;
}
.statement em { font-style: normal; color: var(--accent); }

.portrait {
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-m);
}

/* ---- FAQ -----------------------------------------------------------------------------------*/
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) 0;
  font-family: var(--font-display);
  font-weight: var(--weight-heading);
  font-size: var(--text-lg);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.4em; line-height: 1; transition: transform var(--dur); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 0 var(--space-5); color: var(--text-muted); max-width: 70ch; }

/* ---- CTA band --------------------------------------------------------------------------------*/
.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  padding: clamp(2.5rem, 7vw, 6rem);
  background:
    radial-gradient(120% 140% at 0% 0%, rgb(98 180 217 / 0.22), transparent 50%),
    radial-gradient(120% 140% at 100% 100%, rgb(229 77 71 / 0.2), transparent 50%),
    var(--bg-elev);
  border: 1px solid var(--line);
}

/* ---- Footer -----------------------------------------------------------------------------------*/
.footer {
  padding-block: var(--space-8) var(--space-6);
  border-top: 1px solid var(--line);
  background: var(--bg);
  color: var(--text-muted);
  font-size: var(--text-sm);
}
.footer-grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}
.footer h4 { font-size: var(--text-sm); color: var(--text); margin-bottom: var(--space-3); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }
.footer-base {
  margin-top: var(--space-7);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: var(--text-xs);
  color: var(--text-faint);
}

/* ---- Forms ------------------------------------------------------------------------------------*/
.field { display: grid; gap: var(--space-2); }
.field label,
.field legend { font-weight: var(--weight-strong); font-size: var(--text-sm); }
.field .hint { font-size: var(--text-xs); color: var(--text-faint); }
.input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line-strong);
  background: var(--bg-elev);
  color: var(--text);
}
fieldset { border: 0; margin: 0; padding: 0; }
.choices { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.choice {
  position: relative;
  display: inline-flex;
}
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span {
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  font-size: var(--text-sm);
  color: var(--text-muted);
  transition: all var(--dur-fast);
}
.choice input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.choice input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Small print: the forms' privacy lines, "Prices may change before launch." and the like. */
.fine-print {
  font-size: var(--text-xs);
  color: var(--text-faint);
}
.fine-print a { color: inherit; }
