:root {
  --red: #c8102e;
  --red-dark: #8c0a1f;
  --black: #111111;
  --white: #ffffff;
  --off-white: #f4f3f1;
  --grey: #6b6b6b;
  --max-width: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  color: var(--black);
  background: var(--white);
  line-height: 1.55;
}

img { max-width: 100%; display: block; }

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

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid #eee;
  box-shadow: 0 1px 0 rgba(17, 17, 17, 0.04);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--black);
}

.brand img { width: 34px; height: 34px; }

.brand span {
  font-weight: 700;
  letter-spacing: 0.04em;
  font-size: 1.05rem;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--black);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  padding-bottom: 4px;
}

.nav-links a:hover { border-bottom-color: var(--red); }

.nav-toggle { display: none; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 50% 0%, rgba(200, 16, 46, 0.25), transparent 55%), var(--black);
  color: var(--white);
  padding: 130px 0 100px;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.9), transparent 85%);
  pointer-events: none;
}

.hero .wrap { position: relative; z-index: 1; }

.hero img.hero-logo {
  width: clamp(110px, 14vw, 160px);
  height: clamp(110px, 14vw, 160px);
  margin: 0 auto 32px;
  filter: invert(1) brightness(2) drop-shadow(0 0 36px rgba(200, 16, 46, 0.5));
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  letter-spacing: 0.03em;
  margin: 0 0 18px;
  text-transform: uppercase;
}

.hero h1 .accent { color: var(--red); }

.hero p {
  max-width: 560px;
  margin: 0 auto 34px;
  color: #d9d9d9;
  font-size: 1.08rem;
}

.btn {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  text-decoration: none;
  padding: 14px 32px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.85rem;
  border-radius: 2px;
  box-shadow: 0 4px 14px rgba(200, 16, 46, 0.28);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(200, 16, 46, 0.38);
}

.btn:active { transform: translateY(0); }

.flag-bar {
  height: 6px;
  background: linear-gradient(
    to right,
    var(--red) 0%, var(--red) 32%,
    var(--white) 32%, var(--white) 40%,
    var(--red) 40%, var(--red) 100%
  );
}

/* Section basics */
section { padding: 84px 0; }

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 12px;
}

.section-title::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--red);
}

h2.section-heading {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin: 0 0 28px;
  letter-spacing: -0.01em;
}

/* About */
.about {
  background: var(--white);
}

.about .grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: start;
}

.about-badge {
  background: var(--off-white);
  border-left: 4px solid var(--red);
  border-radius: 0 6px 6px 0;
  padding: 20px;
  font-size: 0.92rem;
  color: var(--grey);
  box-shadow: 0 2px 8px rgba(17, 17, 17, 0.05);
}

.about-badge strong { color: var(--black); display: block; margin-bottom: 4px; }

.about p { margin: 0 0 18px; font-size: 1.02rem; }

/* Values / sourcing */
.values {
  position: relative;
  overflow: hidden;
  background: var(--black);
  color: var(--white);
}

.values::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 0%, rgba(0, 0, 0, 0.9), transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 50% 0%, rgba(0, 0, 0, 0.9), transparent 70%);
  pointer-events: none;
}

.values .wrap { position: relative; z-index: 1; }

.values .section-title { color: var(--red); }

.values h2.section-heading { color: var(--white); }

.values p { color: #d5d5d5; font-size: 1.02rem; margin: 0 0 18px; }

.values .rule {
  border-top: 1px solid #333;
  margin: 36px 0;
}

.values-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 36px;
}

.values-grid h3 {
  color: var(--red);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 10px;
}

/* Products */
.products { background: var(--off-white); }

.product-card {
  background: var(--white);
  border: 1px solid #e5e3df;
  border-radius: 8px;
  margin-bottom: 32px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(17, 17, 17, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(17, 17, 17, 0.1);
}

.product-card:nth-child(even) { grid-template-columns: 1.2fr 1fr; }
.product-card:nth-child(even) .product-media { order: 2; }

.product-media {
  background: var(--off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
}

.product-media img {
  max-width: 100%;
  max-height: 280px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
  cursor: zoom-in;
  transition: opacity 0.15s ease;
}

.product-media img:hover { opacity: 0.8; }

.product-media.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.product-media.gallery img { max-height: 130px; }

.product-body {
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 2px;
  margin-bottom: 12px;
}

.badge.available { background: var(--red); color: var(--white); }
.badge.dev { background: var(--black); color: var(--white); }
.badge.type { background: transparent; color: var(--grey); border: 1px solid #ccc; }

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.badge-row .badge { margin-bottom: 0; }

.product-body h3 {
  margin: 0 0 12px;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
}

.product-body p { margin: 0 0 14px; color: #333; }

.spec-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--grey);
}

.spec-list li { padding: 4px 0; border-top: 1px solid #eee; }
.spec-list li:first-child { border-top: none; }

.link-more {
  display: inline-block;
  margin-top: 4px;
  color: var(--red);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.link-more:hover { color: var(--red-dark); }

footer {
  background: var(--black);
  color: #999;
  padding: 32px 0;
  font-size: 0.85rem;
  text-align: center;
}

footer .flag-bar { margin-bottom: 24px; }

/* Product detail page */
.product-detail { background: var(--white); padding-top: 56px; }

.back-link {
  display: inline-block;
  color: var(--grey);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 28px;
}

.back-link:hover { color: var(--red); }

.product-detail h1 {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  margin: 0 0 28px;
  letter-spacing: -0.01em;
}

.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  background: var(--off-white);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 40px;
}

.detail-gallery img {
  max-width: 100%;
  max-height: 220px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto;
}

.product-detail-body {
  max-width: 720px;
}

.product-detail-body h2 {
  font-size: 1.2rem;
  margin: 40px 0 14px;
  letter-spacing: -0.01em;
}

.product-detail-body h2:first-child { margin-top: 0; }

.product-detail-body p { margin: 0 0 16px; color: #333; font-size: 1.02rem; }

.product-detail-body .spec-list { max-width: 480px; }

.download-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-width: 480px;
}

.download-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: var(--off-white);
  border: 1px solid #e5e3df;
  border-radius: 4px;
  margin-bottom: 10px;
  transition: background 0.15s ease;
}

.download-list li:hover { background: #ececea; }

.download-name { font-weight: 600; font-size: 0.95rem; }

.download-status {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--grey);
  background: #e5e3df;
  padding: 4px 10px;
  border-radius: 2px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox[hidden] { display: none; }

.lightbox-img {
  max-width: min(88vw, 900px);
  max-height: 78vh;
  width: auto;
  object-fit: contain;
  margin: 0 auto;
}

.lightbox-caption {
  color: #ccc;
  font-size: 0.9rem;
  margin: 16px 0 0;
  text-align: center;
  max-width: 640px;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 24px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}

.lightbox-close:hover { color: var(--red); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--white);
  font-size: 1.2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
}

.lightbox-nav:hover { background: var(--red); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

.lightbox-nav[hidden] { display: none; }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .about .grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .product-card, .product-card:nth-child(even) {
    grid-template-columns: 1fr;
  }
  .product-card:nth-child(even) .product-media { order: 0; }
  .product-body { padding: 28px 24px; }
}
