/* ==========================================================================
   HYPER LOGISTICS — design system

   Structure follows the reference the client approved: dark page, one accent,
   photography-led sections, a card for every idea. Everything is designed at
   375px first and only widened at breakpoints — the client judges this on a
   phone, so the phone layout is the real one.

   Accent is electric blue. Amber is reserved for star ratings alone, so the
   blue never has to compete with a second bright colour for attention.
   ========================================================================== */

:root {
  --asphalt:      #0F0F0F;   /* page */
  --asphalt-deep: #0A0A0A;   /* footer, wells */
  --cab:          #161616;   /* cards */
  --cab-raised:   #1F1F1F;   /* inputs, card hover */
  --signal:       #38BDF8;   /* primary accent */
  --signal-deep:  #0EA5E9;
  --signal-soft:  rgba(56, 189, 248, 0.12);
  --guide:        #34D399;   /* positive */
  --clay:         #F87171;   /* error */
  --amber:        #FCCA18;   /* ratings only */
  --paint:        #FFFFFF;
  --paint-dim:    #A6A6A6;
  --paint-faint:  #737373;
  --line:         rgba(255, 255, 255, 0.08);
  --line-strong:  rgba(255, 255, 255, 0.16);

  --display: "Inter", system-ui, -apple-system, sans-serif;
  --body:    "Inter", system-ui, -apple-system, sans-serif;
  --mono:    "Inter", system-ui, -apple-system, sans-serif;

  --shell: 1200px;
  --gutter: clamp(1.15rem, 5vw, 3rem);
  --bay: clamp(4rem, 9vw, 7.5rem);
  --radius: 18px;
  --radius-sm: 12px;
  --nav-space: 76px;   /* pill height + the gap above and below it */

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--asphalt);
  color: var(--paint);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
::selection { background: var(--signal); color: #05202B; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--signal); color: #05202B;
  padding: 0.75rem 1.25rem; font-weight: 600;
}
.skip-link:focus { left: 0; }

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

/* --------------------------------------------------------------- type ---- */

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.14;
  letter-spacing: -0.022em;
  margin: 0;
}

h1 { font-size: clamp(2.05rem, 7.4vw, 3.75rem); }
h2 { font-size: clamp(1.7rem, 5.4vw, 2.75rem); }
h3 { font-size: clamp(1.12rem, 3.4vw, 1.35rem); letter-spacing: -0.015em; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

.lede {
  color: var(--paint-dim);
  font-size: clamp(0.98rem, 2.6vw, 1.09rem);
  line-height: 1.72;
  max-width: 58ch;
}

.mono {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tabular { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------- layout ---- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.bay { padding-block: var(--bay); position: relative; }
.bay--tight { padding-block: calc(var(--bay) * 0.62); }

/* Alternating section grounds. Not colour for its own sake — the point is
   that crossing from one band to the next is visible, so a long page reads as
   chapters instead of one unbroken sheet of black. */
.bay--well, .bay--deep { isolation: isolate; }
.bay--well::before, .bay--deep::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
}
.bay--well::before {
  background:
    radial-gradient(120% 70% at 50% 0%, rgba(56, 189, 248, 0.07), transparent 62%),
    linear-gradient(180deg, #151517, #121214 55%, #151517);
}
.bay--deep::before {
  background:
    radial-gradient(90% 60% at 12% 100%, rgba(56, 189, 248, 0.05), transparent 60%),
    linear-gradient(180deg, #0A0A0B, #0C0C0E);
}
/* A lit hairline on the seam, so the change of ground has an edge. */
.bay--well::after, .bay--deep::after {
  content: ""; position: absolute; inset: 0 0 auto; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.28), transparent);
}

/* Section eyebrow: small blue label with a rule running off it. */
.marker { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1.1rem; }
.marker__code {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--signal); white-space: nowrap;
}
.marker__line { flex: 1; max-width: 90px; height: 1px; background: var(--line-strong); }
.marker--center { justify-content: center; }
.marker--center .marker__line { display: none; }
.marker--inband { margin-bottom: 1rem; }

.headrow { margin-bottom: 2.25rem; }
.headrow .lede { margin-top: 1rem; }

.split { display: grid; gap: 2.25rem; }
.split__aside .lede { margin-top: 1rem; }

.how__title { margin-bottom: 0.5rem; }

/* ------------------------------------------------------------- reveal ---- */
/* Content is visible by default and only hidden once site.js proves it can
   reveal it again. A dead script must never leave the page blank. */

/* Blocks arrive from wherever site.js parks them: --dx is set per card so the
   left column comes in from the left, the right column from the right, and
   everything else simply rises. */
.reveal {
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease), filter 0.7s var(--ease);
}
.reveal-ready .reveal {
  opacity: 0;
  transform: translate3d(var(--dx, 0px), var(--dy, 34px), 0) scale(0.985);
  filter: blur(var(--blur, 7px));
}
.reveal-ready .reveal.is-visible { opacity: 1; transform: none; filter: none; }

/* --------------------------------------------------------- word type ---- */
/* Headings write themselves on as they come into view — site.js wraps each
   word and sets the per-word delay. Fast on purpose: this is punctuation for
   the scroll, not a title sequence. */

/* Same contract as .reveal: a word is visible by default and only hidden once
   site.js has proved it can put it back. A split heading must never be able to
   leave the page blank. */
.w {
  display: inline-block;
  transition: opacity 0.34s var(--ease), transform 0.34s var(--ease), filter 0.34s var(--ease);
  transition-delay: var(--wd, 0ms);
}
.reveal-ready .w {
  opacity: 0;
  transform: translateY(0.42em);
  filter: blur(5px);
}
.reveal-ready .is-visible .w,
.reveal-ready .hero__slide.is-active .w { opacity: 1; transform: none; filter: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal-ready .w { opacity: 1; transform: none; filter: none; transition: none; }
}

/* ------------------------------------------------------------- drift ---- */
/* Road vocabulary drifting behind the page: a compass ring, a route arc, a
   pin, a tractor unit, lane markings. Five shapes, barely there, fixed and
   transform-only so scrolling costs nothing. */

.drift {
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none; overflow: hidden;
  color: var(--signal);
}
.drift__item {
  position: absolute;
  width: 120px; height: auto;
  opacity: 0.055;
  animation: float 26s var(--ease) infinite;
}
.drift__item--1 { top: 14%;  left: -4%;   width: 150px; animation-duration: 31s; }
.drift__item--2 { top: 38%;  right: -3%;  width: 190px; animation-duration: 39s; animation-delay: -6s; opacity: 0.045; }
.drift__item--3 { top: 63%;  left: 6%;    width: 100px; animation-duration: 27s; animation-delay: -13s; }
.drift__item--4 { top: 82%;  right: 8%;   width: 170px; animation-duration: 35s; animation-delay: -3s; opacity: 0.05; }
.drift__item--5 { top: 4%;   right: 22%;  width: 140px; animation-duration: 44s; animation-delay: -18s; opacity: 0.04; }

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  33%      { transform: translate3d(18px, -26px, 0) rotate(4deg); }
  66%      { transform: translate3d(-14px, 16px, 0) rotate(-3deg); }
}

/* Everything real sits above the ambient layer. The masthead is sticky and
   already stacks higher. */
main, .footer { position: relative; z-index: 1; }

@media (prefers-reduced-motion: reduce) { .drift { display: none; } }

/* ------------------------------------------------------------- lift ----- */
/* One hover gesture, applied to everything that behaves like a card. */

.service, .quote, .stat, .step, .exchange, .faq__item {
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease),
              box-shadow 0.28s var(--ease);
}
.service:hover, .quote:hover, .stat:hover, .step:hover, .exchange:hover {
  transform: translateY(-6px) scale(1.012);
  border-color: rgba(56, 189, 248, 0.34);
  box-shadow: 0 22px 46px -26px rgba(0, 0, 0, 0.9);
}
.faq__item:hover { border-color: rgba(56, 189, 248, 0.28); }

/* The photo inside a card leans in with it. */
.step__media img, .about__media img, .assistant__media img {
  transition: transform 0.7s var(--ease);
}
.step:hover .step__media img,
.about__media:hover img,
.assistant__media:hover img { transform: scale(1.05); }

@media (prefers-reduced-motion: reduce) {
  .service:hover, .quote:hover, .stat:hover, .step:hover, .exchange:hover { transform: none; }
}

/* ------------------------------------------------------------ buttons ---- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.95rem 1.6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--body);
  font-size: 0.94rem; font-weight: 600; letter-spacing: -0.005em;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease),
              border-color 0.2s var(--ease), box-shadow 0.2s var(--ease),
              color 0.2s var(--ease);
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

/* Hover flips the two buttons into each other's colours, so it is obvious
   which one the cursor is on rather than a shade lighter. */
.btn--signal {
  background: var(--signal);
  color: #05202B;
  box-shadow: 0 8px 26px rgba(56, 189, 248, 0.24);
}
.btn--signal:hover {
  background: var(--paint);
  color: #05202B;
  box-shadow: 0 12px 34px rgba(255, 255, 255, 0.22);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line-strong);
  color: var(--paint);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover {
  background: var(--signal);
  border-color: var(--signal);
  color: #05202B;
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.3);
}

.btn--sm { padding: 0.62rem 1.15rem; font-size: 0.86rem; }

/* ----------------------------------------------------------- masthead ---- */

/* A floating pill rather than a full-width bar. It is frosted rather than
   filled, so whatever the page is scrolling past shows through it as a blur —
   and the frost thickens as you scroll, which is what makes the movement
   legible instead of the header just sitting there. */
.masthead {
  position: fixed; inset: 0 0 auto; z-index: 100;
  padding-block: clamp(0.5rem, 1.6vw, 0.9rem);
  pointer-events: none;
}
/* The pill floats over the page, so the page has to leave room for it — except
   in the hero, which pulls back up so the photograph runs underneath. The
   hero's own top padding is set with the rest of its padding further down;
   splitting it across two rules is what let padding-block quietly win and put
   the badge under the pill. */
main { padding-top: var(--nav-space); }
.hero { margin-top: calc(var(--nav-space) * -1); }
.masthead__inner { pointer-events: auto; }

.masthead__pill {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 58px;
  padding: 0.4rem 0.5rem 0.4rem 1.15rem;
  border-radius: 999px;

  /* Warm off-white frost — no blue, so the accent stays the only blue thing
     on the page. saturate() is what lets the colour behind read through. */
  background: rgba(244, 243, 238, 0.07);
  border: 1px solid rgba(244, 243, 238, 0.12);
  backdrop-filter: blur(16px) saturate(170%);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.34);
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease),
              box-shadow 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
}
.masthead.is-stuck .masthead__pill {
  background: rgba(244, 243, 238, 0.13);
  border-color: rgba(244, 243, 238, 0.2);
  backdrop-filter: blur(26px) saturate(200%);
  -webkit-backdrop-filter: blur(26px) saturate(200%);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5);
}

.wordmark { display: inline-flex; align-items: baseline; gap: 0.42rem; line-height: 1; }
.wordmark__primary {
  font-size: 1.16rem; font-weight: 700; letter-spacing: -0.03em; color: var(--paint);
}
.wordmark__secondary {
  font-size: 0.64rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--signal);
}
.wordmark--footer .wordmark__primary { font-size: 1.35rem; }

.nav { display: none; }
.nav a {
  font-size: 0.92rem; font-weight: 500; color: var(--paint-dim);
  transition: color 0.2s var(--ease);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--paint); }

.masthead__actions { display: flex; align-items: center; gap: 0.65rem; }
.masthead__actions .btn { display: none; }

.navtoggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 0 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 12px; cursor: pointer;
}
.navtoggle span {
  display: block; height: 1.6px; background: var(--paint); border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}
.navtoggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6.6px) rotate(45deg); }
.navtoggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.navtoggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6.6px) rotate(-45deg); }

/* Mobile drawer: a floating sheet, not a full-width bar — it reads as a menu
   at a glance and keeps the page visible behind it. */
.nav.is-open {
  display: flex; flex-direction: column; gap: 0.15rem;
  position: absolute; left: 0; right: 0; top: calc(100% + 10px);
  background: rgba(20, 20, 20, 0.9);
  border: 1px solid rgba(244, 243, 238, 0.14);
  border-radius: 22px;
  padding: 0.6rem;
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.nav.is-open a {
  padding: 0.82rem 0.9rem; border-radius: var(--radius-sm); color: var(--paint);
}
.nav.is-open a:hover { background: rgba(255, 255, 255, 0.05); }

@media (min-width: 900px) {
  .nav { display: flex; gap: 1.9rem; }
  .navtoggle { display: none; }
  .masthead__actions .btn { display: inline-flex; }
  :root { --nav-space: 94px; }
  .masthead__pill { min-height: 66px; padding-left: 1.6rem; }
  /* The pill stops short of the page edges — it should read as an object on
     the page, not as the page's own top edge. */
  .masthead__inner { max-width: 1080px; }
}

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

.hero {
  position: relative;
  min-height: 88svh;
  display: flex; align-items: flex-end;
  /* The top has to clear the floating pill as well as breathe, so the nav
     space is part of this one declaration rather than a second rule that this
     one would override. */
  padding-block: calc(var(--nav-space) + clamp(2.25rem, 6vw, 4rem)) clamp(2.5rem, 9vw, 7rem);
  overflow: hidden;
}
/* Photo stack. The tint sits on the container, not on each slide, so two
   overlays never stack up mid-crossfade and darken the hero. */
.hero__slides { position: absolute; inset: 0; z-index: 0; }
.hero__slides::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(15,15,15,0.88) 0%, rgba(15,15,15,0.5) 34%, rgba(15,15,15,0.97) 88%),
    radial-gradient(90% 60% at 78% 22%, rgba(56,189,248,0.20), transparent 70%);
}
.hero__media {
  position: absolute; inset: 0;
  opacity: 0; transition: opacity 1.1s var(--ease);
}
.hero__media.is-active { opacity: 1; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
/* Slow push-in while a slide holds — the page reads as alive without anything
   actually moving under the reader's eye. */
.hero__media.is-active img { animation: kenburns 9s linear forwards; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.07); } }

.hero__inner { position: relative; z-index: 1; width: 100%; }

/* Copy stack: every slide in the same grid cell, so the block is as tall as
   the longest one and the buttons below it never jump. */
.hero__copy { display: grid; }
.hero__slide {
  grid-area: 1 / 1;
  opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease), visibility 0.65s;
}
.hero__slide.is-active { opacity: 1; visibility: visible; transform: none; }

.hero__dots { display: flex; gap: 0.5rem; margin-top: 1.6rem; }
.hero__dot {
  width: 26px; height: 4px; padding: 0;
  background: rgba(255, 255, 255, 0.22);
  border: 0; border-radius: 99px; cursor: pointer;
  transition: background 0.3s var(--ease), width 0.3s var(--ease);
}
.hero__dot:hover { background: rgba(255, 255, 255, 0.45); }
.hero__dot.is-active { width: 44px; background: var(--signal); }

.badge {
  display: inline-flex; align-items: center; gap: 0.55rem;
  padding: 0.42rem 0.9rem 0.42rem 0.65rem;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 999px;
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.02em;
  color: #BAE6FD;
  margin-bottom: 1.35rem;
}
.badge__dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--signal);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.18);
}

.hero h1 { max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--signal); }
.hero__sub { margin-top: 1.15rem; max-width: 52ch; }

.hero__slogan {
  margin-top: 1.7rem;
  font-size: clamp(1.05rem, 2.6vw, 1.5rem);
  font-weight: 600; letter-spacing: -0.01em;
  color: var(--paint);
}
.hero__slogan b { color: var(--signal); font-weight: 700; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1.9rem; }
.hero__cta .btn { flex: 1 1 auto; min-width: 168px; }

.hero__proof {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem; margin: 2.5rem 0 0;
  padding-top: 1.5rem; border-top: 1px solid var(--line-strong);
}
.hero__proof dt {
  font-size: clamp(1.4rem, 5.6vw, 1.9rem); font-weight: 600;
  letter-spacing: -0.035em; line-height: 1; color: var(--paint);
}
.hero__proof dd {
  margin: 0.35rem 0 0; font-size: 0.73rem; line-height: 1.4; color: var(--paint-faint);
}

@media (min-width: 900px) {
  .hero { min-height: 92svh; align-items: center; }
  .hero__proof { max-width: 640px; gap: 1.5rem; }
}

/* ------------------------------------------------------------- ticker ---- */

.ticker {
  display: flex; align-items: center;
  border-block: 1px solid var(--line);
  background: var(--asphalt-deep);
  overflow: hidden;
}
.ticker__tag {
  flex: none; z-index: 2; align-self: stretch;
  display: flex; align-items: center;
  padding-inline: var(--gutter) 1rem;
  background: var(--asphalt-deep);
  border-right: 1px solid var(--line);
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--signal); white-space: nowrap;
}
.ticker__track {
  display: flex; width: max-content;
  padding-block: 0.85rem;
  animation: slide 46s linear infinite;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }

.ticker__item {
  display: inline-flex; align-items: center; gap: 0.6rem;
  padding-inline: 1.5rem;
  font-size: 0.76rem; color: var(--paint-faint); white-space: nowrap;
}
.ticker__item b { color: var(--paint-dim); font-weight: 500; }
.ticker__item i { font-style: normal; font-weight: 600; color: var(--guide); }
.ticker__item i.down { color: var(--clay); }

/* -------------------------------------------------------------- about ---- */

.about { display: grid; gap: 2rem; }
.about__media { position: relative; border-radius: var(--radius); overflow: hidden; }
/* height:auto is load-bearing wherever aspect-ratio crops a photo: the width
   and height attributes on <img> are presentational hints for the height
   property, and with both dimensions set the aspect ratio is ignored — the
   photo renders at its full natural height instead of the crop. */
.about__media img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.about__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(165deg, transparent 45%, rgba(15,15,15,0.65));
}

.about__rating {
  position: absolute; z-index: 1; left: 1rem; bottom: 1rem;
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.7rem 1rem;
  background: rgba(10, 10, 10, 0.82);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
}
.about__score { font-size: 1.4rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1; }
.about__stars { color: var(--amber); font-size: 0.78rem; letter-spacing: 0.12em; }
.about__rating span { display: block; margin-top: 0.15rem; font-size: 0.68rem; color: var(--paint-faint); }

.about__copy h2 { margin-top: 0.35rem; }
.about__copy .lede { margin-top: 1.1rem; }
.about__copy .btn { margin-top: 1.6rem; }

@media (min-width: 900px) {
  .about { grid-template-columns: 1fr 1fr; align-items: center; gap: 3.5rem; }
}

/* ------------------------------------------------------------ founder ---- */
/* Two photographs: the portrait carries the section, the wide one sits under
   it offset, so the pair reads as one composition rather than a gallery. */

.founder { display: grid; gap: 2.25rem; }

.founder__media { position: relative; }
.founder__portrait {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line-strong);
}
.founder__portrait img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; object-position: center 22%; }

.founder__wide {
  width: 68%;
  margin: -14% 0 0 auto;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 3px solid var(--asphalt);
  box-shadow: 0 22px 48px rgba(0, 0, 0, 0.6);
}
.founder__wide img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }

.founder__portrait img, .founder__wide img { transition: transform 0.7s var(--ease); }
.founder__media:hover .founder__portrait img,
.founder__media:hover .founder__wide img { transform: scale(1.04); }

.founder__copy h2 { margin-top: 0.35rem; }
.founder__role {
  margin: 0.55rem 0 1.3rem;
  font-size: 0.82rem; font-weight: 600; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--signal);
}
.founder__copy .lede + .lede { margin-top: 1rem; }

.founder__facts { list-style: none; margin: 1.9rem 0 0; padding: 0; display: grid; gap: 0.9rem; }
.founder__facts li {
  display: grid; gap: 0.15rem;
  padding-left: 1rem;
  border-left: 2px solid rgba(56, 189, 248, 0.4);
}
.founder__facts b {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--paint-faint);
}
.founder__facts span { font-size: 0.93rem; color: var(--paint-dim); }

.founder__copy .btn { margin-top: 1.9rem; }

@media (min-width: 900px) {
  .founder { grid-template-columns: 0.95fr 1.05fr; gap: 3.5rem; align-items: center; }
  .founder__facts { grid-template-columns: repeat(2, 1fr); gap: 1.1rem 1.5rem; }
  .founder__facts li:first-child { grid-column: span 2; }
}

/* ------------------------------------------------------------ contact ---- */

.contacts { display: grid; gap: 1rem; margin-top: 2.25rem; }

.contact {
  display: block;
  padding: 1.5rem 1.4rem;
  background: var(--cab);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: transform 0.28s var(--ease), border-color 0.28s var(--ease),
              box-shadow 0.28s var(--ease);
}
.contact:hover {
  transform: translateY(-6px) scale(1.012);
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 22px 46px -26px rgba(0, 0, 0, 0.9);
}
.contact__icon {
  width: 44px; height: 44px; padding: 10px;
  color: var(--signal);
  background: var(--signal-soft);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 13px;
  margin-bottom: 1.1rem;
}
.contact__label {
  display: block;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--paint-faint);
}
.contact__value {
  display: block; margin-top: 0.3rem;
  font-size: 1.02rem; font-weight: 600; color: var(--paint);
  /* An email address must wrap rather than push the card sideways. */
  overflow-wrap: anywhere;
}
.contact:hover .contact__value { color: var(--signal); }
.contact__note {
  display: block; margin-top: 0.6rem;
  font-size: 0.83rem; color: var(--paint-faint);
}

@media (min-width: 760px) { .contacts { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }

@media (prefers-reduced-motion: reduce) { .contact:hover { transform: none; } }

/* ----------------------------------------------------------- services ---- */

.services { display: grid; gap: 1rem; margin-top: 2.25rem; }

.service {
  position: relative;
  padding: 1.6rem 1.4rem 1.4rem;
  background: var(--cab);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.service::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 100% 0%, var(--signal-soft), transparent 62%);
  opacity: 0; transition: opacity 0.3s var(--ease);
}
.service:hover::before { opacity: 1; }
.service > * { position: relative; }

.service__num {
  position: absolute; top: 1.1rem; right: 1.3rem;
  font-size: 1.6rem; font-weight: 700; letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.07);
}
.service__icon {
  width: 46px; height: 46px; padding: 11px;
  color: var(--signal);
  background: var(--signal-soft);
  border: 1px solid rgba(56, 189, 248, 0.22);
  border-radius: 13px;
  margin-bottom: 1.1rem;
}
.service h3 { margin-bottom: 0.6rem; }
.service p { color: var(--paint-dim); font-size: 0.93rem; line-height: 1.68; }

.service__ask {
  display: inline-flex; align-items: center; gap: 0.4rem;
  margin-top: 1.1rem;
  font-size: 0.84rem; font-weight: 600; color: var(--signal);
  transition: gap 0.2s var(--ease);
}
.service__ask::after { content: "→"; }
.service:hover .service__ask { gap: 0.7rem; }
/* The whole card is the tap target — one line of text is not something you hit
   accurately from a dash mount. */
.service__ask::before { content: ""; position: absolute; inset: 0; }

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

/* ------------------------------------------------------------- choose ---- */

.choose { display: grid; gap: 1rem; margin-top: 2.25rem; }
.stat {
  padding: 1.7rem 1.4rem;
  background: linear-gradient(180deg, var(--cab), #121212);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.stat__num {
  font-size: clamp(2.4rem, 9vw, 3.1rem); font-weight: 700;
  letter-spacing: -0.045em; line-height: 1;
  background: linear-gradient(180deg, #FFFFFF, #7DD3FC);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat p { margin-top: 0.85rem; color: var(--paint-dim); font-size: 0.92rem; }
@media (min-width: 760px) { .choose { grid-template-columns: repeat(3, 1fr); gap: 1.25rem; } }

/* ---------------------------------------------------------- assistant ---- */

.assistant {
  display: grid; gap: 2rem;
  padding: clamp(1.5rem, 5vw, 3rem);
  background:
    radial-gradient(90% 120% at 100% 0%, rgba(56,189,248,0.13), transparent 60%),
    var(--cab);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
}
.assistant__media { border-radius: var(--radius); overflow: hidden; }
.assistant__media img { width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; }

.assistant__list { list-style: none; margin: 1.5rem 0 0; padding: 0; display: grid; gap: 0.9rem; }
.assistant__list li {
  display: grid; grid-template-columns: 22px 1fr; gap: 0.75rem; align-items: start;
  font-size: 0.94rem; line-height: 1.6; color: var(--paint-dim);
}
.assistant__list b { color: var(--paint); font-weight: 600; }
.assistant__check {
  width: 22px; height: 22px; margin-top: 3px; padding: 4px;
  color: var(--signal); background: var(--signal-soft); border-radius: 50%;
}
.assistant .btn { margin-top: 1.8rem; }

@media (min-width: 900px) {
  .assistant { grid-template-columns: 1fr 1fr; align-items: center; gap: 3rem; }
}

/* ------------------------------------------------------------- quotes ---- */
/* Swipeable on a phone with CSS scroll-snap; a plain grid once there is room.
   No carousel library, no dots, nothing to break. */

.quotes {
  display: grid; grid-auto-flow: column; grid-auto-columns: 84%;
  gap: 1rem; margin-top: 2.25rem;
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: 0.6rem;
  scrollbar-width: none;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
}
.quotes::-webkit-scrollbar { display: none; }

.quote {
  scroll-snap-align: start;
  display: flex; flex-direction: column;
  padding: 1.6rem 1.4rem;
  background: var(--cab);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.quote__stars { color: var(--amber); font-size: 0.8rem; letter-spacing: 0.14em; }
.quote p {
  margin: 0.9rem 0 1.4rem; flex: 1;
  color: var(--paint-dim); font-size: 0.94rem; line-height: 1.72;
}
.quote__who { display: flex; align-items: center; gap: 0.75rem; }
.quote__who img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.quote__who b { display: block; font-size: 0.9rem; font-weight: 600; }
.quote__who span { display: block; font-size: 0.76rem; color: var(--paint-faint); }

@media (min-width: 760px) {
  .quotes {
    grid-auto-flow: row; grid-template-columns: repeat(3, 1fr);
    overflow: visible; margin-inline: 0; padding-inline: 0; gap: 1.25rem;
  }
}

/* -------------------------------------------------------------- steps ---- */

.steps { display: grid; gap: 1.25rem; margin-top: 2.25rem; }

.step {
  overflow: hidden;
  background: var(--cab);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.step__media { position: relative; }
.step__media img { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; }
.step__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(15,15,15,0.12), rgba(22,22,22,0.96));
}
.step__num {
  position: absolute; z-index: 1; left: 1.15rem; bottom: -1px;
  display: inline-flex; align-items: center; justify-content: center;
  width: 46px; height: 46px;
  background: var(--signal); color: #05202B;
  border-radius: 14px;
  font-size: 1.05rem; font-weight: 700;
  box-shadow: 0 8px 22px rgba(56, 189, 248, 0.3);
}
.step__body { padding: 1.9rem 1.4rem 1.5rem; }
.step__body h3 { margin-bottom: 0.6rem; }
.step__body p { color: var(--paint-dim); font-size: 0.93rem; }
.step__time {
  display: inline-block; margin-top: 1rem;
  padding: 0.3rem 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.72rem; color: var(--paint-faint);
}
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* --------------------------------------------------------- transcript ---- */

.transcript { display: grid; gap: 1rem; margin-top: 2.25rem; }
.exchange {
  padding: 1.35rem 1.25rem;
  background: var(--cab);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.exchange__tag {
  margin-bottom: 1rem;
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--signal);
}
.bubble { display: grid; grid-template-columns: 30px 1fr; gap: 0.7rem; margin-bottom: 0.85rem; }
.bubble:last-child { margin-bottom: 0; }
.bubble__who {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 9px;
  font-size: 0.62rem; font-weight: 700;
}
.bubble--op .bubble__who { background: rgba(255, 255, 255, 0.08); color: var(--paint-dim); }
.bubble--ai .bubble__who { background: var(--signal); color: #05202B; }
.bubble__text {
  margin: 0; padding: 0.75rem 0.95rem;
  border-radius: 4px 14px 14px 14px;
  font-size: 0.92rem; line-height: 1.68;
}
.bubble--op .bubble__text { background: rgba(255, 255, 255, 0.04); color: var(--paint-dim); }
.bubble--ai .bubble__text { background: rgba(56, 189, 248, 0.08); color: var(--paint); }
.bubble__text b { color: var(--signal); font-weight: 600; }

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

/* ---------------------------------------------------------------- faq ---- */

.faq { display: grid; gap: 0.7rem; }
.faq__item {
  background: var(--cab);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.25s var(--ease);
}
.faq__item:has(.faq__q[aria-expanded="true"]) { border-color: rgba(56, 189, 248, 0.35); }

.faq__q {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: 100%; padding: 1.1rem 1.15rem;
  background: none; border: 0; cursor: pointer;
  font-family: var(--body); font-size: 0.97rem; font-weight: 500;
  color: var(--paint); text-align: left; line-height: 1.5;
}
.faq__sign { flex: none; position: relative; width: 18px; height: 18px; }
.faq__sign::before, .faq__sign::after {
  content: ""; position: absolute; inset: 50% 0 auto 0;
  height: 1.8px; background: var(--signal); border-radius: 2px;
  transition: transform 0.28s var(--ease);
}
.faq__sign::after { transform: rotate(90deg); }
.faq__q[aria-expanded="true"] .faq__sign::after { transform: rotate(0); }

.faq__a { max-height: 0; overflow: hidden; transition: max-height 0.35s var(--ease); }
.faq__a p {
  padding: 0 1.15rem 1.25rem;
  color: var(--paint-dim); font-size: 0.92rem; line-height: 1.75;
}

/* ---------------------------------------------------------------- cta ---- */

.cta { position: relative; overflow: hidden; border-top: 1px solid var(--line); }
.cta__media { position: absolute; inset: 0; z-index: 0; }
.cta__media img { width: 100%; height: 100%; object-fit: cover; }
.cta__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(15,15,15,0.9), rgba(15,15,15,0.95)),
    radial-gradient(70% 90% at 50% 0%, rgba(56,189,248,0.22), transparent 65%);
}
.cta__inner { position: relative; z-index: 1; text-align: center; }
.cta__inner h2 { max-width: 18ch; margin-inline: auto; }
.cta__inner .lede { margin: 1.1rem auto 2rem; max-width: 46ch; }

/* ------------------------------------------------------------ compare ---- */

.compare {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--cab);
  overflow-x: auto;
}
.compare table { width: 100%; min-width: 640px; border-collapse: collapse; }
.compare th, .compare td {
  padding: 0.95rem 1.1rem; text-align: left; vertical-align: top;
  font-size: 0.89rem; border-bottom: 1px solid var(--line);
}
.compare thead th {
  font-size: 0.66rem; font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--paint-faint);
  background: rgba(255, 255, 255, 0.02);
}
.compare tbody th { font-weight: 600; color: var(--paint); }
.compare td { color: var(--paint-dim); }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare .is-us { background: rgba(56, 189, 248, 0.07); }
.compare .is-us th, .compare .is-us .price { color: var(--signal); }
.compare .price { font-variant-numeric: tabular-nums; white-space: nowrap; color: var(--paint); }

.tag-yes, .tag-no {
  display: inline-block; padding: 0.15rem 0.6rem;
  border-radius: 999px; font-size: 0.72rem; font-weight: 600;
}
.tag-yes { background: rgba(248, 113, 113, 0.14); color: var(--clay); }
.tag-no  { background: rgba(52, 211, 153, 0.14); color: var(--guide); }

.compare__note {
  margin: 0; padding: 1rem 1.1rem;
  border-top: 1px solid var(--line);
  font-size: 0.8rem; line-height: 1.6; color: var(--paint-faint);
}

/* -------------------------------------------------------------- price ---- */

.price-band {
  display: grid; gap: 2rem;
  padding: clamp(1.5rem, 5vw, 3rem);
  background:
    radial-gradient(80% 120% at 0% 0%, rgba(56,189,248,0.12), transparent 60%),
    var(--cab);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
}
.price-band__list { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: 0.7rem; }
.price-band__list li {
  position: relative; padding-left: 1.6rem;
  font-size: 0.93rem; color: var(--paint-dim);
}
.price-band__list li::before {
  content: ""; position: absolute; left: 0; top: 0.6rem;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--signal); box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15);
}

.price-card {
  padding: 1.9rem 1.5rem; text-align: center;
  background: var(--asphalt-deep);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}
.price-card__amount {
  margin: 0; font-size: clamp(3rem, 13vw, 4.2rem); font-weight: 700;
  letter-spacing: -0.05em; line-height: 1;
}
.price-card__amount sup { font-size: 0.36em; top: -0.9em; font-weight: 600; }
.price-card__unit {
  margin: 0.7rem 0 1.5rem;
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--paint-faint);
}
.price-card .btn { width: 100%; }
.price-card__alt { margin: 1rem 0 0; font-size: 0.79rem; color: var(--paint-faint); }

@media (min-width: 900px) {
  .price-band { grid-template-columns: 1.35fr 1fr; align-items: center; gap: 3rem; }
}

/* -------------------------------------------------------------- prose ---- */

.prose { max-width: 72ch; }
.prose h1 { font-size: clamp(1.9rem, 6vw, 2.9rem); }
.prose h2 { margin: 2.5rem 0 0.85rem; font-size: clamp(1.15rem, 3.4vw, 1.45rem); }
.prose p, .prose li { color: var(--paint-dim); font-size: 0.96rem; line-height: 1.78; }
.prose ul { margin: 0 0 1rem; padding-left: 1.15rem; display: grid; gap: 0.5rem; }
.prose li::marker { color: var(--signal); }
.prose strong { color: var(--paint); font-weight: 600; }
.prose__updated {
  margin: 0.7rem 0 2rem;
  font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--paint-faint);
}

/* ------------------------------------------------------------- footer ---- */

.footer {
  background: var(--asphalt-deep);
  border-top: 1px solid var(--line);
  padding-block: clamp(2.75rem, 7vw, 4.5rem) 1.75rem;
}

.newsletter {
  display: grid; gap: 1.25rem;
  padding: clamp(1.4rem, 4vw, 2.25rem);
  background: var(--cab);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: clamp(2.25rem, 6vw, 3.5rem);
}
.newsletter h2 { font-size: clamp(1.3rem, 4vw, 1.75rem); }
.newsletter p { margin-top: 0.6rem; color: var(--paint-dim); font-size: 0.92rem; }
.newsletter__form { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.newsletter__form input {
  flex: 1 1 200px; min-width: 0;
  padding: 0.9rem 1.15rem;
  background: var(--asphalt-deep);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--paint); font-family: var(--body); font-size: 0.92rem;
}
.newsletter__form input::placeholder { color: var(--paint-faint); }
.newsletter__form input:focus { outline: none; border-color: var(--signal); }
.newsletter__note { margin-top: 0.85rem; font-size: 0.74rem; color: var(--paint-faint); }
@media (min-width: 860px) {
  .newsletter { grid-template-columns: 1fr 1fr; align-items: center; gap: 2.5rem; }
}

.footer__top { display: grid; gap: 2.25rem; }
.footer__pitch { margin-top: 1rem; color: var(--paint-dim); font-size: 0.93rem; max-width: 40ch; }
.footer__owner { margin-top: 0.7rem; font-size: 0.88rem; color: var(--paint); font-weight: 500; }
.footer__meta { margin-top: 0.9rem; font-size: 0.66rem; color: var(--paint-faint); }

.footer__cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.75rem; }
.footer__col { display: flex; flex-direction: column; gap: 0.55rem; }
.footer__head { margin: 0 0 0.35rem; font-size: 0.68rem; color: var(--paint); }
.footer__col a { font-size: 0.89rem; color: var(--paint-dim); transition: color 0.2s var(--ease); }
.footer__col a:hover { color: var(--signal); }

.footer__disclaimer {
  margin: 2.5rem 0 0; padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.76rem; line-height: 1.7; color: var(--paint-faint);
}
.footer__base {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between;
  margin-top: 1.5rem; font-size: 0.7rem; color: var(--paint-faint);
}

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

/* --------------------------------------------------------- wide split ---- */

@media (min-width: 900px) {
  .split { grid-template-columns: 0.85fr 1.15fr; gap: 3.5rem; align-items: start; }
  .split__aside { position: sticky; top: 110px; }
  .headrow { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: end; }
  .headrow .lede { margin-top: 0; }
}

/* --------------------------------------------------------- phone-first ---- */

@media (max-width: 560px) {
  :root { --bay: 3.6rem; }

  /* Full-width buttons: a thumb shouldn't have to aim. */
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn, .cta .btn, .about__copy .btn, .assistant .btn { width: 100%; }
  .hero__cta .btn { padding-block: 1.05rem; }

  .hero__proof dd { font-size: 0.68rem; }
  .footer__col { gap: 0; }
  .footer__col a { padding-block: 0.55rem; }
  .price-card { padding: 1.5rem 1.25rem; }
}

/* The one table on the site scrolls sideways on a phone — say so, rather than
   letting the last column just disappear off the edge. */
@media (max-width: 720px) {
  .compare__note::before {
    content: "Swipe the table sideways to see the rest. ";
    color: var(--signal);
  }
}

/* ------------------------------------------------- floating assistant ---- */
/* Anchored bottom-right on every page and unmoved by scroll — the one control
   that is always where the reader last saw it. */

.chatfab {
  position: fixed; right: clamp(0.9rem, 3vw, 1.75rem); bottom: clamp(0.9rem, 3vw, 1.75rem);
  z-index: 200;
  display: grid; place-items: center;
  width: 60px; height: 60px; padding: 0;
  background: var(--signal); color: #05202B;
  border: 0; border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(56, 189, 248, 0.4);
  transition: transform 0.28s var(--ease), background 0.28s var(--ease),
              box-shadow 0.28s var(--ease);
}
.chatfab:hover { transform: translateY(-4px) scale(1.06); background: var(--paint); }
.chatfab__icon, .chatfab__close {
  grid-area: 1 / 1; width: 28px; height: 28px;
  transition: opacity 0.22s var(--ease), transform 0.28s var(--ease);
}
.chatfab__close { width: 22px; height: 22px; opacity: 0; transform: rotate(-90deg); }
.chatfab.is-open .chatfab__icon { opacity: 0; transform: rotate(90deg); }
.chatfab.is-open .chatfab__close { opacity: 1; transform: none; }

/* The "someone is home" dot, and a ring that pulses until it is first opened. */
.chatfab__ping {
  position: absolute; top: 3px; right: 3px;
  width: 13px; height: 13px;
  background: var(--guide);
  border: 2.5px solid var(--asphalt);
  border-radius: 50%;
}
.chatfab::after {
  content: ""; position: absolute; inset: 0;
  border-radius: 50%; border: 2px solid var(--signal);
  animation: ring 2.6s var(--ease) infinite;
}
.chatfab.is-open::after { display: none; }
@keyframes ring {
  0%       { transform: scale(1);    opacity: 0.7; }
  70%, 100% { transform: scale(1.6); opacity: 0; }
}

.chatpanel {
  position: fixed; z-index: 201;
  right: clamp(0.9rem, 3vw, 1.75rem);
  bottom: calc(clamp(0.9rem, 3vw, 1.75rem) + 74px);
  left: clamp(0.9rem, 3vw, 1.75rem);
  max-width: 420px; margin-left: auto;
  /* A set height, not a maximum: the thread must never open as a two-line
     sliver just because there is little in it yet. */
  height: min(74svh, 620px);
  display: flex; flex-direction: column;
  border-radius: 22px;
  overflow: hidden;
  animation: panel-in 0.3s var(--ease);

  /* The panel runs light against a dark site so it reads as a window opened
     on top of the page rather than another patch of it. chat.css is written
     entirely against these variables, so redefining them here is the whole
     theme — the /chat page keeps the dark set. */
  /* Bright, but not paper-white — a full-white panel on a near-black page is
     a glare source at night, which is when this actually gets used. The ground
     is a cool porcelain and the cards on it are the white. */
  --asphalt:      #F6F8FB;
  --asphalt-deep: #E9EEF5;
  --cab:          #FFFFFF;
  --cab-raised:   #DFE6EF;
  /* Deeper than the site blue: the bright one glares on white, and it has to
     carry white button text at 4.5:1. */
  --signal:       #0369A1;
  --signal-soft:  rgba(3, 105, 161, 0.1);
  --guide:        #047857;
  --clay:         #DC2626;
  --paint:        #10151C;
  --paint-dim:    #4B5563;
  --paint-faint:  #5C6875;   /* clears 4.5:1 even on the darkest of the three grounds */
  --line:         rgba(16, 21, 28, 0.1);
  --line-strong:  rgba(16, 21, 28, 0.16);

  background: var(--asphalt);
  /* Set explicitly: anything inside that just inherits its colour would
     otherwise pick up the page's white text and vanish against this ground. */
  color: var(--paint);
  border: 1px solid rgba(16, 21, 28, 0.12);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.75), 0 0 0 1px rgba(255, 255, 255, 0.08);
}

/* On white, the accent carries white text rather than the near-black the site
   buttons use, and hovering must not turn the button into a black slab. */
.chatpanel .btn--signal {
  color: #FFFFFF;
  box-shadow: 0 6px 18px rgba(3, 105, 161, 0.28);
}
.chatpanel .btn--signal:hover {
  background: #02506F;
  color: #FFFFFF;
  box-shadow: 0 8px 22px rgba(3, 105, 161, 0.38);
}
.chatpanel[hidden] { display: none; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.chatpanel__head {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--asphalt-deep);
}
.chatpanel__avatar {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--signal); color: #FFFFFF;
  font-size: 0.72rem; font-weight: 700;
}
.chatpanel__id { flex: 1; min-width: 0; line-height: 1.3; }
.chatpanel__id b { display: block; font-size: 0.92rem; font-weight: 600; }
.chatpanel__id span {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.72rem; color: var(--paint-faint);
}
.chatpanel__id i { width: 6px; height: 6px; border-radius: 50%; background: var(--guide); }
.chatpanel__x {
  display: grid; place-items: center;
  width: 34px; height: 34px; padding: 0;
  background: var(--cab-raised);
  border: 1px solid var(--line);
  border-radius: 10px; color: var(--paint-dim); cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.chatpanel__x svg { width: 16px; height: 16px; }
.chatpanel__x:hover { background: #DDE3EA; color: var(--paint); }

/* The thread stays the scrolling element, because chat.js scrolls it by hand
   after every message. */
.chatpanel__body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.chatpanel .thread {
  flex: 1; min-height: 0; padding: 1rem;
  /* A flick that reaches the end of the thread must stop there instead of
     handing the rest of the gesture to the page behind the panel. */
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.chatpanel .msg { margin-bottom: 1.1rem; }

/* Starter cards. They are the whole opening screen, so they go once the
   conversation has actually started. */
/* chat.css loads after this file and styles the rail's plain .chips, so the
   panel's rules need the extra class to win. */
.chatpanel .chips--panel { display: grid; gap: 0.6rem; padding: 0; margin-top: 1.25rem; }
.chatpanel__body:has(.thread .msg:not(.msg--intro)) .chips--panel { display: none; }

.chatpanel .chips--panel .chip {
  display: block; width: 100%; text-align: left;
  padding: 0.8rem 0.95rem;
  /* White on the porcelain ground, so the cards lift off it. */
  background: var(--cab);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--paint); cursor: pointer;
  font-family: var(--body); letter-spacing: 0;
  text-transform: none;
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease),
              background 0.22s var(--ease);
}
.chatpanel .chips--panel .chip b { display: block; font-size: 0.88rem; font-weight: 600; }
.chatpanel .chips--panel .chip span {
  display: block; margin-top: 0.2rem;
  font-size: 0.78rem; line-height: 1.5; color: var(--paint-faint);
}
.chatpanel .chips--panel .chip:hover {
  transform: translateY(-2px);
  background: var(--cab-raised);
  border-color: rgba(56, 189, 248, 0.42);
}

.chatpanel .composer { padding: 0.85rem 1rem 1rem; border-top: 1px solid var(--line); }
.chatpanel .composer__status {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.chatpanel__reset {
  flex: none; padding: 0;
  background: none; border: 0; cursor: pointer;
  font-family: var(--body); font-size: 0.72rem; color: var(--paint-faint);
  text-decoration: underline; text-underline-offset: 3px;
}
.chatpanel__reset:hover { color: var(--signal); }

.langs--panel { display: flex; gap: 0.35rem; margin-top: 0.7rem; }

/* Caret on the answer while it is still being written out. */
.msg__body.is-typing > :last-child::after {
  content: "";
  display: inline-block;
  width: 2px; height: 1em;
  margin-left: 2px;
  vertical-align: -0.15em;
  background: var(--signal);
  animation: caret 1s steps(2, start) infinite;
}
@keyframes caret { to { visibility: hidden; } }

@media (min-width: 480px) { .chatpanel { left: auto; width: 400px; } }

/* Behind the panel on a phone the page must not scroll away underneath it. */
@media (max-width: 560px) {
  body.chat-open { overflow: hidden; }
  .chatpanel { height: calc(100svh - 8.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal-ready .reveal { opacity: 1; transform: none; filter: none; }
}
