/* AFKERIAN INTERACTIVE -- corporate site design system.
   Shared by the homepage, the four product pages, and 404. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/inter/Inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/inter/Inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ==========================================================================
   TOKENS
   ========================================================================== */
:root {
  color-scheme: light dark;

  --bg: #ffffff;
  --surface: #f7f9fc;
  --surface-strong: #eef2f7;
  --text-strong: #0b1220;
  --text: #334155;
  --text-muted: #64748b;
  --border: #d8e1eb;
  --brand: #0b63ce;
  --brand-hover: #084fa7;
  --brand-on: #ffffff;
  --shadow-color: 220 40% 10%;

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

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  --radius-sm: 6px;
  --radius-md: 10px;

  --max-width: 1200px;

  --dur-fast: 150ms;
  --dur-base: 200ms;
  --ease: cubic-bezier(0.2, 0.6, 0.2, 1);

  --shadow-sm: 0 1px 2px hsl(var(--shadow-color) / 0.06), 0 1px 1px hsl(var(--shadow-color) / 0.04);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0f17;
    --surface: #111827;
    --surface-strong: #172033;
    --text-strong: #f8fafc;
    --text: #cbd5e1;
    --text-muted: #94a3b8;
    --border: #293548;
    --brand: #69adff;
    --brand-hover: #8dc0ff;
    --brand-on: #06111f;
    --shadow-color: 220 60% 2%;
  }
}

:root[data-theme="dark"] {
  --bg: #0a0f17;
  --surface: #111827;
  --surface-strong: #172033;
  --text-strong: #f8fafc;
  --text: #cbd5e1;
  --text-muted: #94a3b8;
  --border: #293548;
  --brand: #69adff;
  --brand-hover: #8dc0ff;
  --brand-on: #06111f;
  --shadow-color: 220 60% 2%;
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  min-width: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 {
  margin: 0;
  color: var(--text-strong);
  font-family: var(--font-sans);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h1 { font-weight: 700; }
h2, h3 { font-weight: 600; }

p { margin: 0 0 var(--space-4); max-width: 68ch; }
p:last-child { margin-bottom: 0; }

a { color: var(--brand); text-decoration-thickness: 1px; }
a:hover { color: var(--brand-hover); }

a:focus-visible,
button:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 3px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-4);
  z-index: 999;
  padding: var(--space-3) var(--space-5);
  background: var(--brand);
  color: var(--brand-on);
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  text-decoration: none;
  transition: top var(--dur-base) var(--ease);
}
.skip-link:focus { top: 0; }

.container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-on);
}
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: var(--brand-on); }
.btn-secondary {
  background: transparent;
  border-color: var(--border);
  color: var(--text-strong);
}
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); }

/* ==========================================================================
   HEADER + NAV + THEME CONTROL
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding-block: var(--space-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.brand-logo { height: 32px; width: auto; }
.brand-name {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-strong);
  white-space: nowrap;
}

.primary-nav { display: flex; align-items: center; gap: var(--space-6); }
.header-controls { display: flex; align-items: center; gap: var(--space-4); }
.primary-nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-6);
  margin: 0;
  padding: 0;
}
.primary-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.primary-nav a:hover { color: var(--text-strong); border-color: var(--border); }

.theme-control { display: inline-flex; align-items: center; }
.theme-control select {
  min-height: 40px;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-strong);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
}

.nav-toggle { display: none; }
@media (max-width: 760px) {
  .desktop-only { display: none; }
  .nav-toggle { display: block; position: relative; }
  .nav-toggle summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
  }
  .nav-toggle summary::-webkit-details-marker { display: none; }
  .nav-toggle summary::before {
    content: "";
    width: 18px;
    height: 12px;
    background:
      linear-gradient(var(--text-strong), var(--text-strong)) top / 100% 2px no-repeat,
      linear-gradient(var(--text-strong), var(--text-strong)) center / 100% 2px no-repeat,
      linear-gradient(var(--text-strong), var(--text-strong)) bottom / 100% 2px no-repeat;
  }
  .mobile-nav-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 240px;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: var(--space-4);
  }
  .mobile-nav-panel ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .mobile-nav-panel a {
    display: block;
    min-height: 44px;
    display: flex;
    align-items: center;
    padding-inline: var(--space-3);
    color: var(--text-strong);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius-sm);
  }
  .mobile-nav-panel a:hover,
  .mobile-nav-panel a:focus-visible { background: var(--surface); }
}
@media (min-width: 761px) {
  .nav-toggle { display: none !important; }
}

/* ==========================================================================
   SECTIONS (shared rhythm)
   ========================================================================== */
.section { padding-block: clamp(var(--space-7), 6vw, var(--space-9)); }
.section + .section { border-top: 1px solid var(--border); }
.section-head { max-width: 44rem; margin-bottom: var(--space-6); }
.section-head h2 { font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem); margin-top: var(--space-2); }
.section-head p { color: var(--text-muted); margin-top: var(--space-2); }
.section-alt { background: var(--surface); }

/* ==========================================================================
   HERO (homepage + product pages)
   ========================================================================== */
.hero { padding-block: clamp(var(--space-8), 8vw, var(--space-9)) clamp(var(--space-7), 6vw, var(--space-8)); }
.hero-content { max-width: 46rem; }
.hero h1 {
  margin-top: var(--space-3);
  font-size: clamp(2rem, 1.55rem + 2vw, 3.1rem);
  max-width: 18ch;
}
.hero-lede {
  margin-top: var(--space-4);
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  color: var(--text);
  max-width: 56ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-6);
}
.hero-grid {
  display: grid;
  gap: var(--space-7);
  align-items: center;
}
.hero-media {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
}
.hero-media img { width: 100%; height: 100%; object-fit: contain; }
@media (min-width: 900px) {
  .hero-grid.has-media { grid-template-columns: minmax(0, 0.95fr) minmax(20rem, 1.05fr); }
}

/* ==========================================================================
   PRODUCTS GRID (homepage)
   ========================================================================== */
.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-6);
}
@media (min-width: 720px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}
.product-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
  overflow: hidden;
  transition: border-color var(--dur-fast) var(--ease);
}
.product-card:hover { border-color: var(--brand); }
.product-media {
  aspect-ratio: 1024 / 500;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.product-media img { width: 100%; height: 100%; object-fit: contain; }
.product-body { padding: var(--space-5); }
.product-name { font-size: 1.3rem; margin-top: var(--space-1); }
.product-desc { color: var(--text); margin-top: var(--space-3); }
.product-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
}
.product-link:hover { text-decoration: underline; }

/* ==========================================================================
   COMPANY / LEADERSHIP
   ========================================================================== */
.company-copy { max-width: 60rem; }
.leadership {
  margin-top: var(--space-6);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
}
.leadership-name { font-weight: 700; color: var(--text-strong); }
.leadership-title { color: var(--text-muted); font-size: 0.92rem; }

/* ==========================================================================
   PRINCIPLES
   ========================================================================== */
.principles-list { border-top: 1px solid var(--border); }
.principle {
  display: grid;
  grid-template-columns: 3px 1fr;
  gap: var(--space-5);
  padding-block: var(--space-5);
  border-bottom: 1px solid var(--border);
}
.principle-bar { background: var(--brand); border-radius: 2px; }
.principle-title { font-size: 1.05rem; margin-bottom: var(--space-2); }
.principle-desc { color: var(--text-muted); margin: 0; max-width: 58ch; }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact { text-align: center; }
.contact .section-head { margin-inline: auto; text-align: center; }
.contact-email {
  display: inline-block;
  font-size: clamp(1.3rem, 1.05rem + 1.4vw, 1.9rem);
  font-weight: 700;
  color: var(--text-strong);
  text-decoration: none;
  border-bottom: 2px solid var(--brand);
  padding-bottom: var(--space-1);
}
.contact-email:hover { color: var(--brand); }
.contact-note { margin: var(--space-4) auto 0; color: var(--text-muted); max-width: 46ch; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer { border-top: 1px solid var(--border); padding-block: clamp(var(--space-6), 5vw, var(--space-7)); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: var(--space-6);
  padding-bottom: var(--space-6);
}
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-5); }
}
.footer-brand .brand-logo { height: 26px; margin-bottom: var(--space-3); }
.footer-brand p { font-size: 0.85rem; color: var(--text-muted); max-width: 34ch; }
.footer-heading {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 var(--space-4);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.footer-col a { color: var(--text); text-decoration: none; font-size: 0.9rem; }
.footer-col a:hover { color: var(--text-strong); text-decoration: underline; }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-3);
  padding-top: var(--space-5);
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ==========================================================================
   PRODUCT PAGE: fact strip, legal links, more-products, market notice
   ========================================================================== */
.fact-strip {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
@media (min-width: 720px) { .fact-strip { grid-template-columns: repeat(3, 1fr); } }
.fact { background: var(--bg); padding: var(--space-5); }
.fact strong { display: block; color: var(--text-strong); }
.fact span { color: var(--text-muted); font-size: 0.92rem; }

.card-grid { display: grid; gap: var(--space-4); }
@media (min-width: 720px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
.card {
  padding: var(--space-5);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg);
}
.card h3 { font-size: 1.05rem; margin-bottom: var(--space-2); }
.card p { color: var(--text-muted); margin: 0; }

.callout {
  margin-top: var(--space-5);
  padding: var(--space-4) var(--space-5);
  border-inline-start: 3px solid var(--brand);
  background: var(--surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text);
  overflow-wrap: anywhere;
}
.callout strong { color: var(--text-strong); }

.legal-links { display: grid; gap: var(--space-3); }
@media (min-width: 720px) { .legal-links { grid-template-columns: repeat(3, 1fr); } }
.legal-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 54px;
  padding: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text-strong);
  font-weight: 600;
  text-decoration: none;
}
.legal-links a:hover { border-color: var(--brand); }
.legal-links a::after { content: "Open"; color: var(--brand); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

.more-products ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.more-products a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-strong);
  font-weight: 600;
  text-decoration: none;
}
.more-products a:hover { border-color: var(--brand); color: var(--brand); }

.language-note { margin-top: var(--space-5); color: var(--text-muted); font-size: 0.92rem; }

/* ==========================================================================
   404
   ========================================================================== */
.error-main { display: grid; min-height: 55vh; align-content: center; padding-block: var(--space-8); }
.error-code {
  margin: 0;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.error-main h1 { margin-top: var(--space-2); font-size: clamp(1.9rem, 1.5rem + 1.6vw, 2.75rem); }
.route-list {
  list-style: none;
  margin: var(--space-6) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.route-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: var(--space-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-strong);
  font-weight: 600;
  text-decoration: none;
}
.route-list a:hover { border-color: var(--brand); color: var(--brand); }

/* ==========================================================================
   RESPONSIVE FIT
   ========================================================================== */
@media (max-width: 480px) {
  .container { padding-inline: 1.1rem; }

  .header-inner { gap: var(--space-3); }
  .brand { gap: var(--space-2); }
  .brand-logo { height: 26px; }
  .brand-name { font-size: 0.8rem; }
  .header-controls { gap: var(--space-2); }
  .theme-control select {
    min-height: 40px;
    padding: var(--space-1) var(--space-2);
    font-size: 0.78rem;
  }
}
