/* ============================================
   ATLAS POS — Design tokens & base
   ============================================ */

:root {
  /* Palette: warm midnight + electric blue (default) — Atlas Works mountain warmth */
  --bg: #0E1626;
  --bg-elev: #14203A;
  --bg-card: #1A2A47;
  --bg-soft: #233356;
  --line: #2A3A5C;
  --line-strong: #3D5078;
  --ink: #F8F4ED;
  --ink-muted: #B8C4DC;
  --ink-dim: #7889A8;
  --brand: #3B9EFF;
  --brand-deep: #0B5FD6;
  --accent: #FFB347;     /* warm amber accent */
  --warm: #F8E5C2;
  --warn: #FFB347;
  --good: #4ADE80;
  --grid: rgba(255,255,255,0.04);
  --grid-strong: rgba(59,158,255,0.12);

  /* Density */
  --pad-section: 120px;
  --pad-block: 32px;
  --gap: 24px;

  /* Type scale */
  --fs-display: clamp(72px, 11vw, 184px);
  --fs-h1: clamp(48px, 7vw, 112px);
  --fs-h2: clamp(40px, 5vw, 80px);
  --fs-h3: clamp(24px, 2.2vw, 36px);
  --fs-body: 17px;
  --fs-small: 14px;
  --fs-mono: 13px;

  /* Motif intensity */
  --motif-opacity: 0.5;

  --serif: "Big Shoulders Display", "Archivo", "Helvetica Neue", sans-serif;
  --display-italic: "Archivo", sans-serif;
  --sans: "DM Sans", "Helvetica Neue", -apple-system, sans-serif;
  --mono: "DM Mono", ui-monospace, monospace;

  --radius: 4px;
  --radius-lg: 12px;
}

[data-theme="light"] {
  --bg: #F5F2EC;
  --bg-elev: #EFEBE2;
  --bg-card: #FBF9F4;
  --bg-soft: #E8E3D6;
  --line: #DDD6C5;
  --line-strong: #BBB098;
  --ink: #11151B;
  --ink-muted: #4A5568;
  --ink-dim: #7A8595;
  --brand: #0B5FD6;
  --brand-deep: #053C92;
  --accent: #0AA89E;
  --grid: rgba(0,0,0,0.04);
  --grid-strong: rgba(11,95,214,0.10);
}

[data-density="compact"] {
  --pad-section: 80px;
  --pad-block: 20px;
  --gap: 16px;
}
[data-density="spacious"] {
  --pad-section: 160px;
  --pad-block: 48px;
  --gap: 32px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ============== Layout primitives ============== */
.container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 32px;
}
@media (max-width: 720px) {
  .container { padding: 0 20px; }
}

.section {
  padding: var(--pad-section) 0;
  position: relative;
  border-top: 1px solid var(--line);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--brand);
}

.h-display { font-family: var(--serif); font-size: var(--fs-display); line-height: 0.85; letter-spacing: -0.02em; font-weight: 900; text-transform: uppercase; }
.h1 { font-family: var(--serif); font-size: var(--fs-h1); line-height: 0.9; letter-spacing: -0.015em; font-weight: 900; text-transform: uppercase; }
.h2 { font-family: var(--serif); font-size: var(--fs-h2); line-height: 0.95; letter-spacing: -0.01em; font-weight: 800; text-transform: uppercase; }
.h3 { font-size: var(--fs-h3); line-height: 1.15; letter-spacing: -0.005em; font-weight: 700; }

.italic-em { font-family: "Archivo", sans-serif; font-style: italic; font-weight: 800; color: var(--brand); text-transform: none; letter-spacing: -0.01em; }

.mono { font-family: var(--mono); font-size: var(--fs-mono); letter-spacing: 0.01em; }
.muted { color: var(--ink-muted); }
.dim { color: var(--ink-dim); }

/* ============== Buttons ============== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 22px;
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: all 0.18s ease;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-deep);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  background: var(--bg-soft);
  border-color: var(--brand);
}
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }

/* ============== Circuit motif ============== */
/* Replaced circuit motif with mountain/ice motif on light bg */
.circuit-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--motif-opacity);
  z-index: 0;
}
.circuit-bg svg { width: 100%; height: 100%; }
.circuit-bg path, .circuit-bg line { stroke: var(--brand); stroke-width: 1; fill: none; opacity: 0.4; }
.circuit-bg circle { fill: var(--accent); opacity: 0.6; }

[data-motif="off"] { --motif-opacity: 0; }
[data-motif="subtle"] { --motif-opacity: 0.12; }
[data-motif="medium"] { --motif-opacity: 0.25; }
[data-motif="loud"] { --motif-opacity: 0.5; }

/* Grid backdrop */
.grid-bg {
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 80px 80px;
}

/* ============== Cards ============== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--pad-block);
  transition: border-color 0.2s ease;
  position: relative;
}
.card:hover { border-color: var(--line-strong); }

.card-tag {
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* ============== Header ============== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand-mark {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em;
  text-transform: uppercase;
}
.brand-mark .mark {
  width: 28px; height: 28px;
  display: grid; place-items: center;
}
.brand-mark .mark svg { width: 100%; height: 100%; }
.nav-links {
  display: flex; gap: 36px;
  font-size: 14px;
}
.nav-links a {
  color: var(--ink-muted);
  transition: color 0.15s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
@media (max-width: 820px) {
  .nav-links { display: none; }
}

/* ============== Footer ============== */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-elev);
  padding: 80px 0 40px;
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
.footer-col h5 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: var(--ink-muted); font-size: 14px; transition: color 0.15s; }
.footer-col a:hover { color: var(--brand); }

.footer-base {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 32px; border-top: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; color: var(--ink-dim);
}

/* ============== Utility ============== */
.divider {
  height: 1px;
  background: var(--line);
  width: 100%;
}
.tick {
  width: 16px; height: 16px;
  display: inline-grid; place-items: center;
  border-radius: 50%;
  background: color-mix(in oklab, var(--brand) 18%, transparent);
  color: var(--brand);
  font-size: 11px;
  flex-shrink: 0;
}

/* Number ticker for stats */
.stat-num {
  font-family: var(--serif);
  font-size: clamp(48px, 6vw, 80px);
  line-height: 1;
  letter-spacing: -0.025em;
}

/* ============== Marquee ============== */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: var(--bg-elev);
  padding: 18px 0;
}
.marquee-track {
  display: flex;
  gap: 80px;
  white-space: nowrap;
  animation: marquee 40s linear infinite;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-muted);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.marquee-track .dot {
  width: 4px; height: 4px; border-radius: 50%; background: var(--brand);
}
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ============ animations ============ */
@keyframes pulseDot {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.4); }
}
@keyframes traceLine {
  to { stroke-dashoffset: 0; }
}
.fade-in { opacity: 0; transform: translateY(12px); animation: fadeUp 0.6s 0.1s ease forwards; }
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}



/* ============== Hero stage ============== */
.hero-stage {
  background: linear-gradient(180deg, #FFFFFF 0%, #E6F0FA 100%), var(--bg);
  border-bottom: 1px solid var(--line);
  position: relative;
}
/* Mountain silhouettes — clean geometric */
.hero-stage::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 240px;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(135deg, transparent 50%, #C5D8EB 50%, #C5D8EB 51%, transparent 51%),
    linear-gradient(225deg, transparent 50%, #B6CCE2 50%, #B6CCE2 51%, transparent 51%);
  opacity: 0.6;
}
.hero-glow {
  position: absolute; inset: 0 0 auto 0;
  height: 280px; pointer-events: none; z-index: 0;
  background:
    /* Ice peak shapes */
    linear-gradient(135deg, transparent 70%, #DCE8F4 71%, transparent 80%),
    radial-gradient(circle at 80% 0%, rgba(14,165,255,0.08) 0%, transparent 50%);
  filter: none; opacity: 1;
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none; z-index: 0; opacity: 0.6;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
}

/* MOUNTAIN BACKDROP — used in sections */
.mountain-bg {
  position: absolute; inset: auto 0 0 0;
  height: 200px;
  pointer-events: none;
  background: linear-gradient(180deg, transparent 0%, var(--bg-soft) 100%);
}
.mountain-bg::before {
  content: '';
  position: absolute; bottom: 0; left: -10%; right: -10%; height: 100%;
  background:
    /* Three mountain peaks */
    linear-gradient(135deg, transparent 60%, #B6CCE2 60.5%, #B6CCE2 70%, transparent 70.5%),
    linear-gradient(225deg, transparent 65%, #C5D8EB 65.5%, #C5D8EB 75%, transparent 75.5%),
    linear-gradient(135deg, transparent 75%, #A8BACE 75.5%, #A8BACE 85%, transparent 85.5%);
}

/* ============== POS Terminal ============== */
.pos-terminal {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin-left: auto;
  filter: drop-shadow(0 30px 40px rgba(14,22,40,0.12)) drop-shadow(0 8px 16px rgba(14,165,255,0.18));
  perspective: 1400px;
}
.pos-halo {
  position: absolute; inset: -20% -10% -10% -10%; z-index: 0;
  background: radial-gradient(ellipse 60% 70% at 50% 50%, color-mix(in oklab, var(--brand) 35%, transparent), transparent 70%);
  filter: blur(50px);
}
.pos-bezel {
  position: relative; z-index: 1;
  background: linear-gradient(160deg, #2A3650 0%, #0E1626 100%);
  border-radius: 22px;
  padding: 14px;
  border: 1px solid #3D5078;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.08),
    inset 0 -1px 0 rgba(0,0,0,0.4),
    0 1px 0 rgba(255,255,255,0.04);
  transform: rotate(-1.5deg) rotateY(4deg) rotateX(2deg);
  transform-origin: center bottom;
}
.pos-cam {
  position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
  width: 6px; height: 6px; border-radius: 50%;
  background: #4ADE80; box-shadow: 0 0 8px #4ADE80;
}
.pos-screen {
  background: #F1EFEA;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.2);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.6);
}
.pos-topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px;
  background: linear-gradient(180deg, #fff, #F8F5EE);
  border-bottom: 1px solid #E0DBCD;
}
.pos-chip {
  font-family: var(--mono); font-size: 9px; font-weight: 600;
  padding: 3px 8px; border-radius: 3px;
  background: #E8E3D2; color: #5A5340;
  letter-spacing: 0.06em;
}
.pos-chip-good { background: color-mix(in oklab, #4ADE80 25%, white); color: #1F7A45; }
.pos-body {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 0;
  background: #F1EFEA;
}
.pos-cats {
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px 8px;
  background: #E8E3D2;
  border-right: 1px solid #D4CDB7;
}
.pos-cat {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 8px 4px; border-radius: 6px;
  background: #fff; border: 1px solid #D4CDB7;
  color: #5A5340; cursor: pointer;
  transition: all 0.2s;
}
.pos-cat.is-active {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateY(-1px);
}
.pos-main {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 10px;
  padding: 10px;
}
.pos-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  align-content: start;
}
.pos-tile {
  position: relative;
  aspect-ratio: 1.1/1;
  border-radius: 8px;
  padding: 10px;
  display: flex; flex-direction: column; justify-content: space-between;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.25);
  cursor: pointer;
  transition: transform 0.15s;
}
.pos-tile.is-big { grid-column: span 2; aspect-ratio: 2.3/1; }
.pos-tile:hover { transform: translateY(-2px); }
.pos-tile-name { font-size: 11px; font-weight: 600; line-height: 1.2; white-space: pre-line; }
.pos-tile-price { font-family: var(--serif); font-size: 18px; font-weight: 600; letter-spacing: -0.02em; align-self: flex-end; }
.pos-tile-hot {
  position: absolute; top: 6px; right: 6px;
  font-family: var(--mono); font-size: 8px; font-weight: 700;
  padding: 2px 5px; border-radius: 3px;
  background: rgba(255,255,255,0.25); color: #fff;
  letter-spacing: 0.08em;
}

/* Cart */
.pos-cart {
  background: #fff;
  border-radius: 8px;
  border: 1px solid #D4CDB7;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.pos-cart-head {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 9px; font-weight: 600;
  letter-spacing: 0.08em;
  padding: 8px 12px;
  background: #F8F5EE;
  color: #5A5340;
  border-bottom: 1px solid #E0DBCD;
}
.pos-cart-items {
  flex: 1;
  padding: 8px 12px;
  display: flex; flex-direction: column; gap: 8px;
  min-height: 100px;
}
.pos-cart-row {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px dashed #E0DBCD;
}
.pos-cart-row:last-child { border-bottom: none; }
.pos-cart-foot {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding: 10px 12px;
  background: #F8F5EE;
  border-top: 2px solid #0E1626;
  gap: 10px;
}
.pos-pay {
  background: #4ADE80;
  color: #fff;
  border: none;
  padding: 12px 18px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  letter-spacing: 0.04em;
  box-shadow: 0 4px 12px rgba(74,222,128,0.4);
}
.pos-pay:hover { transform: translateY(-1px); }

/* Stand */
.pos-stand-neck {
  position: absolute;
  bottom: -32px; left: 50%; transform: translateX(-50%);
  width: 36px; height: 32px;
  background: linear-gradient(180deg, #2A3650, #0E1626);
  border-left: 1px solid #3D5078;
  border-right: 1px solid #3D5078;
}
.pos-stand-base {
  position: relative;
  margin: 0 auto;
  width: 70%;
  max-width: 480px;
  height: 14px;
  margin-top: 32px;
  background: linear-gradient(180deg, #2A3650, #0E1626 60%, #050810);
  border-radius: 4px 4px 60% 60%/4px 4px 100% 100%;
  border: 1px solid #3D5078;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}
.pos-reflection {
  position: absolute;
  bottom: -50px; left: 5%; right: 5%;
  height: 50px;
  background: linear-gradient(180deg, color-mix(in oklab, var(--brand) 30%, transparent), transparent);
  filter: blur(8px);
  transform: scaleY(-0.4);
  opacity: 0.4;
  pointer-events: none;
}

/* ============== Floating receipt ============== */
.float-receipt {
  position: absolute;
  top: -30px;
  left: -40px;
  width: 200px;
  background: #FBF9F2;
  color: #0E1626;
  z-index: 3;
  box-shadow: 0 30px 50px rgba(0,0,0,0.4), 0 8px 16px rgba(0,0,0,0.2);
  transform: rotate(-7deg);
  font-family: var(--mono);
  animation: gentleBob 6s ease-in-out infinite;
}
.float-receipt-edge {
  height: 8px;
  background-image: linear-gradient(45deg, transparent 50%, #FBF9F2 50%),
                    linear-gradient(-45deg, transparent 50%, #FBF9F2 50%);
  background-size: 8px 8px;
  background-position: 0 0, 4px 0;
  background-repeat: repeat-x;
}
.float-receipt-edge.top { background-position: 0 100%, 4px 100%; }
.float-receipt-edge.bot { background-position: 0 0, 4px 0; }

/* ============== Floating PIN terminal ============== */
.float-pin {
  position: absolute;
  bottom: -20px;
  right: -30px;
  width: 180px;
  background: linear-gradient(160deg, #2A3650, #0E1626);
  border-radius: 14px;
  padding: 12px;
  border: 1px solid #3D5078;
  box-shadow: 0 30px 50px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
  z-index: 3;
  transform: rotate(6deg);
  animation: gentleBob 7s ease-in-out infinite reverse;
}
.float-pin-screen {
  background: linear-gradient(160deg, #14203A, #0B5FD6);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  min-height: 90px;
}
.float-pin-keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
}
.float-pin-key {
  background: #1A2A47;
  color: #B8C4DC;
  border: 1px solid #3D5078;
  border-radius: 4px;
  padding: 8px 0;
  text-align: center;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
}

@keyframes gentleBob {
  0%, 100% { transform: translateY(0) rotate(var(--r, -7deg)); }
  50% { transform: translateY(-6px) rotate(var(--r, -7deg)); }
}
.float-receipt { --r: -7deg; }
.float-pin { --r: 6deg; }

/* Responsive */
@media (max-width: 1100px) {
  .hero-stage .container > div { grid-template-columns: 1fr !important; }
  .pos-terminal { transform: scale(0.9); margin-top: 40px; }
  .float-receipt { left: -10px; }
  .float-pin { right: -10px; }
}


/* ============================================
   MOBILE-FIRST RESPONSIVE OVERRIDES
   Targets inline-styled grids in React components
   ============================================ */

/* Tablet & below — break 5/4-col grids first */
@media (max-width: 1024px) {
  /* Ecosystem 5-col → 2-col */
  [style*="repeat(5, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  /* 4-col grids → 2-col */
  [style*="repeat(4, 1fr)"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  /* Hardware showcase 320px+1fr */
  [style*="grid-template-columns: 320px 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* Mobile — collapse everything to single column */
@media (max-width: 760px) {
  /* All multi-column layouts → single column */
  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns: 1fr 1.05fr"],
  [style*="grid-template-columns: 1fr 1.2fr"],
  [style*="grid-template-columns: 1fr 1.4fr"],
  [style*="grid-template-columns: 1fr 2fr"],
  [style*="grid-template-columns: 2fr 1fr"],
  [style*="grid-template-columns: 1.4fr 1.4fr 1fr 1fr"],
  [style*="grid-template-columns: 76px 1fr 220px"],
  [style*="repeat(3, 1fr)"],
  [style*="repeat(2, 1fr)"],
  [style*="repeat(4, 1fr)"],
  [style*="repeat(5, 1fr)"] {
    grid-template-columns: 1fr !important;
  }

  /* Force gap reduction */
  [style*="gap: 80px"],
  [style*="gap: 60px"],
  [style*="gap: 56px"] {
    gap: 32px !important;
  }
  [style*="gap: 48px"] {
    gap: 24px !important;
  }

  /* Padding reduction */
  [style*="padding: 64px"],
  [style*="padding: 60px"],
  [style*="padding: 48px"] {
    padding: 32px !important;
  }
  [style*="padding: 40px"] {
    padding: 24px !important;
  }
  [style*="padding: 90px 32px 80px"],
  [style*="padding: 120px 0"] {
    padding: 56px 0 !important;
  }

  /* Section padding */
  .section { padding: 64px 0 !important; }

  /* Hero glow + grid: tone down */
  .hero-glow { opacity: 0.4 !important; }
  .hero-grid { opacity: 0.2 !important; }

  /* POS terminal: scale down further on phone */
  .pos-terminal { transform: scale(0.75) !important; margin: 0 auto !important; max-width: 100% !important; }
  .float-receipt { display: none; }
  .float-pin { display: none; }
  .pos-stand-base { width: 80% !important; }

  /* Marquee speed */
  .marquee-track { animation-duration: 25s !important; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
  .footer-base { flex-direction: column !important; align-items: flex-start !important; gap: 12px !important; padding-top: 24px !important; }

  /* Comparison table — stack rows */
  [style*="grid-template-columns: 1.4fr 1.4fr 1fr 1fr"] {
    grid-template-columns: 1fr !important;
    border-bottom: none !important;
  }
  [style*="grid-template-columns: 1.4fr 1.4fr 1fr 1fr"] > div {
    border-left: none !important;
    padding: 12px 16px !important;
    font-size: 13px !important;
  }

  /* Hero stats row */
  [style*="repeat(4, 1fr)"]:has(.mono) {
    grid-template-columns: 1fr 1fr !important;
  }

  /* h-display / h2 — reduce on mobile */
  .h-display { font-size: clamp(40px, 12vw, 64px) !important; line-height: 0.9 !important; }
  .h2 { font-size: clamp(28px, 8vw, 40px) !important; }

  /* Buttons full width on mobile */
  .btn { padding: 0 18px !important; font-size: 14px !important; }

  /* Hardware showcase tab list horizontal scroll on mobile */
  [style*="grid-template-columns: 320px 1fr"] > div:first-child {
    display: flex !important;
    overflow-x: auto !important;
    border-bottom: 1px solid var(--line) !important;
  }
  [style*="grid-template-columns: 320px 1fr"] > div:first-child > button {
    flex: 0 0 auto !important;
    min-width: 200px !important;
    border-bottom: none !important;
    border-left: none !important;
    border-right: 1px solid var(--line) !important;
  }

  /* HowItWorks 3-col → stacked */
  [style*="grid-template-columns: 76px 1fr 220px"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    padding: 24px 0 !important;
  }
  [style*="grid-template-columns: 76px 1fr 220px"] > div:first-child {
    width: 56px !important;
    height: 56px !important;
    font-size: 24px !important;
  }
  [style*="grid-template-columns: 76px 1fr 220px"] > div:last-child {
    text-align: left !important;
    padding-top: 0 !important;
  }

  /* Pricing card padding */
  [style*="padding: 32px"] { padding: 24px !important; }

  /* Container padding */
  .container { padding: 0 16px !important; }

  /* Eyebrow gap */
  .eyebrow { font-size: 11px !important; }
}

/* Small phones */
@media (max-width: 380px) {
  .h-display { font-size: 36px !important; }
  .h2 { font-size: 26px !important; }
  .pos-terminal { transform: scale(0.65) !important; }
  [style*="repeat(4, 1fr)"]:has(.mono) {
    grid-template-columns: 1fr !important;
  }
  .nav-links { display: none !important; }
  .site-header-inner { gap: 12px !important; }
}

/* Le Miri scenario page mobile */
@media (max-width: 760px) {
  .scenario {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    padding: 24px !important;
  }
  .scenario__num { font-size: 48px !important; }
  .scenario__hardware { grid-template-columns: 1fr !important; }
  .lemiri-meta { grid-template-columns: 1fr 1fr !important; }
  .lemiri-meta > div { padding: 12px !important; }
}


/* ---------- Mobile burger menu (atlaspos light theme) ---------- */
.site-burger {
  display: none;
  width: 44px; height: 44px;
  background: rgba(14,165,255,0.08);
  border: 1px solid var(--brand);
  border-radius: 8px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s;
}
.site-burger:hover { background: rgba(14,165,255,0.16); }
.site-burger span {
  display: block;
  width: 20px; height: 2.5px;
  background: var(--brand-deep);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s;
}
.site-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-burger.is-open span:nth-child(2) { opacity: 0; }
.site-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-drawer {
  position: fixed;
  top: 68px; left: 0; right: 0; bottom: 0;
  background: rgba(251,253,255,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 49;
  padding: 28px 20px;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.32s ease, opacity 0.25s;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.site-drawer.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.site-drawer nav { display: flex; flex-direction: column; gap: 2px; }
.site-drawer nav a {
  display: block;
  padding: 16px 20px;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
  transition: color 0.2s, padding-left 0.2s;
}
.site-drawer nav a:hover { color: var(--brand); padding-left: 28px; }
.site-drawer__cross {
  margin-top: auto;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.site-drawer__cross a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: border-color 0.2s, color 0.2s;
}
.site-drawer__cross a:hover { border-color: var(--brand); color: var(--ink); }

@media (max-width: 820px) {
  .site-burger { display: flex; }
  .site-header-cta { display: none !important; }
  .nav-links { display: none !important; }
}
@media (min-width: 821px) {
  .site-drawer { display: none; }
}

/* Accessibility: respect motion preference */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .marquee-track { animation: none !important; }
  .float-receipt, .float-pin { animation: none !important; }
}

/* Touch targets: ensure 44px minimum on mobile */
@media (max-width: 820px) and (pointer: coarse) {
  a.btn, button.btn, .btn { min-height: 44px; }
  .nav-links a, .footer-col a, .site-drawer nav a { min-height: 44px; display: flex; align-items: center; }
  input, textarea, select { min-height: 44px; }
}

/* Smooth scroll snap for horizontal scrollers */
@media (max-width: 820px) {
  [style*="grid-template-columns: 320px 1fr"] > div:first-child {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  [style*="grid-template-columns: 320px 1fr"] > div:first-child > button {
    scroll-snap-align: start;
  }
}
