/* Ringmain launch page. Palette and type from docs/site/BRIEF.md. */

:root {
  color-scheme: light dark;

  /* Light */
  --bg: #f6f3ea;
  --bg-raised: #ffffff;
  --bg-sunken: #ece7d9;
  --ink: #0c1a2c;
  --ink-muted: #4a566b;
  --line: #d6cfbd;
  --grid: rgb(16 41 74 / 0.07);
  --navy: #0f2747;
  --navy-deep: #091a31;
  --on-navy: #f6f3ea;
  --on-navy-muted: #a9b6c9;
  --volt: #ffd60a;
  --volt-hover: #ffe45c;
  --on-volt: #0c1a2c;
  --volt-glow: rgb(255 214 10 / 0.35);
  --copper: #b8652a;
  --copper-soft: #f3e2d3;
  --danger: #c62828;
  --safe: #1e7a46;
  --focus: #1f6feb;

  --font-display: Archivo, "Arial Narrow", system-ui, sans-serif;
  --font-body: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --max: 72rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --band-pad: clamp(4.5rem, 10vw, 8rem);
  --radius: 28px;
  --radius-card: 18px;
  --shadow: 0 1px 2px rgb(9 26 49 / 0.06), 0 8px 24px -12px rgb(9 26 49 / 0.18);
  --shadow-lift:
    0 2px 4px rgb(9 26 49 / 0.08), 0 18px 40px -16px rgb(9 26 49 / 0.32);
  --shadow-hero:
    0 30px 80px -30px rgb(9 26 49 / 0.65), 0 8px 24px -12px rgb(9 26 49 / 0.4);
  --breaker: #f1ede2;
  --breaker-edge: #c9c1ad;
  --lever: #1b2a40;
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --header-h: 64px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #08121f;
    --bg-raised: #0f1d33;
    --bg-sunken: #0b1729;
    --ink: #eef1f6;
    --ink-muted: #a6b3c6;
    --line: #22375a;
    --grid: rgb(238 241 246 / 0.05);
    --navy: #10284a;
    --navy-deep: #061021;
    --on-navy: #eef1f6;
    --on-navy-muted: #9fb0c8;
    --volt: #ffd60a;
    --volt-hover: #ffe45c;
    --on-volt: #0c1a2c;
    --volt-glow: rgb(255 214 10 / 0.22);
    --copper: #e08a4c;
    --copper-soft: #3a2414;
    --danger: #ff6b61;
    --safe: #4ade80;
    --focus: #ffd60a;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -12px rgb(0 0 0 / 0.6);
    --shadow-lift:
      0 2px 4px rgb(0 0 0 / 0.35), 0 18px 40px -16px rgb(0 0 0 / 0.8);
    --shadow-hero: 0 30px 80px -30px rgb(0 0 0 / 0.9), 0 0 0 1px var(--line);
    --mark-stroke: var(--line);
  }
}

/* Base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: clip;
}

h1,
h2,
h3,
p,
ol,
ul,
figure,
pre {
  margin: 0;
}

ol[role="list"],
ul[role="list"] {
  list-style: none;
  padding: 0;
}

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

img {
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.hero-panel :focus-visible,
.band-navy :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--volt);
}

main:focus {
  outline: none;
}

.defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 1rem;
  top: 0.5rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  min-height: 44px;
  background: var(--volt);
  color: var(--on-volt);
  font-weight: 600;
  border-radius: 10px;
  transform: translateY(-200%);
}

.skip:focus {
  transform: none;
}

.wrap {
  width: 100%;
  max-width: calc(var(--max) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.display {
  font-family: var(--font-display);
  font-weight: 850;
  font-variation-settings: "wdth" 112;
  letter-spacing: -0.025em;
  line-height: 1.02;
  text-wrap: balance;
}

.h2 {
  font-size: clamp(2rem, 1.3rem + 2.6vw, 3.25rem);
  max-width: 22ch;
}

.eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 1rem;
}

.eyebrow-volt {
  color: var(--volt);
}

.intro {
  max-width: 38rem;
  margin-top: 1.25rem;
  color: var(--ink-muted);
  font-size: 1.125rem;
}

.grid-bg {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem 1.15rem;
  border-radius: 12px;
  border: 2px solid transparent;
  font: 600 1rem/1.2 var(--font-body);
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 160ms var(--ease-out),
    opacity 160ms;
}

.btn:active {
  transform: translateY(1px);
}

.btn-volt {
  background: var(--volt);
  color: var(--on-volt);
  box-shadow: 0 6px 18px -8px var(--volt-glow);
}

.btn-volt:hover {
  background: var(--volt-hover);
}

.btn-lg {
  min-height: 52px;
  padding-inline: 1.5rem;
  font-size: 1.0625rem;
}

.btn-xl {
  min-height: 56px;
  padding-inline: 2rem;
  font-size: 1.125rem;
  border-radius: 14px;
}

.btn-ghost {
  border-color: color-mix(in srgb, var(--on-navy) 70%, transparent);
  color: var(--on-navy);
}

.btn-ghost:hover {
  background: color-mix(in srgb, var(--on-navy) 10%, transparent);
}

.btn-outline {
  border-color: var(--ink);
  color: var(--ink);
}

.btn-outline:hover {
  background: color-mix(in srgb, var(--ink) 7%, transparent);
}

/* Logo */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
}

.logo-mark {
  width: 32px;
  height: 32px;
  flex: none;
}

.logo-word {
  font-family: var(--font-display);
  font-weight: 850;
  font-variation-settings: "wdth" 112;
  letter-spacing: -0.025em;
  font-size: 1.375rem;
  line-height: 1;
}

.mark-tile {
  fill: var(--navy);
  stroke: var(--mark-stroke, none);
  stroke-width: 1;
}

.mark-ring {
  stroke: var(--on-navy);
}

.mark-bolt {
  fill: var(--volt);
}

.logo-on-navy {
  color: var(--on-navy);
  --mark-stroke: color-mix(in srgb, var(--on-navy) 25%, transparent);
}

/* 0. Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header.at-top {
  border-bottom-color: transparent;
}

.header-row {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.header-nav {
  display: none;
  gap: 0.25rem;
}

.header-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.85rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink-muted);
}

.header-nav a:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 6%, transparent);
}

@media (min-width: 860px) {
  .header-nav {
    display: flex;
  }
}

.header-cta .short {
  display: none;
}

@media (max-width: 399px) {
  .header-cta .long {
    display: none;
  }
  .header-cta .short {
    display: inline;
  }
}

.top-sentinel {
  position: absolute;
  top: 0;
  height: 1px;
  width: 1px;
}

/* 1. Hero */

.hero {
  padding-block: clamp(1rem, 3vw, 2.5rem) clamp(3rem, 6vw, 5rem);
}

.hero-panel {
  --grid: rgb(246 243 234 / 0.06);
  position: relative;
  display: grid;
  gap: clamp(2.5rem, 5vw, 3rem);
  padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 3.5rem);
  background-color: var(--navy);
  color: var(--on-navy);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hero);
  overflow: hidden;
}

@media (min-width: 1024px) {
  .hero-panel {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    /* Halves of at least 520 px at 1440, so the unit can fill one. */
    column-gap: 2rem;
    padding-inline: 2.5rem;
  }
}

.hero-title {
  font-size: clamp(2.6rem, 1.4rem + 5.2vw, 5.75rem);
  color: var(--on-navy);
}

/* Sized so "should know your" fits a half and "postcodes." takes the last line on its own;
   plain wrapping, because balancing can pull "your" down beside it. */
@media (min-width: 1024px) {
  .hero-title {
    font-size: clamp(2.6rem, 0.8rem + 2.75vw, 3.3rem);
    text-wrap: wrap;
  }
}

.underline {
  background-image: linear-gradient(var(--volt), var(--volt));
  background-repeat: no-repeat;
  background-position: 0 95%;
  background-size: 100% 0.12em;
}

.hero-sub {
  margin-top: 1.5rem;
  max-width: 38rem;
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--on-navy-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero-small {
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--on-navy-muted);
}

@media (max-width: 599px) {
  .hero-wrap {
    padding-inline: 0;
  }
  .hero {
    padding-top: 0;
  }
  .hero-panel {
    border-radius: 0 0 24px 24px;
  }
  .hero-actions {
    flex-direction: column;
  }
  .hero-actions .btn {
    width: 100%;
  }
}

/* The consumer unit */

.hero-unit {
  width: max(100%, 340px);
  margin-left: min(0px, calc((100% - 340px) / 2));
}

.cu {
  max-width: 600px;
  margin-inline: auto;
}

.cu-casing {
  position: relative;
  padding: 14px 14px 18px;
  background: var(--navy-deep);
  border-radius: 20px;
  box-shadow:
    inset 0 1px 0 rgb(255 255 255 / 0.06),
    inset 0 0 0 1px rgb(255 255 255 / 0.05),
    0 24px 40px -24px rgb(0 0 0 / 0.7);
}

.cu-top {
  display: flex;
  justify-content: center;
  padding: 2px 0 12px;
}

.led {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--navy);
  box-shadow: inset 0 0 0 2px rgb(0 0 0 / 0.45);
}

.led::after,
.led-glow {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

/* The lit LED face sits over the unlit one and fades. */
.led::after {
  inset: 0;
  background: var(--volt);
  box-shadow: inset 0 -2px 3px rgb(0 0 0 / 0.15);
}

.led-glow {
  inset: -22px;
  background: radial-gradient(circle, var(--volt-glow) 0%, transparent 70%);
}

.cu-cover {
  padding: 12px 10px 10px;
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    rgb(255 255 255 / 0.07),
    rgb(255 255 255 / 0.03)
  );
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.07);
}

.cu-row {
  display: grid;
  grid-template-columns: 1.15fr repeat(6, 1fr);
  gap: 6px;
}

.cb {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  min-width: 0;
  text-decoration: none;
  border-radius: 8px;
}

/* Widens each breaker link's hit area to 44 px across the gap. */
a.cb::before {
  content: "";
  position: absolute;
  top: -4px;
  bottom: -4px;
  left: 50%;
  width: max(100% + 6px, 44px);
  translate: -50% 0;
}

.cb-svg {
  width: 100%;
  height: auto;
}

.cb-case {
  fill: var(--breaker);
  stroke: var(--breaker-edge);
  stroke-width: 1;
}

.cb-slot {
  fill: #2b3546;
}

.cb-mark {
  fill: var(--breaker-edge);
}

.cb-lever {
  fill: var(--lever);
  transform-box: view-box;
  transform-origin: 20px 37px;
  transition: transform 220ms var(--ease-spring);
}

.cb-main .cb-lever {
  transform-origin: 28px 37px;
}

.cb-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 3px 1px;
  border-radius: 3px;
  background: var(--breaker);
  color: var(--lever);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 8.5px;
  letter-spacing: 0;
  line-height: 1.2;
  white-space: nowrap;
  transition: opacity 200ms;
}

.cb-num {
  color: var(--copper);
}

@media (prefers-color-scheme: dark) {
  .cb-num {
    color: #b8652a;
  }
}

.cb-main .cb-label {
  background: transparent;
  color: var(--on-navy-muted);
}

/* Hover or focus: the lever dips to 45 degrees, the label lights. */
a.cb:hover .cb-lever,
a.cb:focus-visible .cb-lever {
  transform: scaleY(0.7);
}

a.cb:hover .cb-label,
a.cb:focus-visible .cb-label {
  background: var(--volt);
  color: var(--on-volt);
}

a.cb:hover .cb-num,
a.cb:focus-visible .cb-num {
  color: var(--on-volt);
}

/* The maker's plate: only the large hero unit shows the word. */
.cu-brand {
  display: none;
}

@media (min-width: 1024px) {
  .hero-unit .cu-casing {
    padding: 0 10px 28px;
  }
  .hero-unit .cu-cover {
    padding-inline: 6px;
  }
  .hero-unit .cu-row {
    gap: 4px;
  }
  .hero-unit .cu-top {
    justify-content: space-between;
    align-items: center;
    height: 40px;
    padding: 0 6px 6px;
  }
  .hero-unit .cu-brand {
    display: block;
    font-size: 11px;
    letter-spacing: 0.14em;
    color: var(--on-navy-muted);
  }
  .hero-unit .cb-label {
    padding-inline: 0;
    font-size: 10.5px;
  }
}

/* At the narrowest desktop width the unit tightens up so "EMERGENCY" still fits its breaker. */
@media (min-width: 1024px) and (max-width: 1279px) {
  .hero-panel {
    padding-inline: 2rem;
  }
  .hero-unit .cu-casing {
    padding-inline: 6px;
  }
  .hero-unit .cu-cover {
    padding-inline: 3px;
  }
  .hero-unit .cu-row {
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
  }
  .hero-unit .cb-label {
    letter-spacing: -0.04em;
  }
}

.cu-legend {
  display: none;
  margin-top: 0.9rem;
  font-size: 0.8125rem;
  color: var(--on-navy-muted);
  text-align: center;
  text-wrap: balance;
}

.cu-caption {
  margin-top: 0.9rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-align: center;
  color: var(--on-navy-muted);
}

@media (max-width: 599px) {
  .hero-unit .cb-name {
    display: none;
  }
  .hero-unit .cb-main .cb-name {
    display: inline;
  }
  .hero-unit .cb-label {
    font-size: 12px;
  }
  .hero-unit .cb-main .cb-label {
    font-size: 9px;
  }
  .cu-legend {
    display: block;
  }
}

/* Start-up: main.js adds .is-off, then removes it so the levers flip up. */
.cu.is-off .cb-lever {
  transform: scaleY(-1);
  transition: none;
}

.cu.is-off .led::after,
.cu.is-off .led-glow {
  opacity: 0;
  transition: none;
}

.cu.is-off .led-glow {
  transform: scale(0.4);
}

.is-booting .cb-lever {
  transition-delay: calc(300ms + var(--i) * 90ms);
}

.is-booting .led::after,
.is-booting .led-glow,
.is-booting .underline {
  transition:
    opacity 400ms ease-out,
    transform 400ms ease-out,
    background-size 400ms ease-out;
  transition-delay: 1000ms;
}

.hero-title.is-off .underline {
  background-size: 0% 0.12em;
  transition: none;
}

/* The small closing unit breathes. */
.cu-small {
  width: min(320px, 100%);
  margin: 0 auto 2.5rem;
}

.cu-small .cu-casing {
  padding: 10px 10px 12px;
  border-radius: 16px;
}

.cu-small .cb-label {
  font-size: 9px;
}

.led-breathe .led-glow {
  animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

/* Bands */

.band {
  padding-block: var(--band-pad);
  background-color: var(--bg);
}

.band-sunken {
  background-color: var(--bg-sunken);
}

.band-navy {
  --grid: transparent;
  background-color: var(--navy);
  color: var(--on-navy);
}

/* Reveal: main.js adds .reveal to a band, then .is-in when it scrolls in. */
.reveal .rise {
  opacity: 0;
  transform: translateY(16px);
}

.reveal.is-in .rise {
  opacity: 1;
  transform: none;
  transition:
    opacity 500ms var(--ease-out),
    transform 500ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 80ms);
}

#features.reveal.is-in .rise {
  transition-delay: calc(var(--i, 0) * 60ms);
}

/* 2. Calls */

.calls {
  display: grid;
  gap: 1.25rem;
  margin-top: 2.75rem;
}

@media (min-width: 860px) {
  .calls {
    grid-template-columns: repeat(3, 1fr);
  }
}

.call {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}

.call-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--copper-soft);
  color: var(--copper);
  font-weight: 600;
  font-size: 0.875rem;
}

.call-who {
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.call-line {
  margin-top: 1rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-variation-settings: "wdth" 106;
  font-size: 1.375rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.call-fix {
  margin-top: auto;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  margin-block-start: 1.25rem;
  color: var(--ink);
}

.call-tag {
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--copper);
}

/* 3. How it works */

.steps {
  position: relative;
  display: grid;
  gap: 2.5rem;
  margin-top: 3rem;
}

@media (min-width: 860px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.step {
  position: relative;
  padding-left: 64px;
}

@media (min-width: 860px) {
  .step {
    padding-left: 0;
    padding-top: 68px;
  }
}

.step p {
  margin-top: 0.5rem;
  color: var(--ink-muted);
  max-width: 34ch;
}

.step-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-variation-settings: "wdth" 108;
  font-size: 1.375rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

/* The copper cable: one segment from each terminal to the next. */
.step:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  background: var(--copper);
  border-radius: 3px;
  left: 20.5px;
  top: 22px;
  width: 3px;
  height: calc(100% + 2.5rem);
  transform-origin: top;
}

@media (min-width: 860px) {
  .step:not(:last-child)::after {
    left: 22px;
    top: 20.5px;
    height: 3px;
    width: calc(100% + 2rem);
    transform-origin: left;
  }
}

.screw {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 1;
  width: 44px;
  height: 44px;
}

.screw-head {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 30%,
    #ffffff,
    var(--breaker) 60%,
    #d9d1bd
  );
  box-shadow:
    0 0 0 3px var(--bg),
    0 0 0 4px var(--line),
    0 4px 10px -4px rgb(9 26 49 / 0.35);
}

/* The slot across the screw head. */
.screw-head::before {
  content: "";
  position: absolute;
  inset: 50% 7px auto;
  height: 2px;
  margin-top: -1px;
  background: rgb(12 26 44 / 0.28);
  border-radius: 2px;
  transition: transform 300ms var(--ease-spring);
}

.screw-head span {
  position: relative;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--copper);
  background: var(--breaker);
  padding: 0 3px;
  border-radius: 3px;
}

@media (prefers-color-scheme: dark) {
  .screw-head span {
    color: #b8652a;
  }
}

#how.reveal .step:not(:last-child)::after {
  transform: scale(0);
}

@media (min-width: 860px) {
  #how.reveal .step:not(:last-child)::after {
    transform: scaleX(0);
  }
}

#how.reveal .screw-head::before {
  transform: rotate(-90deg);
}

#how.reveal.is-in .step:not(:last-child)::after {
  transform: none;
  transition: transform 450ms linear;
  transition-delay: calc(var(--i) * 450ms);
}

#how.reveal.is-in .screw-head::before {
  transform: none;
  transition-delay: calc(var(--i) * 450ms);
}

/* 4. Features */

.bento {
  display: grid;
  gap: 1.25rem;
  margin-top: 3rem;
}

@media (min-width: 640px) {
  .bento {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .bento {
    grid-template-columns: repeat(12, 1fr);
  }
  #feature-areas {
    grid-column: span 7;
  }
  #feature-emergency {
    grid-column: span 5;
  }
  .bento .card:not(.card-big) {
    grid-column: span 3;
  }
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}

.card-big {
  padding: clamp(1.5rem, 3vw, 2.25rem);
}

.card > p {
  color: var(--ink-muted);
}

.card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-variation-settings: "wdth" 108;
  font-size: 1.25rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.card-big .card-title {
  font-size: clamp(1.375rem, 1rem + 1vw, 1.75rem);
}

.chip {
  align-self: flex-start;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--copper-soft);
  color: var(--copper);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  transition: opacity 200ms;
}

@media (hover: hover) and (pointer: fine) {
  .card {
    transition:
      transform 200ms var(--ease-out),
      box-shadow 200ms var(--ease-out);
  }
  .reveal.is-in .card.rise {
    transition:
      opacity 500ms var(--ease-out),
      transform 200ms var(--ease-out),
      box-shadow 200ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 60ms), 0ms, 0ms;
  }
  .bento .card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lift);
  }
  .bento .card:hover .chip {
    background: var(--volt);
    color: var(--on-volt);
  }
}

/* Areas demo */

/* A framed well that fills the card, matching the Emergency card's question card. */
.demo-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-top: 0.5rem;
  padding: 1.5rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.fake-label {
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.4rem;
}

.fake-row {
  display: flex;
  gap: 0.5rem;
}

.fake-input {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0 0.85rem;
  border: 2px solid #8a93a3;
  border-radius: 10px;
  background: var(--bg-raised);
  font-size: 1rem;
  color: var(--ink);
}

.caret {
  width: 2px;
  height: 1.2em;
  margin-left: -0.45rem;
  background: var(--ink);
  animation: blink 1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.fake-btn {
  display: inline-grid;
  place-items: center;
  padding: 0 1.1rem;
  min-height: 46px;
  border-radius: 10px;
  background: var(--navy);
  color: var(--on-navy);
  font-weight: 600;
  font-size: 0.9375rem;
}

.fake-btn-sm {
  min-height: 38px;
  min-width: 64px;
  font-size: 0.9375rem;
}

.answer {
  margin-top: 0.75rem;
  padding: 1rem 1.15rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--line);
  background: var(--bg);
  transition: opacity 200ms;
}

.answer.is-yes {
  border-color: var(--safe);
  background: color-mix(in srgb, var(--safe) 9%, var(--bg-raised));
}

.answer.is-hidden {
  opacity: 0;
}

.answer-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-variation-settings: "wdth" 106;
  font-size: 1.125rem;
  line-height: 1.25;
}

.answer.is-yes .answer-title {
  color: var(--safe);
}

.answer-body {
  margin-top: 0.25rem;
  color: var(--ink-muted);
}

/* Emergency demo */

.demo-guide {
  display: grid;
  gap: 0.9rem;
  margin-top: auto;
  padding-top: 0.75rem;
}

.q-card {
  padding: 1rem;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-weight: 600;
  line-height: 1.45;
}

.q-btns {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.outcomes {
  display: grid;
  gap: 0.5rem;
}

.outcome {
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-left-width: 6px;
  font-weight: 600;
  font-size: 0.9375rem;
}

.edge-red {
  border-left-color: var(--danger);
}

.edge-volt {
  border-left-color: var(--volt);
}

.edge-navy {
  border-left-color: var(--navy);
}

@media (prefers-color-scheme: dark) {
  .edge-navy {
    border-left-color: var(--on-navy-muted);
  }
}

/* Small card visuals */

.prices {
  margin-top: auto;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  font-size: 0.8125rem;
  line-height: 1.9;
  list-style: none;
}

/* Name, dot leader, price: the prices line up on the right at any width. */
.prices li {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.prices-dots {
  flex: 1;
  border-bottom: 2px dotted var(--line);
  translate: 0 -0.3em;
}

.prices-from {
  white-space: nowrap;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: auto;
}

.tile {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  color: var(--on-navy);
}

.tile svg {
  width: 40%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.t1 {
  background: var(--navy);
}

.t2 {
  background: color-mix(in srgb, var(--navy) 78%, var(--bg));
}

.t3 {
  background: color-mix(in srgb, var(--navy) 60%, var(--bg));
}

.tile.lifted {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lift);
  color: var(--volt);
}

.demo-faq {
  margin-top: auto;
}

.search-ico {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: var(--ink-muted);
  stroke-width: 2;
  stroke-linecap: round;
}

.faq-count {
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--copper);
  letter-spacing: 0.06em;
}

.envelope {
  position: relative;
  margin-top: auto;
  padding: 2.25rem 1rem 1rem;
  border: 1.5px solid var(--copper);
  border-radius: 8px;
}

.envelope .flap {
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
  height: 40px;
  fill: none;
  stroke: var(--copper);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.envelope p {
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--ink);
}

.plus {
  max-width: 44rem;
  margin: 2.5rem auto 0;
  text-align: center;
  color: var(--ink-muted);
}

/* 5. See it */

.showcase {
  margin-top: 2.5rem;
}

.tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.tabs[hidden],
.stage[hidden],
.stacked[hidden] {
  display: none;
}

.tab {
  flex: none;
  min-height: 44px;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-raised);
  color: var(--ink);
  font: 600 0.9375rem/1.2 var(--font-body);
  cursor: pointer;
  scroll-snap-align: start;
}

.tab:hover {
  border-color: var(--ink-muted);
}

.tab[aria-selected="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}

.frames {
  position: relative;
  padding-bottom: 40px;
}

.browser {
  width: 88%;
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lift);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-sunken);
}

.dots {
  display: flex;
  gap: 6px;
}

.dots i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}

.address {
  flex: 1;
  max-width: 28rem;
  padding: 0.3rem 0.8rem;
  border-radius: 8px;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--ink-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 22%;
  min-width: 170px;
  padding: 10px;
  border-radius: 34px;
  background: var(--navy-deep);
  box-shadow: var(--shadow-hero);
}

.phone img,
.phone picture {
  border-radius: 24px;
  overflow: hidden;
}

.phone img {
  aspect-ratio: 390 / 844;
  object-fit: cover;
  object-position: left top;
}

.notch {
  position: absolute;
  z-index: 1;
  top: 10px;
  left: 50%;
  width: 34%;
  height: 16px;
  translate: -50% 0;
  border-radius: 0 0 12px 12px;
  background: var(--navy-deep);
}

.shot-fade {
  display: block;
  transition: opacity 200ms;
}

.shot-fade.is-fading {
  opacity: 0;
}

.see-caption {
  max-width: 38rem;
  margin-top: 1.5rem;
  color: var(--ink-muted);
  min-height: 3.2em;
}

.see-cta {
  margin-top: 1.25rem;
}

.stacked {
  display: grid;
  gap: 2rem;
}

.stacked img {
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.stacked figcaption {
  margin-top: 0.75rem;
  color: var(--ink-muted);
}

.reveal .phone.rise {
  transform: translateY(48px);
}

.reveal.is-in .phone.rise {
  transform: none;
  transition:
    opacity 500ms var(--ease-out) 120ms,
    transform 600ms var(--ease-spring) 120ms;
}

.reveal .browser.rise {
  transform: translateY(24px);
}

.reveal.is-in .browser.rise {
  transform: none;
}

@media (max-width: 759px) {
  .tabs {
    margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 80%, transparent);
    mask-image: linear-gradient(90deg, #000 80%, transparent);
  }
  .tabs::-webkit-scrollbar {
    display: none;
  }
  .browser {
    display: none;
  }
  .frames {
    padding-bottom: 0;
  }
  .phone {
    position: relative;
    width: 78vw;
    max-width: 340px;
    margin-inline: auto;
    border-radius: 40px;
  }
  .phone img,
  .phone picture {
    border-radius: 30px;
  }
}

/* 6. For owners */

.owners {
  display: grid;
  gap: 3rem;
}

@media (min-width: 1024px) {
  .owners {
    grid-template-columns: 5fr 7fr;
    align-items: center;
  }
}

.owners-text > p {
  margin-top: 1.5rem;
  color: var(--on-navy-muted);
  max-width: 38rem;
}

.owners-text code {
  font-size: 0.9375rem;
  color: var(--volt);
}

.ticks {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.ticks li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 0.75rem;
  align-items: start;
}

.ticks svg {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: #e08a4c;
}

.code-card {
  min-width: 0;
  border-radius: 16px;
  background: var(--navy-deep);
  box-shadow:
    inset 0 0 0 1px rgb(255 255 255 / 0.07),
    0 30px 60px -30px rgb(0 0 0 / 0.7);
  overflow: hidden;
}

.code-title {
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--on-navy-muted);
}

.code {
  padding: 1.25rem;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.875rem;
  line-height: 1.75;
  color: var(--on-navy);
}

.code .s {
  color: var(--volt);
}

.code .c {
  color: var(--on-navy-muted);
}

.code .p {
  opacity: 0.7;
}

.code .k {
  color: #e08a4c;
}

/* 7. Closing */

.closing {
  border-top: 1px solid color-mix(in srgb, var(--on-navy) 15%, transparent);
  text-align: center;
}

.closing-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.close-title {
  font-size: clamp(2.75rem, 1.5rem + 5vw, 5.5rem);
  color: var(--on-navy);
}

.close-line {
  margin: 1.25rem 0 2rem;
  max-width: 34rem;
  font-size: 1.1875rem;
  color: var(--on-navy-muted);
}

.close-small {
  margin-top: 1.5rem;
  max-width: 34rem;
  font-size: 0.875rem;
  color: var(--on-navy-muted);
}

/* 8. Footer */

.site-footer {
  padding-block: 2.5rem;
  background: var(--navy-deep);
  color: var(--on-navy-muted);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
}

.footer-brand p {
  font-size: 0.9375rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 0.75rem;
  border-radius: 10px;
  color: var(--on-navy);
  font-weight: 600;
  font-size: 0.9375rem;
}

.footer-links a:hover {
  background: rgb(255 255 255 / 0.08);
}

/* Reduced motion: final states, no movement. */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0ms !important;
    transition-delay: 0ms !important;
  }
  .led-breathe .led-glow,
  .caret {
    animation: none;
  }
  a.cb:hover .cb-lever,
  a.cb:focus-visible .cb-lever {
    transform: none;
  }
  .bento .card:hover {
    transform: none !important;
  }
}
