/* ============================================================
   Quant Lab SFO FZCO — site styles
   Dark, refined, institutional. Built for clarity and speed.
   ============================================================ */

:root {
  /* Palette */
  --bg:          #0A0E16;
  --bg-elev:     #10151F;
  --bg-elev-2:   #141A26;
  --line:        #232C3B;
  --line-soft:   #1A2230;
  --text:        #E8ECF4;
  --text-muted:  #9FACC0;
  --text-dim:    #6F7C90;
  --accent:      #6E97C9;
  --accent-2:    #8FB2DD;
  --gold:        #C8A96A;
  --danger:      #E0826A;

  /* Type */
  --font-head: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Layout */
  --maxw: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --section-y: clamp(64px, 9vw, 120px);
  --radius: 14px;
  --radius-sm: 10px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  font-family: var(--font-body);
  /* Atmospheric gradient layered over the flat base, fixed to the viewport
     so it doesn't move with scroll — no section-edge artifacts. Mirrored
     blue glows in the top-right and bottom-left corners for balance. */
  background:
    radial-gradient(1100px 750px at 85% 5%,  rgba(110,151,201,.10), transparent 62%),
    radial-gradient(1100px 750px at 15% 95%, rgba(110,151,201,.10), transparent 62%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.7;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-2); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--text); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; font-weight: 600; letter-spacing: -0.01em; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 4px; }

/* ---------- Utilities ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(48px, 6vw, 80px); }
.eyebrow {
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: 1rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: var(--gold);
  display: inline-block;
}
.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--text-muted); }
.muted { color: var(--text-muted); }
.center { text-align: center; }
.maxw-prose { max-width: 62ch; }
.mx-auto { margin-inline: auto; }

h1 { font-size: clamp(2.3rem, 5.2vw, 3.7rem); }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3 { font-size: 1.2rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-family: var(--font-body); font-weight: 600; font-size: .95rem;
  padding: .8rem 1.5rem; border-radius: 999px;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-1px); }
/* Primary button — light-blue brand background with white text.
   Double class selector (.btn.btn--primary) beats .nav__links a so the
   "Get in touch" CTA in the nav doesn't inherit the muted link color. */
.btn.btn--primary { background: var(--accent); color: #FFFFFF; }
.btn.btn--primary:hover { background: var(--accent-2); color: #FFFFFF; }
.btn--ghost { border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent-2); color: var(--text); }
.btn__arrow { transition: transform .2s ease; }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 14, 22, .72);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 104px; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--text); }
.brand:hover { color: var(--text); }
/* Logo image — height fixed, width auto so the artwork aspect ratio is
   preserved. Larger in the footer where there's more breathing room. */
.brand__logo { height: 72px; width: auto; display: block; }
.site-footer .brand__logo { height: 96px; }
.nav__links { display: flex; align-items: center; gap: 2rem; list-style: none; padding: 0; }
.nav__links a { color: var(--text-muted); font-size: .95rem; font-weight: 500; }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--text); }
.nav__cta { margin-left: .5rem; }
.nav__toggle { display: none; background: none; border: 0; color: var(--text); padding: 8px; cursor: pointer; }

@media (max-width: 860px) {
  .nav__toggle { display: inline-flex; }
  .nav__links {
    position: fixed; inset: 104px 0 auto 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--bg-elev); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px;
    transform: translateY(-120%); transition: transform .28s ease; height: auto;
  }
  .nav__links.open { transform: translateY(0); }
  .nav__links li { width: 100%; }
  .nav__links a { display: block; padding: 14px 0; width: 100%; border-bottom: 1px solid var(--line-soft); }
  .nav__cta { margin: 14px 0 0; }
}

/* ---------- Hero ---------- */
/* Plain hero — same flat background as the rest of the page. No decorative
   gradients or grid pattern so there's nothing to create a visible edge
   when scrolling into the next section. */
.hero { position: relative; padding-block: clamp(72px, 12vw, 150px) clamp(64px, 9vw, 120px); }
.hero__inner { max-width: 760px; }
.hero h1 { margin-bottom: 1.2rem; }
.hero__sub { font-size: clamp(1.1rem, 1.7vw, 1.35rem); color: var(--text-muted); max-width: 56ch; margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero__tags { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-top: 2.6rem; color: var(--text-dim); font-size: .85rem; letter-spacing: .04em; }
.hero__tags span { display: inline-flex; align-items: center; gap: .5rem; }
.hero__tags span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }

/* ---------- Section heading ---------- */
.sec-head { max-width: 720px; margin-bottom: clamp(2.2rem, 4vw, 3.4rem); }
.sec-head.center { margin-inline: auto; }
.sec-head p { margin-top: 1rem; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 980px) { .grid--4, .grid--5 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 680px) { .grid--2, .grid--3, .grid--4, .grid--5 { grid-template-columns: 1fr; } }

.card {
  background: var(--bg-elev); border: 1px solid var(--line-soft);
  border-radius: var(--radius); padding: 1.6rem;
  transition: transform .2s ease, border-color .2s ease, background .2s ease;
}
.card:hover { transform: translateY(-3px); border-color: var(--line); background: var(--bg-elev-2); }
.card h3 { margin-bottom: .55rem; }
.card p { color: var(--text-muted); font-size: .98rem; }
.card__icon {
  width: 46px; height: 46px; border-radius: 12px;
  display: grid; place-items: center; margin-bottom: 1.1rem;
  background: rgba(110,151,201,.1); border: 1px solid var(--line);
  color: var(--accent-2);
}
.card__icon svg { width: 24px; height: 24px; }

/* operate row variant: lighter, centered */
.op { text-align: center; padding: 1.4rem 1rem; }
.op .card__icon { margin-inline: auto; }

/* ---------- Split / feature ---------- */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.split--reverse .split__media { order: -1; }
@media (max-width: 880px) { .split { grid-template-columns: 1fr; } .split--reverse .split__media { order: 0; } }
/* Media container for split sections — holds either an SVG or a photo. */
.split__media {
  min-height: 320px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Photos inside split layouts — fill the column, rounded, subtle bordered frame. */
.split__photo {
  width: 100%;
  height: 100%;
  max-height: 420px;
  min-height: 280px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  display: block;
}
/* Vector silhouettes traced from photos — pure SVG, no raster, transparent.
   Sit naturally on the page background without a frame. */
.split__silhouette {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  display: block;
}
.panel-figure { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-dim); }

/* ---------- Stats ---------- */
/* Fully transparent so the body's fixed radial gradient flows through every
   section. The whole page reads as one canvas with content scrolling over a
   single static background. */
.stats-band { background: transparent; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1.5rem; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 2rem 1.5rem; } }
@media (max-width: 480px) { .stats { grid-template-columns: 1fr; } }
.stat { text-align: center; }
.stat__num { font-family: var(--font-head); font-weight: 700; font-size: clamp(2.2rem, 4vw, 3rem); color: var(--text); letter-spacing: -.02em; }
.stat__num span { color: var(--accent-2); }
.stat__label { color: var(--text-muted); font-size: .9rem; margin-top: .4rem; }
.disclaimer { color: var(--text-dim); font-size: .8rem; line-height: 1.6; margin-top: 2.6rem; max-width: 80ch; }

/* ---------- Definition list / governance ---------- */
.factrow { display: grid; grid-template-columns: 200px 1fr; gap: 1rem 2rem; padding: 1.2rem 0; border-bottom: 1px solid var(--line-soft); }
.factrow:last-child { border-bottom: 0; }
.factrow dt { color: var(--text); font-weight: 600; font-family: var(--font-head); font-size: 1rem; }
.factrow dd { color: var(--text-muted); margin: 0; }
@media (max-width: 620px) { .factrow { grid-template-columns: 1fr; gap: .3rem; } }

/* ---------- Leadership ---------- */
.leader { display: grid; grid-template-columns: 150px 1fr; gap: 2rem; align-items: start; }
.leader__photo {
  width: 150px; height: 150px; border-radius: 16px; flex: none;
  background: linear-gradient(160deg, #1A2434, #0E141E); border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--text-dim); font-family: var(--font-head);
  font-size: 2.4rem; font-weight: 600;
}
@media (max-width: 560px) { .leader { grid-template-columns: 1fr; } }

/* ---------- Callout / note ---------- */
.note {
  border: 1px solid var(--line); border-left: 3px solid var(--gold);
  background: var(--bg-elev); border-radius: var(--radius-sm);
  padding: 1.2rem 1.4rem; color: var(--text-muted);
}
.note strong { color: var(--text); }

/* ---------- CTA band ---------- */
/* Transparent so it flows with the main page background — no boxed-in look. */
.cta {
  background: transparent;
  border: 0;
  padding: clamp(1.6rem, 4vw, 2.8rem) 0;
  text-align: center;
}
.cta h2 { margin-bottom: 1rem; }
.cta p { margin-inline: auto; margin-bottom: 1.8rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
@media (max-width: 880px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-detail { display: flex; gap: 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--line-soft); }
.contact-detail:last-child { border-bottom: 0; }
.contact-detail .card__icon { width: 40px; height: 40px; margin: 0; flex: none; }
.contact-detail h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--text-dim); margin-bottom: .2rem; font-family: var(--font-body); font-weight: 600; }
.contact-detail a, .contact-detail p { color: var(--text); }

.form { background: var(--bg-elev); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: clamp(1.5rem, 3vw, 2.2rem); }

/* Office map embed */
.map-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elev);
  position: relative;
}
.map-wrap iframe { filter: saturate(0.85) brightness(0.92); transition: filter .25s ease; }
.map-wrap:hover iframe { filter: saturate(1) brightness(1); }
.map-link {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: 1rem; font-size: .95rem; font-weight: 600;
  color: var(--accent-2);
}
.map-link:hover { color: var(--text); }
.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: .85rem; color: var(--text-muted); margin-bottom: .45rem; font-weight: 500; }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: .98rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: .8rem .9rem; transition: border-color .2s ease;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.field textarea { resize: vertical; min-height: 130px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 520px) { .form__row { grid-template-columns: 1fr; } }
.form__note { font-size: .8rem; color: var(--text-dim); margin-top: .2rem; }

/* ---------- Footer ---------- */
.site-footer { background: #080B12; border-top: 1px solid var(--line-soft); padding-block: clamp(48px, 6vw, 72px) 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }
.footer-grid h4 { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 1rem; font-family: var(--font-body); font-weight: 600; }
.footer-grid p, .footer-grid li { color: var(--text-muted); font-size: .92rem; }
.footer-grid ul { list-style: none; padding: 0; display: grid; gap: .6rem; }
.footer-brand .brand { margin-bottom: 1rem; }
.social { display: inline-flex; gap: .6rem; margin-top: .4rem; }
.social a { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; color: var(--text-muted); }
.social a:hover { border-color: var(--accent-2); color: var(--text); }
.footer-bottom { border-top: 1px solid var(--line-soft); margin-top: 2.6rem; padding-top: 1.6rem; display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; justify-content: space-between; color: var(--text-dim); font-size: .82rem; }
.footer-bottom a { color: var(--text-dim); }
.footer-bottom a:hover { color: var(--text-muted); }

/* ---------- Reveal animation (subtle, fast, reduced-motion aware) ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
