:root {
  --c-bg: #faf9f8;
  --c-surface: #ffffff;
  --c-surface2: #f5f3f1;
  --c-text: #000033;
  --c-muted: #5f5f82;
  --c-subtle: #9292ac;
  --c-border: #e7e6ec;
  --c-border2: #dad9e2;
  --c-red: #e20626;
  --c-red-dark: #b40a23;
  --c-red-soft: #fceaec;
  --c-purple: #3430ff;
  --c-purple-soft: #eeedff;
  --c-green: #1f8a5b;
  --c-green-soft: #e6f4ec;
  --c-accent: #f9733a;
  --c-nav: #000033;
  --max-width: 1240px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --c-bg: #06061d;
  --c-surface: #101031;
  --c-surface2: #171740;
  --c-text: #f2f2fb;
  --c-muted: #a7a7c7;
  --c-subtle: #6f6f94;
  --c-border: rgba(255, 255, 255, 0.085);
  --c-border2: rgba(255, 255, 255, 0.15);
  --c-red: #ff6173;
  --c-red-dark: #ff8593;
  --c-red-soft: rgba(226, 6, 38, 0.17);
  --c-purple: #a89df2;
  --c-purple-soft: rgba(82, 77, 255, 0.2);
  --c-green: #42d89a;
  --c-green-soft: rgba(31, 138, 91, 0.2);
  --c-nav: #04041a;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { background: var(--c-bg); scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  color: var(--c-text);
  background: var(--c-bg);
  font-family: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  line-height: 1.5;
  transition: background-color 220ms ease, color 220ms ease;
}

:root[data-theme="dark"] body {
  background:
    radial-gradient(120% 70% at 12% -5%, rgba(226, 6, 38, 0.13), transparent 46%),
    radial-gradient(120% 80% at 100% 0%, rgba(52, 48, 255, 0.12), transparent 50%),
    var(--c-bg);
  background-attachment: fixed;
}

a { color: inherit; }

.site-header,
main,
footer {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  min-height: 58px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}

body::before {
  position: absolute;
  z-index: -1;
  top: 0;
  right: 0;
  left: 0;
  height: 58px;
  content: "";
  background: var(--c-nav);
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: "Space Grotesk", ui-sans-serif, sans-serif;
  font-weight: 600;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  color: #fff;
  background: #e20626;
  border-radius: 7px;
  font-size: 11px;
  letter-spacing: -0.04em;
}

.brand-name { font-size: 18px; }

.brand-divider { width: 1px; height: 18px; background: rgba(255, 255, 255, 0.2); }

.brand-product { color: #c9c9de; font-family: "DM Sans", ui-sans-serif, sans-serif; font-size: 13px; font-weight: 500; letter-spacing: 0.04em; }

.header-actions { display: flex; align-items: center; gap: 16px; }

.header-link { color: #fff; font-size: 0.88rem; font-weight: 700; }

.theme-toggle {
  padding: 5px 9px;
  color: #c9c9de;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 7px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
}

.theme-toggle:hover,
.theme-toggle:focus-visible { color: #fff; border-color: #fff; outline: none; }

.hero {
  max-width: 880px;
  padding: 96px 0 58px;
  border-bottom: 1px solid var(--c-border);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--c-red);
  font-family: "Space Grotesk", ui-sans-serif, sans-serif;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p { margin-top: 0; }

h1,
h2,
h3 { font-family: "Space Grotesk", ui-sans-serif, sans-serif; letter-spacing: -0.035em; line-height: 1.08; }

h1 { max-width: 850px; margin-bottom: 22px; font-size: clamp(2.7rem, 7vw, 5.25rem); }

h2 { margin-bottom: 0; font-size: clamp(2rem, 4vw, 3.2rem); }

.hero-copy { max-width: 710px; margin-bottom: 30px; color: var(--c-muted); font-size: 1.18rem; }

.hero-actions,
.collaboration-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border: 1px solid var(--c-border2);
  border-radius: 10px;
  color: var(--c-text);
  background: var(--c-surface);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.button:hover { transform: translateY(-1px); }

.button-primary { border-color: #e20626; color: #fff; background: #e20626; box-shadow: 0 8px 22px rgba(226, 6, 38, 0.22); }
.button-primary:hover { background: #b40a23; border-color: #b40a23; }
.button-secondary:hover { border-color: var(--c-red); background: var(--c-red-soft); }

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 48px;
  color: var(--c-muted);
  font-size: 0.87rem;
}

.hero-metrics span { display: inline-flex; align-items: baseline; gap: 6px; }
.hero-metrics strong { color: var(--c-text); font-family: "Space Grotesk", ui-sans-serif, sans-serif; font-size: 1.25rem; }

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  padding: 22px 0;
  border-bottom: 1px solid var(--c-border);
}

.trust-strip p { margin: 0; color: var(--c-muted); font-size: 0.9rem; }
.trust-strip strong { color: var(--c-text); }
.trust-strip a { color: var(--c-red-dark); font-weight: 700; }

.lane-overview,
.catalog-section,
.collaboration { padding: 82px 0; }

.section-heading { margin-bottom: 32px; }

.lane-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.lane-card {
  position: relative;
  min-height: 180px;
  padding: 22px;
  overflow: hidden;
  text-align: left;
  color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 51, 0.035);
  cursor: pointer;
}

.lane-card::before { position: absolute; top: 0; bottom: 0; left: 0; width: 4px; content: ""; background: var(--c-red); }
.lane-card:nth-child(2)::before, .lane-card:nth-child(4)::before { background: var(--c-purple); }
.lane-card:nth-child(3)::before, .lane-card:nth-child(6)::before { background: var(--c-accent); }
.lane-card:nth-child(5)::before { background: var(--c-green); }
.lane-card:hover,
.lane-card:focus-visible { border-color: var(--c-red); outline: none; transform: translateY(-1px); box-shadow: 0 9px 18px rgba(0, 0, 51, 0.08); }

.lane-card span,
.card-topline { display: block; color: var(--c-red); font-family: "Space Grotesk", ui-sans-serif, sans-serif; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.11em; text-transform: uppercase; }
.lane-card strong { display: block; margin: 26px 0 8px; font-family: "Space Grotesk", ui-sans-serif, sans-serif; font-size: 1.16rem; }
.lane-card small { color: var(--c-muted); font-size: 0.91rem; }

.catalog-section { background: var(--c-surface2); margin: 0 calc((100vw - min(var(--max-width), calc(100% - 40px))) / -2); padding-right: max(20px, calc((100vw - var(--max-width)) / 2)); padding-left: max(20px, calc((100vw - var(--max-width)) / 2)); }

.catalog-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.catalog-count { margin: 0; color: var(--c-muted); font-weight: 700; }
.catalog-controls { margin-bottom: 28px; }
.search-label { display: block; margin-bottom: 8px; color: var(--c-text); font-size: 0.9rem; font-weight: 700; }

#catalog-search {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--c-border2);
  border-radius: 10px;
  color: var(--c-text);
  background: var(--c-surface);
  box-shadow: 0 1px 2px rgba(0, 0, 51, 0.03);
  font: inherit;
}

#catalog-search::placeholder { color: var(--c-subtle); }
#catalog-search:focus { border-color: var(--c-red); outline: 2px solid var(--c-red-soft); }

.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.filter-button {
  padding: 8px 12px;
  color: var(--c-muted);
  background: var(--c-surface);
  border: 1px solid var(--c-border2);
  border-radius: 8px;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.filter-button:hover { color: var(--c-text); background: var(--c-red-soft); border-color: var(--c-red); }
.filter-button.is-active { color: #fff; background: #e20626; border-color: #e20626; }

.catalog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }

.catalog-card {
  position: relative;
  display: flex;
  min-height: 210px;
  flex-direction: column;
  padding: 22px;
  overflow: hidden;
  color: var(--c-text);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: 15px;
  box-shadow: 0 2px 5px rgba(0, 0, 51, 0.035);
  text-decoration: none;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.catalog-card::before { position: absolute; top: 0; bottom: 0; left: 0; width: 4px; content: ""; background: var(--c-red); }
.catalog-card:hover { border-color: var(--c-red); transform: translateY(-2px); box-shadow: 0 11px 25px rgba(0, 0, 51, 0.1); }
.catalog-card h3 { margin: 17px 0 10px; font-size: 1.13rem; }
.catalog-card p { margin: 0; color: var(--c-muted); font-size: 0.92rem; }
.card-footer { margin-top: auto; padding-top: 18px; color: var(--c-red-dark); font-size: 0.86rem; font-weight: 700; }
.empty-state { margin: 36px 0 0; color: var(--c-muted); }

.collaboration { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(250px, 0.75fr); gap: 48px; align-items: end; }
.collaboration p:not(.eyebrow) { max-width: 720px; margin: 22px 0 0; color: var(--c-muted); }
.collaboration-actions { justify-content: flex-end; }

footer { display: flex; justify-content: space-between; gap: 24px; padding: 26px 0 38px; color: var(--c-muted); border-top: 1px solid var(--c-border); font-size: 0.82rem; }
footer span:first-child { color: var(--c-text); font-family: "Space Grotesk", ui-sans-serif, sans-serif; font-weight: 700; }
footer span:last-child { max-width: 620px; text-align: right; }

@media (max-width: 800px) {
  .trust-strip,
  .lane-grid,
  .catalog-grid,
  .collaboration { grid-template-columns: 1fr 1fr; }
  .collaboration-actions { justify-content: flex-start; }
}

@media (max-width: 580px) {
  .site-header,
  .catalog-heading,
  footer { align-items: flex-start; flex-direction: column; }
  .header-actions { width: 100%; justify-content: space-between; }
  .brand-product,
  .brand-divider { display: none; }
  .hero { padding-top: 60px; }
  .hero-metrics { gap: 12px 18px; }
  .trust-strip,
  .lane-grid,
  .catalog-grid,
  .collaboration { grid-template-columns: 1fr; }
  .catalog-section { margin-right: -20px; margin-left: -20px; padding-right: 20px; padding-left: 20px; }
  footer span:last-child { text-align: left; }
}
