/* ===================================================================
   Movewise - Home-to-Home Moving & Verified Interior Design
   CS491 Senior Design Project, Bilkent University
   Design System & Main Stylesheet
   Palette: drafting paper · ink · construction orange
   =================================================================== */

:root {
  /* Paper and ink */
  --paper: #F4F0E6;         /* page */
  --sheet: #FBF9F4;         /* cards: a lighter sheet laid on the page */
  --paper-deep: #EBE5D7;    /* sunken wells, alternate sections */
  --ink: #1C1B18;
  --ink-2: #4A463F;
  --ink-3: #6B665C;
  --rule: #DAD3C4;          /* hairlines */
  --rule-strong: #B5AC99;   /* hover and emphasis lines */

  /* Construction orange: the route, the action, the control in your hand */
  --accent: #D9531E;        /* lines, nodes, slider (3.5:1 on paper) */
  --accent-strong: #C24A17; /* filled buttons, white text 4.9:1 */
  --accent-ink: #B03F0F;    /* orange text on paper, 5.2:1 */
  --accent-tint: #FBE8DC;

  /* Status: only for verdicts and maturity */
  --verified: #2E6B4E;
  --verified-tint: #E1EDE5;
  --warn: #C98A12;
  --warn-ink: #7A5200;
  --warn-tint: #F7EACB;
  --alert: #B42318;
  --alert-tint: #F9E1DD;

  /* RGB triplets for alpha blends */
  --ink-rgb: 28, 27, 24;
  --accent-rgb: 217, 83, 30;

  /* Semantic surfaces */
  --bg-deep: var(--paper);
  --bg-card: var(--sheet);
  --border-subtle: var(--rule);
  --border-strong: var(--rule-strong);

  --text-primary: var(--ink);
  --text-secondary: var(--ink-2);
  --text-muted: var(--ink-3);

  /* Typography */
  /* drafting lettering: a sturdy grotesk for titles, IBM Plex for notes and dimensions */
  --font-heading: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;

  /* Shadows: soft, warm, offset downward like paper on a desk */
  --shadow-md: 0 12px 28px -14px rgba(var(--ink-rgb), 0.22), 0 2px 4px rgba(var(--ink-rgb), 0.04);
  --shadow-lg: 0 24px 50px -24px rgba(var(--ink-rgb), 0.28), 0 2px 6px rgba(var(--ink-rgb), 0.05);

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --transition-fast: 0.2s ease;
  --transition-normal: 0.45s var(--ease-out);
}

/* Line icons: one stroke weight everywhere */
.icon {
  display: inline-block;
  flex-shrink: 0;
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

/* Base & Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  font-size: 16px;
  color-scheme: light;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font: inherit;
}

::selection {
  background: var(--accent-tint);
  color: var(--ink);
}

::placeholder { color: var(--ink-3); }

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: var(--rule-strong);
  border-radius: 10px;
  border: 2px solid var(--bg-deep);
}

:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Scroll Progress Bar */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 200;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}

/* Ambient Background Mesh */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(var(--ink-rgb), 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(var(--ink-rgb), 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black 0, black 900px, transparent 1400px);
  -webkit-mask-image: linear-gradient(to bottom, black 0, black 900px, transparent 1400px);
}

/* Cursor companion: tiny truck canvas (fine pointers only, created by JS) */
.cursor-truck {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

/* Layout Container */
.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* Header & Navbar */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(244, 240, 230, 0.72);
  border-bottom: 1px solid transparent;
  transition: background 0.5s var(--ease-out), border-color 0.5s ease, box-shadow 0.5s ease;
}

.site-header.scrolled {
  background: rgba(244, 240, 230, 0.94);
  border-bottom-color: var(--rule);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
  transition: height 0.5s var(--ease-out);
}

.site-header.scrolled .navbar { height: 4rem; }

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 36px;
  height: 36px;
  transition: transform 0.6s var(--ease-out);
}

.brand:hover .brand-icon {
  transform: rotate(-12deg) scale(1.08);
}

.brand-tag {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: transparent;
  border: 1px solid var(--rule-strong);
  color: var(--ink-2);
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-left: 0.25rem;
}

.nav-links {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 1.15rem;
}

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.3s ease;
  position: relative;
  padding: 0.35rem 0;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.5s var(--ease-out);
  border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.is-active::after {
  transform: scaleX(1);
  transform-origin: 0 50%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Language Switcher */
.lang-toggle {
  display: flex;
  align-items: center;
  background: var(--sheet);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  padding: 0.2rem;
  cursor: pointer;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.3rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.35s var(--ease-out), color 0.25s ease, box-shadow 0.35s ease;
}

.lang-btn:hover { color: var(--text-primary); }

.lang-btn.active {
  background: var(--ink);
  color: var(--paper);
}

.mobile-toggle-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.nav-pdf { display: none; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid transparent;
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out),
              background 0.3s ease, border-color 0.3s ease, color 0.3s ease,
              translate 0.6s var(--ease-out);
}

.btn svg { transition: translate 0.45s var(--ease-out); }
.btn:hover svg { translate: 3px 0; }

.btn-sm {
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
}

.btn-primary {
  background: var(--accent-strong);
  color: #ffffff;
  border-color: var(--accent-strong);
  box-shadow: 0 8px 18px -10px rgba(var(--accent-rgb), 0.7);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--accent-ink);
  border-color: var(--accent-ink);
  box-shadow: 0 14px 24px -12px rgba(var(--accent-rgb), 0.75);
}

.btn-secondary {
  background: var(--sheet);
  border: 1px solid var(--rule-strong);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: #FFFFFF;
  border-color: var(--ink);
  transform: translateY(-2px);
}

.btn[disabled] { transform: none !important; }

/* Typography & Section Headers */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.025em;
  line-height: 1.25;
}

.section-alt {
  background: rgba(235, 229, 215, 0.55);
}

.section {
  padding: 7rem 0;
  position: relative;
}

/* hairline divider between sections */
.section + .section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: min(760px, 80%);
  height: 1px;
  transform: translateX(-50%);
  background: var(--rule);
}

.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 4rem auto;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.2rem;
}

.badge-primary {
  background: var(--sheet);
  border: 1px solid var(--rule-strong);
  color: var(--ink-2);
}

.section-title {
  font-size: clamp(2rem, 3.6vw, 2.75rem);
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Hero Section */
.hero-section {
  padding: 5.5rem 0 6rem 0;
  position: relative;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.hero-content {
  text-align: center;
  max-width: 900px;
  margin: 0 auto 3.5rem auto;
  position: relative;
}

.hero-title {
  font-size: clamp(2.3rem, 5.4vw, 4.2rem);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.hero-title .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding: 0.1em 0.03em 0.16em;
  margin: -0.1em -0.03em -0.16em;
}

.hero-title .word-inner {
  display: inline-block;
  transform: translateY(115%) rotate(5deg);
  transform-origin: 0 100%;
  transition: transform 1.15s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 65ms + 150ms);
}

.hero-title.words-in .word-inner { transform: none; }

.hero-title .accent {
  color: var(--accent-ink);
}

.hero-subtitle {
  font-size: 1.22rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 64ch;
  margin: 0 auto 2.5rem auto;
}

.hero-cta {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Hero intro choreography */
.js .intro {
  opacity: 0;
  translate: 0 26px;
  filter: blur(var(--b, 8px));
  transition: opacity 1s var(--ease-out) var(--d, 0s),
              translate 1.2s var(--ease-out) var(--d, 0s),
              filter 1s var(--ease-out) var(--d, 0s);
}

.js.is-loaded .intro {
  opacity: 1;
  translate: 0 0;
  filter: blur(0);
}

/* Hero Visual Showcase */
.hero-showcase {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow-lg);
  background: var(--sheet);
  margin-top: 1rem;
}

/* the drawing sheet: graph paper inside a ruled frame */
.hero-image-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 21 / 9;
  overflow: hidden;
  background:
    linear-gradient(to right, rgba(var(--ink-rgb), 0.045) 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(to bottom, rgba(var(--ink-rgb), 0.045) 1px, transparent 1px) 0 0 / 22px 22px,
    var(--sheet);
}

.hero-caption {
  position: absolute;
  z-index: 2;
  right: 1rem;
  bottom: 1rem;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--sheet);
  border: 1px solid var(--rule-strong);
  color: var(--ink-2);
  font-size: 0.78rem;
  font-weight: 500;
  pointer-events: none;
}

/* Problem vs Solution Split Section */
.problem-solution-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: stretch;
}

.contrast-card {
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color 0.35s ease;
}

.contrast-card:hover { transform: translateY(-4px); }

.contrast-card.problem {
  background: var(--sheet);
  border: 1px solid var(--border-subtle);
}

.contrast-card.solution {
  background: var(--sheet);
  border: 1px solid var(--rule-strong);
  box-shadow: var(--shadow-md);
}

.contrast-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contrast-title {
  font-size: 1.4rem;
}

.contrast-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}

.contrast-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.contrast-bullet {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.problem .contrast-bullet { color: var(--alert); }
.solution .contrast-bullet { color: var(--accent-ink); }

/* The 4-Step Pipeline Section */
.pipeline-track {
  position: relative;
  height: 2px;
  margin: 0 0 2.75rem;
  background: transparent;
}

.pipeline-track::before,
.track-fill {
  content: '';
  position: absolute;
  top: 0;
  left: 12.5%;
  right: 12.5%;
  height: 2px;
  border-radius: 2px;
}

.pipeline-track::before { background: transparent; }

/* the route is drawn dashed: only stage 1 exists today */
.track-fill {
  background: repeating-linear-gradient(90deg, var(--rule-strong) 0 8px, transparent 8px 14px);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 1.8s var(--ease-in-out) 0.2s;
}

.track-node {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--rule-strong);
  transition: border-color 0.5s ease, background 0.5s ease, box-shadow 0.5s ease, transform 0.6s var(--ease-out);
  transform: scale(0.6);
}

.track-node:nth-of-type(1) { left: 12.5%; }
.track-node:nth-of-type(2) { left: 37.5%; }
.track-node:nth-of-type(3) { left: 62.5%; }
.track-node:nth-of-type(4) { left: 87.5%; }

.pipeline-track.is-visible .track-fill { transform: scaleX(1); }

.pipeline-track.is-visible .track-node {
  transform: scale(1);
  border-color: var(--ink-3);
}

/* stage 1 is a working prototype */
.pipeline-track.is-visible .track-node:nth-of-type(1) {
  border-color: var(--verified);
  background: var(--verified);
  box-shadow: 0 0 0 4px var(--verified-tint);
}

.pipeline-track.is-visible .track-node:nth-of-type(1) { transition-delay: 0.2s; }
.pipeline-track.is-visible .track-node:nth-of-type(2) { transition-delay: 0.75s; }
.pipeline-track.is-visible .track-node:nth-of-type(3) { transition-delay: 1.3s; }
.pipeline-track.is-visible .track-node:nth-of-type(4) {
  transition-delay: 1.85s;
  border-color: var(--accent);
}

.track-pulse { display: none; }

.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  position: relative;
}

.pipeline-step {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  position: relative;
  transition: transform var(--transition-normal), border-color 0.35s ease, box-shadow var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.pipeline-step:hover {
  transform: translateY(-8px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.step-icon {
  width: 30px;
  height: 30px;
  color: var(--ink);
  margin-bottom: 1.25rem;
  transition: translate 0.6s var(--ease-out);
}

.pipeline-step:hover .step-icon {
  translate: 0 -3px;
}

.step-title {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.step-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

/* stage status, same dot vocabulary as the deliverables route */
.step-status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.step-status.is-proto { color: var(--verified); }
.step-status.is-proto .status-dot { background: currentColor; }
.step-status.is-planned { color: var(--text-muted); }

/* Interactive Simulator Section */
.simulator-container {
  background: var(--bg-card);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.sim-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.sim-controls {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sim-note {
  background: var(--paper);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
}

.sim-note-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-2);
  margin-bottom: 0.35rem;
}

.sim-note-text {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.control-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-secondary);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.control-val {
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-weight: 700;
}

.furniture-select-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

/* sample dimensions + pass thresholds of the selected item */
.sim-item-spec {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.sim-item-spec span { color: var(--text-muted); font-family: var(--font-body); }

.furn-btn {
  background: var(--paper);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.4s ease, transform 0.45s var(--ease-out);
}

.furn-icon {
  width: 22px;
  height: 22px;
  color: var(--ink-2);
  transition: color 0.3s ease;
}

.furn-btn.active .furn-icon { color: var(--accent-ink); }

.furn-btn:hover {
  background: #FFFFFF;
  color: var(--text-primary);
  border-color: var(--rule-strong);
  transform: translateY(-2px);
}

.furn-btn:active { transform: scale(0.97); }

.furn-btn.active {
  background: var(--accent-tint);
  border-color: var(--accent);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.slider-input {
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--paper-deep);
  box-shadow: inset 0 0 0 1px var(--rule);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

/* keyboard focus: ring around the track, thumb grows like on hover */
.slider-input:focus-visible {
  outline: 2px solid var(--accent-ink);
  outline-offset: 8px;
}

.slider-input:focus-visible::-webkit-slider-thumb {
  transform: scale(1.25);
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.18), 0 2px 4px rgba(var(--ink-rgb), 0.25);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s ease;
}

.slider-input::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: none;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.18), 0 2px 4px rgba(var(--ink-rgb), 0.25);
}

.slider-input::-webkit-slider-thumb:hover,
.slider-input:active::-webkit-slider-thumb {
  transform: scale(1.25);
  box-shadow: 0 0 0 7px rgba(var(--accent-rgb), 0.18), 0 2px 6px rgba(var(--ink-rgb), 0.25);
}

/* Simulation Canvas & Results Panel */
.sim-preview {
  /* not a card: the drawing and verdict sit straight on the simulator sheet */
  background: none;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sim-canvas-box {
  width: 100%;
  height: 220px;
  background:
    linear-gradient(to right, rgba(var(--ink-rgb), 0.06) 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(to bottom, rgba(var(--ink-rgb), 0.06) 1px, transparent 1px) 0 0 / 20px 20px,
    var(--sheet);
  border-radius: var(--radius-sm);
  position: relative;
  overflow: hidden;
  border: 1px dashed var(--rule-strong);
  display: flex;
  align-items: center;
  justify-content: center;
}

#sim-furn {
  transition: fill 0.4s ease, stroke 0.4s ease;
}

.sim-move { transform: translateY(var(--stop, 0px)); }

/* the approach plays once per item/verdict change, then the item rests:
   leading edge in the doorway when it fits, nose against the wall when it doesn't */
.sim-move.is-pass {
  animation: simPass 1.6s var(--ease-out) both;
}

.sim-move.is-fail {
  animation: simFail 2s var(--ease-out) both;
}

/* tipped through: approach, stop at the wall, tip (JS narrows the footprint), go */
.sim-move.is-tip {
  animation: simTip 2.6s var(--ease-out) both;
}

.sim-move.is-tip-fail {
  animation: simTipFail 2.6s var(--ease-out) both;
}

@keyframes simTip {
  0% { transform: translateY(60px); opacity: 0; }
  15% { opacity: 1; }
  40% { transform: translateY(var(--pre, 0px)); }
  62% { transform: translateY(var(--pre, 0px)); }
  100% { transform: translateY(var(--stop, 0px)); opacity: 1; }
}

@keyframes simTipFail {
  0% { transform: translateY(60px); opacity: 0; }
  15% { opacity: 1; }
  40% { transform: translateY(var(--pre, 0px)); }
  62% { transform: translateY(var(--pre, 0px)); }
  72% { transform: translateY(var(--stop, 0px)); }
  78% { transform: translate(-4px, var(--stop, 0px)); }
  84% { transform: translate(4px, var(--stop, 0px)); }
  100% { transform: translate(0, var(--stop, 0px)); opacity: 1; }
}

@keyframes simPass {
  0% { transform: translateY(60px); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(var(--stop, 0px)); opacity: 1; }
}

@keyframes simFail {
  0% { transform: translateY(60px); opacity: 0; }
  20% { opacity: 1; }
  62% { transform: translateY(var(--stop, 0px)); }
  70% { transform: translate(-5px, var(--stop, 0px)); }
  78% { transform: translate(5px, var(--stop, 0px)); }
  86% { transform: translate(-3px, var(--stop, 0px)); }
  100% { transform: translate(0, var(--stop, 0px)); opacity: 1; }
}

.sim-dim-line { animation: dashMove 1.2s linear infinite; }

@keyframes dashMove { to { stroke-dashoffset: -12; } }

.sim-status-banner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
  padding: 0.85rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.45s ease, border-color 0.45s ease, color 0.45s ease;
}

.sim-status-icon {
  order: -1;
  display: inline-flex;
  width: 1.25rem;
  height: 1.25rem;
}

.sim-status-icon .icon { width: 100%; height: 100%; }

.status-pass {
  background: var(--verified-tint);
  border: 1px solid rgba(46, 107, 78, 0.35);
  color: var(--verified);
}

.status-warn {
  background: var(--warn-tint);
  border: 1px solid rgba(201, 138, 18, 0.45);
  color: var(--warn-ink);
}

.status-fail {
  background: var(--alert-tint);
  border: 1px solid rgba(180, 35, 24, 0.35);
  color: var(--alert);
}

.sim-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.sim-stat-box {
  background: var(--sheet);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  text-align: center;
}

.sim-stat-val {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  transition: color 0.4s ease;
}

.sim-stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Comparison Table Section */
.comparison-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  min-width: 720px;
}

.comparison-table th,
.comparison-table td {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.35s ease, color 0.35s ease;
}

.comparison-table th {
  background: var(--paper-deep);
  color: var(--ink-2);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.comparison-table td {
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.comparison-table tbody tr:hover td {
  background: var(--paper);
  color: var(--text-primary);
}

.table-highlight {
  background: var(--accent-tint) !important;
  color: var(--ink) !important;
  border-left: 1px solid var(--accent);
  border-right: 1px solid var(--accent);
}

.table-highlight-head {
  background: var(--accent-strong) !important;
  color: #FFFFFF !important;
  font-weight: 800 !important;
  border-left: 1px solid var(--accent-strong);
  border-right: 1px solid var(--accent-strong);
}

.check-icon {
  width: 1.05rem;
  height: 1.05rem;
  color: var(--accent-ink);
  vertical-align: -0.2em;
  margin-right: 0.35rem;
}

/* Target Users Grid */
.target-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.target-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  transition: transform var(--transition-normal), border-color 0.35s ease, box-shadow var(--transition-normal);
  display: flex;
  flex-direction: column;
}

.target-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.target-icon {
  width: 30px;
  height: 30px;
  color: var(--ink-2);
  margin-bottom: 1.25rem;
  transition: color 0.4s ease, translate 0.6s var(--ease-out);
}

.target-card:hover .target-icon {
  color: var(--accent-ink);
  translate: 0 -3px;
}

.target-title {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
}

.target-problem {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.target-value {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Team & CS491 Section */
.team-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
  margin-bottom: 3rem;
}

.team-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.75rem 1.25rem;
  text-align: center;
  transition: transform var(--transition-normal), border-color 0.35s ease, box-shadow var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.team-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.team-avatar {
  position: relative;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  margin: 0 auto 1rem auto;
  background: var(--paper-deep);
  border: 1px solid var(--rule-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink-2);
  transition: transform 0.6s var(--ease-out), color 0.4s ease, border-color 0.4s ease;
}

.team-card:hover .team-avatar {
  transform: scale(1.06);
  color: var(--ink);
  border-color: var(--accent);
}

.team-name {
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.team-email {
  font-size: 0.75rem;
  color: var(--ink-2);
  text-decoration: none;
  overflow-wrap: anywhere;
  display: inline-block;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat;
  transition: color 0.3s ease, background-size 0.5s var(--ease-out);
}

.team-email:hover {
  color: var(--accent-ink);
  background-size: 100% 1px;
}

/* Documents & Deliverables Section */
.docs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.doc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal), border-color 0.35s ease, box-shadow var(--transition-normal);
}

.doc-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}


/* Deliverables as a route: the same line-and-node language as the pipeline.
   Solid ink out of a finished stop, dashed after the one in progress. */
.docs-route {
  list-style: none;
  position: relative;
  margin: 0;
  padding: 2.5rem 0 0;
}

/* each stop draws the segment to the next stop: solid ink out of the
   finished one, dashed out of the one in progress */
.route-seg {
  position: absolute;
  top: -2rem;
  left: 2rem;
  right: -3.5rem;      /* card gap (1.5rem) + next node offset (2rem) */
  height: 2px;
  margin-top: -1px;
  border-radius: 2px;
}

.doc-card.is-done .route-seg {
  background: var(--ink-2);
}

.doc-card.is-progress .route-seg {
  background: repeating-linear-gradient(90deg, var(--rule-strong) 0 6px, transparent 6px 12px);
}

.doc-card:hover .route-seg { translate: 0 6px; }

.doc-card { position: relative; }

.route-node {
  content: '';
  position: absolute;
  top: -2.5rem;
  left: 2rem;
  width: 14px;
  height: 14px;
  margin: 0.5rem 0 0 -7px;
  translate: 0 -6px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--rule-strong);
}

/* the card lifts 6px on hover; its node stays on the line */
.doc-card:hover .route-node { translate: 0 0; }

.doc-card.is-done .route-node {
  background: var(--verified);
  border-color: var(--verified);
  box-shadow: 0 0 0 4px var(--verified-tint);
}

.doc-card.is-progress .route-node {
  border-color: var(--accent);
  background: linear-gradient(90deg, var(--accent) 50%, var(--paper) 50%);
}

.doc-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.doc-status.ready {
  color: var(--verified);
}

.doc-status.upcoming {
  color: var(--text-muted);
}

.doc-status.progress {
  color: var(--accent-ink);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
}

.doc-status.ready .status-dot {
  background: currentColor;
}

.doc-title {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}

.doc-card .btn {
  align-self: flex-start;
  margin-top: auto;
}

.doc-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border-subtle);
  background: var(--paper-deep);
  padding: 4.5rem 0 2rem 0;
  position: relative;
  z-index: 10;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  max-width: 400px;
  margin-top: 0.75rem;
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.88rem;
  display: inline-block;
  transition: color 0.3s ease, translate 0.45s var(--ease-out);
}

.footer-links a:hover {
  color: var(--accent-ink);
  translate: 4px 0;
}

.footer-bottom {
  border-top: 1px solid var(--rule-strong);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ===================================================================
   Motion layer: spotlight cards & scroll reveal
   (kept last so these transitions win over component defaults)
   =================================================================== */

/* cursor-following edge highlight in construction orange */
.spotlight {
  position: relative;
  isolation: isolate;
}

.spotlight::before,
.spotlight::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.spotlight::before { display: none; }

.spotlight::after {
  padding: 1px;
  background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--accent-rgb), 0.85), rgba(var(--accent-rgb), 0.2) 45%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}

.spotlight:hover::before,
.spotlight:hover::after {
  opacity: 1;
}

/* scroll reveal: uses the individual `translate` property so it
   composes with hover `transform`s instead of fighting them */
.js .reveal {
  opacity: 0;
  translate: 0 32px;
  filter: blur(6px);
  transition:
    opacity 0.9s var(--ease-out) var(--rd, 0s),
    translate 1.1s var(--ease-out) var(--rd, 0s),
    filter 0.9s var(--ease-out) var(--rd, 0s),
    transform 0.45s var(--ease-out),
    border-color 0.35s ease,
    box-shadow 0.45s var(--ease-out),
    background-color 0.35s ease,
    color 0.35s ease;
}

.js .reveal.is-visible {
  opacity: 1;
  translate: 0 0;
  filter: blur(0);
}

.js .reveal-left { translate: -36px 0; }
.js .reveal-right { translate: 36px 0; }
.js .reveal-left.is-visible,
.js .reveal-right.is-visible { translate: 0 0; }

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .pipeline-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .pipeline-track {
    display: none;
  }
  .target-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* compact nav PDF button, then collapse the menu before links get cramped */
@media (max-width: 1240px) {
  #nav-proposal-btn span { display: none; }
  #nav-proposal-btn { padding: 0.5rem 0.6rem; }
}

@media (max-width: 1180px) {
  .nav-links {
    display: none;
  }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-deep); /* solid: the translucent version let page text bleed through */
    border-bottom: 1px solid var(--border-subtle);
    padding: 1.5rem;
    gap: 1rem;
    animation: menuDrop 0.45s var(--ease-out);
  }
  .mobile-toggle-btn {
    display: inline-flex;
  }
}

@media (max-width: 768px) {

  /* simulator: result sits between the picker and the slider,
     so dragging the slider keeps the verdict on screen */
  .sim-grid { display: flex; flex-direction: column; align-items: stretch; gap: 1.25rem; }
  .sim-controls { display: contents; }
  .sim-preview { display: contents; }
  .sim-group-furn { order: 1; }
  .sim-canvas-box { order: 2; height: 170px; }
  .sim-route { order: 2; }
  .sim-status-banner { order: 3; }
  .sim-group-door { order: 4; }
  .sim-route { order: 2; }
  .sim-note-text { order: 5; }
  .furn-btn { padding: 0.7rem 0.8rem; font-size: 0.84rem; }
  .sim-stat-box { padding: 0.6rem 0.4rem; }
  .sim-stat-val { font-size: 0.95rem; white-space: nowrap; }


  /* deliverables route turns vertical */
  .docs-route { padding-top: 0; padding-left: 1.75rem; }
  .route-seg {
    top: 1.5rem;
    bottom: -3rem;     /* card gap (1.5rem) + next node offset (1.5rem) */
    left: calc(-1.75rem + 0.4rem);
    right: auto;
    width: 2px;
    height: auto;
    margin: 0;
  }
  .doc-card.is-progress .route-seg {
    background: repeating-linear-gradient(180deg, var(--rule-strong) 0 6px, transparent 6px 12px);
  }
  .route-node { top: 1.5rem; left: -1.75rem; margin: 0 0 0 calc(0.4rem - 6px); translate: 0 -6px; }

  /* comparison: one card per competitor, Movewise difference first */
  .comparison-wrap { overflow: visible; background: none; border: none; box-shadow: none; }
  .comparison-table { min-width: 0; }
  .comparison-table thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
  }
  .comparison-table, .comparison-table tbody, .comparison-table tr, .comparison-table td { display: block; }
  .comparison-table tr {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1rem;
  }
  .comparison-table td { padding: 0.85rem 1.25rem; border-bottom: 1px solid var(--border-subtle); }
  .comparison-table td:last-child { border-bottom: none; }
  .comparison-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
  }
  .comparison-table td:first-child { order: -2; padding-top: 1.1rem; }
  .comparison-table td:first-child::before { display: none; }
  .comparison-table td:first-child strong { font-family: var(--font-heading); font-size: 1.1rem; color: var(--text-primary); }
  .comparison-table td.table-highlight { border-left: none; border-right: none; }
  .comparison-table td.table-highlight::before { color: var(--accent-ink); }
  .comparison-table tbody tr:hover td { background: none; }
  .comparison-table tbody tr:hover td.table-highlight { background: var(--accent-tint) !important; }
  .section {
    padding: 5rem 0;
  }
  .section-title {
    font-size: 2rem;
  }
  .hero-image-wrap { aspect-ratio: 4 / 3; }
  .problem-solution-grid,
  .sim-grid,
  .footer-top {
    grid-template-columns: 1fr;
  }
  .docs-grid {
    grid-template-columns: 1fr;
  }
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  #nav-proposal-btn {
    display: none;
  }
  .nav-pdf { display: list-item; }
  .js .reveal-left,
  .js .reveal-right {
    translate: 0 32px;
  }
}

@keyframes menuDrop {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 480px) {
  .team-grid {
    grid-template-columns: 1fr;
  }
  .pipeline-grid {
    grid-template-columns: 1fr;
  }
  .contrast-card {
    padding: 1.75rem;
  }
  .simulator-container {
    padding: 1.25rem;
  }
}

/* Respect users who prefer less motion */
@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;
    transition-delay: 0s !important;
  }
  .js .intro,
  .js .reveal {
    opacity: 1;
    translate: none;
    scale: none;
    filter: none;
  }
  .hero-title .word-inner { transform: none; }
  .sim-move.is-pass,
  .sim-move.is-fail,
  .sim-move.is-tip,
  .sim-move.is-tip-fail { animation: none; transform: translateY(var(--stop, 0px)); }
}

/* ===================================================================
   Round 4: route-drawn pipeline, stakeholder list, polish
   =================================================================== */

/* pipeline nodes sit exactly over each column's centre (4 columns, 1.5rem gaps) */
.pipeline-track::before,
.track-fill { left: calc((100% - 4.5rem) / 8); right: calc((100% - 4.5rem) / 8); }
.track-node:nth-of-type(1) { left: calc((100% - 4.5rem) / 8); }
.track-node:nth-of-type(2) { left: calc((100% - 4.5rem) * 3 / 8 + 1.5rem); }
.track-node:nth-of-type(3) { left: calc((100% - 4.5rem) * 5 / 8 + 3rem); }
.track-node:nth-of-type(4) { left: calc((100% - 4.5rem) * 7 / 8 + 4.5rem); }
.track-node { z-index: 1; }

/* built stages are inked; planned ones are drawn dashed, the drafting convention for future work */
.pipeline-step {
  background: transparent;
  border: 1px dashed var(--rule-strong);
}
.pipeline-step .step-icon { color: var(--ink-3); }
.pipeline-step.is-built {
  background: var(--sheet);
  border: 1px solid var(--ink);
  box-shadow: var(--shadow-md);
}
.pipeline-step.is-built .step-icon { color: var(--ink); }
.pipeline-step:hover { transform: translateY(-3px); }

/* a leader line from each stage's node down to its sheet */
.pipeline-grid > .pipeline-step::before {
  content: '';
  display: block;
  position: absolute;
  inset: auto;
  top: calc(-2.75rem - 1px);
  left: 50%;
  width: 0;
  height: 2.75rem;
  border-left: 1px dashed var(--rule-strong);
  background: none;
  opacity: 1;
  z-index: 0;
}
.pipeline-grid > .pipeline-step.is-built::before { border-left: 2px solid var(--verified); border-left-style: solid; }
.pipeline-grid > .pipeline-step:hover::before { height: calc(2.75rem + 3px); top: calc(-2.75rem - 4px); }

/* who it's for: a ruled schedule, not a second card grid */
.target-grid {
  display: block;
  border-top: 1px solid var(--ink);
}
.target-card {
  display: grid;
  grid-template-columns: 2rem minmax(10rem, 13rem) minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 0 1.5rem;
  align-items: baseline;
  background: none;
  border: none;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  padding: 1.25rem 0;
}
.target-card:hover { transform: none; box-shadow: none; border-color: var(--rule); }
.target-icon { width: 22px; height: 22px; margin: 0.15rem 0 0; align-self: start; }
.target-title { font-size: 1.1rem; margin: 0; }
.target-problem { margin: 0; padding: 0; border: none; }
.target-value { margin: 0; }

/* team: no role line until roles are decided */
.team-name { margin-bottom: 0.4rem; }

.footer-top { grid-template-columns: 2fr 1fr; }
.footer-col h3 { font-size: 1rem; margin-bottom: 1.25rem; color: var(--text-primary); }

/* the route's last word */
.route-end {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  max-width: 64ch;
  margin: 3rem auto 0;
  color: var(--ink-2);
  font-size: 0.95rem;
}
.route-end strong { color: var(--ink); }
.route-end a { color: var(--accent-ink); text-underline-offset: 3px; }
.route-end-node {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: linear-gradient(90deg, var(--accent) 50%, var(--paper) 50%);
  translate: 0 1px;
}

/* skip link */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 300;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* nav focus ring gets air around the text */
.nav-link:focus-visible { outline-offset: 6px; }

/* slider: same 6px drawn track, but a 32px tall hit area and a larger thumb */
.slider-input {
  height: 32px;
  background: linear-gradient(var(--paper-deep), var(--paper-deep)) center / 100% 6px no-repeat;
  box-shadow: none;
  border-radius: 0;
}
.slider-input::-webkit-slider-thumb { width: 24px; height: 24px; }
.slider-input::-moz-range-thumb { width: 24px; height: 24px; }
.slider-input::-moz-range-track { height: 6px; background: var(--paper-deep); border-radius: 3px; }

/* no lonely last words */
p, li { text-wrap: pretty; }

@media (max-width: 1024px) {
  .target-card { grid-template-columns: 2rem minmax(0, 1fr) minmax(0, 1.4fr); }
  .target-problem { grid-column: 2; }
  .target-value { grid-column: 3; grid-row: 1 / span 2; }
}

@media (max-width: 768px) {
  .target-card { grid-template-columns: 1.75rem minmax(0, 1fr); gap: 0.35rem 0.85rem; }
  .target-problem, .target-value { grid-column: 2; grid-row: auto; }
  .footer-top { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .team-card { padding: 1.25rem 0.75rem; }
  .team-avatar { width: 52px; height: 52px; font-size: 1.15rem; }
}

@media (max-width: 768px) {
  .sim-stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #sim-tightest-val { white-space: normal; }
}

/* Round 5 polish */

/* focus and selection must not look alike on the furniture tiles */
.furn-btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* alternate sections already change tone; the floating hairline said nothing */
.section + .section::before { display: none; }

.sim-stat-label { text-wrap: balance; }

/* Round 6: closing block, touch targets */
.route-close {
  max-width: 64ch;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--ink);
}
.route-close .route-end { margin: 0; max-width: none; }
.route-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 1rem;
}
.route-contact-note { color: var(--ink-2); font-size: 0.92rem; }
.route-address {
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--ink);
  user-select: all;
  overflow-wrap: anywhere;
}

/* every tap target at least 44px tall */
.btn-sm { min-height: 44px; }
.team-email { padding: 0.75rem 0; }
.footer-links a { padding: 0.7rem 0; }
.footer-links { gap: 0; }
.brand { min-height: 44px; }

.slider-input { height: 44px; }

/* Round 7: the simulator shows its route; rhythm; mobile menu */
.sim-route {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0;
  padding: 0;
  position: relative;
}
.sim-route::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 6px;
  right: 50%;
  height: 0;
  border-top: 1.5px dashed var(--rule-strong);
}
.sim-stop {
  position: relative;
  display: grid;
  grid-template-columns: 12px 1fr;
  column-gap: 0.6rem;
  row-gap: 0.1rem;
  align-items: center;
  padding-right: 0.5rem;
}
.sim-stop-node {
  grid-row: 1 / span 2;
  align-self: start;
  width: 12px;
  height: 12px;
  margin-top: 1px;
  border-radius: 50%;
  border: 2px solid var(--rule-strong);
  background: var(--paper);
  position: relative;
  z-index: 1;
}
.sim-stop-name { font-weight: 600; font-size: 0.88rem; color: var(--ink); }
.sim-stop-detail { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sim-stop.is-pass .sim-stop-node { border-color: var(--verified); background: var(--verified); }
.sim-stop.is-tight .sim-stop-node { border-color: var(--warn); background: var(--warn); }
.sim-stop.is-fail .sim-stop-node { border-color: var(--alert); background: var(--paper); }
.sim-stop.is-tightest .sim-stop-node { box-shadow: 0 0 0 4px var(--paper-deep); }
.sim-stop.is-tightest.is-pass .sim-stop-detail { color: var(--verified); }
.sim-stop.is-tightest.is-tight .sim-stop-detail { color: var(--warn-ink); }
.sim-stop.is-tightest.is-fail .sim-stop-detail { color: var(--alert); }

.sim-preview .sim-note-text { color: var(--ink-2); font-size: 0.92rem; line-height: 1.6; max-width: 60ch; }

/* where the fixed landing sits on the door-width scale */
.sim-group-door { position: relative; padding-bottom: 1.1rem; }
.slider-mark {
  position: absolute;
  left: calc(12px + (100% - 24px) * var(--f));
  bottom: 0;
  translate: -50% 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--ink-3);
  white-space: nowrap;
}
.slider-mark::before {
  content: '';
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  height: 10px;
  border-left: 1px solid var(--ink-3);
}

/* section leads keep a readable measure */
.section-desc { max-width: 62ch; margin-inline: auto; }
.section-head.is-left { text-align: left; margin-left: 0; }
.section-head.is-left .section-desc { margin-inline: 0; }

/* mobile menu: full-height tap targets, page locked behind it */
@media (max-width: 1180px) {
  .nav-links.open { gap: 0; padding: 0.5rem 1.5rem 1rem; }
  .nav-links.open .nav-link { display: block; padding: 0.7rem 0; }
  .nav-links.open .nav-link::after { bottom: 0.45rem; }
  .menu-open, .menu-open body { overflow: hidden; }
}

/* mobile comparison: a wrapped Movewise difference stays indented past its arrow */
@media (max-width: 768px) {
  .comparison-table td.table-highlight { padding-left: 2.6rem; position: relative; }
  .comparison-table td.table-highlight .check-icon { position: absolute; left: 1.25rem; top: 2.15rem; margin: 0; }
  .hero-section { padding-top: 3rem; }
  .sim-route { grid-template-columns: 1fr 1fr; }
}

/* route strip: nodes on the line, names and numbers underneath, so the dashed line never runs through text */
.sim-stop { grid-template-columns: 1fr; row-gap: 0.15rem; padding-top: 0; }
.sim-stop-node { grid-row: auto; margin: 0 0 0.45rem; }
.sim-route::before { left: 6px; right: calc(50% - 6px); }
.sim-stop { align-items: start; align-content: start; }
