/* ==========================================================
   BrickPi3 Static Website – Stylesheet
   ========================================================== */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:        #e63946;
  --red-dark:   #c1121f;
  --dark:       #1a1a2e;
  --dark2:      #16213e;
  --dark3:      #0f3460;
  --light:      #f8f9fa;
  --light2:     #e9ecef;
  --text:       #212529;
  --text-muted: #5c6b77; /* darkened from #6c757d → now 5.6:1 on white, WCAG AA ✓ */
  --white:      #ffffff;
  --radius:     10px;
  --radius-lg:  18px;
  --shadow:     0 4px 24px rgba(0,0,0,.10);
  --shadow-lg:  0 8px 40px rgba(0,0,0,.18);
  --font:       'Segoe UI', system-ui, -apple-system, sans-serif;
  --mono:       'Cascadia Code', 'Fira Code', 'Courier New', monospace;
  --transition: .25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a  { color: var(--red); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--red-dark); }
ul { list-style: none; }
code {
  font-family: var(--mono);
  font-size: .88em;
  background: rgba(0,0,0,.06);
  padding: 1px 5px;
  border-radius: 4px;
}

/* ---- Container ---- */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  letter-spacing: .02em;
}
.btn-primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn-primary:hover {
  background: var(--red-dark);
  border-color: var(--red-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(230,57,70,.35);
}
.btn-outline {
  background: transparent;
  color: var(--red);
  border-color: var(--red);
}
.btn-outline:hover {
  background: var(--red);
  color: var(--white);
  transform: translateY(-2px);
}
.btn-outline-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.6);
}
.btn-outline-light:hover {
  background: var(--white);
  color: var(--dark);
  border-color: var(--white);
}
.btn-nav {
  padding: 8px 20px;
  font-size: .88rem;
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
}
.btn-nav:hover {
  background: var(--red-dark);
  color: var(--white);
}
.btn-full { width: 100%; text-align: center; }

/* ---- Section shared ---- */
.section { padding: 96px 0; }
.section-light { background: var(--light); }
.section-dark  { background: var(--dark2); color: var(--white); }

.section-header {
  text-align: center;
  max-width: 660px;
  margin: 0 auto 64px;
}
.section-header h2 {
  font-size: clamp(1.75rem, 3vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
}
.section-header p {
  color: var(--text-muted);
  font-size: 1.05rem;
}
.section-header.light h2 { color: var(--white); }
.section-header.light p  { color: rgba(255,255,255,.7); }

.section-tag {
  display: inline-block;
  background: rgba(230,57,70,.12);
  color: var(--red-dark); /* #c1121f on pinkish bg → 5.1:1, WCAG AA ✓ */
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 14px;
  border-radius: 50px;
  margin-bottom: 14px;
}
.section-dark .section-tag {
  background: rgba(230,57,70,.25);
  color: var(--white); /* white on dark-red bg → 11:1, WCAG AAA ✓ */
}

/* ==========================================================
   HEADER / NAV
   ========================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(26, 26, 46, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.01em;
}
.logo img {
  height: 36px;
  width: 36px;
  object-fit: contain;
}
.logo span sup { font-size: .6em; color: var(--red); }
.logo:hover { color: var(--white); }

nav ul.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
nav ul.nav-links li a {
  color: rgba(255,255,255,.80);
  font-size: .92rem;
  font-weight: 500;
}
nav ul.nav-links li a:hover { color: var(--white); }

.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 10px;
  min-width: 44px;  /* WCAG 2.5.8 minimum touch target */
  min-height: 44px;
  line-height: 1;
}

.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--dark);
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 24px;
  gap: 12px;
}
.mobile-menu a {
  color: rgba(255,255,255,.9);
  font-size: .95rem;
  font-weight: 500;
  padding: 12px 0; /* min ~44px touch target */
  min-height: 44px;
  display: flex;
  align-items: center;
}
.mobile-menu.open { display: flex; }

/* ==========================================================
   HERO
   ========================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(135deg, var(--dark) 0%, var(--dark3) 50%, #1b2a4a 100%);
  overflow: hidden;
  padding-top: 68px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 60% at 70% 50%, rgba(230,57,70,.18) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 20% 80%, rgba(15,52,96,.6) 0%, transparent 60%);
  pointer-events: none;
}
/* Subtle dot-grid texture */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
}
.hero-overlay { display: none; }

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  padding: 80px 24px;
}
.hero-eyebrow {
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 20px;
}
.hero-content h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.08;
  margin-bottom: 24px;
  letter-spacing: -.02em;
}
.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: rgba(255,255,255,.75);
  max-width: 560px;
  margin-bottom: 40px;
  line-height: 1.7;
}
.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.hero-badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-badges span {
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.85);
  font-size: .8rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,.15);
  letter-spacing: .04em;
}

/* ==========================================================
   STATS BAR
   ========================================================== */
.stats-bar {
  background: var(--dark);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.stats-inner {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 0;
}
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
  flex: 1 1 140px;
  border-right: 1px solid rgba(255,255,255,.07);
}
.stat:last-child { border-right: none; }
.stat strong {
  font-size: 2rem;
  font-weight: 900;
  color: var(--red);
  line-height: 1;
}
.stat span {
  font-size: .78rem;
  color: rgba(255,255,255,.55);
  font-weight: 500;
  text-align: center;
  margin-top: 4px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

/* ==========================================================
   SPLIT ROW
   ========================================================== */
.split-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.split-row.reverse { direction: rtl; }
.split-row.reverse > * { direction: ltr; }

.split-text h3 {
  font-size: 1.9rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.2;
}
.split-text p {
  color: var(--text-muted);
  margin-bottom: 20px;
  font-size: 1.02rem;
}
.check-list { margin-bottom: 32px; }
.check-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  color: var(--text-muted);
  font-size: .98rem;
}
.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: 800;
}

.split-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  object-fit: cover;
}

/* ==========================================================
   FEATURES GRID
   ========================================================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 80px;
}
.feature-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: background var(--transition), transform var(--transition);
}
.feature-card:hover {
  background: rgba(255,255,255,.09);
  transform: translateY(-3px);
}
.feature-icon {
  font-size: 2rem;
  margin-bottom: 14px;
  line-height: 1;
}
.feature-card h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}
.feature-card p {
  font-size: .88rem;
  color: rgba(255,255,255,.6);
  line-height: 1.6;
}

/* Diagram */
.diagram-block {
  text-align: center;
  padding: 48px 0 0;
  border-top: 1px solid rgba(255,255,255,.08);
}
.diagram-block h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 28px;
  color: var(--white);
}
.diagram-img {
  max-width: 780px;
  margin: 0 auto 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.diagram-block p {
  color: rgba(255,255,255,.6);
  font-size: .95rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ==========================================================
   KITS / PRICING
   ========================================================== */
.kits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
  margin-bottom: 48px;
}

.kit-single {
  display: flex;
  justify-content: center;
  margin-bottom: 48px;
}
.kit-single .kit-card {
  max-width: 480px;
  width: 100%;
}

.kit-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 48px;
}
@media (max-width: 780px) {
  .kit-pair { grid-template-columns: 1fr; }
}

/* Classroom card */
.kit-card-classroom {
  border-color: #2d6a4f;
  box-shadow: 0 8px 40px rgba(45,106,79,.15);
}
.kit-qty-label {
  font-size: .85em;
  color: var(--text-muted);
  font-weight: 600;
}
.kit-price-block {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.kit-price-block .kit-price {
  margin-bottom: 0;
  color: #2d6a4f;
}
.kit-price-orig {
  font-size: 1rem;
  color: var(--text-muted);
  text-decoration: line-through;
}
.kit-discount-badge {
  display: inline-block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: #2d6a4f;
  color: var(--white);
  padding: 3px 10px;
  border-radius: 50px;
}
.kit-classroom-note {
  font-size: .82rem !important;
  background: #f0faf4;
  border: 1px solid #b7e4c7;
  border-radius: 8px;
  padding: 10px 14px;
  color: #1b4332 !important;
  margin-bottom: 16px !important;
}
.kit-card {
  background: var(--white);
  border: 2px solid var(--light2);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  position: relative;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--transition), transform var(--transition);
}
.kit-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.kit-card-featured {
  border-color: var(--red);
  box-shadow: 0 8px 40px rgba(230,57,70,.18);
}
.kit-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: var(--red);
  color: var(--white);
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 16px;
  align-self: flex-start;
}
.kit-card .kit-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  margin-bottom: 0;
  z-index: 1;
}
.badge-alt { background: var(--dark3); }
.badge-edu { background: #2d6a4f; }

.kit-card img {
  width: 100%;
  height: 200px;
  object-fit: contain;
  background: var(--light2);
  border-radius: var(--radius);
  margin-bottom: 20px;
  padding: 12px;
}
.kit-card h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 4px;
}
.kit-price {
  font-size: 2rem;
  font-weight: 900;
  color: var(--red);
  margin-bottom: 8px;
  line-height: 1;
}
.kit-note {
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: 12px;
  font-style: italic;
}
.kit-card p:not(.kit-price):not(.kit-note):not(.kit-requires) {
  font-size: .93rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.kit-includes {
  margin-bottom: 16px;
  flex: 1;
}
.kit-includes li {
  font-size: .88rem;
  color: var(--text-muted);
  padding: 4px 0 4px 22px;
  position: relative;
  border-bottom: 1px solid var(--light2);
}
.kit-includes li::before {
  content: '›';
  position: absolute;
  left: 6px;
  color: var(--red);
  font-weight: 800;
}
.kit-requires {
  font-size: .78rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.5;
}

/* Spare parts */
.spare-parts-note {
  display: flex;
  align-items: center;
  gap: 32px;
  background: var(--white);
  border: 1px solid var(--light2);
  border-radius: var(--radius);
  padding: 28px 32px;
  box-shadow: var(--shadow);
}
.spare-parts-note img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  background: var(--light2);
  border-radius: var(--radius);
  padding: 8px;
  flex-shrink: 0;
}
.spare-parts-note h4 { font-size: 1.1rem; font-weight: 700; margin-bottom: 6px; }
.spare-parts-note p  { color: var(--text-muted); font-size: .9rem; margin-bottom: 14px; }

/* ==========================================================
   TESTIMONIAL
   ========================================================== */
.testimonial-section {
  background: linear-gradient(135deg, var(--dark3) 0%, var(--dark) 100%);
  padding: 96px 0;
  color: var(--white);
}
.testimonial-section .container {
  display: flex;
  justify-content: center;
}
blockquote {
  max-width: 720px;
  border-left: 4px solid var(--red);
  padding-left: 28px;
}
blockquote p {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-style: italic;
  color: rgba(255,255,255,.85);
  line-height: 1.7;
  margin-bottom: 16px;
}
blockquote cite {
  font-size: .88rem;
  font-style: normal;
  color: rgba(255,255,255,.5);
  font-weight: 600;
}
.edu-cta h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 14px;
  line-height: 1.3;
}
.edu-cta p {
  color: rgba(255,255,255,.7);
  font-size: .98rem;
  margin-bottom: 24px;
}

/* ==========================================================
   GETTING STARTED STEPS
   ========================================================== */
.steps-block h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 32px;
  text-align: center;
}
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.step-card {
  background: var(--white);
  border: 1px solid var(--light2);
  border-radius: var(--radius);
  padding: 28px 22px;
  position: relative;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.step-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  background: var(--red);
  color: var(--white);
  font-weight: 900;
  font-size: 1.1rem;
  border-radius: 50%;
  margin-bottom: 16px;
  flex-shrink: 0;
}
.step-card h4 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.step-card p  { font-size: .88rem; color: var(--text-muted); margin-bottom: 14px; line-height: 1.55; }
.step-card a  { font-size: .85rem; font-weight: 600; color: var(--red); }
.step-card a:hover { color: var(--red-dark); }

/* ==========================================================
   SPECS TABLE
   ========================================================== */
.specs-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: start;
}
.specs-table-wrapper {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.1);
}
.specs-table {
  width: 100%;
  border-collapse: collapse;
}
.specs-table th,
.specs-table td {
  padding: 12px 18px;
  font-size: .88rem;
  line-height: 1.5;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.specs-table th {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.5);
  font-weight: 600;
  letter-spacing: .03em;
  width: 45%;
  text-align: left;
}
.specs-table td {
  color: rgba(255,255,255,.85);
}
.specs-table tr:last-child th,
.specs-table tr:last-child td { border-bottom: none; }
.specs-table a { color: #6ea8fe; }
.specs-table a:hover { color: #a5c8ff; text-decoration: underline; }

.specs-diagram img {
  border-radius: var(--radius);
  margin-bottom: 28px;
  width: 100%;
}
.specs-diagram h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--white);
}
.led-list { display: flex; flex-direction: column; gap: 10px; }
.led-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .85rem;
  color: rgba(255,255,255,.7);
}
.led-list strong { color: var(--white); }
.led {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}
.led.green  { background: #2dc653; box-shadow: 0 0 8px #2dc653; }
.led.yellow { background: #ffd60a; box-shadow: 0 0 8px #ffd60a; }
.led.red    { background: var(--red); box-shadow: 0 0 8px var(--red); }

/* ==========================================================
   PROGRAMMING LANGUAGES
   ========================================================== */
.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 56px;
}
.lang-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--white);
  border: 2px solid var(--light2);
  border-radius: var(--radius);
  padding: 24px 16px;
  color: var(--text);
  gap: 6px;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  cursor: pointer;
}
.lang-card:hover {
  border-color: var(--red);
  box-shadow: 0 4px 20px rgba(230,57,70,.14);
  transform: translateY(-3px);
  color: var(--text);
}
.lang-icon { font-size: 2rem; line-height: 1; margin-bottom: 4px; }
.lang-card strong { font-size: .95rem; font-weight: 700; }
.lang-card span   { font-size: .76rem; color: var(--text-muted); }
.lang-card-more {
  background: var(--light2);
  border-style: dashed;
  cursor: default;
}

/* Code Sample */
.code-sample {
  background: #1e1e2e;
  border-radius: var(--radius);
  padding: 28px 32px;
  border: 1px solid rgba(255,255,255,.08);
}
.code-sample h4 {
  font-size: .9rem;
  font-weight: 700;
  color: rgba(255,255,255,.5);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 16px;
}
.code-sample pre {
  font-family: var(--mono);
  font-size: .88rem;
  line-height: 1.7;
  color: #cdd6f4;
  overflow-x: auto;
  margin-bottom: 16px;
}
.code-comment { color: #9399b2; } /* lightened from #6c7086 → 5.4:1 on #1e1e2e, WCAG AA ✓ */
.code-kw      { color: #89b4fa; font-weight: 600; }
.code-str     { color: #a6e3a1; }
.code-note {
  font-size: .82rem;
  color: rgba(255,255,255,.45);
  margin-bottom: 0;
}
.code-note a { color: #6ea8fe; }
.code-note a:hover { text-decoration: underline; color: #a5c8ff; }

/* ==========================================================
   PROJECTS
   ========================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.project-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
}
.project-img-wrap {
  height: 200px;
  overflow: hidden;
  background: var(--dark3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.project-card:hover .project-img-wrap img { transform: scale(1.05); }
.project-img-placeholder { background: rgba(255,255,255,.04); }
.project-img-placeholder.bg-alt  { background: rgba(15,52,96,.6); }
.project-img-placeholder.bg-alt2 { background: rgba(45,106,79,.4); }
.project-icon {
  font-size: 3.5rem;
  opacity: .6;
}
.project-body {
  padding: 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.project-body h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 10px;
}
.project-body p {
  font-size: .88rem;
  color: rgba(255,255,255,.6);
  flex: 1;
  margin-bottom: 16px;
  line-height: 1.6;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}
.project-tags span {
  background: rgba(230,57,70,.2);
  color: #ff8fab;
  font-size: .72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 50px;
  letter-spacing: .04em;
}

.project-card-cta {
  background: linear-gradient(135deg, rgba(230,57,70,.25) 0%, rgba(15,52,96,.5) 100%);
  border-color: rgba(230,57,70,.3);
  display: flex;
  align-items: center;
  justify-content: center;
}
.project-cta-body {
  text-align: center;
  padding: 40px 28px;
}
.project-icon.large {
  font-size: 4rem;
  display: block;
  margin-bottom: 20px;
  opacity: .8;
}
.project-cta-body h4 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
}
.project-cta-body p {
  color: rgba(255,255,255,.65);
  font-size: .9rem;
  margin-bottom: 24px;
}

/* ==========================================================
   RESOURCES
   ========================================================== */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.resource-card {
  background: var(--white);
  border: 1px solid var(--light2);
  border-radius: var(--radius);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.resource-card:hover {
  border-color: var(--red);
  box-shadow: 0 6px 28px rgba(230,57,70,.12);
  transform: translateY(-3px);
  color: var(--text);
}
.resource-icon  { font-size: 2rem; line-height: 1; }
.resource-card h4 { font-size: .98rem; font-weight: 700; }
.resource-card p  { font-size: .84rem; color: var(--text-muted); line-height: 1.55; }
.resource-card-highlight {
  border-color: var(--red);
  background: linear-gradient(135deg, #fff5f7 0%, var(--white) 100%);
}

/* ==========================================================
   FOOTER
   ========================================================== */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,.65);
  padding-top: 64px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-brand img {
  height: 44px;
  width: 44px;
  object-fit: contain;
  margin-bottom: 10px;
}
.footer-brand span {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  margin-bottom: 6px;
}
.footer-brand span sup { font-size: .6em; color: var(--red); }
.footer-brand p { font-size: .85rem; }
.footer-brand a { color: rgba(255,255,255,.55); }
.footer-brand a:hover { color: var(--white); }

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links h5 {
  color: var(--white);
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 4px;
}
.footer-links a {
  font-size: .88rem;
  color: rgba(255,255,255,.5);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--white); }

.footer-bottom {
  padding: 20px 24px;
  text-align: center;
  max-width: 1160px;
  margin: 0 auto;
}
.footer-bottom p {
  font-size: .76rem;
  color: rgba(255,255,255,.58); /* raised from .30 → ~5.5:1, WCAG AA ✓ */
  line-height: 1.7;
}
.footer-bottom a { color: rgba(255,255,255,.68); } /* raised from .40 → ~6.4:1 ✓ */
.footer-bottom a:hover { color: var(--white); }

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 900px) {
  .split-row {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .split-row.reverse { direction: ltr; }

  .testimonial-section .container {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .specs-layout {
    grid-template-columns: 1fr;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .section-header { margin-bottom: 40px; }

  nav ul.nav-links { display: none; }
  .hamburger { display: flex; align-items: center; justify-content: center; }

  .hero-ctas { flex-direction: column; }
  .hero-ctas .btn { text-align: center; }
  .stats-inner { flex-wrap: wrap; }
  .stat { flex: 1 1 40%; border-right: none; border-bottom: 1px solid rgba(255,255,255,.07); }

  .kits-grid { grid-template-columns: 1fr; }
  .spare-parts-note { flex-direction: column; gap: 16px; }
  .spare-parts-note img { width: 100%; height: 160px; }

  .footer-inner { grid-template-columns: 1fr; gap: 32px; }

  .lang-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 420px) {
  .lang-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================
   SCROLL FADE-IN ANIMATION
   ========================================================== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .5s ease, transform .5s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Active nav link */
.nav-links a.active {
  color: var(--white) !important;
  border-bottom: 2px solid var(--red);
  padding-bottom: 2px;
}

/* ==========================================================
   ACCESSIBILITY – Skip link
   ========================================================== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  padding: 12px 22px;
  background: var(--dark);
  color: var(--white);
  font-weight: 700;
  font-size: .95rem;
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 9999;
  text-decoration: underline;
  transition: none; /* show instantly */
}
.skip-link:focus {
  top: 0;
  color: var(--white);
}

/* ==========================================================
   ACCESSIBILITY – Focus visible
   ========================================================== */
/* Remove default outline only when we provide our own */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--red-dark);
  outline-offset: 3px;
  border-radius: 3px;
}
/* On dark backgrounds, use white outline */
.site-header :focus-visible,
.site-footer :focus-visible,
.hero :focus-visible,
.stats-bar :focus-visible,
.section-dark :focus-visible,
.testimonial-section :focus-visible,
.mobile-menu :focus-visible {
  outline-color: var(--white);
}
/* Buttons already have background, offset into the button */
.btn:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 2px;
}
.btn-outline:focus-visible,
.btn-nav:focus-visible {
  outline-color: var(--dark);
}

/* ==========================================================
   ACCESSIBILITY – Reduced motion
   ========================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  html { scroll-behavior: auto; }
}

/* ==========================================================
   MOBILE – Safe area insets (notched phones)
   ========================================================== */
.site-header {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
.site-footer {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  padding-bottom: env(safe-area-inset-bottom);
}
.container {
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
}
