:root {
  --site-bg: #f5efe4;
  --site-fg: #241d14;
  --site-accent: #8a5a2b;
  --site-on-accent: #fff9f0;
  --site-surface: #fffdf8;
  --site-muted: #6d6355;
  --site-border: #ddd2bf;
  --site-font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, sans-serif;
  --site-radius: 14px;
  --site-space: 1;
  --site-type: 1;
  --site-motion: 1;

  --sp: calc(24px * var(--site-space, 1));
  --r: var(--site-radius);
  --r-sm: calc(var(--site-radius) * 0.55);
  --mo: calc(180ms * var(--site-motion, 1));
  --type: calc(48px * var(--site-type, 1));
  --mono: "Cascadia Mono", "Cascadia Code", Consolas, ui-monospace, monospace;
  --shadow: 0 28px 60px -32px rgba(36, 29, 20, 0.38);
  --ink-dark: #241b12;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--site-bg);
  color: var(--site-fg);
  font-family: var(--site-font);
  font-size: 16.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

img { max-width: 100%; display: block; }

a { color: var(--site-accent); }

:focus-visible {
  outline: 2px solid var(--site-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: var(--sp);
  padding: 14px clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--site-bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--site-border);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--site-fg);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand-mark { color: var(--site-accent); display: inline-flex; }

.brand-ver {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--site-muted);
  border: 1px solid var(--site-border);
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: 2px;
}

.site-nav {
  display: flex;
  gap: clamp(14px, 2.4vw, 30px);
  margin-left: auto;
}

.site-nav a {
  color: var(--site-muted);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 550;
  padding: 4px 2px;
  border-bottom: 2px solid transparent;
  transition: color var(--mo), border-color var(--mo);
}

.site-nav a:hover { color: var(--site-fg); border-bottom-color: var(--site-accent); }

.head-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: clamp(10px, 2vw, 28px);
  font-size: 13px;
  color: var(--site-muted);
  white-space: nowrap;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #5d7a4f;
  box-shadow: 0 0 0 3px rgba(93, 122, 79, 0.16);
}

/* ---------- hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(36px, 6.5vw, 96px) clamp(16px, 4vw, 48px) clamp(40px, 6vw, 88px);
  max-width: 1240px;
  margin: 0 auto;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(680px 420px at 88% 0%, rgba(138, 90, 43, 0.10), transparent 62%),
    linear-gradient(to bottom, rgba(255, 253, 248, 0.5), transparent 45%);
  pointer-events: none;
  z-index: -1;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--site-accent);
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(2.15rem, 4.6vw, var(--type));
  line-height: 1.04;
  letter-spacing: -0.028em;
  font-weight: 680;
  max-width: 13ch;
}

.lead {
  margin: 0 0 clamp(20px, 3vw, 30px);
  font-size: clamp(16.5px, 1.35vw, 18.5px);
  color: var(--site-muted);
  max-width: 46ch;
}

.steps {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 0 0 18px;
}

.steps li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: 999px;
  padding: 6px 15px 6px 7px;
  font-size: 14.5px;
  font-weight: 560;
}

.step-n {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--site-accent);
  color: var(--site-on-accent);
  font-family: var(--mono);
  font-size: 12.5px;
}

.hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  background: color-mix(in srgb, var(--site-accent) 9%, var(--site-surface));
  border: 1px dashed color-mix(in srgb, var(--site-accent) 45%, var(--site-border));
  color: var(--site-fg);
  border-radius: var(--r-sm);
  padding: 9px 14px;
  font-size: 14.5px;
}

.hint strong { font-family: var(--mono); font-size: 13.5px; }
.hint .sep { color: var(--site-muted); }
.small { margin: 0; color: var(--site-muted); font-size: 13.5px; max-width: 46ch; }

/* ---------- sign in card ---------- */

.signin-wrap { position: relative; }

.signin,
.signed {
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
  width: 100%;
  max-width: 430px;
  margin-left: auto;
}

.signin-top {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 18px;
  background: linear-gradient(160deg, #2e2318, var(--ink-dark));
  color: #f0e6d6;
  border-bottom: 3px solid var(--site-accent);
}

.app-badge { display: inline-flex; }

.app-id { display: grid; line-height: 1.25; }

.app-name { margin: 0; font-weight: 650; font-size: 15px; letter-spacing: 0.01em; }

.app-shop { margin: 0; font-size: 12px; color: #bfae95; }

.signin-ver {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 11.5px;
  color: #bfae95;
  border: 1px solid #4a3a29;
  border-radius: 999px;
  padding: 2px 8px;
}

.signin-body { padding: clamp(18px, 3vw, 26px); }

.signin-title {
  margin: 0 0 14px;
  font-size: 21px;
  font-weight: 660;
  letter-spacing: -0.015em;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--site-border);
  border-radius: var(--r-sm);
  padding: 11px 13px;
  background: color-mix(in srgb, var(--site-accent) 4%, var(--site-surface));
  margin-bottom: 18px;
}

.avatar {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--site-accent);
  color: var(--site-on-accent);
  font-weight: 650;
  font-size: 14px;
  letter-spacing: 0.02em;
  flex: none;
}

.user-name { margin: 0; font-weight: 620; font-size: 15px; line-height: 1.3; }
.user-role { margin: 0; font-size: 12.5px; color: var(--site-muted); }

.pin-label {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--site-muted);
}

.pin-dots { display: flex; gap: 12px; margin-bottom: 6px; }

.pin-dots span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--site-border);
  background: transparent;
  transition: background var(--mo), border-color var(--mo), transform var(--mo);
}

.pin-dots span.on {
  background: var(--site-accent);
  border-color: var(--site-accent);
  transform: scale(1.05);
}

.pin-dots.shake { animation: shake calc(340ms * var(--site-motion, 1)) ease; }

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}

.pin-msg {
  min-height: 21px;
  margin: 0 0 10px;
  font-size: 13px;
  color: #a33d2e;
  font-weight: 560;
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.keypad button {
  appearance: none;
  border: 1px solid var(--site-border);
  background: var(--site-surface);
  color: var(--site-fg);
  border-radius: var(--r-sm);
  height: 52px;
  font-family: var(--mono);
  font-size: 19px;
  cursor: pointer;
  transition: background var(--mo), border-color var(--mo), transform calc(var(--mo) / 2);
}

.keypad button:hover { border-color: var(--site-accent); background: color-mix(in srgb, var(--site-accent) 6%, var(--site-surface)); }

.keypad button:active { transform: translateY(1px) scale(0.985); }

.keypad .key-fn { color: var(--site-muted); font-size: 16px; }

.signin-foot {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 18px;
  border-top: 1px solid var(--site-border);
  background: color-mix(in srgb, var(--site-bg) 55%, var(--site-surface));
  font-size: 12px;
  color: var(--site-muted);
}

.mono { font-family: var(--mono); }

/* signed state */

.signed {
  padding: clamp(26px, 4vw, 38px);
  display: grid;
  justify-items: start;
  gap: 6px;
}

.signed-check {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: color-mix(in srgb, #4f7a4a 14%, var(--site-surface));
  color: #3f6b3b;
  margin-bottom: 8px;
}

.signed-title { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -0.015em; }
.signed-sub { margin: 0 0 18px; color: var(--site-muted); font-size: 14px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 11px 22px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--mo), color var(--mo), border-color var(--mo), transform calc(var(--mo) / 2);
}

.btn-primary { background: var(--site-accent); color: var(--site-on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--site-accent) 86%, #000); }
.btn-ghost { background: transparent; color: var(--site-muted); border-color: var(--site-border); margin-top: 4px; }
.btn-ghost:hover { color: var(--site-fg); border-color: var(--site-accent); }

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

.section {
  padding: clamp(42px, 6vw, 84px) clamp(16px, 4vw, 48px);
  max-width: 1240px;
  margin: 0 auto;
  border-top: 1px solid var(--site-border);
  scroll-margin-top: 72px;
}

.section-head { max-width: 62ch; margin-bottom: clamp(24px, 3.5vw, 40px); }

h2 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 3vw, calc(var(--type) * 0.72));
  line-height: 1.1;
  letter-spacing: -0.022em;
  font-weight: 670;
}

.section-sub { margin: 0; color: var(--site-muted); }

body.is-locked .demo-only { display: none; }

/* facts */

.facts {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  background: var(--site-border);
  border: 1px solid var(--site-border);
  border-radius: var(--r);
  overflow: hidden;
  margin: 0 0 clamp(24px, 3.5vw, 38px);
}

.facts div { background: var(--site-surface); padding: 16px 18px; }

.facts dt {
  margin: 0 0 3px;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--site-muted);
}

.facts dd {
  margin: 0;
  font-family: var(--mono);
  font-size: clamp(20px, 2.4vw, 27px);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

.shot { margin: 0; }

.shot-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 1px solid var(--site-border);
  border-radius: var(--r);
  background: var(--site-surface);
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 16 / 10;
  transition: border-color var(--mo), box-shadow var(--mo), transform var(--mo);
}

.shot-btn:hover {
  border-color: color-mix(in srgb, var(--site-accent) 55%, var(--site-border));
  box-shadow: 0 16px 34px -22px rgba(36, 29, 20, 0.45);
  transform: translateY(-2px);
}

.shot-btn img { width: 100%; height: 100%; object-fit: contain; background: #fff; }

.shot figcaption {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 10px;
  row-gap: 2px;
  padding: 11px 4px 0;
}

.shot-n {
  grid-row: span 2;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--site-accent);
  padding-top: 2px;
}

.shot-title { font-weight: 620; font-size: 15px; line-height: 1.35; }
.shot-desc { font-size: 13.5px; color: var(--site-muted); line-height: 1.45; }

/* video */

.video-section {
  max-width: none;
  background: var(--ink-dark);
  color: #f0e6d6;
  border-top: 0;
}

.video-section .eyebrow { color: #c99a63; }
.video-section .section-sub { color: #bfae95; }

.video-section > .section-head,
.video-frame { max-width: 1240px; margin-left: auto; margin-right: auto; }

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8);
  background: #000;
}

.video-link { position: absolute; inset: 0; display: block; color: var(--site-on-accent); }

.video-link:focus-visible { outline: 3px solid var(--site-accent); outline-offset: -3px; }

.video-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform calc(var(--mo) * 3) ease;
}

.video-link:hover img { transform: scale(1.03); }

.video-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0) 55%);
}

.video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78px;
  height: 78px;
  margin: -39px 0 0 -39px;
  border-radius: 50%;
  background: rgba(255, 249, 240, 0.95);
  box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.65);
  transition: transform var(--mo) ease;
}

.video-play::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -14px 0 0 -9px;
  border-style: solid;
  border-width: 14px 0 14px 21px;
  border-color: transparent transparent transparent var(--site-accent);
}

.video-link:hover .video-play { transform: scale(1.07); }

.video-label {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 16px;
  z-index: 1;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

/* features */

.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
}

.card {
  background: var(--site-surface);
  border: 1px solid var(--site-border);
  border-radius: var(--r);
  padding: clamp(18px, 2.4vw, 26px);
}

.card h3 { margin: 0 0 8px; font-size: 17px; font-weight: 650; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--site-muted); font-size: 14.5px; }

/* specs */

.specs-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
}

.spec-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }

.spec-table th,
.spec-table td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--site-border);
  vertical-align: top;
}

.spec-table th {
  width: 34%;
  color: var(--site-muted);
  font-weight: 600;
  white-space: nowrap;
}

.spec-table tr:first-child th,
.spec-table tr:first-child td { border-top: 1px solid var(--site-border); }

.spec-lists { display: grid; gap: 26px; }
.spec-lists h3 { margin: 0 0 10px; font-size: 16px; font-weight: 650; }

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.ticks li {
  position: relative;
  padding-left: 22px;
  color: var(--site-muted);
  font-size: 14.5px;
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--site-accent);
  transform: rotate(45deg);
}

/* footer */

.site-foot {
  border-top: 1px solid var(--site-border);
  padding: clamp(28px, 4vw, 44px) clamp(16px, 4vw, 48px);
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  gap: 8px;
}

.foot-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-weight: 640;
}

.foot-brand .brand-mark { color: var(--site-accent); }

.foot-note { margin: 0; color: var(--site-muted); font-size: 13.5px; max-width: 70ch; }
.foot-note code { font-family: var(--mono); font-size: 12.5px; }
.foot-copy { margin: 6px 0 0; color: var(--site-muted); font-size: 12.5px; }

/* lightbox */

.lightbox {
  border: 0;
  border-radius: var(--r);
  padding: 0;
  max-width: min(1140px, 94vw);
  width: 100%;
  background: var(--site-surface);
  color: var(--site-fg);
  box-shadow: 0 50px 120px -30px rgba(0, 0, 0, 0.6);
}

.lightbox::backdrop { background: rgba(20, 15, 10, 0.78); }

.lb-fig { margin: 0; display: grid; }

.lb-fig img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  background: #fff;
}

.lb-fig figcaption {
  display: grid;
  gap: 3px;
  padding: 14px 56px 16px;
  border-top: 1px solid var(--site-border);
}

.lb-title { font-weight: 640; font-size: 15px; }
.lb-desc { color: var(--site-muted); font-size: 13.5px; }

.lb-close,
.lb-nav {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--site-border);
  background: var(--site-surface);
  color: var(--site-fg);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.lb-close { top: 10px; right: 12px; font-size: 26px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }

.lb-close:hover,
.lb-nav:hover { border-color: var(--site-accent); color: var(--site-accent); }

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; }
  .signin, .signed { margin: 0 auto; }
  .facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gallery, .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .specs-grid { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .site-nav { display: none; }
  .head-status { margin-left: auto; }
  h1 { max-width: none; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery, .cards { grid-template-columns: 1fr; }
  .lb-prev, .lb-next { top: auto; bottom: 8px; transform: none; }
  .lb-fig figcaption { padding: 14px 16px 60px; }
  .signed { justify-items: stretch; text-align: center; }
  .signed-check { margin: 0 auto 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
