/* =====================================================================
   Starcat Technologies — site styles
   Concept: an installer's drawing set at night. Dark by default with a
   light theme, condensed display type with an italic serif accent, and
   scroll-driven sections (see js/motion.js). Every animated section has
   a complete static state for no-JS and reduced motion.
   ===================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-variable-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("/fonts/instrument-serif-italic-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/* ---------- Tokens: dark (default) ---------- */
:root {
  color-scheme: dark;
  --bg: #12131C;
  --surface: #1A1C29;
  --surface-2: #222536;
  --rule: #2C3045;
  --rule-strong: #454B66;
  --text: #EDEDF3;
  --muted: #B9BDCC;
  --subtle: #9096AC;
  --brand: #9AA8FF;
  --accent: #FF5A5F;
  --button: #D81824;
  --button-hover: #B5121C;
  --on-button: #FFFFFF;
  --accent-wash: rgba(255, 90, 95, 0.12);
  --header-bg: rgba(18, 19, 28, 0.78);
  --grid-line: rgba(237, 237, 243, 0.05);
  --shadow: 0 24px 48px -28px rgba(0, 0, 0, 0.7);
  --logo-star: #FFFFFF;
  --logo-cat: #FF5A5F;
  --logo-sub: #B9BDCC;
  --focus: #EDEDF3;
  /* floor plans */
  --touch-fill: rgba(255, 90, 95, 0.28);
  --touch-core: rgba(255, 90, 95, 0.75);
  --plan-lawn: #23273A;
  --plan-pave: #202334;
  --plan-street: #161722;
  --plan-floor: #24283B;
  --plan-furn: #646B8C;
  --plan-furn-fill: #2E3249;
  --plan-water: rgba(154, 168, 255, 0.16);
  --plan-tree: rgba(154, 168, 255, 0.07);

  /* type */
  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --t-xs: 0.8125rem;
  --t-sm: 0.9375rem;
  --t-base: 1.0625rem;
  --t-md: 1.25rem;
  --t-lg: clamp(1.375rem, 1.15rem + 0.9vw, 1.75rem);
  --t-xl: clamp(2.125rem, 1.4rem + 3vw, 3.75rem);
  --t-hero: clamp(3.4rem, 1.4rem + 9.2vw, 10.75rem);

  /* space (4px base) */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;
  --s-10: 8rem;

  /* shape and motion */
  --radius: 6px;
  --radius-lg: 14px;
  --dur-press: 120ms;
  --dur-state: 220ms;
  --dur-panel: 320ms;
  --dur-draw: 1100ms;
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-inout: cubic-bezier(0.6, 0, 0.2, 1);

  /* layout */
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 68px;
}

/* ---------- Tokens: light ---------- */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #EEF1F4;
  --surface: #FFFFFF;
  --surface-2: #F6F7F9;
  --rule: #D3D8E0;
  --rule-strong: #8B93A6;
  --text: #161C3A;
  --muted: #4F5768;
  --subtle: #5A6276;
  --brand: #243078;
  --accent: #B5121C;
  --button: #D81824;
  --button-hover: #B5121C;
  --on-button: #FFFFFF;
  --accent-wash: rgba(216, 24, 36, 0.08);
  --header-bg: rgba(238, 241, 244, 0.82);
  --grid-line: rgba(22, 28, 58, 0.06);
  --shadow: 0 24px 48px -30px rgba(22, 28, 58, 0.45);
  --logo-star: #243078;
  --logo-cat: #D81824;
  --logo-sub: #4F5768;
  --focus: #243078;
  --touch-fill: rgba(181, 18, 28, 0.22);
  --touch-core: rgba(181, 18, 28, 0.7);
  --plan-lawn: #DCE1EA;
  --plan-pave: #E6E9EF;
  --plan-street: #D5DAE3;
  --plan-floor: #F7F8FB;
  --plan-furn: #9AA1B4;
  --plan-furn-fill: #E7EAF0;
  --plan-water: rgba(36, 48, 120, 0.09);
  --plan-tree: rgba(36, 48, 120, 0.05);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
  background: var(--bg);
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--t-base);
  line-height: 1.6;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3 { margin: 0; line-height: 1.08; text-wrap: balance; overflow-wrap: break-word; hyphens: manual; }
@media (max-width: 559px) { h2 { hyphens: auto; } }
h2 { font-stretch: 112%; font-weight: 640; letter-spacing: -0.01em; font-size: var(--t-xl); }
h3 { font-stretch: 104%; font-weight: 650; letter-spacing: -0.005em; font-size: var(--t-md); }
h1 em, h2 em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-stretch: 100%;
  letter-spacing: 0;
  color: var(--accent);
}
h2 em { font-size: 1.12em; line-height: 0.9; }
p { margin: 0; }
p, li { text-wrap: pretty; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--accent); }
strong { font-weight: 650; color: var(--text); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { background: var(--accent); color: #FFFFFF; }
[hidden] { display: none !important; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.sprite .fill { fill: currentColor; stroke: none; }
.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
.wm-star { fill: var(--logo-star); }
.wm-cat { fill: var(--logo-cat); }
.wm-sub { fill: var(--logo-sub); }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.skip-link {
  position: absolute;
  left: var(--s-4);
  top: -100px;
  z-index: 300;
  padding: var(--s-3) var(--s-4);
  background: var(--text);
  color: var(--bg);
  font-weight: 650;
  border-radius: var(--radius);
  text-decoration: none;
}
.skip-link:focus { top: var(--s-3); color: var(--bg); }

/* ---------- Intro (first visit per session, see js/theme.js) ---------- */
.intro { display: none; }
.has-intro .intro {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: var(--bg);
  /* Safety net: never cover the page for long, even if scripts fail. */
  animation: intro-failsafe 0.01s linear 3.2s forwards;
}
.intro-logo { width: min(72vw, 560px); height: auto; overflow: visible; }
@keyframes intro-failsafe { to { visibility: hidden; opacity: 0; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 44px;
  padding: 0.6rem 1.15rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-weight: 650;
  font-size: var(--t-sm);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color var(--dur-state) var(--ease-out), color var(--dur-state) var(--ease-out),
    border-color var(--dur-state) var(--ease-out), transform var(--dur-press) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:active { transform: scale(0.97); }
.btn-lg { min-height: 54px; padding: 0.85rem 1.5rem; font-size: var(--t-base); }
.btn-primary { background: var(--button); color: var(--on-button); }
.btn-primary:hover { background: var(--button-hover); color: var(--on-button); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--rule-strong); }
.btn-secondary:hover { border-color: var(--text); color: var(--text); }
.btn:disabled { opacity: 0.6; cursor: progress; transform: none; }

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--brand);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
}
.link-btn:hover { color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-state) var(--ease-out), background-color var(--dur-state) var(--ease-out);
}
@supports (backdrop-filter: blur(8px)) { .site-header { backdrop-filter: blur(14px) saturate(140%); } }
.site-header.is-scrolled { border-bottom-color: var(--rule); }
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3) var(--s-4);
  min-height: var(--header-h);
}
.brand { display: block; flex: none; padding: var(--s-2) 0; }
.brand-logo { width: auto; height: 24px; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: var(--s-1); margin: 0; padding: 0; list-style: none; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--s-3);
  color: var(--muted);
  font-weight: 560;
  font-size: var(--t-sm);
  text-decoration: none;
  border-radius: 999px;
  transition: color var(--dur-state) var(--ease-out);
}
.site-nav a:hover, .site-nav a[aria-current="true"] { color: var(--text); }
.site-nav a[aria-current="true"] { box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  border: 1.5px solid var(--rule-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  transition: border-color var(--dur-state) var(--ease-out), transform var(--dur-press) var(--ease-out);
}
.theme-toggle:hover { border-color: var(--text); }
.theme-toggle:active { transform: scale(0.94); }
.theme-toggle .icon { width: 20px; height: 20px; }
:root[data-theme="dark"] .theme-toggle .icon-moon,
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
.no-js .theme-toggle { display: none; }
.header-call { flex: none; }
.header-call-short { display: none; }
.menu-toggle { display: none; }

@media (max-width: 959px) {
  :root { --header-h: 60px; }
  .brand-logo { height: 20px; }
  .header-call { margin-left: auto; padding-inline: 0.95rem; }
  .header-call-number { display: none; }
  .header-call-short { display: inline; }
  .js .menu-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--s-2);
    min-height: 44px;
    padding: 0 0.95rem;
    border: 1.5px solid var(--rule-strong);
    border-radius: 999px;
    background: transparent;
    font-weight: 600;
    font-size: var(--t-sm);
  }
  .menu-toggle-bars, .menu-toggle-bars::before, .menu-toggle-bars::after {
    display: block;
    width: 16px;
    height: 2px;
    background: currentColor;
    border-radius: 1px;
    transition: transform var(--dur-state) var(--ease-out), background-color var(--dur-state);
  }
  .menu-toggle-bars { position: relative; }
  .menu-toggle-bars::before, .menu-toggle-bars::after { content: ""; position: absolute; left: 0; }
  .menu-toggle-bars::before { top: -5px; }
  .menu-toggle-bars::after { top: 5px; }
  .menu-toggle[aria-expanded="true"] .menu-toggle-bars { background: transparent; }
  .menu-toggle[aria-expanded="true"] .menu-toggle-bars::before { transform: translateY(5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] .menu-toggle-bars::after { transform: translateY(-5px) rotate(-45deg); }

  .js .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: var(--s-2) max(var(--gutter), env(safe-area-inset-left, 0px)) var(--s-6);
    background: var(--bg);
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity var(--dur-state) var(--ease-out), transform var(--dur-state) var(--ease-out), visibility 0s linear var(--dur-state);
  }
  .js .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity var(--dur-state) var(--ease-out), transform var(--dur-state) var(--ease-out);
  }
  .js .site-nav ul { flex-direction: column; gap: 0; }
  .js .site-nav a {
    width: 100%;
    min-height: 56px;
    padding: 0;
    color: var(--text);
    font-size: var(--t-lg);
    font-stretch: 110%;
    font-weight: 600;
    border-bottom: 1px solid var(--rule);
    border-radius: 0;
  }
  .js .site-nav a[aria-current="true"] { box-shadow: none; color: var(--accent); }
  .no-js .site-nav { order: 3; width: 100%; margin: 0; }
  .no-js .site-nav ul { flex-wrap: wrap; }
}
@media (max-width: 419px) {
  .header-inner { gap: var(--s-2); }
  .js .menu-toggle { padding: 0 0.8rem; }
  .menu-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .header-call { padding-inline: 0.8rem; }
}
@media (max-width: 389px) {
  .brand-logo { height: 16px; }
  .header-inner { gap: 6px; }
  .theme-toggle { width: 40px; height: 40px; }
  .header-call { padding-inline: 0.7rem; }
}
@media (max-width: 339px) {
  .header-call { width: 44px; padding: 0; justify-content: center; }
  .header-call-short { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; padding-block: var(--s-7) var(--s-7); }
@media (min-width: 960px) {
  .hero { min-height: calc(100svh - var(--header-h)); display: grid; align-content: end; padding-block: var(--s-8) var(--s-8); }
}
.hero-grid-lines {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: calc(100% / 6) 100%;
  -webkit-mask-image: linear-gradient(to bottom, #000 20%, transparent 95%);
  mask-image: linear-gradient(to bottom, #000 20%, transparent 95%);
  pointer-events: none;
}
.hero-inner { width: 100%; }
.hero-kicker {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem clamp(0.5rem, 0.2rem + 1.2vw, 0.9rem); margin: 0 0 var(--s-5);
  font-size: clamp(0.6875rem, 0.55rem + 0.55vw, 0.9375rem); font-weight: 650;
  letter-spacing: clamp(0.08em, 0.04em + 0.5vw, 0.16em); text-transform: uppercase; color: var(--muted);
}
.hero-kicker > span { display: inline-flex; align-items: center; gap: clamp(0.5rem, 0.2rem + 1.2vw, 0.9rem); white-space: nowrap; }
.hero-kicker > span + span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero-title {
  font-size: var(--t-hero);
  font-stretch: 66%;
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.hero-title .line-inner { display: inline-block; }
/* Start states for the hero entrance (js/motion.js). The animation at the end reveals
   everything anyway if scripts never run. */
.motion .hero-title .line-inner { transform: translateY(110%); animation: reveal-failsafe 0.01s linear 3.4s forwards; }
.motion [data-hero-fade] { opacity: 0; animation: reveal-failsafe 0.01s linear 3.4s forwards; }
.motion .hero-kicker { opacity: 0; animation: reveal-failsafe 0.01s linear 3.4s forwards; }
@keyframes reveal-failsafe { to { transform: none; opacity: 1; } }
.hero-title em {
  text-transform: none;
  font-size: 0.98em;
  line-height: 0.8;
  padding-right: 0.06em;
}
.hero-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-6);
  margin-top: var(--s-7);
  padding-top: var(--s-6);
  border-top: 1px solid var(--rule);
  align-items: end;
}
@media (min-width: 960px) { .hero-bottom { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-8); } }
.lede { font-size: var(--t-md); line-height: 1.55; color: var(--muted); max-width: 40rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-6); }

.glance {
  margin: 0;
  padding: var(--s-4) var(--s-5);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
@supports (backdrop-filter: blur(8px)) { .glance { backdrop-filter: blur(12px); } }
.glance div {
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-3) 0;
  border-bottom: 1px solid var(--rule);
  font-size: var(--t-sm);
}
.glance div:last-child { border-bottom: 0; }
.glance dt { color: var(--subtle); white-space: nowrap; }
.glance dd { margin: 0; min-width: 0; overflow-wrap: anywhere; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.glance .glance-head dt { color: var(--accent); font-weight: 650; }
.glance .glance-head dd { color: var(--subtle); font-weight: 500; }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--rule);
  padding-block: var(--s-4);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track { display: flex; width: max-content; }
.marquee-group { display: flex; align-items: center; flex: none; }
.marquee-item {
  padding-inline: var(--s-5);
  font-size: clamp(1.25rem, 0.9rem + 1.4vw, 2.25rem);
  font-stretch: 70%;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--text);
  line-height: 1.1;
}

.marquee-label {
  max-width: var(--wrap); margin: 0 auto var(--s-3); padding-inline: var(--gutter);
  font-size: var(--t-xs); font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; color: var(--subtle);
}
.marquee-sep { width: 9px; height: 9px; flex: none; background: var(--accent); transform: rotate(45deg); }
@media (prefers-reduced-motion: no-preference) {
  .marquee-track { animation: marquee 48s linear infinite; }
  .marquee:hover .marquee-track { animation-play-state: paused; }
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Statement ---------- */
.statement { padding-block: var(--s-9); }
@media (min-width: 960px) { .statement { padding-block: var(--s-10); } }
.statement-text {
  max-width: 22ch;
  font-size: clamp(1.9rem, 1rem + 3.6vw, 4.25rem);
  font-stretch: 104%;
  font-weight: 620;
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.statement-text .word { color: var(--subtle); transition: color 0.3s; }
.statement-text .word.is-lit { color: var(--text); }

/* ---------- Sections ---------- */
.section { padding-block: var(--s-8); }
@media (min-width: 960px) { .section { padding-block: var(--s-9); } }
.section-head { max-width: 48rem; margin-bottom: var(--s-7); }
.section-head p { margin-top: var(--s-4); color: var(--muted); font-size: var(--t-md); line-height: 1.5; }

/* ---------- Process ---------- */
.process { border-top: 1px solid var(--rule); }
.process-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-7); align-items: start; }
@media (min-width: 960px) { .process-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-8); align-items: center; } }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; display: grid; gap: var(--s-2); }
.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  column-gap: var(--s-4);
  padding: var(--s-4) 0;
  border-top: 1px solid var(--rule);
  transition: color var(--dur-panel) var(--ease-out), border-color var(--dur-panel) var(--ease-out);
}
.step::before {
  content: counter(step, decimal-leading-zero);
  grid-row: span 2;
  font-stretch: 70%;
  font-weight: 800;
  font-size: var(--t-lg);
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.step p { margin-top: var(--s-2); color: var(--muted); }
.step p, .step::before { transition: color var(--dur-panel) var(--ease-out); }
/* While pinned, inactive steps step back to the subtle text colour (still AA) and the active one lights up. */
.process.is-pinned .step,
.process.is-pinned .step p,
.process.is-pinned .step::before { color: var(--subtle); }
.process.is-pinned .step.is-active { color: var(--text); border-top-color: var(--accent); }
.process.is-pinned .step.is-active p { color: var(--muted); }
.process.is-pinned .step.is-active::before { color: var(--accent); }

/* Process figure: a phone that follows the job. Texts from us for steps 1-3, then the app for step 4.
   js/motion.js sets data-stage while the section is pinned; without it the phone shows the finished app. */
.process-figure { position: relative; display: grid; justify-items: center; gap: var(--s-5); }
.phone-stage { position: relative; display: grid; place-items: center; width: 100%; padding-block: var(--s-3); }
.phone-stage::before {
  content: ""; position: absolute; inset: 8% 10%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, var(--accent-wash), transparent);
}
.phone {
  position: relative; width: 272px; height: 556px; padding: 9px; border-radius: 46px;
  background: #0A0B11;
  box-shadow: 0 0 0 1.5px var(--rule-strong), inset 0 0 0 1px rgba(255, 255, 255, 0.08), var(--shadow);
}
.phone-screen {
  position: relative; height: 100%; overflow: hidden; border-radius: 37px;
  background: var(--bg); color: var(--text); font-size: 13px; line-height: 1.35;
}
.phone-status {
  display: flex; align-items: center; justify-content: space-between;
  height: 40px; padding: 4px 24px 0; font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums;
}
.phone-island { width: 82px; height: 24px; border-radius: 14px; background: #000; }
.phone-bars { display: flex; align-items: flex-end; gap: 2px; height: 10px; }
.phone-bars i { width: 3px; border-radius: 1px; background: currentColor; }
.phone-bars i:nth-child(1) { height: 4px; } .phone-bars i:nth-child(2) { height: 6px; }
.phone-bars i:nth-child(3) { height: 8px; } .phone-bars i:nth-child(4) { height: 10px; }
.screen {
  position: absolute; inset: 40px 0 0; display: flex; flex-direction: column; padding: 6px 14px 14px;
  transition: opacity 450ms var(--ease-out), transform 450ms var(--ease-out);
}

/* Messages */
.msgs-head { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.msgs-head strong { display: block; font-size: 13px; }
.msgs-head small { display: block; font-size: 11px; color: var(--subtle); }
.msgs-avatar {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: var(--button); color: var(--on-button); font-size: 12px; font-weight: 750; font-stretch: 112%;
}
.thread { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 7px; overflow: hidden; padding-top: 10px; }
.msg { max-width: 84%; margin: 0; padding: 8px 11px; border-radius: 17px; font-size: 12.5px; }
.msg-in { align-self: flex-start; background: var(--surface-2); border-bottom-left-radius: 5px; }
.msg-out { align-self: flex-end; background: var(--button); color: var(--on-button); border-bottom-right-radius: 5px; }
.msg-card { display: grid; gap: 6px; width: 84%; }
.msg-card-title { font-weight: 700; }
.msg-card-row, .msg-check { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.msg-card-row .icon { width: 16px; height: 16px; color: var(--accent); }
.msg-check::before {
  content: ""; width: 14px; height: 14px; flex: none; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M4 7.2 6.1 9.3 10 5' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}
.msg-check.is-next::before { background: none; box-shadow: inset 0 0 0 1.5px var(--subtle); }
.install-bar { display: block; height: 5px; border-radius: 3px; background: var(--rule); overflow: hidden; }
.install-bar span { display: block; width: 70%; height: 100%; background: var(--accent); }

/* App */
.app-head small { display: block; font-size: 12px; color: var(--subtle); }
.app-head strong { display: block; font-size: 24px; font-weight: 750; font-stretch: 108%; line-height: 1.15; }
.scenes { display: flex; gap: 6px; margin: 12px 0; }
.scenes span { padding: 5px 9px; border-radius: 999px; border: 1px solid var(--rule-strong); font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile {
  display: flex; flex-direction: column; gap: 1px; min-height: 92px; padding: 11px 12px; border-radius: 17px;
  background: var(--surface); border: 1px solid var(--rule);
  transition: background-color 250ms var(--ease-out), border-color 250ms var(--ease-out), color 250ms var(--ease-out);
}
.tile .icon { width: 22px; height: 22px; margin-bottom: auto; color: var(--muted); transition: color 250ms var(--ease-out); }
.tile-name { margin-top: 8px; font-size: 12.5px; font-weight: 700; }
.tile-state { font-size: 11.5px; color: var(--subtle); }
.tile.is-on { background: var(--button); border-color: var(--button); color: var(--on-button); }
.tile.is-on .icon, .tile.is-on .tile-state { color: var(--on-button); }
.tile .tile-on, .tile.is-on .tile-off { display: none; }
.tile.is-on .tile-on { display: inline; }
.support-bar {
  display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 9px 10px 9px 12px; border-radius: 15px;
  background: var(--surface); border: 1px solid var(--rule); font-size: 12px; font-weight: 650;
}
.support-bar .icon { width: 16px; height: 16px; color: var(--accent); }
.support-call { margin-left: auto; padding: 4px 11px; border-radius: 999px; background: var(--button); color: var(--on-button); font-size: 11.5px; }
.toast {
  position: absolute; top: 2px; left: 10px; right: 10px; display: flex; align-items: center; gap: 10px; margin: 0;
  padding: 10px 12px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--rule-strong);
  box-shadow: 0 12px 24px -12px rgba(0, 0, 0, 0.5); font-size: 12px; line-height: 1.3;
  opacity: 0; transform: translateY(-12px); transition: opacity 300ms var(--ease-out), transform 300ms var(--ease-out);
}
.toast .icon { width: 28px; height: 28px; padding: 6px; flex: none; border-radius: 8px; background: var(--button); color: var(--on-button); }
.toast strong { display: block; font-weight: 700; }
.toast small { display: block; color: var(--subtle); font-size: 11px; }
.toast.is-shown { opacity: 1; transform: none; }

/* Which screen shows when */
.screen-msgs { opacity: 0; transform: translateX(-16px); visibility: hidden; }
.process-figure[data-stage="1"] .screen-msgs,
.process-figure[data-stage="2"] .screen-msgs,
.process-figure[data-stage="3"] .screen-msgs { opacity: 1; transform: none; visibility: visible; }
.process-figure[data-stage="1"] .screen-app,
.process-figure[data-stage="2"] .screen-app,
.process-figure[data-stage="3"] .screen-app { opacity: 0; transform: translateX(16px); visibility: hidden; }
.process-figure[data-stage="1"] .s2,
.process-figure[data-stage="1"] .s3,
.process-figure[data-stage="2"] .s3 { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .process-figure[data-stage] .msg { animation: msg-in 420ms var(--ease-out) backwards; }
  .process-figure[data-stage] .msg-out { animation-delay: 650ms; }
}
@keyframes msg-in { from { opacity: 0; transform: translateY(10px) scale(0.97); } }

/* Touch indicator: a red circle, like a screen recording, hidden until js/motion.js plays the demo */
.touch {
  position: absolute; left: 0; top: 0; z-index: 3; width: 40px; height: 40px; margin: -20px 0 0 -20px;
  border-radius: 50%; opacity: 0; pointer-events: none;
  background: radial-gradient(circle, var(--touch-core) 0 34%, var(--touch-fill) 36% 100%);
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 6px var(--accent-wash), 0 6px 16px -4px rgba(0, 0, 0, 0.45);
}
.touch-ripple { position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; }

.app-section { margin: 14px 0 6px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--subtle); }
.activity { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.activity li { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 14px; background: var(--surface); border: 1px solid var(--rule); font-size: 12px; font-weight: 600; }
.activity .icon { width: 18px; height: 18px; flex: none; color: var(--accent); }
.activity small { display: block; font-size: 11px; font-weight: 500; color: var(--subtle); }

/* App content scrolls under the fixed support bar */
.app-scroll {
  position: relative; flex: 1; min-height: 0; overflow: hidden; margin-bottom: 10px;
  -webkit-mask-image: linear-gradient(to bottom, #000 90%, transparent);
  mask-image: linear-gradient(to bottom, #000 90%, transparent);
}

.process-progress { width: 272px; height: 3px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.process-progress span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: 0 50%; }
.process-figure:not([data-stage]) .process-progress { display: none; }
@media (max-width: 359px) { .phone { width: 252px; height: 520px; } }
/* Compact pinned mode on small screens (js/motion.js): one step at a time above a phone scaled to fit */
.process.is-compact .process-grid { gap: var(--s-4); }
.process.is-compact .steps { display: grid; }
.process.is-compact .step { grid-area: 1 / 1; opacity: 0; transition: opacity 350ms var(--ease-out); }
.process.is-compact .step.is-active { opacity: 1; }
.process.is-compact .process-figure { gap: var(--s-3); }
.process.is-compact .phone-stage { place-items: start center; padding-block: 0; height: calc(var(--phone-h, 556px) * var(--phone-scale, 1)); }
.process.is-compact .phone { transform: scale(var(--phone-scale, 1)); transform-origin: top center; }

/* ---------- Floor plans (plan explorer) ---------- */
/* Three stacked SVG layers: ground, walls, devices. js/motion.js lifts them apart in 3D for the fly-over. */
.plan-figure { position: relative; perspective: 1800px; perspective-origin: 50% 30%; }
.plan-tilt, .plan-stage { transform-style: preserve-3d; }
.plan-stage { display: grid; }
.plan-layer { grid-area: 1 / 1; min-width: 0; transform-style: preserve-3d; pointer-events: none; }
.plan-svg { display: block; width: 100%; height: auto; overflow: hidden; pointer-events: none; }
.layer-ground .plan-svg { border-radius: var(--radius); }

/* Ground */
.plan-svg .lawn { fill: url(#p-lawn); }
.lawn-dot { fill: var(--plan-lawn); }
.plan-svg .pave { fill: var(--plan-pave); }
.plan-svg .street { fill: var(--plan-street); }
.plan-svg .street-line { fill: none; stroke: var(--subtle); stroke-width: 1.5; stroke-dasharray: 18 14; opacity: 0.6; }
.plan-svg .curb { fill: none; stroke: var(--rule-strong); stroke-width: 1.5; }
.plan-svg .water { fill: var(--plan-water); stroke: var(--brand); stroke-width: 1; stroke-opacity: 0.5; }
.plan-svg .fence { fill: none; stroke: var(--subtle); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 0.5 6; }
.plan-svg .gate { fill: none; stroke: var(--subtle); stroke-width: 3; stroke-dasharray: 10 4; }
.plan-svg .perimeter { fill: none; stroke: var(--subtle); stroke-width: 1.4; stroke-dasharray: 0.006 0.008; opacity: 0.7; }
.plan-svg .perimeter.is-active { stroke: var(--accent); opacity: 1; }
.plan-svg .floor { fill: var(--plan-floor); }
.plan-svg .room { fill: transparent; transition: fill var(--dur-state) var(--ease-out); }
.plan-svg .room[data-zone] { cursor: pointer; pointer-events: visiblePainted; }
.plan-svg .room[data-zone]:hover { fill: rgba(154, 168, 255, 0.07); }
.plan-svg .room.is-active { fill: var(--accent-wash); }
.plan-svg .furn { fill: none; stroke: var(--plan-furn); stroke-width: 1.1; stroke-linejoin: round; }
.plan-svg .furn-fill { fill: var(--plan-furn-fill); stroke: none; }
.plan-svg .canopy { fill: var(--plan-tree); stroke: var(--plan-furn); stroke-width: 1.1; }
.plan-svg .branches { fill: none; stroke: var(--plan-furn); stroke-width: 0.9; opacity: 0.7; }

/* Walls and cable runs */
.plan-svg .wall { fill: none; stroke: var(--text); stroke-linecap: square; }
.plan-svg .wall.outer { stroke-width: 8; }
.plan-svg .wall.inner { stroke-width: 4; }
.plan-svg .opening { fill: none; stroke: var(--subtle); stroke-width: 1.2; }
.plan-svg .opening.win { stroke: var(--text); stroke-opacity: 0.75; }
.plan-svg .opening.overhead { stroke-width: 2.5; stroke-dasharray: 8 5; }
.plan-svg .trace { fill: none; stroke: var(--brand); stroke-width: 2; stroke-opacity: 0.3; stroke-linejoin: round; }
.plan-svg .trace.is-active { stroke: var(--accent); stroke-opacity: 0.55; stroke-width: 2.6; }
.plan-svg .trace-flow { fill: none; stroke: var(--accent); stroke-width: 2.8; stroke-linecap: round; stroke-dasharray: 0.012 0.03; opacity: 0; }
.plan-svg .trace-flow.is-active { opacity: 1; }

/* Devices: brand color at rest, accent red when their system is selected */
.plan-svg .dev, .plan-svg .hub { color: var(--brand); transition: color var(--dur-state) var(--ease-out), opacity var(--dur-state) var(--ease-out); }
.plan-svg .dev.is-active, .plan-svg .hub.is-active { color: var(--accent); }
[data-active] .plan-svg .dev:not(.is-active) { opacity: 0.55; }
.plan-svg .hit { fill: transparent; pointer-events: visiblePainted; cursor: help; }
.plan-svg .cam-head, .plan-svg .cam-mount, .plan-svg .ap-body, .plan-svg .spk-body, .plan-svg .proj-body, .plan-svg .pad-body,
.plan-svg .thermo-body, .plan-svg .lock-body, .plan-svg .mixer-body, .plan-svg .opener-body, .plan-svg .motion-body, .plan-svg .hub-ring {
  fill: var(--surface); stroke: currentColor; stroke-width: 1.8;
}
.plan-svg .cam-lens, .plan-svg .dot, .plan-svg .bulb, .plan-svg .pad-led, .plan-svg .hub-dot { fill: currentColor; }
.plan-svg .spk-cone, .plan-svg .pad-keys, .plan-svg .thermo-needle, .plan-svg .lock-shackle, .plan-svg .mixer-faders, .plan-svg .rack-units, .plan-svg .opener-rail {
  fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round;
}
.plan-svg .mixer-caps { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.plan-svg .opener-rail { stroke-dasharray: 2 3; }
.plan-svg .sensor { fill: currentColor; }

/* Coverage shapes */
.plan-svg .fov { fill: url(#g-fov); }
.plan-svg .dev.is-active .fov { fill: url(#g-fov-hot); }
.plan-svg .dome-fov { fill: url(#g-dome); }
.plan-svg .dev.is-active .dome-fov { fill: url(#g-dome-hot); }
.plan-svg .fov-edge { fill: none; stroke: currentColor; stroke-width: 1.4; stroke-dasharray: 3 5; opacity: 0.7; }
.plan-svg .lpr-scan path { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; opacity: 0; }
.plan-svg .dev.is-active .lpr-scan path { opacity: 1; }
.plan-svg .coverage { fill: url(#g-dome); opacity: 0; transition: opacity var(--dur-panel) var(--ease-out); }
.plan-svg .dev.is-active .coverage { fill: url(#g-dome-hot); opacity: 0.8; }
.plan-svg .ring, .plan-svg .wave, .plan-svg .wave-arc { fill: none; stroke: currentColor; stroke-width: 1.6; opacity: 0; }
.plan-svg .fan { fill: url(#g-fov); opacity: 0.6; }
.plan-svg .dev.is-active .fan { fill: url(#g-fov-hot); opacity: 1; }
.plan-svg .fan-arc { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-dasharray: 2 4; opacity: 0.6; }
.plan-svg .beam { fill: url(#g-beam); opacity: 0.35; }
.plan-svg .dev.is-active .beam { fill: url(#g-beam-hot); opacity: 1; }
.plan-svg .screen-line { fill: none; stroke: currentColor; stroke-width: 5; stroke-linecap: round; }
.plan-svg .screen-glow { fill: none; stroke: currentColor; stroke-width: 18; stroke-linecap: round; opacity: 0; }
.plan-svg .dev.is-active .screen-glow { opacity: 0.18; }
.plan-svg .glow { fill: url(#g-glow); opacity: 0; transition: opacity 500ms var(--ease-out); }
.plan-svg .dev.is-active .glow { opacity: 1; }
.plan-svg .hub-pulse { fill: none; stroke: currentColor; stroke-width: 1.5; opacity: 0; }

/* Gradient stops live in the sprite and follow the theme through these classes */
.gs-brand { stop-color: var(--brand); stop-opacity: 0.3; }
.gs-accent { stop-color: var(--accent); stop-opacity: 0.42; }
.gs-brand-0 { stop-color: var(--brand); stop-opacity: 0; }
.gs-accent-0 { stop-color: var(--accent); stop-opacity: 0; }
.gs-glow { stop-color: var(--accent); stop-opacity: 0.5; }
.gs-brand-lo { stop-color: var(--brand); stop-opacity: 0.08; }
.gs-accent-lo { stop-color: var(--accent); stop-opacity: 0.12; }

.plan-svg .room-label {
  font-family: var(--font); font-size: 15px; font-weight: 650; font-stretch: 90%;
  fill: var(--muted); stroke: var(--plan-floor); stroke-width: 4; stroke-linejoin: round; paint-order: stroke; pointer-events: none;
}
@media (max-width: 559px) { .plan-svg .room-label { display: none; } }

/* Hover callout for devices */
.plan-tip {
  position: absolute; left: 0; top: 0; z-index: 2; max-width: 16rem;
  padding: 0.4rem 0.65rem; border-radius: 8px;
  background: var(--text); color: var(--bg);
  font-size: var(--t-xs); font-weight: 600; line-height: 1.3;
  pointer-events: none; white-space: nowrap;
  transform: translate(-50%, calc(-100% - 12px));
}
.plan-tip[hidden] { display: none; }


/* Motion: cameras pan, coverage pulses, cables carry a signal. Paused while off screen. */
@media (prefers-reduced-motion: no-preference) {
  .plan-svg .sweep { animation: ptz-pan 7s ease-in-out infinite alternate; }
  .plan-svg .sweep.d1 { animation-delay: -2.2s; }
  .plan-svg .sweep.d2 { animation-delay: -4.6s; }
  .plan-svg .sweep.d3 { animation-delay: -6.1s; }
  .plan-svg .dev.is-active .ring { animation: ring-out 2.8s var(--ease-out) infinite; }
  .plan-svg .dev.is-active .r2 { animation-delay: 1.4s; }
  .plan-svg .dev.is-active .wave { animation: wave-out 1.8s var(--ease-out) infinite; }
  .plan-svg .dev.is-active .wave-arc { animation: wave-out 1.8s var(--ease-out) infinite; }
  .plan-svg .dev.is-active .w2 { animation-delay: 0.9s; }
  .plan-svg .dev.is-active .lpr-scan { animation: lpr-scan 1.6s ease-in-out infinite alternate; }
  .plan-svg .dev.is-active .fan { animation: fan-pulse 2.4s ease-in-out infinite; }
  .plan-svg .dev.is-active .glow { animation: light-on 700ms var(--ease-out) backwards; }
  .plan-svg .dev.l1 .glow { animation-delay: 90ms; }
  .plan-svg .dev.l2 .glow { animation-delay: 180ms; }
  .plan-svg .dev.l3 .glow { animation-delay: 270ms; }
  .plan-svg .dev.l4 .glow { animation-delay: 360ms; }
  .plan-svg .dev.l5 .glow { animation-delay: 450ms; }
  .plan-svg .dev.is-active .beam { animation: beam 3.2s ease-in-out infinite; }
  .plan-svg .hub.is-active .hub-pulse { animation: hub-pulse 2.2s var(--ease-out) infinite; }
  .plan-svg .trace-flow.is-active { animation: flow 1.4s linear infinite; }
  .js .plan-tilt:not(.is-inview) * { animation-play-state: paused !important; }
}
@keyframes ptz-pan { from { transform: rotate(-38deg); } to { transform: rotate(38deg); } }
@keyframes ring-out { from { transform: scale(0.12); opacity: 0.9; } to { transform: scale(1); opacity: 0; } }
@keyframes wave-out { from { transform: scale(0.45); opacity: 0.9; } to { transform: scale(1.5); opacity: 0; } }
@keyframes lpr-scan { from { transform: translateX(0); } to { transform: translateX(95px); } }
@keyframes fan-pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes light-on { from { opacity: 0; transform: scale(0.4); } }
@keyframes beam { 0%, 100% { opacity: 0.8; } 50% { opacity: 1; } }
@keyframes hub-pulse { from { transform: scale(0.9); opacity: 0.8; } to { transform: scale(2.1); opacity: 0; } }
@keyframes flow { to { stroke-dashoffset: -0.042; } }

/* Plan drawing sequence in the explorer: walls, then wiring, then devices. */
@media (prefers-reduced-motion: no-preference) {
  [data-plan] .plan-svg .wall { stroke-dasharray: 1; animation: draw var(--dur-draw) var(--ease-out) backwards; }
  [data-plan] .plan-svg .s1 { animation-delay: 50ms; }
  [data-plan] .plan-svg .s2 { animation-delay: 100ms; }
  [data-plan] .plan-svg .s3 { animation-delay: 150ms; }
  [data-plan] .plan-svg .s4 { animation-delay: 200ms; }
  [data-plan] .plan-svg .s5 { animation-delay: 250ms; }
  [data-plan] .plan-svg .s6 { animation-delay: 300ms; }
  [data-plan] .plan-svg .s7 { animation-delay: 350ms; }
  [data-plan] .plan-svg .s8 { animation-delay: 400ms; }
  [data-plan] .plan-svg .s9 { animation-delay: 450ms; }
  [data-plan] .plan-svg .trace { stroke-dasharray: 1; animation: draw 800ms var(--ease-out) backwards; animation-delay: 800ms; }
  [data-plan] .plan-svg .dev, [data-plan] .plan-svg .hub, [data-plan] .plan-svg .room-label, [data-plan] .plan-svg .opening {
    animation: fade-in 500ms var(--ease-out) backwards;
    animation-delay: 1100ms;
  }
  [data-plan] .plan-svg .furn, [data-plan] .plan-svg .tree, [data-plan] .plan-svg .furn-fill { animation: fade-in 600ms var(--ease-out) backwards; animation-delay: 500ms; }
  [data-plan] .plan-svg .trace.is-signal { animation: draw 650ms var(--ease-out) both; animation-delay: 0ms; }
}

@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes info-in { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Plan explorer ---------- */
.plan-section { border-top: 1px solid var(--rule); }
.plan {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.plan-head { padding: var(--s-3) var(--s-5) 0; border-bottom: 1px solid var(--rule); }
.plan-tabs { display: flex; flex-wrap: wrap; gap: var(--s-1); }
.plan-tab {
  min-height: 48px;
  padding: 0 var(--s-4);
  border: 0;
  background: none;
  color: var(--muted);
  font-weight: 600;
  font-size: var(--t-sm);
  box-shadow: inset 0 -3px 0 transparent;
  transition: color var(--dur-state) var(--ease-out), box-shadow var(--dur-state) var(--ease-out);
}
.plan-tab:hover { color: var(--text); }
.plan-tab[aria-selected="true"] { color: var(--text); box-shadow: inset 0 -3px 0 var(--accent); }
.plan-body { display: grid; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .plan-body { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); } }
.plan-panel { padding: var(--s-5) var(--s-5) 0; }
.plan-figure { margin: 0 auto; max-width: 720px; }
.zone-list { display: flex; flex-wrap: wrap; gap: var(--s-2); padding: var(--s-5) 0; }
.zone-btn {
  min-height: 44px;
  padding: 0 var(--s-4);
  border: 1.5px solid var(--rule-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: var(--t-sm);
  transition: background-color var(--dur-state) var(--ease-out), border-color var(--dur-state) var(--ease-out),
    color var(--dur-state) var(--ease-out), transform var(--dur-press) var(--ease-out);
  touch-action: manipulation;
}
.zone-btn:hover { border-color: var(--text); }
.zone-btn:active { transform: scale(0.97); }
.zone-btn[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.plan-info {
  margin: 0 var(--s-5) var(--s-5);
  padding: var(--s-5);
  border-left: 3px solid var(--accent);
  background: var(--surface-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  align-self: start;
}
@media (min-width: 960px) { .plan-info { margin: var(--s-5) var(--s-5) var(--s-5) 0; } }
.plan-info-title { font-size: var(--t-lg); font-stretch: 108%; }
.plan-info p { margin-top: var(--s-3); color: var(--muted); max-width: 60ch; }
.plan-info-gear { font-size: var(--t-sm); }
.plan-info-gear span:first-child { font-weight: 650; color: var(--text); margin-right: var(--s-1); }
.plan-hint { font-size: var(--t-xs); color: var(--subtle); }
@media (hover: none) { .plan-hint { display: none; } }
.no-js .plan-hint { display: none; }
.plan-info.is-updating > * { animation: info-in var(--dur-panel) var(--ease-out); }
@media (max-width: 559px) {
  .plan-head, .plan-panel { padding-inline: var(--s-4); }
  .plan-info { margin-inline: var(--s-4); padding-inline: var(--s-4); }
}

/* ---------- Services ---------- */
.services { border-top: 1px solid var(--rule); overflow: hidden; }
.services.is-pinned { padding-top: 0; }
.services.is-pinned .services-pin { padding-top: var(--s-7); }
.services-viewport {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding-bottom: var(--s-4);
}
.services.is-pinned .services-viewport { overflow: visible; scroll-snap-type: none; padding-bottom: 0; }
.services-track {
  display: flex;
  gap: var(--s-4);
  width: max-content;
  margin: 0;
  padding: 0 max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  list-style: none;
}
.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(82vw, 380px);
  min-height: 460px;
  padding: var(--s-6) var(--s-5) var(--s-4);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  scroll-snap-align: start;
  overflow: hidden;
  transition: border-color var(--dur-state) var(--ease-out);
}
.service-card:hover, .service-card:focus-within { border-color: var(--rule-strong); }
.service-icon-wrap {
  display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: var(--s-6);
  border-radius: 16px; background: var(--accent-wash); color: var(--accent);
}
.service-icon { width: 28px; height: 28px; }
.service-card h3 { font-size: var(--t-lg); font-stretch: 108%; }
.service-card > p { margin-top: var(--s-3); color: var(--muted); font-size: var(--t-sm); }
.service-meta { margin: auto 0 0; padding-top: var(--s-5); display: grid; gap: var(--s-2); font-size: var(--t-xs); }
.service-meta div { display: grid; grid-template-columns: 6rem minmax(0, 1fr); gap: var(--s-2); padding-top: var(--s-2); border-top: 1px solid var(--rule); }
.service-meta dt { color: var(--subtle); }
.service-meta dd { margin: 0; color: var(--text); }
.service-card .link-btn { margin-top: var(--s-2); align-self: flex-start; }
.dealers { margin-top: var(--s-7); color: var(--muted); max-width: 60rem; }

/* ---------- Work: stacked cards ---------- */
.work { border-top: 1px solid var(--rule); }
.stack { display: grid; gap: var(--s-6); }
.stack-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-5);
  padding: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transform-origin: 50% 0;
}
@media (min-width: 960px) and (min-height: 700px) {
  .stack { gap: var(--s-8); }
  .stack-card {
    position: sticky;
    top: calc(var(--header-h) + var(--s-5));
    grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
    align-items: center;
    min-height: min(74vh, 620px);
    padding: var(--s-5);
  }
  .stack-card:nth-child(2) { top: calc(var(--header-h) + var(--s-5) + 12px); }
  .stack-card:nth-child(3) { top: calc(var(--header-h) + var(--s-5) + 24px); }
  .work-photo { max-height: calc(74vh - 2 * var(--s-5)); }
  .work-photo.is-portrait { justify-self: center; width: auto; aspect-ratio: 4 / 5; height: min(calc(74vh - 2 * var(--s-5)), 560px); }
  .work-photo.is-portrait picture { display: block; height: 100%; }
  .work-photo.is-portrait img { height: 100%; width: 100%; object-fit: cover; }
}
.work-photo { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); }
.work-photo img { width: 100%; }
.stack-text { padding: var(--s-2); }
.stack-text h3 { font-size: var(--t-lg); font-stretch: 108%; }
.stack-text p { margin-top: var(--s-3); color: var(--muted); }
.notes { margin: var(--s-4) 0 0; padding: 0; list-style: none; counter-reset: note; display: grid; gap: var(--s-2); font-size: var(--t-sm); color: var(--muted); }
.notes li { counter-increment: note; display: grid; grid-template-columns: 1.7rem 1fr; gap: var(--s-2); align-items: baseline; }
.notes li::before {
  content: counter(note);
  display: inline-grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  background: var(--button);
  color: #FFFFFF;
  font-weight: 700;
  font-size: var(--t-xs);
  font-variant-numeric: tabular-nums;
}
.marker {
  position: absolute;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  background: var(--button);
  color: #FFFFFF;
  font-weight: 700;
  font-size: var(--t-xs);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.85);
  font-variant-numeric: tabular-nums;
}
.m-theater-1 { left: 52%; top: 40%; }
.m-theater-2 { left: 10%; top: 42%; }
.m-theater-3 { left: 48%; top: 85%; }
.m-av-1 { left: 66%; top: 66%; }
.m-av-2 { left: 46%; top: 57%; }
.m-av-3 { left: 40%; top: 79%; }
.m-av-4 { left: 40%; top: 91%; }

/* ---------- About ---------- */
.about { border-top: 1px solid var(--rule); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-7); align-items: center; }
@media (min-width: 960px) { .about-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--s-8); } }
.about-copy p { margin-top: var(--s-4); max-width: 60ch; color: var(--muted); font-size: var(--t-md); line-height: 1.55; }
.about-copy h2 + p { margin-top: var(--s-6); }
.credentials { display: grid; justify-items: center; }
.stamp { width: clamp(176px, 22vw, 240px); height: auto; aspect-ratio: 1; color: var(--text); }
.stamp .stamp-outer { fill: none; stroke: currentColor; stroke-width: 3; }
.stamp .stamp-inner { fill: none; stroke: currentColor; stroke-width: 1.2; }
.stamp text { fill: currentColor; font-family: var(--font); }
.stamp .stamp-ring-text { font-size: 11px; font-weight: 650; font-stretch: 100%; letter-spacing: 0.04em; }
.stamp .stamp-small { font-size: 11px; font-weight: 650; letter-spacing: 0.14em; }
.stamp .stamp-big { font-size: 27px; font-weight: 780; font-stretch: 112%; fill: var(--accent); }

/* ---------- Contact ---------- */
.contact-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-7);
  padding: var(--s-6) var(--s-5);
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: calc(var(--radius-lg) + 6px);
  box-shadow: var(--shadow);
}
@media (min-width: 960px) { .contact-panel { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-8); padding: var(--s-8); } }
.contact-copy > p { margin-top: var(--s-4); color: var(--muted); font-size: var(--t-md); line-height: 1.5; max-width: 34rem; }
.contact-cards { display: grid; gap: var(--s-3); margin-top: var(--s-6); }
.contact-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0 var(--s-4);
  align-items: center;
  padding: var(--s-4) var(--s-5);
  background: var(--surface-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  color: var(--text);
  text-decoration: none;
  transition: border-color var(--dur-state) var(--ease-out);
}
.contact-card:hover { border-color: var(--text); color: var(--text); }
.contact-card .icon { grid-row: span 2; width: 26px; height: 26px; color: var(--accent); }
.contact-card-label { font-size: var(--t-sm); color: var(--subtle); }
.contact-card-value { font-weight: 720; font-stretch: 110%; font-size: var(--t-lg); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; overflow-wrap: break-word; }
.contact-card-value.is-email { font-size: var(--t-md); }

.consult { display: grid; gap: var(--s-5); align-content: start; }
.form-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-5); }
@media (min-width: 600px) { .form-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.field { display: grid; gap: var(--s-2); align-content: start; }
.field label { font-weight: 600; font-size: var(--t-sm); }
.optional { font-weight: 400; color: var(--subtle); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 50px;
  padding: 0.7rem 0.95rem;
  border: 1.5px solid var(--rule-strong);
  border-radius: var(--radius);
  background: var(--surface-2);
  color: var(--text);
  font-size: var(--t-base);
  transition: border-color var(--dur-state) var(--ease-out), box-shadow var(--dur-state) var(--ease-out);
}
.field textarea { resize: vertical; min-height: 8rem; }
.field select {
  appearance: none;
  padding-right: 2.5rem;
  background-image: linear-gradient(45deg, transparent 50%, var(--text) 50%), linear-gradient(135deg, var(--text) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 30%, transparent);
}
.field [aria-invalid="true"] { border-color: var(--accent); }
.field-error { color: var(--accent); font-size: var(--t-sm); font-weight: 600; }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3) var(--s-5); }
.form-note { font-size: var(--t-sm); color: var(--subtle); flex: 1 1 14rem; }
.form-errors { padding: var(--s-4) var(--s-5); border: 2px solid var(--accent); border-radius: var(--radius); }
.form-errors h3 { font-size: var(--t-base); color: var(--accent); }
.form-errors ul { margin: var(--s-2) 0 0; padding-left: 1.2em; }
.form-errors a { color: var(--accent); font-weight: 600; }
.form-status { padding: var(--s-4) var(--s-5); border-radius: var(--radius); background: var(--surface-2); border-left: 3px solid var(--brand); }
.form-status.is-success { border-left-color: #3FB37F; }
.form-status.is-error { border-left-color: var(--accent); }
.form-status strong { display: block; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding-block: var(--s-8) var(--s-5); }
.footer-logo { width: min(100%, 760px); height: auto; }
.footer-tagline { margin-top: var(--s-5); color: var(--muted); max-width: 34rem; }
.titleblock {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: var(--s-7) 0 0;
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
}
.titleblock div { padding: var(--s-3) var(--s-4); border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); min-width: 0; }
.titleblock div:nth-child(2n) { border-right: 0; }
.titleblock div:nth-last-child(-n + 2) { border-bottom: 0; }
@media (min-width: 960px) {
  .titleblock { grid-template-columns: 1.25fr 1fr 0.9fr 0.8fr 1fr 1.5fr; }
  .titleblock div, .titleblock div:nth-child(2n) { border-right: 1px solid var(--rule); border-bottom: 0; }
  .titleblock div:last-child { border-right: 0; }
}
.titleblock dt { font-size: var(--t-xs); color: var(--subtle); }
.titleblock dd { margin: 0; font-weight: 600; font-size: var(--t-sm); overflow-wrap: break-word; font-variant-numeric: tabular-nums; }
.titleblock a { color: var(--text); }
.footer-bottom { margin-top: var(--s-5); font-size: var(--t-xs); color: var(--subtle); }

/* ---------- Mobile action bar ---------- */
.action-bar { display: none; }
@media (max-width: 759px) {
  .js .action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--s-2);
    padding: var(--s-2) max(var(--s-4), env(safe-area-inset-right, 0px)) calc(var(--s-2) + env(safe-area-inset-bottom, 0px)) max(var(--s-4), env(safe-area-inset-left, 0px));
    background: var(--header-bg);
    border-top: 1px solid var(--rule);
    transform: translateY(110%);
    transition: transform var(--dur-panel) var(--ease-out);
  }
  @supports (backdrop-filter: blur(8px)) { .js .action-bar { backdrop-filter: blur(14px); } }
  .js .action-bar.is-visible { transform: none; }
  .action-bar .btn { min-height: 48px; }
  .js .site-footer { padding-bottom: calc(var(--s-9) + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- Theme switch transition ---------- */
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- 404 ---------- */
.not-found { min-height: 100vh; min-height: 100dvh; display: grid; align-items: center; padding-block: var(--s-8); }
.not-found .brand-logo { height: 26px; }
.not-found h1 { margin-top: var(--s-7); font-size: clamp(2.6rem, 1.4rem + 5vw, 5.5rem); font-stretch: 70%; font-weight: 800; text-transform: uppercase; line-height: 0.92; max-width: 14ch; }
.not-found p { margin-top: var(--s-4); font-size: var(--t-md); color: var(--muted); max-width: 36rem; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .action-bar, .plan-tabs, .zone-list, .consult, .skip-link, .marquee, .intro { display: none !important; }
  :root { --bg: #fff; --text: #000; }
}
