/* Smart Serve homepage ("the living block"). Loads after styles.css and only on index.html.
 *
 * Idea: the page starts at night on one New York block and ends in daylight with the facts.
 * Orange means "switched on": a lit department, a chosen answer, the main button. Nothing else.
 *
 * Three ways the hero can run (chosen by the small script in <head>):
 *   html.cine  computers with a mouse: the block wakes up frame by frame as you scroll (js/living-block.js)
 *   html.js    phones, tablets, low-power devices: a short looping video, or the still photo
 *   no class   no JavaScript: the still photo, everything readable
 * Visitors who prefer reduced motion get the still photo and no movement at all.
 */

/* Stand-in fonts, sized to match Bricolage Grotesque and DM Sans (measured in Chrome, Nov 2026), so the
   page doesn't jump when the brand fonts finish loading. Overrides = font metric / size-adjust. */
@font-face { font-family: "Bricolage Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 600 900; size-adjust: 99.5%; ascent-override: 93.47%; descent-override: 27.14%; line-gap-override: 0%; }
@font-face { font-family: "Bricolage Fallback R"; src: local("Roboto Bold"), local("Roboto-Bold"); font-weight: 600 900; size-adjust: 101.5%; ascent-override: 91.6%; descent-override: 26.6%; line-gap-override: 0%; }
@font-face { font-family: "DM Sans Fallback"; src: local("Arial"), local("ArialMT"); font-weight: 300 599; size-adjust: 103.5%; ascent-override: 95.85%; descent-override: 29.95%; line-gap-override: 0%; }
@font-face { font-family: "DM Sans Fallback"; src: local("Arial Bold"), local("Arial-BoldMT"); font-weight: 600 900; size-adjust: 101.6%; ascent-override: 97.6%; descent-override: 30.5%; line-gap-override: 0%; }
@font-face { font-family: "DM Sans Fallback R"; src: local("Roboto"), local("Roboto-Regular"); font-weight: 300 599; size-adjust: 105.5%; ascent-override: 94%; descent-override: 29.4%; line-gap-override: 0%; }
@font-face { font-family: "DM Sans Fallback R"; src: local("Roboto Bold"), local("Roboto-Bold"); font-weight: 600 900; size-adjust: 103.6%; ascent-override: 95.8%; descent-override: 29.9%; line-gap-override: 0%; }

:root {
  --font-head: "Bricolage Grotesque", "Bricolage Fallback", "Bricolage Fallback R", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: "DM Sans", "DM Sans Fallback", "DM Sans Fallback R", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --night: #121A2B;
  --night-raised: #18233A;
  --night-line: #2A3550;
  --dusk: #2B3B5E;
  --lamp: #FF7A2F;
  --lamp-text: #B8430F;
  --glow: #FFD9A6;
  --awning-market: #2F5E4B;
  --awning-salon: #E2A99C;
  --awning-restaurant: #7A2333;
  --awning-services: #3E5A86;
}

.page-home { background: var(--paper); }

/* ---------- Header: see-through over the night block, solid once you scroll past it ---------- */
.js .page-home .site-header {
  position: fixed; left: 0; right: 0; top: 0;
  background: transparent; border-bottom-color: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.js .page-home .site-header.is-solid,
.js .page-home .site-header:has(.site-nav.is-open) {
  background: rgba(18, 26, 43, 0.95); border-bottom-color: rgba(255, 255, 255, 0.07);
}
.page-home .text-link::after { content: none; }

/* ---------- Shared bits for this page ---------- */
.home-h2 {
  max-width: 20ch;
  font-size: clamp(2rem, 4.4vw, 3.5rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em;
}
.home-lead { margin-top: 20px; max-width: 56ch; font-size: clamp(1.125rem, 1.9vw, 1.3125rem); line-height: 1.55; }
.home-section { padding-block: clamp(72px, 10vw, 136px); scroll-margin-top: var(--header-h); }
.home-section--night { background: var(--night); color: var(--dark-body); --focus: var(--lamp); }
.home-section--night h2, .home-section--night h3, .home-section--night strong { color: var(--paper); }
.home-section--night .home-lead { color: var(--dark-body); }
.home-section--alt { background: var(--paper-alt); }
.link {
  color: var(--lamp-text); font-weight: 700; text-decoration: underline;
  text-decoration-thickness: 2px; text-underline-offset: 4px;
}
.link:hover { text-decoration-thickness: 3px; }
.home-section--night .link { color: var(--glow); }
.fine { color: var(--muted); font-size: 0.9375rem; line-height: 1.5; }
.home-section--night .fine { color: var(--dark-muted); }

/* ==========================================================================
   1. The living block (hero)
   ========================================================================== */
.lb { position: relative; background: var(--night); color: var(--dark-body); --focus: var(--lamp); }
.lb-stage { position: relative; }
.lb-media { position: relative; overflow: hidden; background: var(--night); }
.lb-picture, .lb-img, .lb-video, .lb-canvas { display: block; width: 100%; height: 100%; }
.lb-img, .lb-video { object-fit: cover; }
.lb-video { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s ease; }
.lb-video.is-playing { opacity: 1; }
.lb-img--noscript { position: absolute; inset: 0; }
.lb-canvas { position: absolute; inset: 0; }
/* A little film grain hides upscaling and makes the footage feel shot, not rendered (computers only). */
.lb-grain { display: none; }
.cine .lb-grain {
  display: block; position: absolute; inset: 0; pointer-events: none; opacity: 0.08; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.lb-title { position: relative; z-index: 2; }
.lb-title h1 {
  max-width: 13ch; color: var(--paper);
  font-size: clamp(2.5rem, 6vw, 5.75rem); font-weight: 800; line-height: 0.98; letter-spacing: -0.035em;
}
.lb-sub { margin-top: 20px; max-width: 44ch; color: #DCE1EA; font-size: clamp(1.125rem, 1.7vw, 1.3125rem); line-height: 1.5; }
.lb-actions { display: flex; flex-wrap: wrap; gap: 12px 14px; margin-top: 28px; }
.lb-meta { margin-top: 16px; color: #B9C1CF; font-size: 0.9375rem; }

.lb-notes { display: grid; gap: 22px; margin: 0; padding: 0; list-style: none; }
.lb-note { position: relative; }
.lb-note-title { color: var(--paper); font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.lb-note p:not(.lb-note-title) { margin-top: 6px; color: var(--dark-body); font-size: 1rem; line-height: 1.45; }
.lb-note-line, .lb-note-dot { display: none; }
.lb-end { color: var(--paper); font-family: var(--font-head); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.lb-end span { display: block; }
.lb-credit { margin-top: 28px; color: var(--dark-muted); font-size: 0.8125rem; }
.cine .lb-credit { position: absolute; left: max(var(--gutter), 3vw); bottom: 26px; margin: 0; opacity: 0; }
.lb-cue { display: none; }

/* Phones: words first, then the block in a tall window, then what happens on it. */
@media (max-width: 699.98px) {
  .lb-stage { display: flex; flex-direction: column; }
  .lb-title { order: -1; padding: calc(var(--header-h) + 28px) var(--gutter) 28px; }
  .lb-shade { display: none; }
  .lb-title h1 { font-size: clamp(2.5rem, 11.5vw, 3.25rem); }
  .lb-actions .btn { flex: 1 1 100%; }
  .lb-media { aspect-ratio: 4 / 5; margin-inline: var(--gutter); border-radius: 18px; }
  .lb-after { padding: 28px 0 56px; }
  .lb-notes { gap: 20px; }
  .lb-note { padding-left: 18px; border-left: 3px solid var(--note-color, var(--lamp)); }
  .lb-end { margin-top: 32px; font-size: clamp(1.375rem, 6.4vw, 1.75rem); text-wrap: balance; }
}

/* Tablets, small laptops, reduced motion, no JavaScript: the whole block behind the words. */
@media (min-width: 700px) {
  .lb-stage { display: grid; min-height: min(100svh, 980px); }
  .lb-media, .lb-shade, .lb-title { grid-area: 1 / 1; }
  .lb-media { min-height: 560px; }
  .lb-img, .lb-video { object-position: 50% 62%; }
  .lb-shade {
    position: relative; z-index: 1; pointer-events: none;
    background:
      linear-gradient(180deg, rgba(18, 26, 43, 0.82) 0%, rgba(18, 26, 43, 0.55) 26%, rgba(18, 26, 43, 0) 48%),
      linear-gradient(0deg, rgba(18, 26, 43, 0.9) 0%, rgba(18, 26, 43, 0) 22%);
  }
  /* Same title card as the scroll version: words in the sky, buttons down on the dark street. */
  .lb-title {
    align-self: stretch; justify-self: center; text-align: center;
    display: flex; flex-direction: column; align-items: center;
    width: 100%; max-width: 1240px; padding: calc(var(--header-h) + clamp(20px, 5vh, 56px)) var(--gutter) clamp(22px, 3.5vh, 36px);
  }
  html:not(.js) .lb-title { padding-top: clamp(24px, 5vh, 56px); }
  .lb-title h1 { margin-inline: auto; text-shadow: 0 2px 28px rgba(18, 26, 43, 0.45); }
  .lb-sub { margin-inline: auto; text-shadow: 0 1px 16px rgba(18, 26, 43, 0.7); }
  .lb-actions { justify-content: center; margin-top: auto; padding-top: 32px; }
  .lb-meta { color: #C9CFDB; }
  .lb-after { padding: clamp(36px, 5vw, 56px) 0 clamp(56px, 7vw, 88px); }
  .lb-notes { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
  .lb-note { padding-top: 18px; border-top: 3px solid var(--note-color, var(--lamp)); }
  .lb-end { margin-top: clamp(36px, 5vw, 56px); max-width: 24ch; font-size: clamp(1.75rem, 3.4vw, 2.75rem); }
}
@media (min-width: 1024px) {
  .lb-title h1 { max-width: none; font-size: clamp(2.75rem, 4.9vw, 5.25rem); }
  .lb-sub { max-width: 58ch; margin-top: 14px; }
}
.lb-note[data-shop="market"] { --note-color: var(--awning-market); }
.lb-note[data-shop="salon"] { --note-color: var(--awning-salon); }
.lb-note[data-shop="restaurant"] { --note-color: #B4384C; }

/* --- Computers with a mouse: the scroll-scrubbed block (living-block.js turns this on) --- */
.cine { scroll-behavior: auto; }
.cine .lb-stage { display: block; height: 100vh; height: 100svh; min-height: 620px; overflow: hidden; }
.cine .lb-media { position: absolute; inset: 0; min-height: 0; }
.cine .lb-img { object-position: 50% 62%; }
.cine .lb-shade {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(18, 26, 43, 0.7) 0%, rgba(18, 26, 43, 0.25) 45%, rgba(18, 26, 43, 0) 70%),
    linear-gradient(0deg, rgba(18, 26, 43, 1) 0%, rgba(18, 26, 43, 0) 14%);
}
/* Title card: headline and line in the sky; the buttons wait at the bottom, over the dark street. */
.cine .lb-title {
  position: absolute; inset: 0; width: auto; max-width: none; margin: 0; pointer-events: none;
  align-self: stretch; justify-self: stretch;
  padding: calc(var(--header-h) + clamp(12px, 3.6vh, 44px)) var(--gutter) 0;
}
.cine .lb-title > * { pointer-events: auto; }
.cine .lb-title h1 { max-width: none; font-size: clamp(2.75rem, 4.9vw, 5.25rem); text-shadow: 0 2px 28px rgba(18, 26, 43, 0.45); }
.cine .lb-sub { max-width: 58ch; margin-top: 14px; text-shadow: 0 1px 16px rgba(18, 26, 43, 0.7); }
.cine .lb-title .lb-actions { position: absolute; left: 0; right: 0; bottom: calc(58px + 1.5vh); margin: 0; padding: 0; }
.cine .lb-title .lb-meta { position: absolute; left: 0; right: 0; bottom: calc(22px + 0.5vh); margin: 0; color: #C9CFDB; }
.cine .lb-after { position: absolute; inset: 0; z-index: 2; padding: 0; pointer-events: none; }
.cine .lb-after .container { max-width: none; padding: 0; }
.cine .lb-notes { display: block; }
.cine .lb-note {
  position: absolute; left: 0; top: 0; width: 17.5rem; padding: 0; border: 0;
  opacity: 0; will-change: transform, opacity; text-wrap: pretty; isolation: isolate;
}
/* A soft halo of night behind each caption keeps it readable over lit windows, without a box. */
.cine .lb-note::before {
  content: ""; position: absolute; inset: -22px -30px; z-index: -1; pointer-events: none;
  background: radial-gradient(closest-side, rgba(18, 26, 43, 0.62), rgba(18, 26, 43, 0.32) 60%, rgba(18, 26, 43, 0));
}
.cine .lb-note-title { font-size: 1.3125rem; text-shadow: 0 1px 18px rgba(18, 26, 43, 0.65); }
.cine .lb-note p:not(.lb-note-title) { color: #E6E9EF; text-shadow: 0 1px 14px rgba(18, 26, 43, 0.8); }
.cine .lb-note-line {
  display: block; position: absolute; left: var(--line-x, 50%); top: 100%; width: 1px; height: 100px;
  margin-top: 12px; transform-origin: top; background: linear-gradient(180deg, rgba(255, 217, 166, 0.85), rgba(255, 217, 166, 0.25));
}
.cine .lb-note-dot {
  display: block; position: absolute; left: var(--line-x, 50%); top: 100%; width: 9px; height: 9px; margin-left: -4px;
  border-radius: 50%; background: var(--glow); box-shadow: 0 0 0 4px rgba(255, 122, 47, 0.25), 0 0 18px 4px rgba(255, 170, 90, 0.6);
}
.cine .lb-end {
  position: absolute; left: 0; right: 0; top: calc(var(--header-h) + clamp(20px, 7vh, 80px));
  width: min(30ch, 90vw); margin: 0 auto; text-align: center; opacity: 0; visibility: hidden;
  font-size: clamp(2.25rem, 4vw, 3.75rem); text-shadow: 0 2px 30px rgba(18, 26, 43, 0.6);
}
.cine .lb-cue {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  position: absolute; right: max(var(--gutter), 3vw); bottom: 26px; z-index: 2;
  color: #DCE1EA; font-size: 0.875rem; font-weight: 500; text-decoration: none;
}
.cine .lb-cue::after { content: ""; width: 1px; height: 34px; background: linear-gradient(180deg, rgba(255, 217, 166, 0.9), rgba(255, 217, 166, 0)); }
/* Until the first frame is on the canvas, the photo underneath shows (it is the same first frame). */
.cine .lb-canvas { opacity: 0; }
.cine .lb-canvas.is-ready { opacity: 1; }

/* ==========================================================================
   2. The moments customers slip away
   ========================================================================== */
.moments { padding-top: clamp(56px, 8vw, 104px); }
.moment-list { display: grid; gap: 0; margin-top: clamp(36px, 5vw, 64px); padding: 0; list-style: none; border-top: 1px solid var(--night-line); }
.moment { display: grid; gap: 6px 28px; padding: 24px 0; border-bottom: 1px solid var(--night-line); }
.moment-mark { color: var(--glow); font-family: var(--font-head); font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; }
.moment h3 { color: var(--paper); font-size: 1.25rem; }
.moment p { color: var(--dark-body); }
@media (min-width: 800px) {
  .moment { grid-template-columns: minmax(150px, 0.8fr) minmax(0, 0.9fr) minmax(0, 2fr); align-items: baseline; }
}
.moments-turn {
  margin-top: clamp(40px, 6vw, 72px); max-width: 24ch; color: var(--paper);
  font-family: var(--font-head); font-size: clamp(1.75rem, 3.6vw, 2.875rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em;
}

/* ==========================================================================
   3. Build your AI office
   ========================================================================== */
.office { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--night) 0%, #141E33 100%); }
.office-head { max-width: 760px; }
.office-grid { display: grid; gap: clamp(32px, 4vw, 48px); margin-top: clamp(36px, 5vw, 56px); }
.office-note { margin-top: 28px; }

.office-form { display: grid; gap: 32px; }
@media (min-width: 860px) { .office-form { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr); gap: 48px; } }
.office-step { margin: 0; padding: 0; border: 0; min-width: 0; }
.office-step legend { display: flex; align-items: baseline; gap: 12px; padding: 0; color: var(--paper); font-family: var(--font-head); font-size: 1.375rem; font-weight: 700; letter-spacing: -0.01em; }
.step-n {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--glow); color: var(--glow);
  font-family: var(--font-body); font-size: 0.9375rem; font-weight: 700; transform: translateY(-2px);
}
.office-hint { margin-top: 6px; color: var(--dark-muted); font-size: 0.9375rem; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.chip { position: relative; display: inline-flex; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 18px 10px 14px;
  border: 1.5px solid #3A4766; border-radius: 999px; background: var(--night-raised);
  color: var(--paper); font-size: 1rem; font-weight: 500; line-height: 1.25; cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.chip span::before {
  content: ""; flex: none; width: 18px; height: 18px; border: 1.5px solid #8A93A6; border-radius: 50%;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.chip input[type="checkbox"] + span::before { border-radius: 5px; }
.chip:hover span { border-color: #6B7898; }
.chip input:focus-visible + span { outline: 3px solid var(--lamp); outline-offset: 3px; }
.chip input:checked + span { background: var(--lamp); border-color: var(--lamp); color: var(--ink); font-weight: 700; }
.chip input:checked + span::before { border-color: var(--ink); background: var(--ink); box-shadow: inset 0 0 0 3px var(--lamp); }
.chip input[type="checkbox"]:checked + span::before {
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23FF7A2F' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
  box-shadow: none;
}
.stores { display: none; align-items: center; flex-wrap: wrap; gap: 12px 16px; margin-top: 18px; color: var(--paper); }
.stores label { font-weight: 700; }
.stepper { display: inline-flex; align-items: center; border: 1.5px solid #3A4766; border-radius: 999px; background: var(--night-raised); }
.stepper button {
  width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--paper);
  font-size: 1.375rem; font-weight: 700; line-height: 1; cursor: pointer;
}
.stepper button:hover { color: var(--lamp); }
.stepper button:disabled { color: #5B6680; cursor: default; }
.stepper input {
  width: 3ch; border: 0; background: transparent; color: var(--paper); text-align: center;
  font: 700 1.125rem/1 var(--font-body); -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.office.is-market .stores { display: flex; }
html:not(.js) .office:has(input[value="supermarket"]:checked) .stores { display: flex; }

/* The org chart: you, your AI chief of staff, five departments that light up when needed. */
.chart { position: relative; padding: clamp(20px, 3vw, 32px); border: 1px solid var(--night-line); border-radius: 28px; background: rgba(24, 35, 58, 0.55); }
.chart-top { display: grid; justify-items: center; gap: 0; }
.chart-you {
  display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 10px; border-radius: 999px;
  background: var(--paper); color: var(--ink); font-size: 0.9375rem; font-weight: 700;
}
.chart-you svg { width: 22px; height: 22px; color: var(--lamp-text); }
.chart-stem { width: 2px; height: 22px; background: var(--glow); opacity: 0.7; }
.chief {
  width: min(100%, 460px); padding: 18px 22px; border-radius: 18px; text-align: center;
  border: 1.5px solid rgba(255, 170, 110, 0.6);
  background: radial-gradient(120% 120% at 50% 0%, rgba(255, 217, 166, 0.22), rgba(255, 122, 47, 0.06) 55%, rgba(24, 35, 58, 0) 80%), var(--night-raised);
  box-shadow: 0 20px 50px -24px rgba(255, 122, 47, 0.55);
}
.chief-name { color: var(--paper); font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; }
.chief-job { margin-top: 4px; color: var(--dark-body); font-size: 0.9375rem; line-height: 1.45; }

.depts { position: relative; display: grid; gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; }
.dept {
  position: relative; display: flex; flex-direction: column; gap: 6px; min-width: 0;
  padding: 16px 16px 18px; border-radius: 16px;
  border: 1.5px dashed rgba(201, 207, 219, 0.28); background: rgba(18, 26, 43, 0.6);
  transition: border-color 0.35s ease, background-color 0.35s ease, box-shadow 0.35s ease, opacity 0.35s ease;
}
.dept-name { display: flex; align-items: center; gap: 10px; color: #AEB6C5; font-family: var(--font-head); font-size: 1.125rem; font-weight: 700; transition: color 0.35s ease; }
.dept-light { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #3A4766; transition: background-color 0.35s ease, box-shadow 0.35s ease; }
.dept-job { color: var(--dark-muted); font-size: 0.9375rem; line-height: 1.45; }
.dept-off { color: #8A93A6; font-size: 0.875rem; }
.dept.is-on {
  border-style: solid; border-color: rgba(255, 170, 110, 0.65);
  background: radial-gradient(130% 100% at 50% 0%, rgba(255, 217, 166, 0.26), rgba(255, 122, 47, 0.08) 50%, rgba(24, 35, 58, 0) 78%), var(--night-raised);
  box-shadow: 0 18px 40px -22px rgba(255, 122, 47, 0.7);
}
.dept.is-on .dept-name { color: var(--paper); }
.dept.is-on .dept-light { background: var(--lamp); box-shadow: 0 0 0 4px rgba(255, 122, 47, 0.2), 0 0 14px 2px rgba(255, 150, 80, 0.7); }
.dept.is-on .dept-job { color: var(--dark-body); }
.dept .dept-off { display: none; }
.js .dept:not(.is-on) .dept-job { display: none; }
.js .dept:not(.is-on) .dept-off { display: block; }

/* Connectors: a vertical spine on phones, a branching line on wide screens. */
.depts::before { content: ""; position: absolute; left: 22px; top: -22px; bottom: 26px; width: 2px; background: #3A4766; }
.dept { margin-left: 44px; }
.dept::before { content: ""; position: absolute; left: -23px; top: 26px; width: 22px; height: 2px; background: #3A4766; transition: background-color 0.35s ease; }
.dept.is-on::before { background: var(--glow); }
@media (min-width: 1040px) {
  .depts { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-top: 44px; }
  .depts::before { left: 10%; right: 10%; top: -22px; bottom: auto; width: auto; height: 2px; }
  .dept { margin-left: 0; padding: 18px 18px 20px; }
  .dept::before { left: 50%; top: -23px; width: 2px; height: 21px; margin-left: -1px; }
}
.chart-top::after { content: ""; display: block; width: 2px; height: 22px; background: #3A4766; }
@media (max-width: 1039.98px) { .chart-top { justify-items: start; } .chart-top::after, .chart-stem { margin-left: 21px; } .chief { text-align: left; } }

/* The plan the choices add up to. */
.plan { margin-top: 22px; padding: clamp(22px, 3vw, 36px); border-radius: 22px; background: var(--paper); color: var(--body); --focus: var(--lamp-text); }
.plan-grid { display: grid; gap: 20px 40px; }
@media (min-width: 900px) { .plan-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); } }
.plan-money { align-self: start; padding: 18px 20px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
.plan-amount { margin-top: 10px; color: var(--ink); font-family: var(--font-head); font-size: clamp(1.625rem, 3vw, 2.25rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; }
.plan-amount-sub { margin-top: 4px; color: var(--ink); font-size: 1.0625rem; font-weight: 700; }
.plan-run { margin-top: 10px; color: var(--body); font-size: 0.9375rem; line-height: 1.5; }
.plan h3, .plan strong { color: var(--ink); }
.home-section--night .plan .link { color: var(--lamp-text); }
.plan-kicker { color: var(--muted); font-size: 0.9375rem; font-weight: 500; }
.plan-name { margin-top: 4px; font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; letter-spacing: -0.02em; }
.plan-why { margin-top: 8px; max-width: 60ch; }
.plan-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin-top: 16px; color: var(--ink); font-family: var(--font-head); font-size: clamp(1.375rem, 2.4vw, 1.75rem); font-weight: 700; letter-spacing: -0.01em; }
.estimate-tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px; border: 1.5px solid var(--lamp-text);
  color: var(--lamp-text); font-family: var(--font-body); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.02em;
}
.plan-sub { margin-top: 6px; color: var(--muted); font-size: 0.9375rem; }
.plan-later { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.plan-later-title { color: var(--ink); font-weight: 700; }
.plan-later ul { display: grid; gap: 6px; margin-top: 8px; padding-left: 1.1em; }
.plan-later li::marker { color: var(--lamp-text); }
.plan-total { margin-top: 14px; color: var(--ink); font-weight: 500; }
.plan-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 20px; }
.plan-fine { margin-top: 14px; color: var(--muted); font-size: 0.875rem; line-height: 1.5; }
.plan-empty { color: var(--ink); font-weight: 500; }
.price-list { display: grid; gap: 8px; margin-top: 12px; padding: 0; list-style: none; }
.price-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 16px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.price-list li span:last-child { color: var(--ink); font-weight: 700; }
.js .plan-static { display: none; }
html:not(.js) .plan-live { display: none; }

/* No JavaScript: departments still light up from the ticked boxes (modern browsers). */
html:not(.js) .office:has(input[value="calls"]:checked) .dept[data-dept="frontdesk"],
html:not(.js) .office:has(input[value="scheduling"]:checked) .dept[data-dept="frontdesk"],
html:not(.js) .office:has(input[value="calls"]:checked) .dept[data-dept="sales"],
html:not(.js) .office:has(input[value="reviews"]:checked) .dept[data-dept="sales"],
html:not(.js) .office:has(input[value="reviews"]:checked) .dept[data-dept="marketing"],
html:not(.js) .office:has(input[value="social"]:checked) .dept[data-dept="marketing"],
html:not(.js) .office:has(input[value="invoices"]:checked) .dept[data-dept="operations"],
html:not(.js) .office:has(input[value="training"]:checked) .dept[data-dept="operations"],
html:not(.js) .office:has(input[value="scheduling"]:checked) .dept[data-dept="operations"],
html:not(.js) .office:has(input[value="invoices"]:checked) .dept[data-dept="finance"] {
  border-style: solid; border-color: rgba(255, 170, 110, 0.65);
  background: radial-gradient(130% 100% at 50% 0%, rgba(255, 217, 166, 0.26), rgba(255, 122, 47, 0.08) 50%, rgba(24, 35, 58, 0) 78%), var(--night-raised);
}

/* Cards are dealt into the chart the first time someone picks a business. */
.depts.is-deck .dept { transition: none; }
.dept.is-dealing { transition: transform 0.75s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease, border-color 0.35s ease, background-color 0.35s ease, box-shadow 0.35s ease; }
.dept.is-pop { animation: dept-pop 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes dept-pop { 0% { transform: scale(0.96); } 60% { transform: scale(1.03); } 100% { transform: none; } }
.plan-live.is-swapping { opacity: 0.25; transform: translateY(4px); }
.plan-live { transition: opacity 0.2s ease, transform 0.2s ease; }

/* ==========================================================================
   4. Proof: Glyde
   ========================================================================== */
.proof-grid { display: grid; gap: clamp(36px, 6vw, 72px); align-items: center; }
@media (min-width: 960px) { .proof-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.proof-copy > * + * { margin-top: 16px; }
.proof-tag { color: var(--lamp-text); font-weight: 700; }
.proof-figure { padding: clamp(24px, 4vw, 40px); border-radius: 28px; background: var(--card); border: 1px solid var(--line); }
.proof-figure .bars { height: 240px; }
.proof-figure .bar-fill { transform-origin: bottom; }
.stat-grid { display: grid; gap: 0 clamp(24px, 4vw, 56px); margin-top: clamp(40px, 6vw, 72px); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stat-item { padding: 22px 0 24px; border-top: 1px solid var(--line-strong); }
.stat-item .num { color: var(--ink); font-family: var(--font-head); font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 800; line-height: 1; letter-spacing: -0.03em; }
.stat-item .what { margin-top: 10px; color: var(--ink); font-size: 1.125rem; font-weight: 700; line-height: 1.3; }
.stat-item .when { margin-top: 4px; color: var(--muted); font-size: 0.9375rem; }

/* ==========================================================================
   5. Offers: each one wears the awning of the shop it suits best
   ========================================================================== */
.offer-grid { display: grid; gap: 20px; margin-top: clamp(36px, 5vw, 56px); }
@media (min-width: 900px) { .offer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.shopfront {
  position: relative; display: flex; flex-direction: column; gap: 14px; overflow: hidden;
  padding: calc(18px + clamp(22px, 3vw, 32px)) clamp(22px, 3vw, 32px) clamp(24px, 3vw, 32px);
  border-radius: 10px 10px 24px 24px; background: var(--card); border: 1px solid #DDD8CC;
}
.shopfront::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 18px; background: var(--awning, var(--lamp));
  -webkit-mask: radial-gradient(9px 7px at 9px 18px, transparent 98%, #000) -9px 0 / 18px 18px repeat-x;
          mask: radial-gradient(9px 7px at 9px 18px, transparent 98%, #000) -9px 0 / 18px 18px repeat-x;
}
.shopfront--found { --awning: var(--awning-restaurant); }
.shopfront--desk { --awning: var(--awning-salon); }
.shopfront--ops { --awning: var(--awning-market); }
.shopfront h3 { font-size: clamp(1.625rem, 2.6vw, 2rem); font-weight: 800; }
.shopfront .best { color: var(--muted); font-size: 0.9375rem; font-weight: 500; }
@media (min-width: 900px) { .shopfront .best { min-height: 3em; } }
.shopfront .price { color: var(--ink); font-size: 1.25rem; font-weight: 700; line-height: 1.35; }
.shopfront .more { color: var(--muted); font-size: 0.9375rem; }
.shopfront .link { margin-top: auto; align-self: flex-start; }
.offer-extra { display: grid; gap: 16px; margin-top: 28px; }
@media (min-width: 900px) { .offer-extra { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); align-items: start; } }
.offer-extra p { max-width: 64ch; }

/* ==========================================================================
   6. Industries, 7. Steps, 8. FAQ, 9. Last call
   ========================================================================== */
.tenants { display: grid; gap: 28px 32px; margin-top: clamp(36px, 5vw, 56px); padding: 0; list-style: none; }
@media (min-width: 640px) { .tenants { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .tenants { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.tenant { display: flex; flex-direction: column; gap: 10px; padding-top: 20px; border-top: 5px solid var(--tenant, var(--lamp)); }
.tenant h3 { font-size: 1.3125rem; }
.tenant .link { align-self: flex-start; margin-top: 4px; }
.tenant--market { --tenant: var(--awning-market); }
.tenant--salon { --tenant: var(--awning-salon); }
.tenant--restaurant { --tenant: var(--awning-restaurant); }
.tenant--services { --tenant: var(--awning-services); }

.start-steps { display: grid; gap: 32px; margin-top: clamp(36px, 5vw, 56px); padding: 0; list-style: none; }
@media (min-width: 860px) { .start-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px; } }
.start-step { display: flex; flex-direction: column; gap: 10px; }
.start-n { color: var(--lamp-text); font-family: var(--font-head); font-size: clamp(3.5rem, 8vw, 5.5rem); font-weight: 800; line-height: 0.9; letter-spacing: -0.04em; }
.start-step h3 { font-size: clamp(1.5rem, 2.6vw, 1.875rem); }
.own-line { margin-top: clamp(32px, 4vw, 48px); color: var(--ink); font-family: var(--font-head); font-size: clamp(1.375rem, 2.4vw, 1.75rem); font-weight: 700; letter-spacing: -0.01em; }

.qa { max-width: 860px; margin-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--line-strong); }
.qa details { border-bottom: 1px solid var(--line-strong); }
.qa summary {
  display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0;
  cursor: pointer; list-style: none; color: var(--ink); font-family: var(--font-head); font-size: clamp(1.125rem, 1.8vw, 1.3125rem); font-weight: 700; line-height: 1.3;
}
.qa summary::-webkit-details-marker { display: none; }
.qa summary::after {
  content: ""; flex: none; width: 14px; height: 14px; margin-right: 6px;
  background: linear-gradient(var(--lamp-text), var(--lamp-text)) center / 14px 2px no-repeat, linear-gradient(var(--lamp-text), var(--lamp-text)) center / 2px 14px no-repeat;
  transition: transform 0.2s ease;
}
.qa details[open] summary::after { transform: rotate(45deg); }
.qa summary:focus-visible { outline-offset: 4px; }
.qa .answer { padding: 0 0 24px; max-width: 64ch; }

.last-call { position: relative; overflow: hidden; background: var(--night); color: var(--dark-body); --focus: var(--lamp); }
.last-call-media { position: absolute; inset: 0; }
.last-call-media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; opacity: 0.38; }
.last-call-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(18, 26, 43, 0.96) 0%, rgba(18, 26, 43, 0.82) 45%, rgba(18, 26, 43, 0.35) 100%); }
.last-call .container { position: relative; padding-block: clamp(80px, 11vw, 144px); }
.last-call h2 { max-width: 15ch; color: var(--paper); font-size: clamp(2.25rem, 6vw, 4.25rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em; }
.last-call p { margin-top: 20px; max-width: 40ch; font-size: clamp(1.125rem, 2vw, 1.3125rem); color: #DCE1EA; }
.last-actions { display: flex; flex-wrap: wrap; gap: 12px 14px; margin-top: 32px; }
@media (max-width: 699.98px) { .last-actions .btn { flex: 1 1 100%; } }

/* Lenis's recommended styles, as published in lenis@1.3.27 dist/lenis.css (MIT). */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent], .lenis [data-lenis-prevent-wheel], .lenis [data-lenis-prevent-touch],
.lenis [data-lenis-prevent-vertical], .lenis [data-lenis-prevent-horizontal] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }
.lenis.lenis-autoToggle { transition-property: overflow; transition-duration: 1ms; transition-behavior: allow-discrete; }

/* ---------- Light reveals for phones and tablets (only when JS is on and motion is OK) ---------- */
.lr-on [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.lr-on [data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .lb-video { display: none; }
  .lr-on [data-reveal] { opacity: 1; transform: none; }
  .dept, .dept.is-dealing, .chip span, .plan-live { transition: none; }
  .dept.is-pop { animation: none; }
}
@media print {
  .lb-media, .lb-shade, .lb-cue, .last-call-media { display: none; }
  .lb-title, .lb-after { position: static; color: var(--ink); }
}
