/* ============================================
   LAMA CONSULTANTS — Stylesheet
   ============================================ */

/* --- Tokens --- */
:root {
  --bg: #ebeef2;
  --bg-warm: #e2e6ec;
  --ink: #0f172a;
  --ink-light: #475569;
  --accent: #1e3a8a;
  --accent-light: #3b62c7;
  --grid-line: rgba(15, 23, 42, 0.06);
  --border: rgba(15, 23, 42, 0.14);
  --serif: 'Playfair Display', 'Georgia', serif;
  --mono: 'DM Mono', 'Courier New', monospace;
  --sans: 'Inter', -apple-system, sans-serif;
  --page-pad: clamp(20px, 5vw, 80px);
  --section-gap: clamp(80px, 12vh, 160px);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Paper texture via CSS noise (subtle) */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
  mix-blend-mode: multiply;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- Page Loader --- */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--ink);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s ease 0.3s, visibility 0s linear 0.9s;
}

.page-loader.done {
  opacity: 0;
  visibility: hidden;
}

.loader-text {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  color: var(--bg);
  animation: loaderPulse 1s ease infinite alternate;
}

@keyframes loaderPulse {
  0% { opacity: 0.4; }
  100% { opacity: 1; }
}

/* --- Grid Lines (Background) --- */
.grid-lines {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 var(--page-pad);
  pointer-events: none;
  z-index: 0;
}

.grid-lines span {
  width: 1px;
  height: 100%;
  background: var(--grid-line);
}

/* --- Utility --- */
.mono-sm {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px var(--page-pad);
  z-index: 100;
  background: linear-gradient(to bottom, var(--bg) 60%, transparent);
  transition: background 0.3s;
}

.nav-logo {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 8px;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-cta {
  margin-left: 12px;
  padding: 6px 14px !important;
  border: 1.5px solid var(--ink);
  transition: background 0.2s, color 0.2s !important;
}

.nav-cta:hover {
  background: var(--ink);
  color: var(--bg) !important;
}

.nav-sep {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-light);
}

.nav-menu-btn {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-menu-btn span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-menu-btn.active span:first-child {
  transform: rotate(45deg) translate(2.3px, 2.3px);
}

.nav-menu-btn.active span:last-child {
  transform: rotate(-45deg) translate(2.3px, -2.3px);
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 32px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
}

.mobile-menu.active {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu a {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  transition: color 0.2s;
}

.mobile-menu a:hover {
  color: var(--accent);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px var(--page-pad) 40px;
  z-index: 1;
}

.hero-content {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.hero-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-headline {
  font-family: var(--serif);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 850px;
}

.hero-headline .line {
  display: block;
  overflow: hidden;
}

/* "We help companies" — same serif, medium size, regular weight */
.hero-headline .line-sub {
  font-size: clamp(1.8rem, 4vw, 3.6rem);
  font-weight: 400;
  color: var(--ink-light);
  line-height: 1.15;
}

/* "deploy robots" — larger, bold, full ink */
.hero-headline .line-mid {
  font-size: clamp(2.6rem, 5.5vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  color: var(--ink);
}

/* "FASTER & BETTER." — same size as deploy robots, black weight, accent blue */
.hero-headline .line-hero {
  font-size: clamp(2.6rem, 5.5vw, 5rem);
  font-weight: 900;
  line-height: 1.05;
  color: var(--accent);
}

.hero-headline .line-inner {
  display: block;
  transform: translateY(110%);
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero-headline.revealed .line-inner {
  transform: translateY(0);
}

.hero-headline .line:nth-child(2) .line-inner { transition-delay: 0.12s; }
.hero-headline .line:nth-child(3) .line-inner { transition-delay: 0.24s; }

.hero-cta {
  display: inline-block;
  margin-top: 28px;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 32px;
  background: var(--accent);
  color: var(--bg);
  transition: background 0.2s;
}

.hero-cta:hover {
  background: var(--accent-light);
}

.hero-blueprint {
  flex-shrink: 0;
  width: clamp(280px, 35vw, 480px);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 1s ease 0.5s, transform 1s ease 0.5s;
}

.hero-blueprint.revealed {
  opacity: 1;
  transform: translateY(0);
}

.blueprint-svg {
  width: 100%;
  height: auto;
  color: var(--ink);
}

/* Robot arm idle animation */
.arm-shoulder {
  animation: shoulderSway 8s ease-in-out infinite;
}

.arm-elbow {
  animation: elbowSway 6s ease-in-out infinite 0.5s;
}

.arm-wrist {
  animation: wristSway 5s ease-in-out infinite 1s;
}

.arm-effector {
  animation: effectorSway 4s ease-in-out infinite 0.3s;
}

.joint-ring {
  animation: jointPulse 3s ease-in-out infinite;
}

@keyframes shoulderSway {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(1.5deg); }
}

@keyframes elbowSway {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-2.5deg); }
}

@keyframes wristSway {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(3deg); }
}

@keyframes effectorSway {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-2deg); }
}

@keyframes jointPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Specs table SVG */
.specs-svg {
  width: 100%;
  height: auto;
  color: var(--ink);
  margin-top: 16px;
  opacity: 0;
  animation: specsFadeIn 1s ease 1.5s forwards;
}

@keyframes specsFadeIn {
  to { opacity: 1; }
}

.status-dot-inner {
  animation: statusBlink 2s ease-in-out infinite;
}

@keyframes statusBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

@media (prefers-reduced-motion: reduce) {
  .arm-shoulder, .arm-elbow, .arm-wrist, .arm-effector, .joint-ring, .status-dot-inner {
    animation: none;
  }
  .specs-svg { opacity: 1; animation: none; }
}

.hero-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: auto;
  padding-top: 60px;
}

.hero-meta-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-meta-center {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--ink-light);
}

/* --- Warehouse Mapping --- */
.warehouse {
  padding: var(--section-gap) var(--page-pad);
  position: relative;
  z-index: 1;
}

.warehouse-header {
  margin-bottom: 32px;
}

.wh-questions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
}

.wh-item {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 24px 20px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  transition: background 0.2s;
}

.wh-item:nth-child(2n) {
  border-right: none;
}

.wh-item:hover {
  background: rgba(15, 23, 42, 0.02);
}

.wh-num {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--accent);
  flex-shrink: 0;
  letter-spacing: 0.04em;
}

.wh-text {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--ink);
  line-height: 1.5;
}

/* Warehouse map below questions */
.warehouse-map {
  margin-bottom: 40px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

.map-svg {
  width: 100%;
  height: auto;
  color: var(--ink);
}

/* Zone pulse animations */
.zone-green-1, .zone-green-2, .zone-green-3 {
  animation: zonePulseGreen 4s ease-in-out infinite;
}
.zone-green-2 { animation-delay: 1s; }
.zone-green-3 { animation-delay: 2s; }

.zone-red-1, .zone-red-2 {
  animation: zonePulseRed 3s ease-in-out infinite;
}
.zone-red-2 { animation-delay: 1.5s; }

@keyframes zonePulseGreen {
  0%, 100% { opacity: 0.08; }
  50% { opacity: 0.15; }
}
@keyframes zonePulseRed {
  0%, 100% { opacity: 0.06; }
  50% { opacity: 0.14; }
}

/* Robot dots */
.robot-dot-1 { animation: robotMove1 6s ease-in-out infinite; }
.robot-dot-2 { animation: robotMove2 5s ease-in-out infinite 1s; }
.robot-dot-3 { animation: robotMove3 7s ease-in-out infinite 0.5s; }

@keyframes robotMove1 {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(0, 40px); }
  50% { transform: translate(60px, 60px); }
  75% { transform: translate(60px, 20px); }
}
@keyframes robotMove2 {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-20px, 30px); }
}
@keyframes robotMove3 {
  0%, 100% { transform: translate(0, 0); }
  30% { transform: translate(30px, -20px); }
  60% { transform: translate(-20px, 20px); }
}

/* Scan sweep */
.scan-line { animation: scanSweep 8s linear infinite; }
@keyframes scanSweep {
  0% { transform: translateX(0); opacity: 0; }
  5% { opacity: 0.2; }
  95% { opacity: 0.2; }
  100% { transform: translateX(580px); opacity: 0; }
}

/* --- Ticker --- */
.ticker {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
  overflow: hidden;
  z-index: 1;
  position: relative;
}

.ticker-track {
  display: flex;
  gap: 40px;
  white-space: nowrap;
  animation: ticker 25s linear infinite;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-light);
}

@keyframes ticker {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Work / Case Studies --- */
.work {
  padding: var(--section-gap) var(--page-pad);
  position: relative;
  z-index: 1;
}

.section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 48px;
}

.case-study {
  border-bottom: 1px solid var(--border);
  padding: 48px 0;
}

.case-study-header {
  margin-bottom: 16px;
}

.case-num {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--ink-light);
}

.case-title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 32px;
  max-width: 700px;
}

.case-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.case-details {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.case-detail-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--grid-line);
}

.case-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--ink-light);
  flex-shrink: 0;
  min-width: 120px;
}

.case-value {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 500;
}

.case-value.highlight {
  color: var(--accent);
  font-weight: 500;
}

.case-description {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--ink-light);
  max-width: 500px;
}

/* --- Process --- */
.process {
  padding: var(--section-gap) var(--page-pad);
  position: relative;
  z-index: 1;
}

.section-headline {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 16px;
}

.process-subtext {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--ink-light);
  max-width: 520px;
  margin-bottom: 56px;
}

.section-headline .line {
  display: block;
  overflow: hidden;
}

.section-headline .line-inner {
  display: block;
  transform: translateY(110%);
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-headline.revealed .line-inner {
  transform: translateY(0);
}

.process-flow {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 20px;
  -webkit-overflow-scrolling: touch;
}

.process-step {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}

.step-box {
  width: 140px;
  height: 140px;
  border: 1.5px solid var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--bg);
  transition: transform 0.3s, box-shadow 0.3s;
}

.step-box:hover {
  transform: translateY(-4px);
  box-shadow: 4px 4px 0 var(--ink);
}

.step-box-active {
  border-color: var(--accent);
  border-width: 3px;
}

.step-num {
  font-family: var(--serif);
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1;
}

.step-box-active .step-num {
  color: var(--accent);
}

.step-name {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.step-desc {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--ink-light);
  max-width: 160px;
  margin-top: 16px;
}

.step-annotation {
  font-family: var(--mono);
  font-size: 0.65rem;
  color: var(--ink-light);
  font-style: italic;
  margin-top: 10px;
}

.step-live-tag {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-top: 6px;
  font-weight: 500;
}

.step-box-cta {
  border-color: var(--accent);
  border-width: 2px;
  border-style: dashed;
}

.step-box-cta .step-num {
  color: var(--accent);
}

.step-cta {
  display: inline-block;
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 16px;
  background: var(--accent);
  color: var(--bg);
  transition: background 0.2s;
}

.step-cta:hover {
  background: var(--accent-light);
}

.process-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding-top: 60px;
  flex-shrink: 0;
  color: var(--ink-light);
  min-width: 50px;
}

.arrow-note {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--ink-light);
  font-style: italic;
}

/* --- Stats --- */
.stats {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.stats-label {
  padding: 16px var(--page-pad);
  border-bottom: 1px solid var(--border);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat {
  padding: 40px 24px;
  text-align: center;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.stat:last-child {
  border-right: none;
}

.stat-number {
  display: block;
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 900;
  line-height: 1;
  margin-bottom: 10px;
}

.stat-label {
  font-family: var(--sans);
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--ink-light);
  max-width: 200px;
}

.stat-source {
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.06em;
  color: var(--border);
  margin-top: 12px;
  text-transform: uppercase;
}

/* --- Field Notes --- */
.notes {
  padding: var(--section-gap) var(--page-pad);
  position: relative;
  z-index: 1;
}

.notes-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 48px;
}

.notes-title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 700;
  font-style: italic;
  line-height: 1.1;
}

.notes-subtitle {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--ink-light);
  margin-top: 8px;
}

.notes-table {
  border-top: 1px solid var(--border);
}

.note-row {
  display: grid;
  grid-template-columns: 120px 1fr 200px;
  align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s, padding-left 0.3s;
}

.note-row:hover {
  padding-left: 12px;
  background: rgba(26, 26, 26, 0.02);
}

.note-row-featured {
  background: transparent;
  border-left: 3px solid var(--accent);
  padding-left: 12px;
}

.note-row-featured .note-date {
  color: var(--accent);
}

.note-row-featured .note-title {
  background: var(--accent);
  color: white;
  padding: 2px 8px;
  display: inline;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  font-weight: 700;
}

.note-date {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--ink-light);
}

.note-title {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 400;
}

.note-tags {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  color: var(--ink-light);
  text-align: right;
}

/* --- Contact --- */
.contact {
  padding: var(--section-gap) var(--page-pad);
  position: relative;
  z-index: 1;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact-content {
  max-width: 600px;
}

.contact-headline {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1.05;
  margin-bottom: 24px;
}

.contact-text {
  font-size: 1rem;
  line-height: 1.7;
  color: var(--ink-light);
  margin-bottom: 40px;
  max-width: 480px;
}

.contact-email {
  font-family: var(--mono);
  font-size: 1rem;
  letter-spacing: 0.02em;
  padding: 16px 0;
  border-bottom: 2px solid var(--ink);
  display: inline-block;
  transition: color 0.2s, border-color 0.2s;
}

.contact-email:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.contact-actions {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.contact-calendly {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 10px 20px;
  border: 1.5px solid var(--ink);
  display: inline-block;
  transition: background 0.2s, color 0.2s;
}

.contact-calendly:hover {
  background: var(--ink);
  color: var(--bg);
}

.contact-details {
  display: flex;
  gap: 60px;
  margin-top: 60px;
}

.contact-detail {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-detail span:last-child {
  font-size: 0.92rem;
}

/* Calendly widget card */
.contact-widget {
  display: flex;
  justify-content: flex-end;
}

.widget-frame {
  border: 1.5px solid var(--ink);
  max-width: 340px;
  width: 100%;
}

.widget-header {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
}

.widget-body {
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.widget-icon {
  color: var(--ink-light);
}

.widget-text {
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink-light);
}

.widget-slots {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--ink-light);
}

.widget-slot-sep {
  color: var(--border);
}

.widget-btn {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 12px 28px;
  background: var(--ink);
  color: var(--bg);
  border: none;
  display: inline-block;
  transition: background 0.2s;
  cursor: pointer;
}

.widget-btn:hover {
  background: var(--accent);
  color: white;
}

/* --- Footer --- */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px var(--page-pad);
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.footer-right {
  display: flex;
  gap: 24px;
}

.footer-right a:hover {
  color: var(--accent);
}

/* ============================================
   Animations / Reveals
   ============================================ */

.reveal-fade {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-fade.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-up.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.case-study.reveal-up:nth-child(3) { transition-delay: 0.1s; }
.case-study.reveal-up:nth-child(4) { transition-delay: 0.2s; }
.case-study.reveal-up:nth-child(5) { transition-delay: 0.3s; }

.note-row.reveal-up:nth-child(2) { transition-delay: 0.05s; }
.note-row.reveal-up:nth-child(3) { transition-delay: 0.1s; }
.note-row.reveal-up:nth-child(4) { transition-delay: 0.15s; }
.note-row.reveal-up:nth-child(5) { transition-delay: 0.2s; }
.note-row.reveal-up:nth-child(6) { transition-delay: 0.25s; }
.note-row.reveal-up:nth-child(7) { transition-delay: 0.3s; }
.note-row.reveal-up:nth-child(8) { transition-delay: 0.35s; }

.stat:nth-child(2) .stat-number { transition-delay: 0.1s; }
.stat:nth-child(3) .stat-number { transition-delay: 0.2s; }
.stat:nth-child(4) .stat-number { transition-delay: 0.3s; }

/* ============================================
   Responsive
   ============================================ */

/* --- Tablet landscape / small laptop (≤1024px) --- */
@media (max-width: 1024px) {
  .hero-blueprint {
    width: clamp(220px, 30vw, 340px);
  }

  .warehouse-map {
    max-width: 100%;
  }
}

/* --- Tablet portrait (≤900px) --- */
@media (max-width: 900px) {
  .hero-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-blueprint {
    width: 70%;
    align-self: flex-end;
  }

  .wh-questions-grid {
    grid-template-columns: 1fr;
  }

  .wh-item {
    border-right: none;
  }

  .case-body {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .process-flow {
    flex-wrap: nowrap;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat:nth-child(2) {
    border-right: none;
  }

  .stat:nth-child(1),
  .stat:nth-child(2) {
    border-bottom: 1px solid var(--border);
  }

  .note-row {
    grid-template-columns: 100px 1fr;
    gap: 8px;
  }

  .note-tags {
    display: none;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .contact-widget {
    justify-content: flex-start;
  }

  .widget-frame {
    max-width: 100%;
  }

  .contact-details {
    flex-direction: column;
    gap: 32px;
  }

  .section-headline {
    margin-bottom: 12px;
  }
}

/* --- Large phone / small tablet (≤640px) --- */
@media (max-width: 640px) {
  :root {
    --page-pad: 16px;
  }

  .nav-links {
    display: none;
  }

  .nav-menu-btn {
    display: flex;
  }

  .hero {
    padding-top: 80px;
    min-height: auto;
    padding-bottom: 40px;
  }

  .hero-headline .line-sub {
    font-size: clamp(1rem, 4.5vw, 1.5rem);
  }

  .hero-headline .line-mid,
  .hero-headline .line-hero {
    font-size: clamp(1.8rem, 8vw, 2.8rem);
  }

  .hero-cta {
    margin-top: 20px;
    padding: 12px 24px;
    font-size: 0.72rem;
  }

  .hero-blueprint {
    width: 90%;
    align-self: center;
  }

  .specs-svg {
    margin-top: 12px;
  }

  .warehouse {
    padding-top: 48px;
    padding-bottom: 48px;
  }

  .wh-item {
    padding: 18px 12px;
    gap: 12px;
  }

  .wh-text {
    font-size: 0.85rem;
  }

  .process-subtext {
    font-size: 0.85rem;
    margin-bottom: 32px;
  }

  .process-flow {
    flex-direction: column;
    align-items: stretch;
    overflow-x: visible;
    padding-bottom: 0;
    gap: 0;
  }

  .process-step {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
    gap: 16px;
    padding: 0;
  }

  .step-box {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
  }

  .step-num {
    font-size: 1.5rem;
  }

  .step-name {
    font-size: 0.6rem;
  }

  .step-desc {
    font-size: 0.82rem;
    max-width: 100%;
    margin-top: 0;
  }

  .step-annotation {
    margin-top: 6px;
  }

  .step-live-tag {
    margin-top: 4px;
  }

  .step-cta {
    font-size: 0.6rem;
    padding: 6px 14px;
    margin-top: 8px;
  }

  .process-arrow {
    padding: 8px 0 8px 30px;
    flex-direction: row;
    min-width: 0;
  }

  .process-arrow svg {
    transform: rotate(90deg);
    width: 24px;
  }

  .arrow-note {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stat {
    padding: 28px 12px;
  }

  .stat-number {
    font-size: clamp(1.6rem, 6vw, 2.2rem);
  }

  .stat-label {
    font-size: 0.72rem;
  }

  .stat-source {
    font-size: 0.52rem;
  }

  .notes-title {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .note-row {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 0;
  }

  .note-date {
    font-size: 0.6rem;
  }

  .note-title {
    font-size: 0.9rem;
  }

  .contact-headline {
    font-size: clamp(2rem, 8vw, 3rem);
  }

  .contact-text {
    font-size: 0.9rem;
    margin-bottom: 28px;
  }

  .contact-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .contact-email {
    font-size: 0.85rem;
  }

  .widget-frame {
    max-width: 100%;
  }

  .footer {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }
}

/* --- Small phone (≤400px) --- */
@media (max-width: 400px) {
  .hero-headline .line-mid,
  .hero-headline .line-hero {
    font-size: clamp(1.6rem, 9vw, 2.2rem);
  }

  .hero-headline .line-sub {
    font-size: clamp(0.85rem, 4vw, 1.1rem);
  }

  .step-box {
    width: 85px;
    height: 85px;
  }

  .step-num {
    font-size: 1.5rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stat {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .stat:last-child {
    border-bottom: none;
  }

  .wh-item {
    padding: 14px 8px;
  }

  .wh-text {
    font-size: 0.8rem;
  }
}

/* --- Selection --- */
::selection {
  background: var(--accent);
  color: white;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--ink-light);
}
