:root {
  --bg: #faf8f4;
  --bg-alt: #ffffff;
  --text: #21262f;
  --muted: #5f6773;
  --accent: #5b3aa6;
  --accent-dark: #402875;
  --accent-soft: #f1ecfb;
  --border: rgba(33, 38, 47, 0.12);
  --shadow: 0 10px 28px rgba(33, 38, 47, 0.07);

  /* navbar palette, light on black */
  --nav-bg: #000000;
  --nav-text: #d4d8de;
  --nav-text-hover: #ffffff;
  --nav-accent: #b9a3f2;
  --nav-hover-bg: rgba(255, 255, 255, 0.12);
  --nav-border: rgba(255, 255, 255, 0.14);

  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(115deg, transparent 11%, rgba(91, 58, 166, 0.06) 12.5%, rgba(91, 58, 166, 0.06) 14%, transparent 15.5%),
    linear-gradient(115deg, transparent 40%, rgba(139, 92, 246, 0.045) 41.5%, rgba(139, 92, 246, 0.045) 43%, transparent 44.5%),
    linear-gradient(115deg, transparent 70%, rgba(91, 58, 166, 0.07) 71.3%, rgba(91, 58, 166, 0.07) 72.6%, transparent 74%);
  background-attachment: fixed;
  line-height: 1.7;
}

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

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

img {
  max-width: 100%;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 300;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  border-radius: 0 0 8px 8px;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

.container {
  width: min(1120px, calc(100% - 2.5rem));
  margin: 0 auto;
}

/* ============ NAVBAR ============ */
.navbar-wrap {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
}

/* --accent is too dark on black */
.navbar-wrap :focus-visible {
  outline-color: var(--nav-accent);
}

.navbar {
  position: relative; /* [THEME] anchors the absolutely-positioned .theme-toggle */
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.2rem 1.25rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav-links a {
  color: var(--nav-text);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-links a:hover {
  color: var(--nav-text-hover);
  background: var(--nav-hover-bg);
}

.nav-links a.active {
  color: var(--nav-accent);
}

.hamburger {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  gap: 0.32rem;
  padding: 0.5rem;
}

.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--nav-text);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* [THEME] light/dark toggle — a favicon-style tile (the logo mark on a rounded
   square) pinned to the right edge of the navbar so the links stay centered.
   The tile previews the theme you switch TO: black in light mode, white in
   dark mode (the dark-mode colours live in the DARK THEME section). */
.theme-toggle {
  position: absolute;
  right: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: #000000;
  border: 1px solid var(--nav-border);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.theme-toggle:hover {
  background: #1e2126;
  border-color: var(--nav-text);
}

.theme-toggle img {
  width: 24px;
  height: 24px;
  display: block;
}

/* ============ TYPOGRAPHY ============ */
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 1rem;
}

h1,
h2,
h3 {
  margin: 0 0 0.9rem;
  line-height: 1.2;
  font-weight: 700;
}

h1 {
  font-size: clamp(2.3rem, 4vw, 3.6rem);
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
}

.btn {
  display: inline-block;
  padding: 0.95rem 1.7rem;
  border-radius: 10px;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-dark);
}

/* ============ HERO / SLOGAN ============ */
.hero-slogan {
  padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3rem);
  background: radial-gradient(ellipse 60% 100% at 50% 0%, var(--accent-soft), transparent 70%);
}

.hero-media {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.9rem, 2.5vw, 1.75rem);
}

.hero-logo {
  width: clamp(84px, 14vw, 140px);
  height: auto;
  flex-shrink: 0;
  display: block;
}

.hero-brand {
  margin: 0;
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
}

.hero-points {
  display: grid;
  gap: clamp(1.5rem, 4vw, 2.25rem);
  margin: clamp(2.5rem, 6vw, 4rem) auto 0;
  max-width: 940px;
}

.hero-point {
  margin: 0;
  max-width: 32rem;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.7;
  text-wrap: pretty;
}

.hero-point:nth-child(1) {
  justify-self: center;
  max-width: 34rem;
  margin-bottom: 0.75rem;
  color: var(--text);
  font-size: clamp(1.1rem, 1.6vw, 1.28rem);
  line-height: 1.6;
  text-align: center;
  text-wrap: balance;
}

.hero-point:nth-child(2) {
  justify-self: start;
}

.hero-point:nth-child(3) {
  justify-self: end;
}

.hero-point-label {
  color: var(--accent);
  font-weight: 700;
}

/* ============ SECTIONS ============ */
.section {
  padding: 1.5rem 0 1.5rem;
}

.about-section {
  padding: 2rem 0 1.5rem;
  text-align: center;
}


/* ============ CHECK LIST ============ */
.check-list {
  padding: 0;
  margin: 0;
  list-style: none;
  display: grid;
  gap: 1.1rem;
}

.about-section .check-list {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 2.5rem;
  text-align: left;
}

.check-list li {
  position: relative;
  padding: 1.6rem 1.5rem 1.6rem 1.8rem;
  border-radius: 14px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 1.02rem;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent);
}

.check-list li:hover,
.check-list li:has(a:focus-visible) {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

/* whole card clickable */
.check-list a::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* ============ IA CONTENT SECTIONS ============ */
.ia-section {
  padding: 1.5rem 0 2rem;
}

.ia-content {
  max-width: 800px;
}

.ia-label {
  margin-bottom: 1rem;
}

.ia-section h2 {
  font-size: clamp(2rem, 3vw, 2.6rem);
  margin-bottom: 1.1rem;
}

.ia-description {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.85;
}

.ai-applications-section {
  padding: 1.5rem 0 1rem;
}

.ai-applications-section h2 {
  margin-bottom: 1.1rem;
}

.ai-applications-description {
  font-size: 1.02rem;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 2.5rem;
  max-width: 800px;
}

.applications-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-top: 2rem;
}

.services-grid {
  grid-template-columns: repeat(2, 1fr);
}

.application-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.application-card h3 {
  font-size: 1.1rem;
  color: var(--accent);
  margin: 0 0 0.5rem 0;
}

.application-card p {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.7;
}

/* ============ CONTACT / CTA ============ */
.cta-section {
  padding: 3rem 0;
}

.cta {
  text-align: center;
  padding: 3.5rem 2.5rem;
  background: linear-gradient(160deg, var(--bg-alt) 0%, var(--accent-soft) 160%);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.cta p {
  color: var(--muted);
  font-size: 1.05rem;
}

.cta .btn {
  margin-top: 0.75rem;
}

/* ============ FOOTER ============ */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  text-align: center;
  color: var(--muted);
}

.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 1.2rem;
}

.footer-links a {
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--text);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 820px) {
  .about,
  .applications-grid,
  .services-grid,
  .about-section .check-list {
    grid-template-columns: 1fr;
  }

  .hero-point:nth-child(1),
  .hero-point:nth-child(2),
  .hero-point:nth-child(3) {
    justify-self: stretch;
    max-width: none;
    text-align: left;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    padding: 0.8rem 1.25rem 1.2rem;
    display: none;
    z-index: 99;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    padding: 0.85rem 1rem;
    text-align: center;
  }

  .navbar {
    position: relative;
    /* keep the toggle right-aligned, not centered */
    justify-content: flex-end;
  }

  /* [THEME] on mobile the toggle sits in the flow, just right of the hamburger */
  .theme-toggle {
    position: static;
    transform: none;
    margin-left: 0.25rem;
  }
}

/* ============ [THEME] DARK THEME (site default) ============ */
/* Activated by <html data-theme="dark">. Both pages ship with that attribute, so
   dark is what visitors get by default (JS or not). The toggle in script.js flips
   the attribute and saves the choice in localStorage; the inline <head> script
   re-applies a saved "light" before first paint. The :root block at the top of
   this file keeps the original light palette, which is what "light" switches to.
   Only the tokens change; every component picks the new values up automatically.
   The rules below the tokens are the few spots that hard-code a colour.
   Search "[THEME]" to find every theme-related rule in this file. */
html[data-theme="dark"] {
  color-scheme: dark; /* dark scrollbars / native form controls */

  --bg: #0d0f13;        /* near-black, cool tint — same hue family as --text in light mode */
  --bg-alt: #171a20;    /* cards & CTA, lifted one step above the page */
  --text: #e6e8ec;
  --muted: #9aa2ad;     /* ≥ 6.7:1 on both --bg and --bg-alt */
  --accent: #b9a3f2;    /* = --nav-accent: the purple this site already uses on black */
  --accent-dark: #cdbdf7; /* hover shade; on a dark surface the hover state brightens */
  --accent-soft: #201a33; /* hero glow & CTA gradient tint */
  --border: rgba(230, 232, 236, 0.12);
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.5);

  /* navbar is already light-on-black, so its palette is unchanged */
}

/* [THEME] diagonal stripes: the light-mode purple is invisible on black,
   so they are redrawn with the light accent at the same opacities */
html[data-theme="dark"] body {
  background-image:
    linear-gradient(115deg, transparent 11%, rgba(185, 163, 242, 0.06) 12.5%, rgba(185, 163, 242, 0.06) 14%, transparent 15.5%),
    linear-gradient(115deg, transparent 40%, rgba(185, 163, 242, 0.045) 41.5%, rgba(185, 163, 242, 0.045) 43%, transparent 44.5%),
    linear-gradient(115deg, transparent 70%, rgba(185, 163, 242, 0.07) 71.3%, rgba(185, 163, 242, 0.07) 72.6%, transparent 74%);
}

/* [THEME] white text no longer contrasts on the light accent (2.2:1);
   dark text on it gives 6.9:1 */
html[data-theme="dark"] .skip-link,
html[data-theme="dark"] .btn-primary {
  color: #21262f;
}

/* [THEME] toggle tile: white in dark mode (= "switch to light") */
html[data-theme="dark"] .theme-toggle {
  background: #ffffff;
}

html[data-theme="dark"] .theme-toggle:hover {
  background: #e4e7eb;
}
