/* ==========================================================================
   marqui.to — static site stylesheet (2026)
   No build step, no frameworks. Modern CSS with graceful fallbacks.
   ========================================================================== */

@layer reset, tokens, base, layout, components, utilities, motion;

/* ---------- Fonts (self-hosted, GDPR-friendly) ---------- */
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/poppins-700.woff2") format("woff2"); }

/* ---------- Reset ---------- */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: none; text-size-adjust: none; }
  img, picture, svg, video { display: block; max-width: 100%; height: auto; }
  input, button, textarea, select { font: inherit; color: inherit; }
  p, h1, h2, h3, h4 { overflow-wrap: break-word; }
  h1, h2, h3, h4 { text-wrap: balance; }
  p { text-wrap: pretty; }
  ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
}

/* ---------- Design tokens ---------- */
@layer tokens {
  :root {
    color-scheme: dark;
    interpolate-size: allow-keywords;

    --bg: #0a0c11;
    --bg-elev: #11141b;
    --bg-card: rgb(255 255 255 / 0.035);
    --border: rgb(255 255 255 / 0.09);
    --border-strong: rgb(255 255 255 / 0.16);
    --text: #f4f6fa;
    --text-muted: #abadb3;
    --text-subtle: #7d8089;

    --brand: #2292b1;
    --brand-2: #25c5c9;
    --brand-3: #1b3385;
    --brand-glow: rgb(37 197 201 / 0.35);
    --gradient: linear-gradient(120deg, var(--brand-2) 0%, var(--brand) 55%, #4d6bff 100%);

    --font: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --step--1: clamp(0.84rem, 0.82rem + 0.1vw, 0.9rem);
    --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
    --step-1: clamp(1.2rem, 1.1rem + 0.45vw, 1.45rem);
    --step-2: clamp(1.5rem, 1.3rem + 0.9vw, 2.1rem);
    --step-3: clamp(2rem, 1.6rem + 1.9vw, 3.2rem);
    --step-4: clamp(2.5rem, 1.8rem + 3.4vw, 4.75rem);

    --space-xs: 0.5rem;
    --space-s: 1rem;
    --space-m: 1.5rem;
    --space-l: clamp(2rem, 1.5rem + 2vw, 3rem);
    --space-xl: clamp(3.5rem, 2.5rem + 4vw, 6.5rem);

    --radius-s: 10px;
    --radius-m: 18px;
    --radius-l: 28px;
    --container: 1180px;
    --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);
    --header-h: 72px;
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  }
}

/* ---------- Base ---------- */
@layer base {
  html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

  body {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text-muted);
    font-family: var(--font);
    font-size: var(--step-0);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
  }

  h1, h2, h3, h4 { color: var(--text); line-height: 1.15; font-weight: 600; letter-spacing: -0.02em; }
  h1 { font-size: var(--step-4); font-weight: 700; letter-spacing: -0.035em; }
  h2 { font-size: var(--step-3); }
  h3 { font-size: var(--step-1); }

  a { color: var(--brand-2); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
  a:hover { color: var(--text); }

  :focus-visible { outline: 2px solid var(--brand-2); outline-offset: 3px; border-radius: 4px; }
  ::selection { background: var(--brand); color: #fff; }

  strong { color: var(--text); font-weight: 600; }
}

/* ---------- Layout ---------- */
@layer layout {
  .container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
  .container--narrow { width: min(100% - 2 * var(--gutter), 780px); margin-inline: auto; }
  main { flex: 1; }
  .section { padding-block: var(--space-xl); position: relative; }
  .section--tight { padding-block: var(--space-l); }

  .skip-link {
    position: absolute; left: 1rem; top: -100px; z-index: 100;
    padding: 0.6rem 1rem; border-radius: var(--radius-s);
    background: var(--brand); color: #fff; text-decoration: none; font-weight: 500;
  }
  .skip-link:focus { top: 1rem; }

  /* Ambient aurora background */
  .aurora { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
  .aurora::before, .aurora::after {
    content: ""; position: absolute; width: 70vmax; aspect-ratio: 1; border-radius: 50%;
    filter: blur(90px); opacity: 0.22;
  }
  .aurora::before { background: radial-gradient(circle, var(--brand-2), transparent 65%); top: -35vmax; left: -20vmax; }
  .aurora::after  { background: radial-gradient(circle, var(--brand-3), transparent 65%); bottom: -40vmax; right: -25vmax; opacity: 0.35; }
  .grain {
    position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.5;
    background-image: radial-gradient(rgb(255 255 255 / 0.04) 1px, transparent 1px);
    background-size: 3px 3px;
    mask-image: linear-gradient(to bottom, #000, transparent 80%);
  }
}

/* ---------- Components ---------- */
@layer components {

  /* Header */
  .site-header {
    position: sticky; top: 0; z-index: 50; height: var(--header-h);
    display: flex; align-items: center;
    background: rgb(10 12 17 / 0.6);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, background-color 0.3s;
    view-transition-name: site-header;
  }
  .site-header[data-scrolled] { border-bottom-color: var(--border); background: rgb(10 12 17 / 0.82); }
  .site-header .container { display: flex; align-items: center; justify-content: space-between; gap: var(--space-m); }

  .brand { display: inline-flex; flex-direction: column; line-height: 1; text-decoration: none; color: var(--text); }
  .brand__name { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.03em; }
  .brand__name span { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .brand__tag { font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.32em; color: var(--text-subtle); margin-top: 0.3rem; }
  .brand:hover { color: var(--text); }

  .nav { display: flex; align-items: center; gap: var(--space-l); }
  .nav__list { display: flex; gap: 0.25rem; list-style: none; padding: 0; }
  .nav__link {
    display: block; padding: 0.45rem 0.9rem; border-radius: 999px;
    color: var(--text-muted); text-decoration: none; font-size: 0.95rem; font-weight: 500;
    transition: color 0.2s, background-color 0.2s;
  }
  .nav__link:hover { color: var(--text); background: rgb(255 255 255 / 0.06); }
  .nav__link[aria-current="page"] { color: var(--text); background: rgb(255 255 255 / 0.08); }

  .social { display: flex; gap: 0.35rem; list-style: none; padding: 0; }
  .social a {
    display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
    color: var(--text-muted); border: 1px solid var(--border);
    transition: color 0.2s, border-color 0.2s, transform 0.2s var(--ease-out);
  }
  .social a:hover { color: var(--text); border-color: var(--brand-2); transform: translateY(-2px); }
  .social svg { width: 17px; height: 17px; }

  .menu-toggle {
    display: none; width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
    background: transparent; border: 1px solid var(--border); color: var(--text);
    place-items: center;
  }
  .menu-toggle svg { width: 22px; height: 22px; }

  /* Mobile menu (Popover API) */
  .mobile-menu {
    inset: 0; width: 100%; height: 100dvh; max-width: none; max-height: none;
    margin: 0; padding: var(--space-l) var(--gutter); border: 0;
    background: rgb(10 12 17 / 0.96); color: var(--text);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    opacity: 0; transform: translateY(-12px);
    transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out), overlay 0.3s allow-discrete, display 0.3s allow-discrete;
  }
  .mobile-menu:popover-open { opacity: 1; transform: none; display: flex; flex-direction: column; }
  @starting-style { .mobile-menu:popover-open { opacity: 0; transform: translateY(-12px); } }
  .mobile-menu__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-l); }
  .mobile-menu ul { list-style: none; padding: 0; display: grid; gap: 0.25rem; }
  .mobile-menu .nav__link { font-size: var(--step-2); padding: 0.5rem 0; background: none; font-weight: 600; }
  .mobile-menu .social { margin-top: auto; }

  @media (max-width: 820px) {
    .nav { display: none; }
    .menu-toggle { display: grid; }
  }

  /* Buttons */
  .btn {
    --_bg: var(--gradient);
    display: inline-flex; align-items: center; gap: 0.6rem;
    padding: 0.85rem 1.5rem; border-radius: 999px;
    font-weight: 600; font-size: 0.98rem; text-decoration: none; line-height: 1.2;
    color: #fff; background: var(--_bg); border: 0; cursor: pointer;
    box-shadow: 0 10px 30px -10px var(--brand-glow);
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
  }
  .btn:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 40px -12px var(--brand-glow); }
  .btn svg { width: 18px; height: 18px; transition: transform 0.25s var(--ease-out); }
  .btn:hover svg { transform: translateX(3px); }
  .btn--ghost { --_bg: transparent; color: var(--text); border: 1px solid var(--border-strong); box-shadow: none; }
  .btn--ghost:hover { border-color: var(--brand-2); box-shadow: none; }

  .eyebrow {
    display: inline-flex; align-items: center; gap: 0.6rem;
    font-size: 0.78rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
    color: var(--brand-2); margin-bottom: var(--space-s);
  }
  .eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }

  .gradient-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
  .lead { font-size: var(--step-1); line-height: 1.6; color: var(--text-muted); max-width: 62ch; }

  /* Hero */
  .hero { padding-block: clamp(3rem, 2rem + 6vw, 7rem) var(--space-xl); }
  .hero .container { display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: var(--space-l); }
  .hero h1 { margin-bottom: var(--space-m); }
  .hero .lead { margin-bottom: var(--space-l); }
  .hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-s); }
  .hero__visual { position: relative; justify-self: center; }
  .hero__visual::before {
    content: ""; position: absolute; inset: 15% 10%; border-radius: 50%;
    background: radial-gradient(circle, var(--brand-glow), transparent 70%); filter: blur(40px); z-index: -1;
  }
  .hero__visual img { width: min(100%, 480px); filter: drop-shadow(0 40px 60px rgb(0 0 0 / 0.6)); }
  @media (max-width: 900px) {
    .hero .container { grid-template-columns: 1fr; }
    .hero__visual { order: -1; }
    .hero__visual img { width: min(70vw, 320px); }
  }

  /* Page hero (subpages) */
  .page-hero { padding-block: clamp(3rem, 2rem + 4vw, 5.5rem) var(--space-l); }
  .page-hero h1 { font-size: var(--step-4); margin-bottom: var(--space-s); }

  /* Challenge / intro split */
  .split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-l); align-items: end; }
  .split p + p { margin-top: var(--space-s); }
  @media (max-width: 820px) { .split { grid-template-columns: 1fr; } }

  /* Stats */
  .stats {
    display: grid; grid-template-columns: repeat(4, 1fr); margin-top: var(--space-xl);
    border: 1px solid var(--border); border-radius: var(--radius-l); overflow: hidden;
    background: var(--bg-card);
  }
  .stat { padding: var(--space-l) var(--space-m); text-align: center; }
  .stat + .stat { border-left: 1px solid var(--border); }
  .stat__value { display: block; font-size: var(--step-3); font-weight: 700; color: var(--text); line-height: 1; font-variant-numeric: tabular-nums; }
  .stat__value::after { content: attr(data-suffix); color: var(--brand-2); }
  .stat__label { display: block; margin-top: 0.6rem; font-size: var(--step--1); text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-subtle); }
  @media (max-width: 720px) {
    .stats { grid-template-columns: 1fr 1fr; }
    .stat:nth-child(3) { border-left: 0; }
    .stat:nth-child(n+3) { border-top: 1px solid var(--border); }
  }

  /* Section heading */
  .section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--space-m); margin-bottom: var(--space-l); }
  .section-head p { max-width: 42ch; }

  /* Service cards */
  .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--space-m); }
  .card {
    position: relative; display: flex; flex-direction: column;
    border: 1px solid var(--border); border-radius: var(--radius-l);
    background: var(--bg-card); overflow: hidden;
    transition: border-color 0.3s, transform 0.4s var(--ease-out), box-shadow 0.4s;
  }
  .card::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; z-index: 1;
    background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgb(37 197 201 / 0.12), transparent 50%);
    opacity: 0; transition: opacity 0.3s;
  }
  .card:hover { border-color: var(--border-strong); transform: translateY(-4px); box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.8); }
  .card:hover::before { opacity: 1; }
  .card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--bg-elev); }
  .card__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(0.85); transition: transform 0.8s var(--ease-out), filter 0.5s; }
  .card:hover .card__media img { transform: scale(1.05); filter: grayscale(0.2) brightness(1); }
  .card__body { padding: var(--space-m); display: flex; flex-direction: column; gap: 0.75rem; flex: 1; }
  .card__body p { font-size: 0.95rem; flex: 1; }
  .card__link { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; text-decoration: none; font-size: 0.95rem; }
  .card__link::after { content: ""; position: absolute; inset: 0; z-index: 2; }
  .card__link svg { width: 16px; height: 16px; }

  /* CTA banner */
  .cta {
    position: relative; overflow: hidden; isolation: isolate;
    padding: var(--space-xl) var(--space-l); border-radius: var(--radius-l);
    border: 1px solid var(--border); text-align: center;
    background:
      radial-gradient(60% 120% at 0% 0%, rgb(37 197 201 / 0.22), transparent 60%),
      radial-gradient(60% 120% at 100% 100%, rgb(27 51 133 / 0.45), transparent 60%),
      var(--bg-elev);
  }
  .cta h2 { margin-bottom: var(--space-m); }
  .cta .eyebrow { justify-content: center; }

  /* Prose (vision, faq answers, imprint) */
  .prose > * + * { margin-top: 1.1em; }
  .prose h2 { font-size: var(--step-2); margin-top: 2em; }
  .prose blockquote {
    border-left: 2px solid var(--brand-2); padding: 0.4rem 0 0.4rem 1.25rem;
    color: var(--text); font-size: var(--step-1); font-style: italic;
  }

  /* Vision pillars */
  .pillars { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: var(--space-s); margin-block: var(--space-l); }
  .pillar { padding: var(--space-m); border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--bg-card); }
  .pillar svg { width: 28px; height: 28px; color: var(--brand-2); margin-bottom: 0.75rem; }
  .pillar h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
  .pillar p { font-size: 0.92rem; }

  /* FAQ accordion */
  .faq { display: grid; gap: var(--space-s); }
  .faq details {
    border: 1px solid var(--border); border-radius: var(--radius-m); background: var(--bg-card);
    transition: border-color 0.3s, background-color 0.3s;
  }
  .faq details[open] { border-color: var(--border-strong); background: rgb(255 255 255 / 0.05); }
  .faq summary {
    display: flex; justify-content: space-between; align-items: center; gap: var(--space-s);
    padding: var(--space-m); cursor: pointer; list-style: none;
    color: var(--text); font-weight: 600; font-size: var(--step-1); line-height: 1.3;
  }
  .faq summary::-webkit-details-marker { display: none; }
  .faq summary::after {
    content: ""; flex: none; width: 32px; height: 32px; border-radius: 50%;
    border: 1px solid var(--border-strong);
    background:
      linear-gradient(var(--brand-2), var(--brand-2)) center / 12px 2px no-repeat,
      linear-gradient(var(--brand-2), var(--brand-2)) center / 2px 12px no-repeat;
    transition: transform 0.35s var(--ease-out);
  }
  .faq details[open] summary::after { transform: rotate(135deg); }
  .faq details::details-content { block-size: 0; overflow: clip; transition: block-size 0.45s var(--ease-out), content-visibility 0.45s allow-discrete; }
  .faq details[open]::details-content { block-size: auto; }
  .faq .faq__answer { padding: 0 var(--space-m) var(--space-m); }

  /* Contact */
  .contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: var(--space-m); }
  .contact-card {
    display: flex; flex-direction: column; gap: 0.5rem; padding: var(--space-l) var(--space-m);
    border: 1px solid var(--border); border-radius: var(--radius-l); background: var(--bg-card);
    font-style: normal;
  }
  .contact-card__icon {
    display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; margin-bottom: 0.5rem;
    background: rgb(37 197 201 / 0.1); color: var(--brand-2);
  }
  .contact-card__icon svg { width: 22px; height: 22px; }
  .contact-card h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--text-subtle); font-weight: 600; }
  .contact-card a, .contact-card .value { color: var(--text); font-size: var(--step-1); font-weight: 500; text-decoration: none; line-height: 1.4; }
  .contact-card a:hover { color: var(--brand-2); }
  .copy-btn {
    align-self: flex-start; margin-top: 0.5rem; padding: 0.35rem 0.8rem; border-radius: 999px;
    border: 1px solid var(--border-strong); background: transparent; color: var(--text-muted);
    font-size: 0.82rem; cursor: pointer; transition: color 0.2s, border-color 0.2s;
  }
  .copy-btn:hover { color: var(--text); border-color: var(--brand-2); }
  .copy-btn[data-copied] { color: var(--brand-2); border-color: var(--brand-2); }

  /* Definition list (imprint) */
  .dl { display: grid; grid-template-columns: max-content 1fr; gap: 0.6rem 2rem; }
  .dl dt { color: var(--text-subtle); }
  .dl dd { color: var(--text); margin: 0; }
  @media (max-width: 560px) { .dl { grid-template-columns: 1fr; gap: 0.15rem; } .dl dd { margin-bottom: 0.6rem; } }

  .panel { padding: var(--space-l); border: 1px solid var(--border); border-radius: var(--radius-l); background: var(--bg-card); }

  /* Footer */
  .site-footer { margin-top: var(--space-xl); border-top: 1px solid var(--border); padding-block: var(--space-xl) var(--space-l); font-size: 0.94rem; }
  .footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--space-l); }
  .footer-grid h2 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--text); margin-bottom: var(--space-s); }
  .footer-grid ul { list-style: none; padding: 0; display: grid; gap: 0.4rem; }
  .footer-grid a { color: var(--text-muted); text-decoration: none; }
  .footer-grid a:hover { color: var(--text); }
  .footer-about p { max-width: 52ch; margin-top: var(--space-s); }
  .footer-bottom {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-s);
    margin-top: var(--space-l); padding-top: var(--space-m); border-top: 1px solid var(--border);
    color: var(--text-subtle); font-size: 0.86rem;
  }
  .footer-bottom a { color: var(--text-muted); }
  @media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about { grid-column: 1 / -1; } }

  /* 404 */
  .notfound { text-align: center; padding-block: var(--space-xl); }
  .notfound__code { font-size: clamp(6rem, 20vw, 12rem); font-weight: 700; line-height: 1; letter-spacing: -0.05em; }
}

/* ---------- Utilities ---------- */
@layer utilities {
  .visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
  .mt-l { margin-top: var(--space-l); }
  .mt-m { margin-top: var(--space-m); }
  .center { text-align: center; }
}

/* ---------- Motion ---------- */
@layer motion {
  /* Cross-document view transitions (MPA) */
  @view-transition { navigation: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.35s; }

  @media (prefers-reduced-motion: no-preference) {
    .hero__copy > * { animation: rise 0.9s var(--ease-out) both; }
    .hero__copy > *:nth-child(2) { animation-delay: 0.08s; }
    .hero__copy > *:nth-child(3) { animation-delay: 0.16s; }
    .hero__copy > *:nth-child(4) { animation-delay: 0.24s; }
    .hero__visual img { animation: float 9s ease-in-out infinite, fade 1.2s var(--ease-out) both; }

    /* Scroll-driven reveal where supported; content stays visible elsewhere */
    @supports (animation-timeline: view()) {
      .reveal {
        animation: rise linear both;
        animation-timeline: view();
        animation-range: entry 0% cover 28%;
      }
    }
  }
  @keyframes rise { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
  @keyframes fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }

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

@layer components {
  .notfound .lead { margin-inline: auto; }
}

@layer components {
  .hero h1 { font-size: clamp(2.1rem, 1.2rem + 4vw, 4.75rem); }
}

/* ==========================================================================
   v2 — personal site: Infrastructure. Intelligence. Innovation.
   ========================================================================== */
@layer components {
  /* Hero eyebrow with the three words; highlight cycles through them */
  .triad-line { flex-wrap: wrap; column-gap: 0.6rem; row-gap: 0.2rem; }
  .triad-line span { color: var(--text-muted); }

  /* About: heading left, text right */
  .about { display: grid; grid-template-columns: 1fr 1.2fr; gap: var(--space-xl); align-items: start; }
  .about__copy p + p { margin-top: var(--space-s); }
  @media (max-width: 820px) { .about { grid-template-columns: 1fr; gap: var(--space-m); } }

  /* Facts strip */
  .facts {
    display: grid; grid-template-columns: repeat(4, 1fr); margin-top: var(--space-xl);
    border: 1px solid var(--border); border-radius: var(--radius-l); overflow: hidden; background: var(--bg-card);
  }
  .fact { padding: var(--space-m); display: flex; flex-direction: column; gap: 0.35rem; }
  .fact + .fact { border-left: 1px solid var(--border); }
  .fact dt { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--brand-2); font-weight: 600; }
  .fact dd { margin: 0; color: var(--text); font-weight: 500; line-height: 1.4; }
  @media (max-width: 820px) {
    .facts { grid-template-columns: 1fr 1fr; }
    .fact:nth-child(3) { border-left: 0; }
    .fact:nth-child(n+3) { border-top: 1px solid var(--border); }
  }
  @media (max-width: 460px) {
    .facts { grid-template-columns: 1fr; }
    .fact + .fact { border-left: 0; border-top: 1px solid var(--border); }
  }

  /* Card number */
  .card__num { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.18em; color: var(--brand-2); }

  /* Vision beliefs */
  .beliefs { display: grid; gap: var(--space-m); }
  .belief {
    display: grid; grid-template-columns: auto 1fr; gap: var(--space-m);
    padding: var(--space-l); border: 1px solid var(--border); border-radius: var(--radius-l); background: var(--bg-card);
  }
  .belief__icon {
    display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px;
    background: rgb(37 197 201 / 0.1); color: var(--brand-2);
  }
  .belief__icon svg { width: 24px; height: 24px; }
  .belief__label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--brand-2); font-weight: 600; margin-bottom: 0.4rem; }
  .belief h2 { font-size: var(--step-2); margin-bottom: 0.75rem; }
  @media (max-width: 560px) { .belief { grid-template-columns: 1fr; } }

  /* Story timeline */
  .timeline { list-style: none; padding: 0; position: relative; display: grid; gap: var(--space-l); }
  .timeline::before {
    content: ""; position: absolute; left: 7px; top: 0.6rem; bottom: 0.6rem; width: 2px;
    background: linear-gradient(to bottom, var(--brand-2), var(--brand), var(--brand-3));
    border-radius: 2px; opacity: 0.6;
  }
  .timeline__item { position: relative; padding-left: 2.75rem; }
  .timeline__item::before {
    content: ""; position: absolute; left: 0; top: 0.45rem; width: 16px; height: 16px; border-radius: 50%;
    background: var(--bg); border: 2px solid var(--brand-2);
  }
  .timeline__item--now::before { background: var(--brand-2); box-shadow: 0 0 0 6px rgb(37 197 201 / 0.18); }
  .timeline__when { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--brand-2); font-weight: 600; }
  .timeline__item h2 { font-size: var(--step-1); margin: 0.25rem 0 0.4rem; }
  .slogan {
    margin-top: var(--space-xl); padding: var(--space-l); text-align: center;
    border: 1px solid var(--border); border-radius: var(--radius-l); background: var(--bg-card);
    color: var(--text); font-size: var(--step-2); font-weight: 600; letter-spacing: -0.02em; line-height: 1.3;
  }

  .footer-triad { color: var(--text); font-weight: 600; letter-spacing: -0.01em; }
}

@layer motion {
  @media (prefers-reduced-motion: no-preference) {
    .triad-line span { animation: triad-glow 7.5s ease-in-out infinite; }
    .triad-line span:nth-child(2) { animation-delay: 2.5s; }
    .triad-line span:nth-child(3) { animation-delay: 5s; }
  }
}

/* ==========================================================================
   v3 — more blue: deeper gradients, blue ambient light, featured card
   ========================================================================== */
@layer tokens {
  :root {
    --brand-3: #2547d0;
    --blue: #3b6cff;
    --blue-deep: #14246b;
    --gradient: linear-gradient(120deg, #25c5c9 0%, #2b8fe0 45%, #4a5cff 100%);
    --gradient-soft: linear-gradient(135deg, rgb(37 197 201 / 0.16), rgb(59 108 255 / 0.16) 55%, rgb(74 92 255 / 0.08));
    --brand-glow: rgb(59 108 255 / 0.4);
  }
}

@layer layout {
  .aurora {
    background:
      radial-gradient(55vmax 45vmax at 100% 0%, rgb(59 108 255 / 0.18), transparent 70%),
      radial-gradient(60vmax 40vmax at 0% 55%, rgb(20 36 107 / 0.45), transparent 70%),
      radial-gradient(50vmax 50vmax at 70% 100%, rgb(43 143 224 / 0.12), transparent 70%);
  }
  .aurora::after { opacity: 0.55; }
  .aurora::before { opacity: 0.2; }
}

@layer components {
  .hero__visual::before { background: radial-gradient(circle, rgb(59 108 255 / 0.45), rgb(37 197 201 / 0.15) 45%, transparent 70%); }

  /* Blue band behind the pillars section */
  .section:has(#pillars-title)::before {
    content: ""; position: absolute; inset: 10% 0; z-index: -1; pointer-events: none;
    background: radial-gradient(60% 70% at 50% 50%, rgb(37 71 208 / 0.22), transparent 75%);
  }

  /* Cards get a blue sheen at the bottom */
  .card { background: linear-gradient(to bottom, var(--bg-card) 40%, rgb(37 71 208 / 0.12)); }
  .card__media img { filter: grayscale(1) brightness(0.8) sepia(0.25) hue-rotate(170deg) saturate(2.2); }
  .card:hover .card__media img { filter: grayscale(0.1) brightness(1) sepia(0.2) hue-rotate(170deg) saturate(1.6); }

  /* Featured card (Intelligence = main focus) */
  .card--featured {
    border: 1px solid transparent;
    background:
      linear-gradient(to bottom, #0f1424, #111a3a) padding-box,
      var(--gradient) border-box;
    box-shadow: 0 30px 80px -40px rgb(59 108 255 / 0.6);
  }
  .card__badge {
    position: absolute; top: 1rem; right: 1rem; z-index: 3;
    padding: 0.3rem 0.75rem; border-radius: 999px;
    background: var(--gradient); color: #fff;
    font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
    box-shadow: 0 8px 20px -8px var(--brand-glow);
  }

  /* Facts strip with gradient top line */
  .facts { position: relative; background: var(--gradient-soft), var(--bg-card); }
  .facts::before {
    content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: var(--gradient);
  }

  /* CTA, beliefs, timeline: blue tints */
  .cta {
    background:
      radial-gradient(60% 120% at 0% 0%, rgb(37 197 201 / 0.22), transparent 60%),
      radial-gradient(70% 130% at 100% 100%, rgb(59 108 255 / 0.4), transparent 60%),
      #0d1226;
  }
  .belief { background: linear-gradient(135deg, var(--bg-card), rgb(37 71 208 / 0.1)); }
  .belief__icon, .contact-card__icon { background: var(--gradient-soft); }
  .slogan { background: var(--gradient-soft), var(--bg-card); }

  /* Footer gradient hairline */
  .site-footer { border-top: 0; position: relative; }
  .site-footer::before {
    content: ""; position: absolute; inset: 0 0 auto; height: 1px;
    background: linear-gradient(90deg, transparent, #25c5c9 25%, #4a5cff 75%, transparent);
    opacity: 0.6;
  }
}

@layer motion {
  @keyframes triad-glow {
    0%, 40%, 100% { color: var(--text); }
    10%, 30% { color: #5fd8ff; }
  }
}

/* ==========================================================================
   v4 — blue duotone for the black & white photos
   (a colour-blend overlay keeps the image's luminance and replaces its hue)
   ========================================================================== */
@layer components {
  .card__media { position: relative; isolation: isolate; }
  .card__media img,
  .card:hover .card__media img { filter: contrast(1.08) brightness(0.95); }
  .card:hover .card__media img { filter: contrast(1.1) brightness(1.08); }
  .card__media::after {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(135deg, #25c5c9 0%, #2b8fe0 45%, #4a5cff 100%);
    mix-blend-mode: color; opacity: 0.85;
    transition: opacity 0.5s;
  }
  .card__media::before {
    content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: linear-gradient(to top, rgb(13 18 38 / 0.55), transparent 55%);
  }
  .card:hover .card__media::after { opacity: 1; }
}

@layer components {
  .prose > h2:first-child { margin-top: 0; }
  .prose ul { padding-left: 1.25rem; }
  .prose li + li { margin-top: 0.3rem; }
}
