/* ==========================================================================
   Tobicars — homepage
   Tokens inherited from DESIGN.md (mobile, 2026-08-13). Not a new world:
   this file extends the committed navy/orange/ivory identity to a first
   web/Persuade surface, it does not invent one.
   ========================================================================== */

@font-face {
  font-family: "Manrope";
  src: url("../fonts/Manrope-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/Manrope-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/Manrope-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/Manrope-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Manrope";
  src: url("../fonts/Manrope-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

:root {
  --navy: #06295f;
  --navy-deep: #041b42;
  --orange: #f06423;
  --ivory: #f7f5ef;
  --ink: #102033;
  --service: #16866b;
  --amber: #d88a16;
  --incident: #c5443d;
  --muted: #5a6980; /* darkened from DESIGN.md's #66738A: 4.39:1 on ivory body text fell just under WCAG AA's 4.5:1 floor */
  --faint: #9aa6b4;
  --hairline: #e1e0d8;
  --surface-alt: #efeee6;

  --on-navy: #f7f5ef;
  --on-navy-muted: #a9bade;
  --on-navy-hairline: rgba(247, 245, 239, 0.14);

  --radius-control: 12px;
  --radius-card: 14px;
  --radius-hero: 20px;

  --measure: 68ch;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  font-family: "Manrope", system-ui, sans-serif;
  background: var(--ivory);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.006em;
}

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

a {
  color: inherit;
}

h1,
h2,
h3 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
}

p {
  margin: 0;
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--orange);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-control);
  font-weight: 700;
  z-index: 100;
  transition: top 0.2s var(--ease-out);
}
.skip-link:focus {
  top: 16px;
}

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

.wrap {
  width: min(1180px, 100% - 48px);
  margin-inline: auto;
}

@media (max-width: 640px) {
  .wrap {
    width: min(1180px, 100% - 32px);
  }
}

/* ---------- shared button vocabulary ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 14px 22px;
  border-radius: var(--radius-control);
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s var(--ease-out), background-color 0.18s var(--ease-out),
    border-color 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out);
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--orange);
  /* white on this orange is 3.2:1, under WCAG AA's 4.5:1 for this text size */
  color: var(--navy-deep);
}
.btn-primary:hover {
  background: #d9531c;
  box-shadow: 0 10px 24px rgba(240, 100, 35, 0.28);
}
.btn-ghost-on-navy {
  background: transparent;
  border-color: var(--on-navy-hairline);
  color: var(--on-navy);
}
.btn-ghost-on-navy:hover {
  border-color: rgba(247, 245, 239, 0.4);
  background: rgba(247, 245, 239, 0.06);
}
.btn-line {
  background: transparent;
  color: var(--navy);
  padding: 10px 4px;
  border-radius: 0;
  border-bottom: 1px solid var(--hairline);
}
.btn-line:hover {
  border-color: var(--navy);
}
.btn-line-on-navy {
  background: transparent;
  color: var(--on-navy);
  padding: 10px 4px;
  border-radius: 0;
  border-bottom: 1px solid var(--on-navy-hairline);
}
.btn-line-on-navy:hover {
  border-color: rgba(247, 245, 239, 0.5);
}

/* ---------- live beacon (StatusBeacon, extended to web) ---------- */

.beacon {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--on-navy-muted);
}
.beacon .dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
}
.beacon .dot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: var(--orange);
  animation: beacon-pulse 1.4s var(--ease-out) infinite;
}
@keyframes beacon-pulse {
  0% {
    opacity: 0.35;
    transform: scale(0.6);
  }
  70% {
    opacity: 0;
    transform: scale(1.6);
  }
  100% {
    opacity: 0;
    transform: scale(1.6);
  }
}

/* ---------- top navigation ---------- */

.topnav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--navy-deep);
  border-bottom: 1px solid var(--on-navy-hairline);
}
.topnav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--on-navy);
}
.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}
.brand strong {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* ---------- hero (navy, night-network ground) ---------- */

.hero {
  background: linear-gradient(180deg, var(--navy-deep) 0%, var(--navy) 62%, var(--navy) 100%);
  color: var(--on-navy);
  padding: 88px 0 0;
  position: relative;
  overflow: clip;
}

/* Below 1040px the network sits stacked full-width under the hero copy (existing
   flow). At 1040px+ there's room to spare beside a 46ch text column on a 1180px
   wrap — left uncorrected that reads as an empty right half. Bring the network
   up beside the text instead: same "one origin, two stops" block, unchanged
   internally, just placed where the empty space was. */
@media (min-width: 1220px) {
  .hero .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    column-gap: 56px;
    padding-block: 40px 64px;
  }
  .network {
    margin-top: 0;
    padding-bottom: 0;
  }
}

.hero-copy {
  max-width: 46ch;
}
.hero-copy h1 {
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  color: #fff;
}
.hero-copy p {
  margin-top: 20px;
  font-size: 1.09rem;
  line-height: 1.55;
  color: var(--on-navy-muted);
  max-width: 52ch;
}
.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
}

/* ---------- the fork: one origin, two stops ---------- */

.network {
  margin-top: 74px;
  padding-bottom: 96px;
}

.network-trunk {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.origin-node {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px 9px 14px;
  border-radius: 999px;
  background: rgba(247, 245, 239, 0.08);
  border: 1px solid var(--on-navy-hairline);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: -0.01em;
}
.origin-node .core {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(240, 100, 35, 0.22);
}

.fork-svg {
  display: block;
  width: min(560px, 92%);
  height: auto;
  margin-top: 4px;
}
.fork-svg path {
  fill: none;
  stroke: var(--on-navy-hairline);
  stroke-width: 2;
  stroke-linecap: round;
}
.fork-svg path.active {
  stroke: var(--orange);
  stroke-width: 2.5;
  stroke-dasharray: 6 8;
  animation: dash-flow 2.6s linear infinite;
}
@keyframes dash-flow {
  to {
    stroke-dashoffset: -140;
  }
}

.stops {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: -1px;
}
@media (max-width: 760px) {
  .stops {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin-inline: auto;
  }
}

.stop {
  background: rgba(247, 245, 239, 0.05);
  border: 1px solid var(--on-navy-hairline);
  border-radius: var(--radius-hero);
  padding: 30px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color 0.2s var(--ease-out), background-color 0.2s var(--ease-out),
    transform 0.2s var(--ease-out);
}
.stop:hover {
  border-color: rgba(247, 245, 239, 0.32);
  background: rgba(247, 245, 239, 0.08);
  transform: translateY(-2px);
}
.stop-marker {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stop-marker .ring {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid var(--orange);
  background: var(--navy);
  flex-shrink: 0;
}
.stop-marker span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--on-navy-muted);
  text-transform: none;
}
.stop h3 {
  font-size: 1.32rem;
  color: #fff;
}
.stop p {
  color: var(--on-navy-muted);
  line-height: 1.55;
  font-size: 0.97rem;
}
.stop .roles {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 2px;
}
.stop .roles span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--on-navy-muted);
  border: 1px solid var(--on-navy-hairline);
  border-radius: 999px;
  padding: 5px 11px;
}
.stop-actions {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

/* ---------- proof section (ivory, daylight ground) ---------- */

.proof {
  padding: 92px 0;
}
.proof-head {
  max-width: var(--measure);
}
.proof-head h2 {
  font-size: clamp(1.7rem, 2.6vw, 2.15rem);
  color: var(--navy);
}
.proof-head p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.03rem;
  line-height: 1.6;
  max-width: 62ch;
}

.continuity {
  margin-top: 52px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  padding: 34px clamp(20px, 4vw, 44px);
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-hero);
}
@media (max-width: 760px) {
  .continuity {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .continuity .arrow {
    transform: rotate(90deg);
  }
}

.route-state {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.route-state .caption {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}
.route-line {
  display: flex;
  align-items: center;
  gap: 0;
}
.route-line .seg {
  height: 2px;
  width: 34px;
  background: var(--hairline);
}
.route-line .seg.on {
  background: var(--orange);
}
.route-line .node {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--navy);
  flex-shrink: 0;
}
.route-line .node.start {
  background: var(--ink);
}
.route-line .node.end {
  background: var(--orange);
}
.route-line .node.broken {
  background: #fff;
  border: 2.5px solid var(--incident);
  width: 8px;
  height: 8px;
}
.route-state .status {
  font-size: 0.86rem;
  font-weight: 700;
}
.route-state .status.incident {
  color: var(--incident);
}
.route-state .status.resolved {
  color: var(--service);
}

.continuity .arrow {
  color: var(--faint);
  font-size: 1.4rem;
  line-height: 1;
}

/* ---------- roles strip ---------- */

.roles-strip {
  margin-top: 64px;
  border-top: 1px solid var(--hairline);
  padding-top: 34px;
}
.roles-strip .caption {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 22px;
}
.roles-list {
  display: flex;
  flex-wrap: wrap;
  row-gap: 18px;
  column-gap: 34px;
}
.roles-list li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
}
.roles-list svg {
  width: 18px;
  height: 18px;
  color: var(--navy);
  flex-shrink: 0;
}

/* ---------- footer (navy, bookend) ---------- */

.site-footer {
  background: var(--navy-deep);
  color: var(--on-navy);
  padding: 56px 0 34px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--on-navy-hairline);
}
.footer-brand {
  max-width: 340px;
}
.footer-brand .brand {
  margin-bottom: 14px;
}
.footer-brand p {
  color: var(--on-navy-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}
.footer-links {
  display: flex;
  gap: 56px;
  flex-wrap: wrap;
}
.footer-col h4 {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--on-navy-muted);
  margin: 0 0 14px;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  text-decoration: none;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--on-navy);
}
.footer-col a:hover {
  color: var(--orange);
}
.footer-bottom {
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--faint);
}

/* ---------- reveal-on-scroll (one authored motion beat) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.reveal.in {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}
