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

:root {
  /* Palette — navy base #113357 with azure + gold accents. Contrast AA. */
  --bg:          #113357;   /* navy base */
  --bg-elev:     #153F6B;   /* surface — subtle lift from base */
  --bg-elev-2:   #194B80;   /* hover / alt surface */
  --line:        #1F5D9E;   /* hairline */
  --line-soft:   #18477A;   /* softer hairline */
  --text:        #FFFFFF;   /* pure white */
  --text-muted:  #CFDCEC;   /* muted body */
  --text-dim:    #B4C3D8;   /* dim labels (AA on all surfaces) */
  --accent:      #77BEFF;   /* azure brand blue */
  --accent-2:    #A5D2FF;   /* lighter blue (hover / accent) */
  --gold:        #FAD47E;   /* gold */
  --danger:      #E89079;

  /* 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(36px, 5vw, 72px);
  --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);
  /* Solid navy base; the Dubai photo + tint live on a GPU-composited fixed
     layer (see body::before) so scrolling stays smooth. */
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* GPU-composited fixed background layer — keeps the photo fixed behind the
   content without the scroll-jank of background-attachment: fixed. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(17, 51, 87, 0.20), rgba(17, 51, 87, 0.34)),
    url('../assets/bg-dubai-trading-vivid2.jpg') center / cover no-repeat;
  transform: translateZ(0);
}
/* Legibility over the background photo: soft dark halo on all copy, removed
   inside solid-background components (cards, form, footer, buttons, header). */
body { text-shadow: 0 1px 2px rgba(2, 8, 20, 1), 0 0 8px rgba(2, 8, 20, 0.85), 0 0 16px rgba(2, 8, 20, 0.55); }
/* Full 50px halo stays on the headings (few, large) — cheap to paint; body copy uses the lighter halo above so long paragraphs scroll smoothly. */
h1, h2 { text-shadow: 0 1px 2px rgba(2, 8, 20, 1), 0 0 6px rgba(2, 8, 20, 1), 0 0 16px rgba(2, 8, 20, 0.9), 0 0 50px rgba(2, 8, 20, 0.7); }
.card, .contact-detail--card, .form, .note, .site-header, .site-footer, .btn { text-shadow: none; }

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; }
/* Global focus indicator — outline sits FLUSH against the element (no offset,
   no separate radius) so it can't float outside the element bounds or get
   clipped by section edges. Per-element overrides may still apply. */
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 0; }

/* ---------- Utilities ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
/* All sections share the same vertical rhythm. --tight is kept as an alias
   for the same padding so existing markup doesn't break, but visually every
   section now has identical vertical spacing. */
.section,
.section--tight { padding-block: var(--section-y); }
/* CTA sections sit tighter — less dead space around the call-to-action */
.section:has(.cta) { padding-block: clamp(16px, 2.5vw, 36px); }
.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; }

/* Fully-centered page layout (home, about, approach) */
.page-center { text-align: center; }
.page-center .hero__inner,
.page-center .sec-head,
.page-center .hero__sub,
.page-center .lead,
.page-center .disclaimer { margin-inline: auto; }
.page-center .hero__actions,
.page-center .hero__tags { justify-content: center; }

/* ...but section headers (eyebrow segment + its title) stay LEFT-aligned */
.page-center .hero__inner,
.page-center .sec-head,
.page-center .cta,
.page-center .split > .reveal { text-align: left; margin-inline: 0; }
.page-center .hero__sub,
.page-center .sec-head p,
.page-center .cta p { margin-inline: 0; }
.page-center .hero__actions,
.page-center .hero__tags,
.page-center .cta .hero__actions { justify-content: flex-start; }

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 — brighter brand blue with deep-navy text. Double class
   selector (.btn.btn--primary) beats .nav__links a so the CTA isn't muted. */
.btn.btn--primary { background: rgba(17, 51, 87, 0.34); color: var(--gold); border-color: var(--gold); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px); }
.btn.btn--primary:hover { background: var(--gold); color: #2E2207; border-color: var(--gold); backdrop-filter: none; -webkit-backdrop-filter: none; }
.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: #113357;
  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 { height: 76px; }
  .brand__logo { height: 48px; }
  .nav__links {
    position: fixed; inset: 76px 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; }
}

/* Mobile polish — smaller logos, tighter hero, lighter heading halo on phones */
@media (max-width: 640px) {
  .site-footer .brand__logo { height: 60px; }
  .hero { padding-block: clamp(40px, 9vw, 72px) clamp(36px, 8vw, 64px); }
  h1, h2 { text-shadow: 0 1px 2px rgba(2, 8, 20, 1), 0 0 6px rgba(2, 8, 20, 0.95), 0 0 18px rgba(2, 8, 20, 0.6); }
}

/* ---------- 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 ---------- */
/* All grids share the same gap so spacing between tiles is uniform across
   the whole site (capability strip, principles, stats, etc.). */
.grid { display: grid; gap: 1.5rem; }
.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: rgba(17, 51, 87, 0.42); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); 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: rgba(17, 51, 87, 0.52); }
/* Frosted-glass card (leadership) — translucent navy + blurred photo behind */
.card--glass, .card--glass:hover { background: rgba(17, 51, 87, 0.42); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.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: var(--gold); border: 1px solid var(--gold);
  color: #14233B;
}
.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 ---------- */
/* Two-column layout — both columns share the row height (align-items:stretch)
   and centre their own content vertically via flexbox. This guarantees the
   title and body block share a vertical centre line, regardless of which
   side is taller. */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: stretch; }
.split > .reveal {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.split--reverse .split__media { order: -1; }
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .split > .reveal { justify-content: flex-start; }
}
.split--solo { grid-template-columns: 1fr; max-width: 720px; margin-inline: auto; text-align: center; }
/* 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(4, 1fr); gap: 1.5rem; }
@media (max-width: 900px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 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(--gold); }
.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 ---------- */
/* Single column — no photo block sits beside the bio. */
.leader { display: block; }
.leader__photo {
  width: 150px; height: 150px; border-radius: 16px; flex: none;
  background: linear-gradient(160deg, #194B80, #113357); 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: 0;
  text-align: center;
}
.cta h2 { margin-bottom: 1rem; }
.cta p { margin-inline: auto; margin-bottom: 1.8rem; }
/* Left-aligned CTA variant (home contact preview, to match the sections above) */
.cta--left { text-align: left; }
.cta--left .lead, .cta--left p { margin-inline: 0; }
.cta--left .eyebrow, .cta--left .hero__actions { justify-content: flex-start; }

/* ---------- 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 details on the no-form page — each channel is its own card-style
   tile. Phone, Email and LinkedIn become clickable cards. */
.contact-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  max-width: 920px;
  margin-inline: auto;
}
@media (max-width: 760px) { .contact-details { grid-template-columns: 1fr; } }
.contact-detail--card {
  display: flex; gap: 1rem; align-items: center;
  padding: 1.4rem 1.5rem;
  background: rgba(17, 51, 87, 0.42);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  transition: transform .15s ease, border-color .2s ease, background .2s ease;
  /* Force every tile to the exact same width (fill its grid column) and the
     exact same height (stretch to row height) regardless of content. */
  width: 100%;
  min-width: 0;
  min-height: 100%;
  box-sizing: border-box;
}
/* Make the inner text column shrink properly inside the flex card so long
   content (Office address, LinkedIn handle) can't push the card wider. */
.contact-detail--card > div:last-child { min-width: 0; flex: 1; }
.contact-detail--card .contact-value { display: block; word-break: break-word; }
/* Hover = subtle lift + brighter background. NO border-colour change so
   no light-blue contour ever appears around the tile. */
.contact-detail--card:hover {
  transform: translateY(-2px);
  background: rgba(17, 51, 87, 0.52);
  color: var(--text);
}
/* Override the global :focus-visible outline (which floats outside the card
   with offset and looks like a stuck contour, clipped by the section edge).
   All four sides get a clean border-colour change on focus — same as hover. */
.contact-detail--card,
.contact-detail--card:focus,
.contact-detail--card:focus-visible,
.contact-detail--card:focus-within,
.contact-detail--card:active {
  outline: 0 none !important;
  outline-offset: 0 !important;
  box-shadow: none !important;
}
/* Focus state has no accent border either. Border stays the soft default
   colour. Accessibility-wise, the slight lift + brighter background still
   indicate "this is the focused element". */
.contact-detail--card:focus-visible {
  border-color: var(--line-soft) !important;
  border-radius: var(--radius) !important;
}
.contact-detail--card .card__icon { width: 44px; height: 44px; margin: 0; flex: none; }
.contact-detail--card h3 { font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); margin: 0 0 .25rem 0; }
.contact-detail--card .contact-value { font-size: 1.05rem; color: var(--text); font-weight: 500; }
.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: #113357; 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; }
}
