/* ==========================================================================
   AMSG ITB — Advanced Manufacturing Study Group
   Visual language inspired by formula1.com: dark, bold, red accents.
   ========================================================================== */

:root {
  --red: #e10600;
  --red-dark: #b10500;
  --bg: #0a0a0d;
  --bg-2: #111116;
  --card: #15151b;
  --card-2: #1b1b22;
  --line: #26262f;
  --line-2: #33333d;
  --text: #f4f4f6;
  --muted: #9a9aa6;
  --green: #1fa34a;
  --blue: #1f6fe0;
  --yellow: #e0a91f;
  --radius: 10px;
  --max: 1240px;
  --nav-h: 68px;
  --font: "Titillium Web", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.red { color: var(--red); }

/* ---------- Typography ---------- */
.display {
  font-weight: 900;
  text-transform: uppercase;
  line-height: .95;
  letter-spacing: .5px;
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.6rem);
}
.display-sm { font-size: clamp(2rem, 4.6vw, 3.4rem); }

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--red);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
}
.kicker::before {
  content: "";
  width: 18px;
  height: 3px;
  background: var(--red);
  transform: skewX(-30deg);
}

.lead { color: #c9c9d1; font-size: 1.05rem; max-width: 520px; }
.muted { color: var(--muted); }

.label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 6px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: background .2s, border-color .2s, transform .2s;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; transition: transform .2s; }
.btn:hover svg { transform: translateX(3px); }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }
.btn-ghost { border-color: var(--line-2); background: rgba(10, 10, 13, .6); }
.btn-ghost:hover { border-color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 14px; font-size: .75rem; }

.icon-btn {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  position: relative;
  transition: background .2s;
}
.icon-btn:hover { background: var(--card-2); }
.icon-btn svg { width: 19px; height: 19px; }

.badge-count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.badge-count:empty,
.badge-count[data-count="0"] { display: none; }

/* ---------- Navbar ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  background: rgba(10, 10, 13, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav .container {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: .5px;
  flex-shrink: 0;
}
.logo-mark { width: 34px; height: 18px; }
.nav-links {
  display: flex;
  gap: 4px;
  margin: 0 auto;
  list-style: none;
  padding: 0;
}
.nav-links a {
  display: block;
  padding: 8px 12px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #cfcfd6;
  position: relative;
  transition: color .2s;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -2px;
  height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transition: transform .25s;
}
.nav-links a:hover { color: #fff; }
.nav-links a.active { color: #fff; }
.nav-links a.active::after,
.nav-links a:hover::after { transform: scaleX(1); }
.nav-tools { display: flex; align-items: center; gap: 4px; }
.lang {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 6px 8px;
  border: 0;
  background: transparent;
  color: #cfcfd6;
}
.itb-logo {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding-left: 14px;
  border-left: 1px solid var(--line-2);
  font-weight: 900;
  font-size: 1rem;
  letter-spacing: 1px;
}
.itb-logo svg { width: 22px; height: 22px; }
.burger { display: none; }

.nav-search {
  position: absolute;
  inset: var(--nav-h) 0 auto 0;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
  display: none;
}
.nav-search.open { display: block; }
.nav-search form { display: flex; gap: 10px; }

/* ---------- Generic inputs ---------- */
.input,
.textarea,
.select {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  padding: 12px 14px;
  outline: none;
  transition: border-color .2s;
}
.input:focus,
.textarea:focus,
.select:focus { border-color: var(--red); }
.textarea { resize: vertical; min-height: 96px; }
.input::placeholder,
.textarea::placeholder { color: #6c6c77; }

/* ---------- Chips / filters ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 16px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  background: transparent;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: #cfcfd6;
  transition: all .2s;
}
.chip:hover { border-color: #fff; color: #fff; }
.chip.active { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- Status pills ---------- */
.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: 1.1px;
  text-transform: uppercase;
  color: #fff;
}
.pill-completed { background: var(--green); }
.pill-progress { background: var(--blue); }
.pill-testing { background: var(--yellow); color: #1a1300; }
.pill-production { background: var(--red); }

/* ---------- Media placeholders ---------- */
.media {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 70% 20%, rgba(225, 6, 0, .16), transparent 55%),
    radial-gradient(90% 80% at 20% 100%, rgba(60, 110, 200, .12), transparent 60%),
    linear-gradient(160deg, #1c1c24, #0d0d11);
  display: grid;
  place-items: center;
  color: #d6d6de;
}
.media::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}
.media svg.art {
  width: 46%;
  max-width: 220px;
  height: auto;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,.6));
  position: relative;
  z-index: 1;
}
.media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}

/* ---------- Page header ---------- */
.page-head { padding: 64px 0 32px; position: relative; }
.page-head .lead { margin-top: 14px; }
.page-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.section { padding: 32px 0 80px; }

/* Diagonal red stripes accent (top-left) */
.stripes {
  position: absolute;
  top: 0;
  left: 0;
  width: 160px;
  height: 160px;
  background: repeating-linear-gradient(-45deg, rgba(225,6,0,.55) 0 6px, transparent 6px 16px);
  mask-image: linear-gradient(135deg, #000 20%, transparent 70%);
  -webkit-mask-image: linear-gradient(135deg, #000 20%, transparent 70%);
  pointer-events: none;
}

/* ==========================================================================
   1. HOME
   ========================================================================== */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10,10,13,.97) 0%, rgba(10,10,13,.75) 40%, rgba(10,10,13,.1) 75%),
    radial-gradient(60% 70% at 72% 55%, #1a2a48 0%, #0b1020 55%, #07070a 100%);
}
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.hero-machine {
  position: absolute;
  right: 4%;
  top: 0;
  height: 100%;
  width: 52%;
  z-index: -1;
}
.hero-machine svg { width: 100%; height: 100%; }
.hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 56px;
  padding-bottom: 40px;
}
.hero h1 {
  font-size: clamp(2.8rem, 7.4vw, 5.6rem);
  margin: 22px 0 22px;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.hero-bottom {
  border-top: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.5));
}
.hero-bottom .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.stats { display: flex; }
.stat {
  padding: 26px 48px 26px 0;
  margin-right: 48px;
  border-right: 1px solid var(--line-2);
}
.stat:last-child { border-right: 0; margin-right: 0; }
.stat-num { font-size: 2.1rem; font-weight: 900; line-height: 1; }
.stat-label { font-size: .82rem; color: var(--muted); margin-top: 6px; }
.hero-tagline {
  text-align: left;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: #cfcfd6;
  line-height: 1.5;
}
.hero-tagline .bar {
  margin-top: 12px;
  height: 3px;
  width: 120px;
  background: var(--line-2);
  position: relative;
  overflow: hidden;
}
.hero-tagline .bar::after {
  content: "";
  position: absolute;
  inset: 0 70% 0 0;
  background: var(--red);
  animation: bar 3.5s ease-in-out infinite;
}
@keyframes bar {
  0% { inset: 0 100% 0 0; }
  50% { inset: 0 30% 0 0; }
  100% { inset: 0 0 0 100%; }
}

.spark { animation: spark 1.2s linear infinite; transform-origin: center; }
@keyframes spark {
  0% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)); }
}

/* Home sections */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.section-head h2 { margin: 8px 0 0; }
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.link-arrow svg { width: 16px; height: 16px; color: var(--red); transition: transform .2s; }
.link-arrow:hover svg { transform: translateX(4px); }

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.tile {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .25s, transform .25s;
  display: flex;
  flex-direction: column;
}
.tile:hover { border-color: var(--red); transform: translateY(-3px); }
.tile .media { aspect-ratio: 16 / 10; }
.tile-body { padding: 18px 20px 20px; }
.tile-body h3 { margin: 6px 0 6px; font-size: 1.2rem; font-weight: 900; text-transform: uppercase; }

.cta-band {
  position: relative;
  overflow: hidden;
  border-radius: 14px;
  padding: 48px;
  background:
    repeating-linear-gradient(-45deg, rgba(255,255,255,.05) 0 6px, transparent 6px 18px),
    linear-gradient(110deg, var(--red) 0%, #8c0400 100%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.cta-band h2 { margin: 0; }
.cta-band .btn { background: #fff; color: #111; }
.cta-band .btn:hover { background: #ececec; }

/* ==========================================================================
   2. PROJECT CALENDAR
   ========================================================================== */
.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}
.year-tabs { display: flex; gap: 8px; justify-content: flex-end; margin-bottom: 18px; }
.year-tabs .chip { min-width: 70px; }
.rounds { display: flex; flex-direction: column; gap: 10px; }
.round {
  display: grid;
  grid-template-columns: 74px 120px 1fr auto 28px;
  align-items: center;
  gap: 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 18px 10px 14px;
  transition: border-color .2s, background .2s;
  position: relative;
}
.round::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  background: var(--red);
  border-radius: 0 3px 3px 0;
  opacity: 0;
  transition: opacity .2s;
}
.round:hover,
.round.hl { border-color: var(--line-2); background: var(--card-2); }
.round:hover::before,
.round.hl::before { opacity: 1; }
.round-no { font-weight: 900; font-size: 1.6rem; color: var(--red); line-height: 1; }
.round-date { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 4px; }
.round .media { aspect-ratio: 16 / 10; border-radius: 6px; }
.round .media svg.art { width: 52%; }
.round h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.round p { margin: 2px 0 0; color: var(--muted); font-size: .85rem; }
.round .arrow { color: var(--red); width: 20px; height: 20px; }

.track-card {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
  background: radial-gradient(80% 60% at 50% 40%, #15151c, transparent);
  border-radius: 14px;
  padding: 10px;
}
.track-card svg { width: 100%; height: auto; }
.track-path { fill: none; stroke: #2c2c36; stroke-width: 14; stroke-linecap: round; stroke-linejoin: round; }
.track-line { fill: none; stroke: #4b4b58; stroke-width: 2; stroke-dasharray: 6 6; }
.track-run { fill: none; stroke: var(--red); stroke-width: 3; stroke-linecap: round; }
.track-dot { cursor: pointer; transition: r .2s; }
.track-label { font-size: 11px; font-weight: 700; fill: #cfcfd6; font-family: var(--font); }
.empty {
  padding: 48px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
}

/* ==========================================================================
   3. PROJECT DETAIL
   ========================================================================== */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #cfcfd6;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}
.back-link svg { width: 16px; height: 16px; color: var(--red); }
.back-link:hover { color: #fff; }
.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
  gap: 48px;
  padding: 36px 0 80px;
  align-items: start;
}
.detail-layout h1 { margin: 22px 0 10px; }
.specs { margin-top: 28px; border-top: 1px solid var(--line); }
.spec {
  display: grid;
  grid-template-columns: 140px 1fr;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: .95rem;
}
.spec dt { color: var(--muted); font-weight: 600; }
.spec dd { margin: 0; font-weight: 600; }
.gallery-main { aspect-ratio: 4 / 3; border-radius: 14px; }
.gallery-main svg.art { width: 52%; max-width: 320px; }
.thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 14px; }
.thumb {
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  border: 2px solid transparent;
  padding: 0;
  overflow: hidden;
  background: none;
}
.thumb .media { width: 100%; height: 100%; }
.thumb .media svg.art { width: 56%; }
.thumb.active { border-color: #fff; }
.thumb:hover { border-color: var(--line-2); }
.thumb.active:hover { border-color: #fff; }
.play {
  position: absolute;
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: #111;
  display: grid;
  place-items: center;
}
.play svg { width: 16px; height: 16px; margin-left: 2px; }
.related { padding-bottom: 80px; }

/* ==========================================================================
   4. TECHNOLOGY
   ========================================================================== */
.tagline-right {
  text-align: right;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.4;
}
.tech-list { display: flex; flex-direction: column; gap: 18px; }
.tech {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .25s;
}
.tech:hover { border-color: var(--red); }
.tech .media { min-height: 240px; }
.tech-body {
  padding: 30px 34px;
  display: flex;
  flex-direction: column;
}
.tech-top { display: flex; justify-content: space-between; gap: 20px; }
.tech-top h2 { margin: 0 0 8px; font-size: 1.8rem; font-weight: 900; text-transform: uppercase; }
.tech-top p { margin: 0; color: #c9c9d1; max-width: 360px; }
.tech-top .arrow { width: 26px; height: 26px; flex-shrink: 0; transition: transform .2s, color .2s; }
.tech:hover .tech-top .arrow { transform: translateX(4px); color: var(--red); }
.tech-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: auto;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
.tech-meta div p { margin: 6px 0 0; font-size: .92rem; }
.tech-more {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.tech.open .tech-more { max-height: 400px; }
.tech-more ul { margin: 18px 0 0; padding-left: 18px; color: #c9c9d1; font-size: .92rem; }
.tech-more li { margin-bottom: 4px; }
.tech.open .tech-top .arrow { transform: rotate(90deg); color: var(--red); }

/* ==========================================================================
   5. STORE
   ========================================================================== */
.store-tools { display: flex; align-items: center; gap: 12px; }
.search-box { position: relative; width: 320px; max-width: 100%; }
.search-box .input { padding-right: 44px; }
.search-box svg {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted);
}
.cart-btn { width: 46px; height: 46px; border: 1px solid var(--line-2); border-radius: 8px; }
.products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 26px;
}
.product {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .25s;
}
.product:hover { border-color: var(--line-2); }
.product .media { aspect-ratio: 4 / 3; }
.product-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.product h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.product .meta { color: var(--muted); font-size: .82rem; margin-top: 2px; }
.product .price { font-weight: 900; font-size: 1.1rem; margin: 10px 0 14px; }
.product .btn { margin-top: auto; }
.fav {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: rgba(0,0,0,.45);
  display: grid;
  place-items: center;
  color: #fff;
}
.fav svg { width: 17px; height: 17px; }
.fav.on { color: var(--red); }
.fav.on svg { fill: var(--red); }

/* Cart drawer */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  max-width: 100%;
  background: var(--bg-2);
  border-left: 1px solid var(--line);
  z-index: 90;
  transform: translateX(100%);
  transition: transform .3s ease;
  display: flex;
  flex-direction: column;
}
.drawer.open { transform: none; }
.drawer.open + .drawer-backdrop,
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h3 { margin: 0; font-weight: 900; text-transform: uppercase; }
.drawer-body { flex: 1; overflow-y: auto; padding: 10px 22px; }
.drawer-foot { padding: 20px 22px; border-top: 1px solid var(--line); }
.cart-item {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.cart-item .media { width: 64px; height: 64px; border-radius: 8px; }
.cart-item .media svg.art { width: 70%; }
.cart-item h4 { margin: 0; font-size: .95rem; }
.cart-item small { color: var(--muted); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 6px; margin-top: 6px; }
.qty button { width: 28px; height: 28px; border: 0; background: none; }
.qty span { min-width: 24px; text-align: center; font-size: .9rem; }
.remove { border: 0; background: none; color: var(--muted); font-size: .78rem; }
.remove:hover { color: var(--red); }
.total-row { display: flex; justify-content: space-between; font-weight: 700; font-size: 1.1rem; margin-bottom: 14px; }

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 30px);
  background: #fff;
  color: #111;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: .9rem;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: all .3s;
  border-left: 4px solid var(--red);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ==========================================================================
   6. CUSTOM ORDER
   ========================================================================== */
.steps { display: flex; gap: 26px; }
.step {
  text-align: center;
  min-width: 70px;
  color: #55555f;
  border-bottom: 3px solid transparent;
  padding-bottom: 8px;
}
.step-no { font-size: 2.2rem; font-weight: 900; line-height: 1; }
.step-name { font-size: .72rem; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; margin-top: 4px; }
.step.active { color: var(--red); border-color: var(--red); }
.step.active .step-name { color: #fff; }
.step.done { color: #fff; }

.order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 28px;
  align-items: stretch;
  padding-bottom: 80px;
}
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 28px;
}
.field { margin-bottom: 22px; }
.field > label,
.field > .field-label { display: block; font-weight: 700; font-size: .92rem; margin-bottom: 10px; }
.field-row { display: grid; grid-template-columns: 160px 1fr; gap: 18px; }
.field-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.option-group { display: flex; flex-wrap: wrap; gap: 8px; }
.option-group input { position: absolute; opacity: 0; pointer-events: none; }
.option-group label {
  padding: 9px 16px;
  border-radius: 6px;
  border: 1px solid var(--line-2);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  user-select: none;
}
.option-group label:hover { border-color: #fff; }
.option-group input:checked + label { background: var(--red); border-color: var(--red); color: #fff; }
.option-group input:focus-visible + label { outline: 2px solid #fff; outline-offset: 2px; }
.dropzone {
  border: 1.5px dashed var(--line-2);
  border-radius: 8px;
  padding: 26px;
  text-align: center;
  color: var(--muted);
  cursor: pointer;
  transition: border-color .2s, background .2s;
  font-size: .9rem;
}
.dropzone svg { width: 26px; height: 26px; margin: 0 auto 8px; display: block; color: #cfcfd6; }
.dropzone.drag,
.dropzone:hover { border-color: var(--red); background: rgba(225,6,0,.05); }
.dropzone .file-name { color: #fff; font-weight: 700; margin-top: 6px; }
.stepper { display: flex; border: 1px solid var(--line-2); border-radius: 6px; overflow: hidden; background: var(--bg-2); }
.stepper button { width: 42px; border: 0; background: none; font-size: 1.1rem; }
.stepper button:hover { background: var(--card-2); }
.stepper input { width: 100%; text-align: center; border: 0; background: none; outline: none; padding: 11px 0; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.form-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.form-error { color: #ff6b66; font-size: .85rem; margin-top: 8px; min-height: 1em; }
.order-visual {
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  min-height: 420px;
}
.order-visual .media { position: absolute; inset: 0; }
.order-visual .media svg.art { width: 62%; max-width: 300px; }
.order-visual .caption {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 3;
  text-align: right;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.1;
  font-size: 1.1rem;
}
.order-visual .stripes { left: auto; right: 0; top: auto; bottom: 0; transform: rotate(180deg); }
.summary { border-top: 1px solid var(--line); }
.summary .spec { grid-template-columns: 170px 1fr; }
.success { text-align: center; padding: 30px 10px; }
.success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--green);
  display: grid;
  place-items: center;
}
.success-icon svg { width: 36px; height: 36px; }
.order-id { font-weight: 900; font-size: 1.4rem; color: var(--red); letter-spacing: 1px; }

/* ==========================================================================
   7. TEAM
   ========================================================================== */
.team-stats { display: flex; gap: 40px; }
.team-stats .stat-num { font-size: 2.4rem; }
.team-stats > div { text-align: center; }
.team-banner {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 21 / 7;
  margin-bottom: 26px;
}
.team-banner .media { position: absolute; inset: 0; }
.team-banner .crowd { position: absolute; inset: 0; z-index: 1; display: flex; align-items: flex-end; justify-content: center; gap: 1.2%; padding: 0 4%; }
.team-banner .crowd svg { height: 78%; width: auto; opacity: .9; }
.team-banner .crowd svg:nth-child(odd) { height: 68%; }
.team-banner .shade { position: absolute; inset: 0; z-index: 2; background: linear-gradient(90deg, rgba(10,10,13,.9) 0%, rgba(10,10,13,.2) 50%, transparent), linear-gradient(0deg, rgba(10,10,13,.45), transparent 35%); }
.team-banner .caption {
  position: absolute;
  left: 32px;
  bottom: 28px;
  z-index: 3;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1.05;
  font-size: clamp(1rem, 2.4vw, 1.6rem);
}
.members {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 22px;
}
.member {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .25s, transform .25s;
}
.member:hover { border-color: var(--red); transform: translateY(-3px); }
.member .media { aspect-ratio: 1 / 1.05; }
.member .media svg.art { width: 70%; max-width: none; align-self: end; filter: none; }
.member-body { padding: 14px 16px 16px; }
.member h3 { margin: 0; font-size: 1rem; font-weight: 700; }
.member p { margin: 2px 0 0; font-size: .82rem; color: var(--muted); }
.member .socials { display: flex; gap: 8px; margin-top: 10px; }
.member .socials a { color: var(--muted); }
.member .socials a:hover { color: #fff; }
.member .socials svg { width: 16px; height: 16px; }

/* ==========================================================================
   8. NEWS / PADDOCK
   ========================================================================== */
.news-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
  margin-top: 26px;
}
.news-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  grid-column: span 2;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  transition: border-color .25s;
}
.news-card.big { grid-column: span 3; min-height: 340px; }
.news-card.big:first-child { grid-column: span 4; }
.news-card.big:nth-child(2) { grid-column: span 2; }
.news-card:hover { border-color: var(--red); }
.news-card .media { position: absolute; inset: 0; }
.news-card .media svg.art { transition: transform .5s; }
.news-card:hover .media svg.art { transform: scale(1.06); }
.news-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(0deg, rgba(8,8,10,.95) 0%, rgba(8,8,10,.4) 50%, transparent 80%);
}
.news-card .tag {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 3;
  background: var(--red);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 4px;
}
.news-card .body { position: relative; z-index: 3; padding: 20px 22px; display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; }
.news-card h3 { margin: 0 0 6px; font-weight: 700; line-height: 1.15; font-size: 1.05rem; }
.news-card.big h3 { font-size: 1.55rem; }
.news-card .date { font-size: .78rem; color: var(--muted); }
.news-card .arrow { width: 20px; height: 20px; color: #fff; flex-shrink: 0; transition: transform .2s, color .2s; }
.news-card:hover .arrow { color: var(--red); transform: translateX(4px); }

/* Article modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,.75);
}
.modal.open { display: flex; }
.modal-box {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  max-width: 720px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
}
.modal-box .media { aspect-ratio: 16 / 7; }
.modal-content { padding: 26px 30px 32px; }
.modal-content h2 { margin: 10px 0 6px; font-weight: 900; font-size: 1.8rem; line-height: 1.15; }
.modal-close { position: absolute; top: 12px; right: 12px; z-index: 5; background: rgba(0,0,0,.6); }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--line);
  background: #070709;
  padding: 56px 0 24px;
  position: relative;
}
.footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 160px;
  height: 3px;
  background: var(--red);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 36px;
}
.footer h4 { margin: 0 0 14px; font-size: .78rem; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); }
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { margin-bottom: 8px; }
.footer li a { color: #cfcfd6; font-size: .92rem; }
.footer li a:hover { color: #fff; }
.footer p { color: #a6a6b0; font-size: .92rem; margin: 12px 0 0; }
.socials-row { display: flex; gap: 10px; margin-top: 18px; }
.socials-row a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  display: grid;
  place-items: center;
  transition: all .2s;
}
.socials-row a:hover { background: var(--red); border-color: var(--red); }
.socials-row svg { width: 16px; height: 16px; }
.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: .82rem;
}

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }

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

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .nav-links a { padding: 8px 8px; font-size: .72rem; }
  .members { grid-template-columns: repeat(3, 1fr); }
  .stat { padding-right: 28px; margin-right: 28px; }
}

@media (max-width: 960px) {
  .burger { display: grid; }
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-2);
    border-bottom: 1px solid var(--line);
    padding: 10px 16px 18px;
    gap: 0;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 14px 6px; font-size: .9rem; border-bottom: 1px solid var(--line); }
  .nav-links a::after { display: none; }
  .nav-links a.active { color: var(--red); }
  .nav-tools { margin-left: auto; }

  .calendar-layout,
  .detail-layout,
  .order-layout { grid-template-columns: 1fr; }
  .track-card { position: static; max-width: 360px; margin: 0 auto; }
  .order-visual { min-height: 260px; }
  .grid-3,
  .products { grid-template-columns: repeat(2, 1fr); }
  .tech { grid-template-columns: 1fr; }
  .tech .media { min-height: 200px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-machine { width: 80%; right: -15%; opacity: .55; }
  .hero-bottom .container { flex-direction: column; align-items: flex-start; }
  .hero-tagline { display: none; }
  .news-card.big:first-child,
  .news-card.big:nth-child(2),
  .news-card.big { grid-column: span 6; }
  .news-card { grid-column: span 3; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .itb-logo, .lang { display: none; }
  .stats { flex-wrap: wrap; width: 100%; }
  .stat { width: 50%; margin: 0; padding: 18px 0; border-right: 0; }
  .stat-num { font-size: 1.7rem; }
  .round { grid-template-columns: 54px 1fr 20px; gap: 12px; padding: 12px; }
  .round .media { display: none; }
  .round .pill { grid-column: 2; justify-self: start; grid-row: 2; }
  .round .arrow { grid-row: 1 / span 2; grid-column: 3; }
  .round-no { font-size: 1.25rem; grid-row: 1 / span 2; }
  .grid-3,
  .products { grid-template-columns: 1fr; }
  .products { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .product-body { padding: 12px; }
  .product h3 { font-size: .92rem; }
  .members { grid-template-columns: repeat(2, 1fr); }
  .news-card,
  .news-card.big,
  .news-card.big:first-child,
  .news-card.big:nth-child(2) { grid-column: span 6; }
  .news-card.big { min-height: 280px; }
  .field-row,
  .field-row-2 { grid-template-columns: 1fr; }
  .steps { gap: 10px; width: 100%; justify-content: space-between; }
  .step { min-width: 0; }
  .step-no { font-size: 1.6rem; }
  .step-name { font-size: .6rem; }
  .panel { padding: 20px; }
  .tech-body { padding: 22px; }
  .tech-meta { grid-template-columns: 1fr; gap: 14px; }
  .footer-grid { grid-template-columns: 1fr; }
  .team-banner { aspect-ratio: 16 / 9; }
  .team-stats { gap: 24px; }
  .cta-band { padding: 30px 22px; }
  .search-box { width: 100%; }
  .store-tools { width: 100%; }
  .spec { grid-template-columns: 120px 1fr; }
  .tagline-right { text-align: left; }
  .year-tabs { justify-content: flex-start; }
}

/* Keep the decorative stripes behind page titles */
.page-head .stripes { left: -24px; opacity: .45; z-index: 0; }
.page-head > :not(.stripes) { position: relative; z-index: 1; }
