/* =========================================================================
   AUTO-GENERATED from config.xlsx (Global_Settings) -- DO NOT EDIT BY HAND.
   Edit the hex codes / durations in Excel and rebuild.
   ========================================================================= */

:root {
  --primary-color: #E84C3D;
  --navy-color:    #0B1B3F;
  --navy-deep:     #050D22;
  --neon-navy:     #2B5CFF;
  --cardboard:     #C8A878;
  --cardboard-dark:#A2825A;
  --ink:           #F4F0E6;
  --map-cyan:      #00E6C3;

  --anim-duration: 0.5s;
  --anim-ease:     cubic-bezier(.2,.8,.2,1);
  --anim-stagger:  0.12s;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Arial Black", "Helvetica Neue", Arial, sans-serif;
  background: var(--navy-deep);
  color: var(--ink);
  line-height: 1.4;
  overflow-x: hidden;
  font-size: clamp(15px, 1.05vw, 20px);
  -webkit-text-size-adjust: 100%;
}

/* ---- Cardboard texture (pure CSS, no assets) ---- */
.cardboard-tex {
  background-color: var(--cardboard);
  background-image:
    repeating-linear-gradient(90deg, rgba(120,80,40,.10) 0 2px, transparent 2px 7px),
    repeating-linear-gradient(0deg,  rgba(160,120,70,.12) 0 1px, transparent 1px 4px),
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.08), transparent 40%);
}

/* ---- Checkerboard placeholder (purple + green = "empty media") ---- */
.checker {
  background-image:
    linear-gradient(45deg,  #6c2bd9 25%, transparent 25%),
    linear-gradient(-45deg, #6c2bd9 25%, transparent 25%),
    linear-gradient(45deg,  transparent 75%, #21c25a 75%),
    linear-gradient(-45deg, transparent 75%, #21c25a 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  background-color: #21c25a;
  position: relative;
}
.checker::after {
  content: attr(data-label);
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: monospace; font-size: 12px; color: #fff;
  background: rgba(11,27,63,.55);
  text-align: center; padding: 6px;
}

/* ---- Splash intro: beat 2-3x, then zoom-in & vanish ---- */
.splash {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--navy-deep);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .5s var(--anim-ease), visibility .5s var(--anim-ease);
}
.splash-logo {
  height: clamp(140px, 27vh, 320px); width: auto; max-width: 90vw;
  object-fit: contain; transform-origin: center;
  padding: 18px; border-radius: 14px;
  border: 4px solid var(--neon-navy);
  box-shadow: 0 0 28px rgba(43,92,255,.7), 0 0 60px rgba(43,92,255,.35);
  background: rgba(43,92,255,.06);
  animation: splashBeat 1.1s var(--anim-ease) 3 both; /* 2-3 beats, slow */
}
.splash-logo.zoom {
  animation: splashZoom 0.9s var(--anim-ease) forwards;
}
.splash-logo-text {
  font-size: clamp(40px, 9vw, 110px); text-transform: uppercase; letter-spacing: -2px; color: var(--ink);
  transform-origin: center; animation: splashBeat 1.1s var(--anim-ease) 3 both;
  padding: 12px 24px; border: 4px solid var(--neon-navy); border-radius: 14px;
  box-shadow: 0 0 28px rgba(43,92,255,.7);
}
.splash-logo-text.zoom { animation: splashZoom 0.9s var(--anim-ease) forwards; }
.splash-logo-text span { color: var(--primary-color); }

@keyframes splashBeat {
  0%, 100% { transform: scale(1); opacity: .8; }
  50%      { transform: scale(1.12); opacity: 1; }
}
@keyframes splashZoom {
  0%   { transform: scale(1); opacity: 1; }
  60%  { transform: scale(6); opacity: 1; }
  100% { transform: scale(14); opacity: 0; }
}
/* continuous heartbeat for the logo once it rests in the nav */
@keyframes logoHeartbeat {
  0%, 100% { transform: scale(1);    filter: drop-shadow(0 0 3px rgba(43,92,255,.5)); }
  50%      { transform: scale(1.07); filter: drop-shadow(0 0 9px rgba(43,92,255,.9)); }
}
.splash.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.nav--hidden { opacity: 0; transform: translateY(-100%); transition: opacity .5s var(--anim-ease), transform .5s var(--anim-ease); }
.nav:not(.nav--hidden) { opacity: 1; transform: translateY(0); }

/* ---- Bilingual EN/AR switching ---- */
.lang-en, .lang-ar { display: none; }
:lang(en) .lang-en, [lang="en"] .lang-en, html:not([lang="ar"]) .lang-en { display: inline; }
:lang(ar) .lang-ar, [lang="ar"] .lang-ar, html[lang="ar"] .lang-ar { display: inline; }

/* RTL — comprehensive */
html[lang="ar"] { direction: rtl; }
html[lang="ar"] body { text-align: right; }

/* Section titles: border-left becomes border-right in RTL */
html[lang="ar"] .section-title {
  border-left: none;
  border-right: 10px solid var(--primary-color);
  padding-left: 0;
  padding-right: 16px;
}

/* Nav: logo on right, menu flows right-to-left */
html[lang="ar"] .nav { flex-direction: row-reverse; }
html[lang="ar"] .nav-left { flex-direction: row-reverse; }
html[lang="ar"] .nav-menu { flex-direction: row-reverse; }

/* Hero grid auto-reverses in RTL; enforce media direction */
html[lang="ar"] .hero { direction: rtl; }
html[lang="ar"] .hero-media { transform: rotate(3deg); }

/* Feature band */
html[lang="ar"] .feature-band .container { direction: rtl; }
html[lang="ar"] .feature-visual { transform: rotate(-2deg); }

/* About cards */
html[lang="ar"] .about-body { text-align: right; }
html[lang="ar"] .about-grid { direction: rtl; }

/* Footer */
html[lang="ar"] .footer-col { text-align: right; }
html[lang="ar"] .footer-cols { direction: rtl; }
html[lang="ar"] .footer-top { text-align: right; }

/* Modal / form */
html[lang="ar"] .modal-box { direction: rtl; text-align: right; }
html[lang="ar"] .quote-form label { text-align: right; }
html[lang="ar"] .quote-form input,
html[lang="ar"] .quote-form select,
html[lang="ar"] .quote-form textarea { text-align: right; direction: rtl; }
html[lang="ar"] .modal-submit { align-self: flex-end; }

/* Customers rail — flex auto-reverses, but ensure chips align right */
html[lang="ar"] .customer-rail { direction: rtl; }

/* Language toggle stays at far edge */
html[lang="ar"] .lang-toggle { order: -1; }
html[lang="ar"] .hero-headline .lang-ar { white-space: nowrap; letter-spacing: -0.5px; }

/* ---- Layout ---- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 48px);
}
section { padding: clamp(48px, 8vw, 100px) 0; }
img, video { max-width: 100%; }
.section-title {
  font-size: clamp(24px, 4vw, 44px);
  text-transform: uppercase;
  letter-spacing: -1px;
  border-left: 10px solid var(--primary-color);
  padding-left: 16px;
  margin-bottom: clamp(24px, 4vw, 40px);
}

/* ---- Nav ---- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  position: sticky; top: 0; z-index: 100;
  background: var(--navy-deep);
  border-bottom: 3px solid var(--neon-navy);
}
.nav-left { display: flex; align-items: center; gap: 20px; }
.nav .logo { font-size: 22px; text-transform: uppercase; letter-spacing: -1px; display: inline-flex; align-items: center; }
.nav .logo img { height: 64px; max-height: 72px; width: auto; max-width: 320px; object-fit: contain; display: block; animation: logoHeartbeat 2.8s ease-in-out infinite; padding: 4px; border: 2px solid var(--neon-navy); border-radius: 8px; box-shadow: 0 0 12px rgba(43,92,255,.55); background: rgba(43,92,255,.05); }
.nav .logo span { color: var(--primary-color); }
.nav-menu { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-menu a { color: var(--ink); text-decoration: none; font-family: monospace; font-size: 14px; text-transform: uppercase; letter-spacing: 1px; transition: color var(--anim-duration) var(--anim-ease); }
.nav-menu a:hover { color: var(--map-cyan); }
.nav-menu .cta { color: #fff; }
.nav-toggle { display: none; background: none; border: 2px solid var(--neon-navy); color: var(--ink); font-size: 20px; padding: 2px 10px; cursor: pointer; }
.lang-toggle { background: none; border: 2px solid var(--neon-navy); color: var(--map-cyan); font-family: monospace; font-size: 12px; padding: 6px 14px; cursor: pointer; text-transform: uppercase; letter-spacing: 1px; margin-left: 12px; }
.lang-toggle:hover { background: var(--neon-navy); color: var(--ink); }

/* ---- Hero ---- */
.hero {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(24px, 4vw, 56px);
  align-items: center; padding: clamp(48px, 8vw, 110px) 0;
}
.hero-headline {
  font-size: clamp(36px, 6vw, 72px); line-height: .98;
  text-transform: uppercase; letter-spacing: -2px;
}
.hero-headline .em { color: var(--primary-color); }
.hero-subtext { margin: 20px 0; color: var(--cardboard); max-width: 46ch; font-family: monospace; }
.cta {
  display: inline-block; background: var(--primary-color); color: #fff;
  padding: 14px 30px; text-transform: uppercase; text-decoration: none;
  font-size: 15px; box-shadow: 6px 6px 0 var(--neon-navy);
  transition: transform var(--anim-duration) var(--anim-ease),
              box-shadow var(--anim-duration) var(--anim-ease);
}
.cta:hover { transform: translate(-2px,-2px); box-shadow: 10px 10px 0 var(--neon-navy); }
.hero-media { aspect-ratio: 4/3; border: 4px solid #000; transform: rotate(-3deg); min-height: 340px; }
.hero-media img, .hero-media video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Hero collage: big main image + smaller tiled boxes around it */
.hero-collage {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 10px;
  width: 100%; height: 100%;
  border: 4px solid #000; transform: rotate(-3deg);
  background: var(--cardboard-dark);
  overflow: hidden;
  min-height: 100%;
}

.hero-media:has(.hero-collage) { border: none; transform: rotate(0deg); }
.hero-collage .collage-main {
  grid-row: 1 / 3; grid-column: 1 / 2;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.hero-collage img:not(.collage-main) {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
/* fallback single image */
.hero-collage:only-child { grid-template-columns: 1fr; grid-template-rows: 1fr; }

/* CSS-drawn cardboard box tiles (guaranteed boxes, no external photo risk) */
.css-box {
  position: relative; width: 100%; height: 100%;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--c) 88%, #fff) 0%, var(--c) 60%, color-mix(in srgb, var(--c) 70%, #000) 100%);
  border: 2px solid #000;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  box-shadow: inset 0 0 0 6px rgba(0,0,0,.08);
}
.css-box::before {
  /* box flap lines */
  content: ""; position: absolute; inset: 14% 14%;
  border: 2px dashed rgba(0,0,0,.35);
}
.css-box span {
  font-family: "Arial Black", sans-serif; font-size: clamp(11px, 1.4vw, 18px);
  letter-spacing: 1px; color: #2a1a08; background: rgba(255,255,255,.55);
  padding: 2px 8px; border: 2px solid #000; text-transform: uppercase;
}

/* ---- Anatomy: flat panels -> folding 3D box ---- */
.anatomy { background: var(--navy-color); }
.anatomy-lead { font-family: monospace; color: var(--cardboard); margin-bottom: 24px; }

/* STEP 1: four flat printed panels */
.panel-strip {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 40px;
}
.panel-flat {
  position: relative; border: 3px solid #000; background: var(--navy-deep);
  opacity: 0; transform: translateX(-60px);
  transition: opacity var(--anim-duration) var(--anim-ease),
              transform var(--anim-duration) var(--anim-ease);
}
.anatomy.in-view .panel-flat { opacity: 1; transform: translateX(0); }
.anatomy.in-view .panel-flat:nth-child(1) { transition-delay: 0s; }
.anatomy.in-view .panel-flat:nth-child(2) { transition-delay: .12s; }
.anatomy.in-view .panel-flat:nth-child(3) { transition-delay: .24s; }
.anatomy.in-view .panel-flat:nth-child(4) { transition-delay: .36s; }
.panel-flat img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.panel-flat .checker { width: 100%; aspect-ratio: 1; }
.panel-flat figcaption {
  font-family: monospace; font-size: 12px; text-transform: uppercase;
  text-align: center; padding: 8px; color: var(--ink); background: var(--navy-deep);
}

/* fold controls */
.fold-controls { display: flex; align-items: center; gap: 16px; margin-bottom: 30px; flex-wrap: wrap; }
.fold-hint { font-family: monospace; font-size: 12px; color: var(--cardboard); }

/* STEP 2: the folding 3D RSC box */
.box-scene { height: 420px; perspective: 1200px; display: flex; align-items: center; justify-content: center; }
.rsc-box {
  position: relative; width: 180px; height: 180px;
  transform-style: preserve-3d;
  transform: rotateX(-20deg) rotateY(-30deg);
  transition: transform 1.4s var(--anim-ease);
  animation: boxSpin 18s linear infinite;
}
.rsc-box:hover { animation-play-state: paused; }
@keyframes boxSpin {
  from { transform: rotateX(-20deg) rotateY(0deg); }
  to   { transform: rotateX(-20deg) rotateY(360deg); }
}
.rsc-box .face {
  position: absolute; width: 180px; height: 180px; border: 2px solid #000;
  overflow: hidden; backface-visibility: hidden;
  transition: transform 1.2s var(--anim-ease);
  transform-origin: center;
}
.rsc-box .face img { width: 100%; height: 100%; object-fit: cover; }
.rsc-box .face .checker { width: 100%; height: 100%; }

/* CLOSED (assembled) box positions */
.rsc-box .front  { transform: translateZ(90px); }
.rsc-box .back   { transform: rotateY(180deg) translateZ(90px); }
.rsc-box .right  { transform: rotateY(90deg)  translateZ(90px); }
.rsc-box .left   { transform: rotateY(-90deg) translateZ(90px); }
.rsc-box .top    { transform: rotateX(90deg)  translateZ(90px); }
.rsc-box .bottom { transform: rotateX(-90deg) translateZ(90px); }

/* OPEN (unfolded flat, cross layout) when .is-open toggled */
.rsc-box.is-open { animation: none; transform: rotateX(-55deg) rotateY(0deg); }
.rsc-box.is-open .front  { transform: rotateY(0deg)   translateZ(0); }
.rsc-box.is-open .back   { transform: translateY(360px); }
.rsc-box.is-open .right  { transform: translateX(180px); }
.rsc-box.is-open .left   { transform: translateX(-180px); }
.rsc-box.is-open .top    { transform: translateY(-180px); }
.rsc-box.is-open .bottom { transform: translateY(180px); }

.map-badge {
  position: absolute; top: -12px; left: -12px;
  background: var(--map-cyan); color: #012;
  font-family: monospace; font-size: 11px; font-weight: bold;
  padding: 3px 7px; border: 2px solid #000; z-index: 5;
}

/* ---- Products grid ---- */
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px;
}

/* ---- Products rail: UCIC-style left-to-right auto-scroll ---- */
.product-rail-wrap { overflow: hidden; position: relative; padding: 6px 0; }
.product-rail {
  display: flex; gap: 24px; width: max-content;
  animation: railScroll 40s linear infinite;
}
.product-rail-wrap:hover .product-rail { animation-play-state: paused; }
@keyframes railScroll {
  /* left -> right: start shifted left by half, slide back to 0 */
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}
.product-rail .product-card {
  flex: 0 0 300px; opacity: 1; /* rail cards always visible */
}
/* image-only range cards (marquee of every box image) */
.range-card {
  flex: 0 0 300px;
  border: 3px solid var(--neon-navy); background: var(--navy-deep);
  height: 220px; overflow: hidden;
}
.range-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.product-card {
  border: 3px solid var(--neon-navy); background: var(--navy-color);
  transform-style: preserve-3d; perspective: 900px;
  opacity: 0; /* revealed by JS */
  transition: transform var(--anim-duration) var(--anim-ease);
}
.product-card.featured { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(232,76,61,.3); }
.product-card:hover { transform: translateY(-8px) rotateX(4deg); }
.product-card:hover .box-lid { transform: rotateX(-55deg); }
.origami-unfold:hover .box-lid { transform: rotateX(-80deg) translateZ(6px); }

.card-media { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.card-media img, .card-media video { width: 100%; height: 100%; object-fit: contain; display: block; background: var(--navy-deep); }
.box-lid { transform-origin: top; transition: transform var(--anim-duration) var(--anim-ease); }
.badge-feat {
  position: absolute; top: 8px; right: 8px; z-index: 6;
  background: var(--primary-color); color: #fff;
  font-family: monospace; font-size: 11px; padding: 3px 8px;
}
.card-body { padding: 16px; }
.card-name { font-size: 17px; text-transform: uppercase; margin-bottom: 8px; }
.chips { font-family: monospace; }
.chip {
  display: inline-block; background: var(--navy-deep);
  border: 1px solid var(--neon-navy); color: var(--map-cyan);
  padding: 2px 8px; margin: 2px 4px 0 0; font-size: 11px;
}
.chip.variant { border-color: var(--primary-color); color: var(--primary-color); }
.play-tag {
  position: absolute; bottom: 8px; left: 8px; z-index: 6;
  font-family: monospace; font-size: 11px; color: #fff;
  background: rgba(0,0,0,.55); padding: 2px 8px;
}

/* ---- Expert Creativity feature band ---- */
.feature-band {
  background: var(--navy-deep);
  border-top: 3px solid var(--neon-navy);
  border-bottom: 3px solid var(--neon-navy);
}
.feature-band .container { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.feature-eyebrow { font-family: monospace; letter-spacing: 3px; color: var(--map-cyan); text-transform: uppercase; font-size: 13px; }
.feature-title { font-size: clamp(28px, 4vw, 52px); text-transform: uppercase; letter-spacing: -1px; margin: 10px 0 18px; }
.feature-title .em { color: var(--primary-color); }
.feature-body { font-family: monospace; color: var(--cardboard); line-height: 1.7; margin-bottom: 24px; max-width: 52ch; }
.feature-points { list-style: none; display: flex; gap: 22px; flex-wrap: wrap; margin-bottom: 26px; }
.feature-points li { font-family: monospace; font-size: 13px; color: var(--ink); border-left: 3px solid var(--primary-color); padding-left: 10px; }
.feature-visual { border: 4px solid #000; transform: rotate(2deg); aspect-ratio: 4/3; overflow: hidden; }
.feature-visual img { width: 100%; height: 100%; object-fit: contain; display: block; background: var(--navy-deep); }
@media (max-width: 800px) { .feature-band .container { grid-template-columns: 1fr; } }

/* ---- About ---- */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); gap: 28px; }
.about-card {
  border: 3px solid var(--cardboard); background: var(--navy-deep);
  opacity: 0; transition: transform var(--anim-duration) var(--anim-ease);
  display: flex; flex-direction: column; overflow: hidden;
}
.about-img {
  width: 100%; aspect-ratio: 16/10; overflow: hidden; border-bottom: 3px solid var(--cardboard);
}
.about-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-img .checker { width: 100%; height: 100%; }
.about-body { padding: 16px; }
.about-card h3 { text-transform: uppercase; font-size: 16px; margin-bottom: 8px; color: var(--ink); }
.about-card p { font-family: monospace; font-size: 13px; color: var(--cardboard); }

/* ---- Our Customers / Trusted by ---- */
.customer-rail-wrap { overflow: hidden; position: relative; padding: 6px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.customer-rail {
  display: flex; gap: 18px; width: max-content;
  animation: railScroll 40s linear infinite;
}
.customer-rail-wrap:hover .customer-rail { animation-play-state: paused; }
@keyframes railScroll {
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}
.customer-chip {
  display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--neon-navy); background: var(--navy-deep);
  padding: 0; text-align: center;
  flex: 0 0 220px; height: 160px; overflow: hidden;
  transition: transform var(--anim-duration) var(--anim-ease),
              border-color var(--anim-duration) var(--anim-ease);
}
.customer-chip:hover { transform: translateY(-6px); border-color: var(--primary-color); }
.customer-logo {
  width: 100%; height: 100%; border: none; overflow: hidden;
  display: flex; align-items: center; justify-content: center; background: #fff;
}
.customer-logo img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
.customer-logo .checker { width: 100%; height: 100%; }

/* ---- Footer ---- */
.footer { background: var(--navy-color); border-top: 3px solid var(--neon-navy); padding: 60px 0 30px; }
.footer-top { margin-bottom: 36px; padding-bottom: 28px; border-bottom: 1px dashed var(--neon-navy); }
.footer-logo img { height: 80px; width: auto; max-width: 360px; object-fit: contain; display: block; }
.footer-logo { font-size: 26px; text-transform: uppercase; letter-spacing: -1px; color: var(--ink); }
.footer-logo span { color: var(--primary-color); }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 30px; }
.footer-col h4 { text-transform: uppercase; font-size: 14px; color: var(--primary-color); margin-bottom: 12px; }
.footer-col a { display: block; color: var(--cardboard); text-decoration: none; font-family: monospace; font-size: 13px; margin-bottom: 6px; }
.footer-col a:hover { color: var(--map-cyan); }
.footer-copy { margin-top: 40px; font-family: monospace; font-size: 12px; color: var(--cardboard); text-align: center; }

/* ---- Quotation modal ---- */
.modal {
  position: fixed; inset: 0; z-index: 2000;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal.open { display: flex; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(5,13,34,.82); backdrop-filter: blur(3px); }
.modal-box {
  position: relative; z-index: 1; width: 100%; max-width: 480px;
  background: var(--navy-color); border: 4px solid var(--neon-navy);
  box-shadow: 14px 14px 0 var(--primary-color); padding: 28px 26px 26px;
  max-height: 92vh; overflow-y: auto;
  animation: modalIn .35s var(--anim-ease) both;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(24px) scale(.96); } to { opacity: 1; transform: none; } }
.modal-close {
  position: absolute; top: 10px; right: 14px; background: none; border: none;
  color: var(--ink); font-size: 30px; line-height: 1; cursor: pointer;
}
.modal-close:hover { color: var(--primary-color); }
.modal-title { font-size: clamp(20px, 4vw, 30px); text-transform: uppercase; letter-spacing: -1px; margin-bottom: 18px; border-left: 10px solid var(--primary-color); padding-left: 12px; }
.quote-form { display: flex; flex-direction: column; gap: 14px; }
.quote-form label { display: flex; flex-direction: column; gap: 6px; font-family: monospace; font-size: 13px; color: var(--cardboard); text-transform: uppercase; letter-spacing: 1px; }
.quote-form input, .quote-form select, .quote-form textarea {
  font-family: monospace; font-size: 14px; color: var(--ink);
  background: var(--navy-deep); border: 2px solid var(--neon-navy);
  padding: 11px 12px; border-radius: 0; width: 100%;
}
.quote-form input:focus, .quote-form select:focus, .quote-form textarea:focus {
  outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(232,76,61,.25);
}
.quote-form input.invalid, .quote-form select.invalid, .quote-form textarea.invalid { border-color: var(--primary-color); }
.quote-form textarea { resize: vertical; }
.modal-submit { align-self: flex-start; margin-top: 4px; }
.form-note { font-family: monospace; font-size: 12px; color: var(--cardboard); margin-top: 6px; }
.form-note strong { color: var(--map-cyan); }
.form-success { font-family: monospace; color: var(--map-cyan); font-size: 14px; padding: 14px 0; }

/* =======================================================================
   ANIMATIONS (durations pulled from Excel via CSS variables)
   ======================================================================= */

/* Scroll entrance: "Slide and Fold" (translateY + rotateX) */
@keyframes slideFold {
  from { opacity: 0; transform: translateY(60px) rotateX(-90deg); transform-origin: top; }
  to   { opacity: 1; transform: translateY(0)    rotateX(0deg);    transform-origin: top; }
}
.product-card.in-view,
.about-card.in-view {
  animation: slideFold var(--anim-duration) var(--anim-ease) both;
  animation-delay: var(--delay, 0s);
}

/* Origami Unfold: for is_featured = TRUE */
@keyframes origamiUnfold {
  0%   { opacity: 0; transform: rotateY(-90deg) scale(.8); transform-origin: left; }
  60%  { opacity: 1; transform: rotateY(15deg)  scale(1.02); }
  100% { opacity: 1; transform: rotateY(0deg)   scale(1); }
}
.origami-unfold.in-view {
  animation: origamiUnfold calc(var(--anim-duration) * 1.4) var(--anim-ease) both;
  animation-delay: var(--stagger, var(--anim-stagger));
}

/* =======================================================================
   RESPONSIVE  —  mobile · tablet · laptop · desktop · TV / 4K
   ======================================================================= */

/* Large desktops & TVs: widen container and scale the UI up so it does
   not look tiny on 1440p / 4K / big screens */
@media (min-width: 1600px) {
  .container { max-width: 1500px; }
}
@media (min-width: 2000px) {
  .container { max-width: 1800px; }
  .product-rail .product-card { flex-basis: 360px; }
}
@media (min-width: 2560px) {
  .container { max-width: 2200px; }
  .nav .logo img { height: 84px; }
  .product-rail .product-card { flex-basis: 420px; }
  .panel-strip { gap: 28px; }
}

/* Tablets & small laptops */
@media (max-width: 1024px) {
  .feature-band .container { gap: 28px; }
  .panel-strip { grid-template-columns: repeat(2, 1fr); }
}

/* Landscape phones & portrait tablets */
@media (max-width: 800px) {
  .hero { grid-template-columns: 1fr; text-align: left; }
  .hero-media { transform: rotate(0deg); }
  .feature-band .container { grid-template-columns: 1fr; }
  .feature-visual { transform: rotate(0deg); }
  .footer-cols { gap: 24px; }
  .fold-controls { flex-direction: column; align-items: flex-start; }
}

/* Phones */
@media (max-width: 560px) {
  .nav { padding: 12px 16px; flex-wrap: wrap; gap: 10px; }
  .nav .cta { padding: 10px 16px; font-size: 13px; }
  .nav .logo img { height: 48px; }
  .nav-toggle { display: block; }
  .nav-menu {
    display: none; flex-direction: column; align-items: flex-start; gap: 14px;
    width: 100%; margin-top: 10px;
    border-top: 2px dashed var(--neon-navy); padding-top: 14px;
  }
  .nav-menu.open { display: flex; }
  .panel-strip { grid-template-columns: 1fr 1fr; gap: 12px; }
  .feature-points { gap: 12px; }
  .product-rail .product-card { flex-basis: 78vw; }
  .cta { box-shadow: 4px 4px 0 var(--neon-navy); }
  .box-scene { height: 320px; }
  .customer-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-box { box-shadow: 6px 6px 0 var(--primary-color); padding: 22px 18px 20px; }
}

/* Very small phones */
@media (max-width: 360px) {
  .panel-strip { grid-template-columns: 1fr; }
}

/* Touch devices: disable heavy hover transforms for stability */
@media (hover: none) {
  .product-card:hover { transform: none; }
  .rsc-box { animation-play-state: running; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .product-card, .about-card { opacity: 1 !important; }
  .product-rail { animation: none !important; }
  .rsc-box { animation: none !important; }
  .splash { display: none !important; }
  .nav--hidden { opacity: 1 !important; transform: none !important; }
}