/* ===========================================================
   Rewind Manufacturing — stylesheet
   Theme: light / "rewind the clock" industrial
   =========================================================== */

:root {
  --bg: #f4f6fb;
  --bg-2: #eaeef6;
  --panel: #ffffff;
  --panel-2: #f2f5fb;
  --line: rgba(15, 27, 54, 0.10);
  --line-strong: rgba(15, 27, 54, 0.18);

  --text: #0b1424;
  --muted: #475069;
  --muted-2: #79839b;

  /* Brand accents — cool cyan → blue → indigo aurora (tuned for white) */
  --cyan: #2563eb;
  --cyan-dim: #1d4ed8;
  --amber: #0891b2;
  --amber-2: #22d3ee;
  --magenta: #4f46e5;

  --grad: linear-gradient(110deg, #06b6d4, #2563eb 55%, #4f46e5);
  --glow-cyan: rgba(37, 99, 235, 0.32);
  --glow-amber: rgba(6, 182, 212, 0.28);

  --radius: 16px;
  --radius-lg: 24px;
  --maxw: 1160px;

  --font-display: 'Archivo', system-ui, sans-serif;
  --font-sans: 'Space Grotesk', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Ensure the [hidden] attribute always wins over component display rules
   (e.g. .viewer__loading/.workspace set display, which would otherwise
   override the UA [hidden]{display:none} and leave overlays stuck on). */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  background-image:
    radial-gradient(1000px 560px at 85% -12%, rgba(37, 99, 235, 0.12), transparent 60%),
    radial-gradient(820px 520px at -5% 8%, rgba(6, 182, 212, 0.10), transparent 58%),
    radial-gradient(900px 700px at 50% 120%, rgba(79, 70, 229, 0.08), transparent 60%);
}

a { color: inherit; text-decoration: none; }
em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Film grain / scanline overlay */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
  background-image: repeating-linear-gradient(
    0deg, rgba(12, 22, 41, 0.03) 0 1px, transparent 1px 3px
  );
  mix-blend-mode: multiply;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.3s ease, background 0.3s ease;
  white-space: nowrap;
}
.btn--primary {
  background: var(--grad);
  color: #06121a;
  box-shadow: 0 8px 30px -8px var(--glow-cyan);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -10px var(--glow-cyan); }
.btn--ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--text);
}
.btn--ghost:hover { border-color: var(--cyan); color: var(--cyan); transform: translateY(-2px); }
.btn--block { width: 100%; justify-content: center; }

/* ---------------- Nav ---------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 0.6rem; }
.logo__text {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: 0.06em;
  line-height: 0.95;
  display: flex;
  flex-direction: column;
  font-size: 1.05rem;
}
.logo__word { display: inline-block; white-space: nowrap; }
/* rewind glyph forming the "W" — inherits the exact letter color via currentColor.
   Sized to the cap height and sat on the baseline so it aligns with RE/IND. */
.logo__rw { display: inline-block; height: 0.72em; width: auto; fill: currentColor; vertical-align: baseline; margin: 0 0.12em 0 0.05em; }
.logo__sub { font-size: 0.55rem; letter-spacing: 0.32em; color: var(--muted); font-weight: 700; }

.nav__links { display: flex; align-items: center; gap: 2rem; }
.nav__links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.2s ease;
  position: relative;
}
.nav__links a:not(.nav__cta):hover { color: var(--text); }
.nav__links a:not(.nav__cta)::after {
  content: ""; position: absolute; left: 0; bottom: -6px;
  width: 0; height: 2px; background: var(--grad); transition: width 0.25s ease;
}
.nav__links a:not(.nav__cta):hover::after { width: 100%; }
.nav__cta {
  border: 1px solid var(--line-strong);
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  color: var(--text) !important;
  font-weight: 600;
  transition: all 0.2s ease;
}
.nav__cta:hover { border-color: var(--cyan); color: var(--cyan) !important; box-shadow: 0 0 20px -6px var(--glow-cyan); }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav__toggle span { width: 26px; height: 2px; background: var(--text); transition: 0.3s; }
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- Top announcement banner ---------------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1100;
  display: flex; align-items: center; justify-content: center; gap: 0.55rem;
  min-height: 42px; padding: 0.5rem 1.2rem;
  background: linear-gradient(90deg, rgba(37,99,235,0.16), rgba(37,99,235,0.05) 55%, rgba(37,99,235,0.16));
  border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--text); white-space: nowrap;
  transition: background 0.25s ease;
}
.topbar:hover { background: linear-gradient(90deg, rgba(37,99,235,0.24), rgba(37,99,235,0.09) 55%, rgba(37,99,235,0.24)); }
.topbar__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); animation: pulse 1.6s ease-in-out infinite; flex: none; }
.topbar__price { color: var(--cyan); font-weight: 700; text-shadow: 0 0 14px rgba(37,99,235,0.45); }
.topbar__arrow { flex: none; transition: transform 0.25s ease; }
.topbar:hover .topbar__arrow { transform: translateX(4px); }
/* pages carrying the banner shift the nav + content down to make room */
body.has-topbar { padding-top: 42px; }
.has-topbar .nav { top: 42px; }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  min-height: 82svh;
  display: flex;
  align-items: center;
  padding: 6rem 1.5rem 4rem;
  overflow: hidden;
}
.hero__grid {
  position: absolute;
  inset: -30% -20%;
  background-image:
    radial-gradient(38% 42% at 22% 28%, rgba(37, 99, 235, 0.30), transparent 70%),
    radial-gradient(34% 40% at 78% 22%, rgba(6, 182, 212, 0.26), transparent 70%),
    radial-gradient(42% 46% at 68% 78%, rgba(79, 70, 229, 0.24), transparent 72%),
    radial-gradient(30% 34% at 30% 82%, rgba(14, 165, 233, 0.20), transparent 72%);
  filter: blur(30px);
  opacity: 0.9;
  pointer-events: none;
  animation: auroraDrift 24s ease-in-out infinite alternate;
}
@keyframes auroraDrift {
  0%   { transform: translate3d(-2%, -1%, 0) scale(1.05) rotate(0deg); }
  50%  { transform: translate3d(2%, 2%, 0) scale(1.12) rotate(4deg); }
  100% { transform: translate3d(1%, -2%, 0) scale(1.06) rotate(-3deg); }
}
.hero__glow {
  position: absolute;
  width: 60vw; height: 60vw;
  max-width: 720px; max-height: 720px;
  right: -10%; top: 10%;
  background: radial-gradient(circle, var(--glow-cyan), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
}
.hero__content { position: relative; z-index: 2; max-width: var(--maxw); margin: 0 auto; width: 100%; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--line);
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: rgba(12, 22, 41, 0.03);
}
.eyebrow__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--cyan); box-shadow: 0 0 12px var(--cyan);
  animation: pulse 1.6s ease-in-out infinite;
}
.eyebrow__price { color: var(--cyan); font-weight: 700; text-shadow: 0 0 14px rgba(37, 99, 235, 0.45); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

.hero__title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.6rem, 7vw, 6rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  max-width: 24ch;
  margin-bottom: 1.6rem;
}
.hero__rewind { display: block; white-space: nowrap; }
.hero__rewind-icon {
  display: inline-block;
  width: 0.82em;
  height: 0.82em;
  margin-right: 0.12em;
  vertical-align: -0.06em;
  filter: drop-shadow(0 0 16px var(--glow-cyan));
}
.hero__rewind-icon .clock { width: 100%; height: 100%; display: block; overflow: visible; }
.clock__face { fill: none; stroke: var(--cyan); stroke-width: 6; }
.clock__tick { stroke: var(--cyan); stroke-width: 4; stroke-linecap: round; opacity: 0.55; }
.clock__pin { fill: var(--cyan); }
.clock__hand {
  stroke: var(--cyan);
  stroke-linecap: round;
  transform-box: view-box;
  transform-origin: 50px 50px;
}
.clock__hand--min { stroke-width: 6; animation: clockRewind 2.4s linear infinite; }
.clock__hand--hr { stroke-width: 7; animation: clockRewind 14.4s linear infinite; }
/* negative rotation = counter-clockwise = winding time backwards */
@keyframes clockRewind { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }
.hero__highlight { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero__line { display: block; }

.hero__sub {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  color: var(--muted);
  max-width: 56ch;
  margin-bottom: 2.2rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 3.5rem; }

.hero__ticker {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 0.9rem 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.ticker__track {
  display: flex;
  gap: 2rem;
  white-space: nowrap;
  width: max-content;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.18em;
  color: var(--muted-2);
  animation: ticker 26s linear infinite;
}
.ticker__track span:not(:nth-child(even)) { color: var(--text); }
@keyframes ticker { to { transform: translateX(-50%); } }

/* ---------------- Stats ---------------- */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.stats__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.stat { text-align: center; }
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat__label { font-size: 0.85rem; color: var(--muted); display: block; margin-top: 0.5rem; }

/* ---------------- Sections ---------------- */
.section { max-width: var(--maxw); margin: 0 auto; padding: 6.5rem 1.5rem; }
.section__head { max-width: 60ch; margin-bottom: 3rem; }
.kicker {
  font-family: var(--font-mono);
  color: var(--cyan);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.82rem;
  margin-bottom: 1rem;
}
.section__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.section__lead { color: var(--muted); font-size: 1.08rem; }
.section__note { color: var(--muted-2); font-size: 0.85rem; margin-top: 1rem; }

/* ---------------- Service cards ---------------- */
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.card {
  position: relative;
  background: linear-gradient(180deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.card::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(500px 200px at var(--mx, 50%) var(--my, 0%), rgba(37,99,235,0.12), transparent 60%);
  opacity: 0; transition: opacity 0.3s ease;
}
.card:hover { transform: translateY(-6px); border-color: var(--line-strong); box-shadow: 0 30px 60px -30px rgba(12,22,41,0.25); }
.card:hover::before { opacity: 1; }
.card__icon {
  width: 60px; height: 60px;
  display: grid; place-items: center;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  color: var(--cyan);
  margin-bottom: 1.4rem;
  background: rgba(37, 99, 235, 0.07);
}
.card__icon svg { width: 30px; height: 30px; }
.card__title { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; margin-bottom: 0.7rem; }
.card__text { color: var(--muted); margin-bottom: 1.4rem; }
.card__list { list-style: none; display: grid; gap: 0.6rem; }
.card__list li {
  position: relative; padding-left: 1.6rem; font-size: 0.95rem; color: var(--text);
}
.card__list li::before {
  content: "⏪"; position: absolute; left: 0; font-size: 0.8rem; opacity: 0.8;
}
.card__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cyan);
  transition: gap 0.2s ease, color 0.2s ease;
  position: relative; z-index: 1;
}
.card__link:hover { gap: 0.8rem; color: var(--amber-2); }

/* ---------------- Timeline ---------------- */
.timeline {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  counter-reset: step;
}
.timeline__step {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem 1.5rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.timeline__step:hover { transform: translateY(-5px); border-color: var(--cyan); }
.timeline__num {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: #06121a;
  background: var(--grad);
  border-radius: 8px;
  padding: 0.2rem 0.6rem;
  display: inline-block;
  margin-bottom: 1rem;
}
.timeline__step h3 { font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 0.5rem; }
.timeline__step p { color: var(--muted); font-size: 0.93rem; }

/* ---------------- Capabilities ---------------- */
.caps { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; align-items: start; }
.caps__tabs {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: sticky;
  top: 100px;
}
.caps__tab {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}
.caps__tab:hover { color: var(--text); border-color: var(--line-strong); }
.caps__tab.is-active {
  color: #06121a;
  background: var(--grad);
  border-color: transparent;
  font-weight: 700;
  box-shadow: 0 8px 24px -10px var(--glow-cyan);
}
.caps__panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2.4rem;
  animation: fadeUp 0.4s ease;
}
.caps__panel[hidden] { display: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.caps__intro { margin-bottom: 2rem; max-width: 70ch; }
.caps__intro h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.9rem; margin-bottom: 0.5rem; }
.caps__lead {
  color: var(--cyan);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1.2rem;
}
.caps__intro p:not(.caps__lead) { color: var(--muted); margin-bottom: 1rem; }
.caps__groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem 2rem;
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}
.caps__group h4 {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.82rem;
  color: var(--amber-2);
  margin-bottom: 1rem;
}
.caps__note { color: var(--muted); font-size: 0.92rem; }
.caps__list { list-style: none; display: grid; gap: 0.55rem; }
.caps__list li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.93rem;
  color: var(--text);
  line-height: 1.4;
}
.caps__list li::before { content: "⏪"; position: absolute; left: 0; font-size: 0.72rem; top: 0.18em; opacity: 0.8; }

.cap__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.cap__col {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
}
.cap__heading {
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.85rem;
  color: var(--amber-2);
  margin-bottom: 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}
.cap__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cap__tags li {
  font-size: 0.85rem;
  border: 1px solid var(--line-strong);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  color: var(--muted);
  transition: all 0.2s ease;
}
.cap__tags li:hover { color: var(--text); border-color: var(--cyan); background: rgba(37,99,235,0.07); }

/* ---------------- About ---------------- */
.about__inner {
  display: block;
  max-width: 760px;
}
.about__text p { color: var(--muted); margin-bottom: 1rem; max-width: 54ch; }
.about__points { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 2rem; }
.point { display: flex; gap: 0.8rem; align-items: flex-start; }
.point__icon { font-size: 1.4rem; line-height: 1; }
.point strong { display: block; font-size: 0.98rem; }
.point span { color: var(--muted); font-size: 0.85rem; }

/* ---------------- Quote ---------------- */
.quote { padding-top: 4rem; }
.quote__inner {
  background: linear-gradient(160deg, var(--panel-2), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 4rem);
  position: relative;
  overflow: hidden;
}
.quote__inner::before {
  content: ""; position: absolute; top: -50%; right: -10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, var(--glow-cyan), transparent 65%);
  filter: blur(30px); opacity: 0.3;
}
.quote__head { position: relative; max-width: 56ch; margin-bottom: 2.5rem; }
.quote__form {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.field { display: flex; flex-direction: column; gap: 0.5rem; }
.field--full { grid-column: 1 / -1; }
.field label { font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.field input, .field select, .field textarea {
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(37,99,235,0.16);
}
.field textarea { resize: vertical; }
.form__note { font-family: var(--font-mono); font-size: 0.85rem; margin-top: 0.8rem; min-height: 1.2em; }
.form__note.is-ok { color: var(--cyan); }
.form__note.is-err { color: var(--amber-2); }

/* ---------------- Footer ---------------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 4rem 1.5rem 2rem; }
.footer__inner {
  max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.2fr 2fr; gap: 3rem;
}
.footer__brand .logo__text { margin-top: 0.6rem; }
.footer__tag { color: var(--muted); margin-top: 1rem; font-size: 0.92rem; max-width: 30ch; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.footer__cols h4 { font-family: var(--font-mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text); margin-bottom: 1rem; }
.footer__cols a, .footer__usa { display: block; color: var(--muted); font-size: 0.92rem; margin-bottom: 0.6rem; transition: color 0.2s ease; }
.footer__cols a:hover { color: var(--cyan); }
.footer__bottom {
  max-width: var(--maxw); margin: 3rem auto 0; padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted-2); letter-spacing: 0.06em;
}
.footer__certs {
  display: flex; align-items: center; gap: 1.4rem; flex-wrap: wrap;
  margin-top: 1.6rem;
}
.cert { height: 48px; width: auto; opacity: 0.9; transition: opacity 0.2s ease; }
.cert:hover { opacity: 1; }

/* ===========================================================
   Injection Molding page
   =========================================================== */
.hero--sub { min-height: auto; padding-top: 9rem; padding-bottom: 3rem; }
.hero--sub .hero__title { max-width: none; font-size: clamp(2rem, 5vw, 4.6rem); }
.hero--sub .hero__line { display: block; white-space: nowrap; }
.hero--sub .hero__highlight { display: block; }
@media (max-width: 560px) { .hero--sub .hero__line { white-space: normal; } }

/* Hero badges */
.badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}
.badge {
  border: 1px solid var(--line);
  background: rgba(12, 22, 41, 0.03);
  border-radius: 12px;
  padding: 0.8rem 1rem;
  font-size: 0.85rem;
  color: var(--muted);
  max-width: 14rem;
}
.badge__big {
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.15rem;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 0.2rem;
}

/* How it works flow */
.iflow {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
.iflow__step {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.iflow__step:hover { transform: translateY(-5px); border-color: var(--cyan); }
.iflow__num {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  font-family: var(--font-mono); font-weight: 700;
  color: #06121a; background: var(--grad);
  border-radius: 50%; margin-bottom: 0.9rem;
}
.iflow__step h3 { font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 0.4rem; }
.iflow__step p { color: var(--muted); font-size: 0.9rem; }

/* Versus */
.versus {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: center;
}
.versus__col {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem;
}
.versus__col h3 { font-family: var(--font-display); font-size: 1.3rem; margin-bottom: 1.2rem; }
.versus__col ul { list-style: none; display: grid; gap: 0.8rem; }
.versus__col li { position: relative; padding-left: 1.8rem; color: var(--text); }
.versus__col--them { background: var(--bg-2); }
.versus__col--them h3 { color: var(--muted); }
.versus__col--them li { color: var(--muted); }
.versus__col--them li::before { content: "✕"; position: absolute; left: 0; color: var(--muted-2); }
.versus__col--us { background: linear-gradient(160deg, rgba(37,99,235,0.10), rgba(6,182,212,0.07)); border-color: var(--line-strong); }
.versus__col--us li::before { content: "✓"; position: absolute; left: 0; color: var(--cyan); font-weight: 700; }
.versus__vs {
  font-family: var(--font-display); font-weight: 900; font-size: 1.4rem;
  color: var(--muted-2);
  border: 1px solid var(--line); border-radius: 50%;
  width: 56px; height: 56px; display: grid; place-items: center;
}

/* 3-up cards */
.cards--3 { grid-template-columns: repeat(3, 1fr); }

/* Materials grid */
.matgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.matgroup {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
}

/* Specialty processes */
.specs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.spec {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.spec:hover { transform: translateY(-4px); border-color: var(--cyan); }
.spec h3 { font-family: var(--font-display); font-size: 1.02rem; margin-bottom: 0.5rem; }
.spec p { color: var(--muted); font-size: 0.88rem; }

/* Secondary ops */
.secops { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.secop {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  background: var(--bg-2);
}
.secop h3 {
  font-family: var(--font-mono);
  font-size: 0.92rem; letter-spacing: 0.02em;
  color: var(--amber-2);
  margin-bottom: 0.4rem;
}
.secop p { color: var(--muted); font-size: 0.88rem; }

/* Tooling table */
.tooltable__wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-lg); }
.tooltable { width: 100%; border-collapse: collapse; min-width: 560px; }
.tooltable th, .tooltable td { padding: 0.85rem 1.2rem; text-align: left; border-bottom: 1px solid var(--line); font-size: 0.92rem; }
.tooltable thead th {
  font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.06em;
  font-size: 0.78rem; color: var(--text); background: var(--panel-2);
}
.tooltable thead th:not(:first-child) { text-align: center; width: 26%; }
.tooltable tbody th { font-weight: 500; color: var(--text); }
.tooltable td:not(:first-child) { text-align: center; color: var(--muted); }
.tooltable tr:last-child th, .tooltable tr:last-child td { border-bottom: 0; }
.tooltable .yes { color: var(--cyan); font-weight: 700; }
.tooltable .no { color: var(--muted-2); }
.tooltable tbody tr:hover { background: rgba(12,22,41,0.03); }

/* Quality columns */
.qual { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.qual__col { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.8rem; }

/* FAQ accordion */
.faq { display: grid; gap: 0.8rem; max-width: 880px; }
.faq__item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}
.faq__item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.2rem 1.4rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  transition: color 0.2s ease;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 1.4rem;
  color: var(--cyan);
  transition: transform 0.25s ease;
}
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item summary:hover { color: var(--cyan); }
.faq__item p { padding: 0 1.4rem 1.3rem; color: var(--muted); font-size: 0.95rem; }

@media (max-width: 920px) {
  .iflow { grid-template-columns: repeat(2, 1fr); }
  .cards--3 { grid-template-columns: 1fr; }
  .specs { grid-template-columns: repeat(2, 1fr); }
  .secops { grid-template-columns: 1fr 1fr; }
  .versus { grid-template-columns: 1fr; }
  .versus__vs { margin: 0 auto; }
  .qual { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .iflow { grid-template-columns: 1fr; }
  .matgrid { grid-template-columns: 1fr; }
  .specs { grid-template-columns: 1fr; }
  .secops { grid-template-columns: 1fr; }
  .badge { max-width: none; flex: 1 1 100%; }
}

/* ===========================================================
   Instant Quote platform
   =========================================================== */
.quote-page { background-image: none; }
.qp { max-width: 1280px; margin: 0 auto; padding: 7.5rem 1.5rem 4rem; }
.qp__head { max-width: 64ch; margin-bottom: 2rem; }
.qp__title {
  font-family: var(--font-display); font-weight: 900;
  font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.02;
  letter-spacing: -0.02em; margin: 0.6rem 0 1rem;
}
.qp__lead { color: var(--muted); font-size: 1.05rem; }

/* Stepper */
.stepper { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 2rem; }
.stepper__item {
  display: flex; align-items: center; gap: 0.6rem;
  font-family: var(--font-mono); font-size: 0.85rem; color: var(--muted-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.5rem 1.1rem;
  transition: all 0.25s ease;
}
.stepper__item span {
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center; font-size: 0.78rem; font-weight: 700;
  background: var(--panel-2); color: var(--muted);
}
.stepper__item.is-active { color: var(--text); border-color: var(--cyan); }
.stepper__item.is-active span { background: var(--grad); color: #06121a; }
.stepper__item.is-done span { background: var(--cyan-dim); color: #06121a; }

/* Dropzone */
.dropzone {
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--panel);
  padding: 3.5rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.dropzone:hover { border-color: var(--cyan); background: var(--panel-2); }
.dropzone.is-drag { border-color: var(--cyan); background: rgba(37,99,235,0.07); transform: scale(1.005); }
.dropzone.is-compact { padding: 1rem 1.5rem; text-align: left; margin-bottom: 1.5rem; cursor: pointer; }
.dropzone.is-compact:hover { border-color: var(--cyan); }
.dropzone.is-compact .dropzone__inner::after {
  content: "Click to replace"; margin-left: auto;
  font-family: var(--font-mono); font-size: 0.75rem; color: var(--muted-2);
}
.dropzone.is-compact .dropzone__inner h2,
.dropzone.is-compact .dropzone__inner p { display: none; }
.dropzone.is-compact .dropzone__inner::before {
  content: "Your part is loaded";
  font-family: var(--font-mono); font-size: 0.85rem; color: var(--text);
}
.dropzone.is-compact .dropzone__icon { width: 34px; height: 34px; margin: 0; order: -1; display: inline-grid; place-items: center; flex: 0 0 auto; }
.dropzone.is-compact .dropzone__inner { display: flex; align-items: center; gap: 0.85rem; }
.dropzone__icon {
  width: 64px; height: 64px; margin: 0 auto 1rem;
  display: grid; place-items: center; border-radius: 16px;
  border: 1px solid var(--line-strong); color: var(--cyan); background: rgba(37,99,235,0.07);
}
.dropzone__icon svg { width: 34px; height: 34px; }
.dropzone h2 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 0.4rem; }
.dropzone p { color: var(--muted); margin-bottom: 0.3rem; }
.linkbtn { background: none; border: 0; color: var(--cyan); font: inherit; cursor: pointer; text-decoration: underline; }
.dropzone__formats { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted-2); margin-top: 0.8rem; }
.dropzone__privacy { font-size: 0.82rem; color: var(--muted-2); margin-top: 0.8rem; }

/* Workspace */
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 1.5rem; align-items: start; }

/* Viewer */
.viewer {
  position: sticky; top: 90px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden;
}
.viewer__canvas {
  position: relative; width: 100%; height: 560px;
  background:
    radial-gradient(120% 90% at 50% 28%, #ffffff 0%, #eef2f8 45%, #dde4ee 100%);
}
.viewer__controls {
  position: absolute; top: 12px; right: 12px; z-index: 5;
  display: flex; gap: 0.4rem;
}
.vbtn {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.02em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line-strong);
  border-radius: 8px; padding: 0.45rem 0.75rem; cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}
.vbtn:hover { color: var(--text); border-color: var(--cyan); }
.vbtn.is-active { color: #06121a; background: var(--cyan); border-color: transparent; font-weight: 700; }
.viewer__canvas canvas { display: block; width: 100% !important; height: 100% !important; }
.viewer__loading, .viewer__error {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1rem;
  background: rgba(245,248,251,0.86); color: var(--text); text-align: center; padding: 2rem;
  font-family: var(--font-mono); font-size: 0.9rem;
}
.viewer__error { color: var(--amber); }
.spinner {
  width: 46px; height: 46px; border-radius: 50%;
  border: 3px solid rgba(37,99,235,0.22); border-top-color: var(--cyan);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.viewer__toolbar {
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  padding: 0.7rem; border-top: 1px solid var(--line); background: var(--bg-2);
}
.tool {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.02em;
  color: var(--muted); background: transparent; border: 1px solid var(--line);
  border-radius: 8px; padding: 0.45rem 0.7rem; cursor: pointer; transition: all 0.2s ease;
}
.tool:hover { color: var(--text); border-color: var(--line-strong); }
.tool.is-active { color: #06121a; background: var(--cyan); border-color: transparent; font-weight: 700; }
.viewer__hint { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted-2); padding: 0.5rem 0.8rem; text-align: center; }

/* Dimensions overlay next to the 3D model (mm + in) */
.viewer__dims {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  display: grid; gap: 0.45rem;
  padding: 0.75rem 0.9rem;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.vdim { display: flex; align-items: center; gap: 0.6rem; }
.vdim__axis {
  width: 20px; height: 20px; flex: none;
  display: grid; place-items: center; border-radius: 5px;
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700;
}
.vdim__axis--x { color: #ff6b6b; background: rgba(255, 107, 107, 0.16); }
.vdim__axis--y { color: #51cf66; background: rgba(81, 207, 102, 0.16); }
.vdim__axis--z { color: #4dabf7; background: rgba(77, 171, 247, 0.16); }
.vdim__vals { display: flex; flex-direction: column; line-height: 1.15; font-family: var(--font-mono); }
.vdim__mm { color: var(--text); font-size: 0.82rem; }
.vdim__in { color: var(--muted); font-size: 0.72rem; }

/* Floating dimension labels attached to the 3D callouts (CSS2DRenderer) */
.dimlabel {
  pointer-events: none;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  font-family: var(--font-mono);
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line-strong);
  border-left-width: 3px;
  border-radius: 7px;
  padding: 0.25rem 0.5rem;
  backdrop-filter: blur(4px);
  box-shadow: 0 4px 14px rgba(12, 22, 41, 0.18);
}
.dimlabel__mm { color: var(--text); font-size: 0.8rem; font-weight: 700; }
.dimlabel__in { color: var(--muted); font-size: 0.68rem; }
.dimlabel--x { border-left-color: #ff6b6b; }
.dimlabel--y { border-left-color: #51cf66; }
.dimlabel--z { border-left-color: #4dabf7; }

/* Panel */
.panel { display: grid; gap: 1.2rem; }
.panel__file {
  display: flex; align-items: baseline; justify-content: space-between; gap: 1rem;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0.9rem 1.1rem;
}
.panel__filename { font-family: var(--font-mono); font-size: 0.9rem; color: var(--text); word-break: break-all; }
.panel__filesize { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted-2); white-space: nowrap; }
.panel__block { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.panel__block h3 { font-family: var(--font-display); font-size: 1.1rem; margin-bottom: 1rem; }
.panel__blockhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.panel__blockhead h3 { margin-bottom: 0; }

/* Unit toggle */
.unitToggle { display: inline-flex; border: 1px solid var(--line-strong); border-radius: 8px; overflow: hidden; }
.unitToggle__btn { background: transparent; border: 0; color: var(--muted); font-family: var(--font-mono); font-size: 0.78rem; padding: 0.3rem 0.7rem; cursor: pointer; }
.unitToggle__btn.is-active { background: var(--cyan); color: #06121a; font-weight: 700; }

/* Dimensions */
.dims { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; margin-bottom: 1.2rem; }
.dim { background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; padding: 0.8rem; text-align: center; }
.dim__axis { display: inline-block; font-family: var(--font-mono); font-weight: 700; font-size: 0.7rem; padding: 0.1rem 0.4rem; border-radius: 5px; margin-bottom: 0.4rem; }
.dim__axis--x { color: #ff6b6b; background: rgba(255,107,107,0.14); }
.dim__axis--y { color: #51cf66; background: rgba(81,207,102,0.14); }
.dim__axis--z { color: #4dabf7; background: rgba(77,171,247,0.14); }
.dim__val { display: block; font-family: var(--font-mono); font-size: 0.9rem; color: var(--text); }
.dim__val2 { display: block; font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); margin-top: 0.15rem; }
.panel__units { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.08em; }

.metrics { list-style: none; display: grid; gap: 0.55rem; }
.metrics li { display: flex; justify-content: space-between; font-size: 0.88rem; padding-bottom: 0.55rem; border-bottom: 1px solid var(--line); }
.metrics li:last-child { border-bottom: 0; padding-bottom: 0; }
.metrics span { color: var(--muted); }
.metrics strong { font-family: var(--font-mono); color: var(--cyan); font-weight: 700; }

/* Price estimate */
.price__empty { color: var(--muted); font-size: 0.9rem; line-height: 1.5; }
.price__empty strong { color: var(--cyan); }
.price__lines { list-style: none; display: grid; gap: 0.55rem; }
.price__lines li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: 0.88rem; padding-bottom: 0.55rem; border-bottom: 1px solid var(--line); }
.price__lines li:last-child { border-bottom: 0; padding-bottom: 0; }
.price__lines span { color: var(--muted); display: flex; flex-direction: column; }
.price__lines span em { font-style: normal; font-size: 0.72rem; color: var(--muted-2); margin-top: 0.15rem; }
.price__lines strong { font-family: var(--font-mono); color: var(--text); font-weight: 700; white-space: nowrap; text-align: right; }
.price__total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed var(--line-strong); }
.price__total span { font-family: var(--font-display); font-size: 1rem; }
.price__total strong { font-family: var(--font-mono); font-size: 1.5rem; font-weight: 800; color: var(--amber); }
.price__total--custom strong { font-size: 1.1rem; }
.price__note { margin-top: 0.9rem; font-size: 0.72rem; color: var(--muted-2); line-height: 1.5; }

/* Config */
.config fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
.config legend, .leadtime + *, .config .field label { font-family: var(--font-mono); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.config__processes { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.config__processes legend { grid-column: 1 / -1; margin-bottom: 0.5rem; }
.proc { cursor: pointer; }
.proc input { position: absolute; opacity: 0; }
.proc__card { display: block; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0.8rem; transition: all 0.2s ease; height: 100%; }
.proc__name { display: block; font-weight: 600; font-size: 0.9rem; }
.proc__desc { display: block; font-size: 0.74rem; color: var(--muted-2); margin-top: 0.2rem; }
.proc input:checked + .proc__card { border-color: var(--cyan); background: rgba(37,99,235,0.08); box-shadow: 0 0 0 1px var(--cyan); }
.proc input:focus-visible + .proc__card { outline: 2px solid var(--cyan); }

.config__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.config .field, .submit .field { margin-bottom: 0.9rem; display: flex; flex-direction: column; gap: 0.4rem; }
.config select, .config input, .config textarea,
.submit input {
  background: var(--bg); border: 1px solid var(--line-strong); border-radius: 9px;
  padding: 0.7rem 0.8rem; color: var(--text); font-family: var(--font-sans); font-size: 0.9rem;
}
.config select:focus, .config input:focus, .config textarea:focus, .submit input:focus {
  outline: none; border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(37,99,235,0.16);
}
.leadtime { display: grid; gap: 0.5rem; }
.lead { display: flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; color: var(--text); cursor: pointer; }
.lead input { accent-color: var(--cyan); }
.lead__fee { color: var(--cyan); font-weight: 700; margin-left: 0.15rem; }

.qp__disclaimer { color: var(--muted-2); font-size: 0.82rem; margin-top: 2rem; max-width: 80ch; }

@media (max-width: 980px) {
  .workspace { grid-template-columns: 1fr; }
  .viewer { position: static; }
  .viewer__canvas { height: 440px; }
}

/* Embedded (inside the quote modal): hide page chrome */
html.embed .nav,
html.embed .footer { display: none; }
html.embed body { background: var(--bg); }
html.embed .qp { padding-top: 2rem; padding-bottom: 2rem; }
html.embed .viewer { top: 1rem; }

/* ===========================================================
   Instant Quote modal (popup)
   =========================================================== */
.qmodal { position: fixed; inset: 0; z-index: 2000; display: none; }
.qmodal.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5vh 1rem;
}
.qmodal__backdrop {
  position: absolute; inset: 0;
  background: rgba(13, 22, 38, 0.45);
  backdrop-filter: blur(6px);
  animation: qmodalFade 0.25s ease;
}
.qmodal__dialog {
  position: relative;
  width: min(1240px, 100%);
  height: 95vh;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 40px 120px -30px rgba(13, 22, 38, 0.5);
  animation: qmodalPop 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
.qmodal__frame {
  width: 100%; height: 100%;
  border: 0; background: var(--bg);
  opacity: 0; transition: opacity 0.3s ease;
}
.qmodal.is-loaded .qmodal__frame { opacity: 1; }
.qmodal__loader {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  background: var(--bg);
}
.qmodal.is-loaded .qmodal__loader { display: none; }
.qmodal__close {
  position: absolute; top: 12px; right: 14px; z-index: 3;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--line-strong);
  color: var(--text); font-size: 1.1rem; cursor: pointer;
  backdrop-filter: blur(8px);
  transition: all 0.2s ease;
}
.qmodal__close:hover { border-color: var(--cyan); color: var(--cyan); transform: rotate(90deg); }

@keyframes qmodalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes qmodalPop { from { opacity: 0; transform: translateY(20px) scale(0.98); } to { opacity: 1; transform: none; } }

@media (max-width: 560px) {
  .qmodal.is-open { padding: 0; }
  .qmodal__dialog { height: 100vh; width: 100%; border-radius: 0; border: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .qmodal__backdrop, .qmodal__dialog { animation: none; }
  .hero__grid { animation: none; }
  .clock__hand { animation: none; }
}

@media (max-width: 560px) {
  .topbar { font-size: 0.64rem; letter-spacing: 0.05em; gap: 0.4rem; }
  .topbar__extra { display: none; }
  .hero__rewind { white-space: normal; }
}

/* ---------------- Reveal animation ---------------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 920px) {
  .nav__links {
    position: fixed; top: 64px; right: 0;
    flex-direction: column; align-items: flex-start;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(14px);
    border-left: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 1.5rem 1.8rem;
    gap: 1.2rem;
    width: min(78vw, 280px);
    height: calc(100svh - 64px);
    transform: translateX(110%);
    transition: transform 0.3s ease;
  }
  .has-topbar .nav__links { top: 106px; height: calc(100svh - 106px); }
  .nav__links.is-open { transform: translateX(0); }
  .nav__toggle { display: flex; }
  .stats__inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .cards { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: 1fr 1fr; }
  .cap__grid { grid-template-columns: 1fr; }
  .caps { grid-template-columns: 1fr; }
  .caps__tabs {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .caps__tab { flex: 1 1 auto; text-align: center; padding: 0.7rem 0.9rem; font-size: 0.82rem; }
  .caps__panel { padding: 1.8rem 1.4rem; }
  .footer__inner { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 560px) {
  .section { padding: 4.5rem 1.25rem; }
  .stats__inner { grid-template-columns: 1fr 1fr; }
  .timeline { grid-template-columns: 1fr; }
  .about__points { grid-template-columns: 1fr; }
  .quote__form { grid-template-columns: 1fr; }
  .footer__cols { grid-template-columns: 1fr 1fr; }
  .footer__bottom { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
