/* ==========================================================================
   Axiomatics Documentation — design tokens
   Palette sampled from axiomatics.com/vertical-solutions/
   ========================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
}

:root {
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --color-bg: #f0f3f4;
  --color-surface: #ffffff;
  --color-surface-soft: rgba(255, 255, 255, 0.65);

  --color-heading: #090d10;
  --color-body: #37424a;
  --color-muted: #5b666e;

  --color-accent: #2620f9;
  --color-accent-dark: #0b06d6;
  --color-accent-darker: #05024f;

  --color-hero-gradient: #d7e2fe;
  --color-border: #d3d9de;
  --color-surface-muted: #37424a0d;
  --color-icon-bg: #e7eaec;
  --color-icon-bg-soft: #f9fafb;

  --color-accent-tint: rgba(38, 32, 249, 0.08);
  --color-accent-border: rgba(38, 32, 249, 0.25);

  --color-brand-red: #e4002b;
  --color-brand-red-text: #cb0026;
  --color-brand-red-tint: #fed7d78c;
  --color-brand-red-border: #efadba;

  --page-gradient-h: 760px;

  --color-dark: #000000;
  --color-bg-translucent: rgba(240, 243, 244, 0.92);

  --color-on-dark: #ffffff;
  --color-on-dark-soft: rgba(255, 255, 255, 0.8);
  --color-on-dark-subtle: rgba(255, 255, 255, 0.65);
  --color-on-dark-muted: rgba(255, 255, 255, 0.6);
  --color-on-dark-border: rgba(255, 255, 255, 0.25);
  --color-on-dark-border-strong: rgba(255, 255, 255, 0.4);
  --color-on-dark-hover: rgba(255, 255, 255, 0.1);

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-pill: 999px;

  --shadow-card: 0 20px 40px -24px rgba(9, 13, 16, 0.18);
  --shadow-card-hover: 0 24px 48px -20px rgba(9, 13, 16, 0.24);

  --container-w: 1440px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

.icon-arrow {
  width: 1em;
  height: 1.0625em;
  flex: none;
  vertical-align: -0.15em;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-body);
  background-color: var(--color-bg);
  background-image: linear-gradient(var(--color-hero-gradient) 0%, rgba(0, 0, 0, 0) 100%);
  background-repeat: no-repeat;
  background-size: 100% var(--page-gradient-h);
}

h1, h2, h3 {
  color: var(--color-heading);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.2rem, 6vw, 3.5rem); font-weight: 500; }
h2 { font-size: clamp(1.375rem, 3vw, 2rem); }
h3 { font-size: 1.125rem; }

p { margin: 0 0 16px; }

a { color: inherit; text-decoration: none; }

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.container {
  width: 90%;
  max-width: var(--container-w);
  margin: 0 auto;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-pill);
  font-weight: 500;
  font-size: 0.9375rem;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.btn-outline {
  border-color: var(--color-heading);
  color: var(--color-heading);
  background: transparent;
  padding: 10px 22px;
}
.btn-outline:hover { background: var(--color-heading); color: var(--color-surface); }

.btn-primary {
  background: var(--color-brand-red);
  color: var(--color-on-dark);
  padding: 10px 22px;
}
.btn-primary:hover { background: var(--color-brand-red-text); }

.btn-text-inverse {
  background: transparent;
  color: var(--color-on-dark);
  border-color: var(--color-on-dark-border-strong);
  padding: 10px 22px;
}
.btn-text-inverse:hover { border-color: var(--color-on-dark); }

.hide-mobile { display: inline-flex; }

/* ---------- Announcement bar ---------- */

.announce-bar {
  background: var(--color-dark);
  color: var(--color-on-dark);
  font-size: 0.8125rem;
  height: 34px;
}
.announce-bar-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 24px;
}
.announce-bar a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
  opacity: 0.85;
}
.announce-bar a:hover { opacity: 1; }
.announce-bar a span { transition: transform 0.15s ease; }
.announce-bar a:hover span { transform: translateX(3px); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: transparent;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .site-header { background: var(--color-bg-translucent); }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo { flex: none; display: block; }

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

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 88px 0 56px;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse closest-side at 50% 50%, #000 0%, transparent 100%);
  mask-image: radial-gradient(ellipse closest-side at 50% 50%, #000 0%, transparent 100%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.1;
  background-image: radial-gradient(circle, var(--color-dark) 1.2px, transparent 1.2px);
  background-size: 10px 10px;
}

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

.hero h1 { max-width: 28ch; margin-left: auto; margin-right: auto; text-wrap: balance; }

.hero-sub {
  max-width: 780px;
  margin: 0 auto 32px;
  font-size: 1.125rem;
  color: var(--color-body);
  font-weight: 300;
}

.basics-banner {
  position: relative;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: left;
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-brand-red-tint) 160%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  box-shadow: var(--shadow-card);
  transition: border 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.basics-banner:hover { border-color: var(--color-brand-red-border); transform: translateY(-1px); box-shadow: var(--shadow-card-hover);}

.basics-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-brand-red);
  color: var(--color-on-dark);
}

.basics-copy { flex: 1; min-width: 0; }

.basics-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--color-brand-red-text);
  margin: 0 0 2px;
}

.basics-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-heading);
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.basics-link {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-brand-red-text);
  white-space: nowrap;
}
.basics-link::after { content: ""; position: absolute; inset: 0; }
.basics-link span { transition: transform 0.15s ease; }
.basics-link:hover span { transform: translateX(3px); }

/* ---------- Sections ---------- */

.section { padding: 72px 0 0 0; }

.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 44px;
}
.section-head p { color: var(--color-muted); margin: 0; }

.section-head-left {
  text-align: left;
  max-width: none;
  margin: 0 0 22px;
}
.section-head-left h2 { margin-bottom: 4px; }

/* ---------- Product cards ---------- */

.card-grid {
  display: grid;
  gap: 24px;
}

.card-grid-3 { grid-template-columns: repeat(3, 1fr); }
.card-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Product section blocks ---------- */

.products-block + .products-block { margin-top: 50px; }

.products-block-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}
.products-block-head h2 { margin: 0; }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--color-surface-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-card);
  transition: border 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-1px); box-shadow: var(--shadow-card-hover); }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-icon-bg);
  color: var(--color-on-dark);
}

.card-badge {
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background: var(--color-surface-muted);
  color: var(--color-body);
  font-size: 0.6875rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.06em;
}

.card h3 { margin-bottom: 10px; }
.card p { color: var(--color-body); margin-bottom: 18px; font-size: 0.9375rem; }

.card-link {
  margin-top: auto;
  align-self: flex-end;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--color-accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.2s ease;
}
.card-link:hover { color: var(--color-accent-darker); }
.card-link::after { content: ""; position: absolute; inset: 0; }
.card-link span { transition: transform 0.15s ease; }
.card-link:hover span { transform: translateX(3px); }

/* De-emphasized secondary product block */

.products-block-secondary .products-block-head h2 {
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--color-body);
}

.products-block-secondary .card {
  background: var(--color-surface-muted);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: none;
}
.products-block-secondary .card:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--color-muted);
}

.products-block-secondary .card-icon {
  width: 34px;
  height: 34px;
  background: var(--color-icon-bg-soft);
  color: var(--color-body);
}
.products-block-secondary .card-head { margin-bottom: 12px; }
.products-block-secondary .card-icon svg { width: 16px; height: 16px; }

.products-block-secondary .card h3 { font-size: 1rem; margin-bottom: 6px; }
.products-block-secondary .card p { font-size: 0.875rem; color: var(--color-muted); margin-bottom: 12px; }
.products-block-secondary .card-link { font-size: 0.8125rem; color: var(--color-body); }
.products-block-secondary .card-link:hover { color: var(--color-accent); }

/* ---------- Guides list ---------- */

.guide-grid {
  --gap: 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(max(200px, calc((100% - 4 * var(--gap)) / 5)), 1fr));
  gap: var(--gap);
}

.guide-row {
  --guide-pad: 24px;
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: var(--guide-pad) calc(var(--guide-pad) * 2) var(--guide-pad) var(--guide-pad);
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: border-color 0.2s ease;
}
.guide-row:hover { border-color: var(--color-accent); }

.guide-index {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-accent);
}

.guide-body { display: flex; flex-direction: column; gap: 4px; }
.guide-title { font-weight: 600; color: var(--color-heading); }
.guide-desc { font-size: 0.875rem; color: var(--color-muted); }

.guide-arrow {
  position: absolute;
  top: var(--guide-pad);
  right: var(--guide-pad);
  color: var(--color-accent);
  transition: transform 0.15s ease;
}
.guide-row:hover .guide-arrow { transform: translateX(3px); }

/* ---------- CTA panel ---------- */

.cta-panel {
  background: linear-gradient(270deg, var(--color-accent-darker) 0%, var(--color-accent-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 56px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  color: var(--color-on-dark);
}
.cta-copy { max-width: 520px; }
.cta-copy h2 { color: var(--color-on-dark); margin-bottom: 6px; }
.cta-copy p { color: var(--color-on-dark-soft); margin: 0; }
.cta-copy .cta-note { margin-top: 24px; font-size: 0.75rem; font-style: italic; font-weight: 200; }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--color-on-dark-subtle);
  margin-bottom: 10px;
}
.cta-actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- Footer ---------- */

.site-footer { background: var(--color-dark); color: var(--color-on-dark); margin-top: 72px; }

.footer-bottom-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 40px 24px;
}

.footer-legal {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-self: start;
}
.footer-legal a { color: var(--color-on-dark-muted); font-size: 0.875rem; }
.footer-legal a:hover { color: var(--color-on-dark); }

.footer-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  justify-self: center;
  text-align: center;
}
.footer-logo { display: flex; align-items: center; }
.footer-copy { color: var(--color-on-dark-muted); font-size: 0.875rem; margin: 0; }

.footer-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 20px; justify-self: end; }
.footer-social { display: flex; gap: 14px; }
.footer-actions .btn { align-self: stretch; justify-content: center; }
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-on-dark-border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-on-dark);
}
.footer-social a:hover { background: var(--color-on-dark-hover); }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .card-grid-3, .card-grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
  .hide-mobile { display: none; }
  .card-grid-3, .card-grid-4 { grid-template-columns: 1fr; }
  .products-block-head { flex-wrap: wrap; }
  .basics-banner { flex-wrap: wrap; text-align: center; justify-content: center; }
  .basics-icon { margin: 0 auto; }
  .basics-copy { flex-basis: 100%; text-align: center; }
  .basics-link { flex-basis: 100%; justify-content: center; }
  .cta-panel { padding: 36px 24px; }
  .footer-bottom-inner { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer-legal { align-items: center; }
  .footer-legal, .footer-center, .footer-actions { justify-self: center; }
  .footer-actions { align-items: center; }
  .section { padding: 48px 0 0; }
  .site-footer { margin-top: 48px; }
  .hero { padding: 56px 0 40px; }
}

/* ---------- 404 page ---------- */

.page-404 { min-height: 100vh; display: flex; flex-direction: column; }
.page-404 main { flex: 1; }
.page-404 .site-footer { margin-top: auto; }

.not-found-code {
  margin-bottom: 12px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-brand-red-text);
}

/* ---------- Keyboard focus ---------- */

a:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}
.announce-bar a:focus-visible,
.cta-panel a:focus-visible,
.site-footer a:focus-visible { outline-color: var(--color-on-dark); }

/* stretched links: draw the ring around the whole card, not just the link text */
.card-link:focus-visible,
.basics-link:focus-visible { outline: none; }
.card-link:focus-visible::after,
.basics-link:focus-visible::after {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-lg);
}
.basics-link:focus-visible::after { outline-color: var(--color-brand-red-text); }
.products-block-secondary .card-link:focus-visible::after { border-radius: var(--radius-md); }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
  .card:hover,
  .basics-banner:hover,
  .guide-row:hover .guide-arrow,
  .card-link:hover span,
  .basics-link:hover span,
  .announce-bar a:hover span { transform: none; }
}
