/* ==========================================================================
   FRAM3 AI LABS — brand design system
   Colours pulled from Frame Colours & Typography: Floral White, Soft Peach,
   Sunflower Gold, Grey Olive, Carbon Black. Headings in Rajdhani, body in Roboto.
   ========================================================================== */

:root{
  --black:      #1D1C1A;
  --black-2:    #262420;
  --black-3:    #34312B;
  --gold:       #E8B640;
  --gold-2:     #F2CA6C;
  --peach:      #F8D89C;
  --white:      #FFFBF4;
  --olive:      #85827C;
  --olive-lt:   #B7B3A8;
  --text-dim:   rgba(255,251,244,0.68);
  --text-faint: rgba(255,251,244,0.44);
  --line:       rgba(232,182,64,0.18);
  --line-soft:  rgba(255,251,244,0.10);
  --shadow:     0 20px 50px rgba(0,0,0,0.35);
  --radius:     14px;
  --radius-sm:  8px;
  --maxw:       1200px;
  --font-head:  'Rajdhani', 'Arial Narrow', sans-serif;
  --font-body:  'Roboto', 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--black);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img{ max-width:100%; display:block; }
a{ color: inherit; text-decoration:none; }
ul{ margin:0; padding:0; list-style:none; }
h1,h2,h3,h4{
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--white);
  margin: 0 0 0.4em;
  letter-spacing: 0.01em;
  line-height: 1.12;
}
h1{ font-size: clamp(2.4rem, 5vw, 4rem); font-weight: 700; }
h2{ font-size: clamp(1.7rem, 3.2vw, 2.5rem); }
h3{ font-size: 1.28rem; }
p{ margin: 0 0 1em; }
.container{ max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }

/* ---------- background texture ---------- */
.grid-bg{
  position: fixed; inset:0; z-index:-2; pointer-events:none;
  background-image:
    linear-gradient(rgba(232,182,64,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232,182,64,0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 10%, transparent 75%);
}
.glow{
  position:absolute; z-index:-1; pointer-events:none;
  width:900px; height:900px; border-radius:50%;
  background: radial-gradient(circle, rgba(232,182,64,0.16), transparent 65%);
  filter: blur(10px);
}

/* ---------- eyebrow / section header (echoes the deck motif) ---------- */
.eyebrow{
  display:flex; align-items:center; gap:14px;
  font-family: var(--font-head); font-weight:600;
  font-size: 0.82rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 18px;
}
.eyebrow .rule{ flex:0 0 40px; height:1px; background: linear-gradient(90deg, var(--gold), transparent); }
.eyebrow.center{ justify-content:center; }
.eyebrow.center .rule{ background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.section-head{ max-width: 760px; margin-bottom: 48px; }
.section-head.center{ margin-left:auto; margin-right:auto; text-align:center; }
.section-head p{ color: var(--text-dim); font-size: 1.05rem; }

section{ padding: 96px 0; position: relative; }
section.tight{ padding: 64px 0; }
.section-light{ background: var(--white); color: var(--black); }
.section-light h1, .section-light h2, .section-light h3, .section-light h4{ color: var(--black); }
.section-light p{ color: rgba(29,28,26,0.72); }
.section-light .eyebrow{ color: #A87A1B; }
.section-panel{ background: var(--black-2); border-top:1px solid var(--line-soft); border-bottom:1px solid var(--line-soft); }

/* ---------- nav ---------- */
header.nav{
  position: fixed; top:0; left:0; right:0; z-index: 100;
  background: rgba(29,28,26,0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav-inner{ max-width: var(--maxw); margin:0 auto; padding: 16px 28px; display:flex; align-items:center; justify-content:space-between; }
.brand{ display:flex; align-items:center; gap:10px; }
.brand-mark{ height:32px; width:auto; display:block; }
.brand .name{ font-family: var(--font-head); font-weight:700; font-size:1.02rem; letter-spacing:0.05em; }
.brand .name span{ color: var(--gold); }
.brand .sub{ display:block; font-size:0.58rem; letter-spacing:0.22em; color: var(--olive-lt); font-family: var(--font-body); margin-top:1px; }
nav.links{ display:flex; align-items:center; gap:2px; }
nav.links a{
  font-family: var(--font-head); font-weight:600; letter-spacing:0.04em;
  font-size:0.92rem; color: var(--text-dim); padding: 10px 16px; border-radius: 6px;
  transition: color .2s ease;
}
nav.links a:hover, nav.links a.active{ color: var(--gold); }
.nav-cta{
  margin-left: 8px; background: var(--gold); color: var(--black) !important;
  padding: 10px 20px !important; border-radius: 6px; font-weight:700 !important;
}
.nav-cta:hover{ background: var(--gold-2) !important; color: var(--black) !important; }
.burger{ display:none; flex-direction:column; gap:5px; background:none; border:0; cursor:pointer; padding:6px; }
.burger span{ width:24px; height:2px; background: var(--white); display:block; }

/* ---------- buttons ---------- */
.btn{
  display:inline-flex; align-items:center; gap:8px;
  font-family: var(--font-head); font-weight:700; letter-spacing:0.03em;
  font-size:0.98rem; padding: 14px 26px; border-radius: 8px; cursor:pointer;
  border: 1px solid transparent; transition: all .2s ease; white-space:nowrap;
}
.btn-primary{ background: var(--gold); color: var(--black); }
.btn-primary:hover{ background: var(--gold-2); transform: translateY(-1px); }
.btn-outline{ background: transparent; border-color: rgba(232,182,64,0.55); color: var(--gold); }
.btn-outline:hover{ background: rgba(232,182,64,0.08); border-color: var(--gold); }
.btn-outline.dark{ border-color: rgba(29,28,26,0.35); color: var(--black); }
.btn-outline.dark:hover{ background: rgba(29,28,26,0.06); }
.btn-row{ display:flex; gap:14px; flex-wrap:wrap; }

/* ---------- hero ---------- */
.hero{ padding: 190px 0 110px; }
.hero .tag{ color: var(--peach); font-family: var(--font-head); font-weight:600; letter-spacing:.22em; text-transform:uppercase; font-size:.82rem; }
.hero h1{ margin-top:14px; max-width: 900px; }
.hero h1 em{ font-style: normal; color: var(--gold); }
.hero .lede{ max-width: 660px; font-size: 1.14rem; color: var(--text-dim); margin: 20px 0 34px; }
.hero-sub{ margin-top: 60px; display:flex; gap:40px; flex-wrap:wrap; border-top:1px solid var(--line-soft); padding-top: 28px; }
.hero-sub .stat b{ display:block; font-family: var(--font-head); font-size:1.5rem; color: var(--gold); }
.hero-sub .stat span{ font-size:0.86rem; color: var(--text-faint); }

.page-hero{ padding: 168px 0 72px; border-bottom: 1px solid var(--line-soft); }
.page-hero .lede{ max-width: 700px; font-size: 1.08rem; color: var(--text-dim); }

/* ---------- grids & cards ---------- */
.grid{ display:grid; gap: 24px; }
.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-6{ grid-template-columns: repeat(6, 1fr); }

.card{
  background: var(--black-2); border:1px solid var(--line-soft); border-radius: var(--radius);
  padding: 30px; transition: border-color .2s ease, transform .2s ease;
}
.card:hover{ border-color: var(--line); transform: translateY(-3px); }
.card .num{ font-family: var(--font-head); font-size:0.82rem; color: var(--olive-lt); letter-spacing:.14em; }
.card h3{ margin-top:10px; }
.card p{ color: var(--text-dim); font-size:0.96rem; }
.card ul li{ position:relative; padding-left:18px; margin-bottom:8px; color:var(--text-dim); font-size:0.94rem; }
.card ul li::before{ content:''; position:absolute; left:0; top:9px; width:6px; height:6px; background: var(--gold); border-radius:1px; }

.card-light{ background: var(--white); border:1px solid rgba(29,28,26,0.10); color: var(--black); box-shadow: 0 12px 30px rgba(29,28,26,0.06); }
.card-light h3{ color: var(--black); }
.card-light p, .card-light ul li{ color: rgba(29,28,26,0.68); }
.card-light .num{ color: #A87A1B; }

.pill{
  display:inline-block; font-family: var(--font-head); font-weight:600; font-size:0.76rem;
  letter-spacing:.1em; text-transform:uppercase; color: var(--gold); background: rgba(232,182,64,0.10);
  border:1px solid rgba(232,182,64,0.28); padding: 5px 12px; border-radius: 100px; margin-bottom:12px;
}

/* ---------- flow / steps ---------- */
.flow{ display:flex; gap:0; flex-wrap:wrap; }
.flow .step{ flex:1 1 160px; text-align:center; padding: 20px 14px; position:relative; }
.flow .step .n{
  width:42px; height:42px; border-radius:50%; background: var(--gold); color: var(--black);
  font-family: var(--font-head); font-weight:700; display:flex; align-items:center; justify-content:center;
  margin: 0 auto 14px; font-size:1.1rem;
}
.flow .step h4{ font-size:1rem; margin-bottom:6px; }
.flow .step p{ font-size:0.86rem; color: var(--text-faint); margin:0; }
.flow .arrow{ display:flex; align-items:center; color: var(--gold); font-size:1.4rem; padding-top:6px; }

/* ---------- diagram (inputs -> workflow -> outputs) ---------- */
.diagram{ display:grid; grid-template-columns: 1fr auto 1.3fr auto 1fr; gap: 18px; align-items:center; }
.diagram .col h4{ font-family: var(--font-head); color: var(--gold); font-size:0.86rem; letter-spacing:.1em; text-transform:uppercase; margin-bottom:14px; }
.diagram .col ul li{ color: var(--text-dim); font-size:0.92rem; padding: 9px 0; border-bottom:1px solid var(--line-soft); }
.diagram .col ul li:last-child{ border-bottom:none; }
.diagram .mid-arrow{ color: var(--gold); font-size:1.8rem; text-align:center; }
.diagram .workflow-box{ background: var(--black-2); border:1px solid var(--line); border-radius: var(--radius); padding:22px; }

/* ---------- leadership ---------- */
.leader-card{ display:flex; gap:26px; align-items:flex-start; }
.leader-card .photo{ flex: 0 0 168px; width:168px; height:168px; border-radius: 16px; overflow:hidden; border: 1px solid var(--line); }
.leader-card .photo img{ width:100%; height:100%; object-fit:cover; }
.leader-card h3{ margin-bottom:2px; }
.leader-card .role{ color: var(--gold); font-family: var(--font-head); font-weight:600; font-size:0.92rem; margin-bottom:12px; display:block; }

/* ---------- footer ---------- */
footer{ background: #17160F; border-top: 1px solid var(--line-soft); padding: 64px 0 28px; }
.footer-grid{ display:grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
footer h4{ font-family: var(--font-head); color: var(--gold); font-size:0.86rem; letter-spacing:.14em; text-transform:uppercase; margin-bottom:16px; }
footer p, footer a, footer li{ color: var(--text-faint); font-size:0.9rem; line-height:1.6; }
footer ul li{ margin-bottom:9px; }
footer a:hover{ color: var(--gold); }
.footer-bottom{ margin-top:56px; padding-top:22px; border-top:1px solid var(--line-soft); display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px; font-size:0.8rem; color: var(--text-faint); }

/* ---------- misc ---------- */
.divider{ height:1px; background: var(--line-soft); margin: 64px 0; }
.tag-row{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom: 22px; }
.callout{
  background: linear-gradient(135deg, rgba(232,182,64,0.10), rgba(232,182,64,0.02));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 32px;
}
.callout.light{ background: var(--peach); border-color: rgba(29,28,26,0.08); color: var(--black); }
.callout.light p{ color: rgba(29,28,26,0.75); }
.two-col{ display:grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items:center; }
.reveal{ opacity:0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in{ opacity:1; transform:none; }

/* ---------- contact form ---------- */
.field{ margin-bottom: 18px; }
.field label{ display:block; font-family: var(--font-head); font-size:0.82rem; letter-spacing:.06em; text-transform:uppercase; color: var(--olive-lt); margin-bottom:8px; }
.field input, .field select, .field textarea{
  width:100%; background: var(--black-2); border:1px solid var(--line-soft); color: var(--white);
  padding: 13px 14px; border-radius: 8px; font-family: var(--font-body); font-size:0.98rem;
}
.field input:focus, .field select:focus, .field textarea:focus{ outline:none; border-color: var(--gold); }
.field textarea{ resize: vertical; min-height:120px; }
.form-note{ font-size:0.82rem; color: var(--text-faint); margin-top:10px; }

/* ---------- responsive ---------- */
@media (max-width: 980px){
  .grid-4{ grid-template-columns: repeat(2,1fr); }
  .grid-3{ grid-template-columns: repeat(2,1fr); }
  .grid-6{ grid-template-columns: repeat(3,1fr); }
  .two-col{ grid-template-columns: 1fr; gap:32px; }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
  .diagram{ grid-template-columns: 1fr; }
  .diagram .mid-arrow{ transform: rotate(90deg); }
}
@media (max-width: 720px){
  nav.links{
    position: fixed; top: 68px; left:0; right:0; background: rgba(23,22,15,0.98);
    flex-direction:column; align-items:stretch; padding: 10px 20px 26px; gap:2px;
    border-bottom: 1px solid var(--line-soft);
    transform: translateY(-130%); transition: transform .25s ease; max-height: 80vh; overflow:auto;
  }
  nav.links.open{ transform: translateY(0); }
  nav.links a{ padding: 14px 6px; border-bottom:1px solid var(--line-soft); }
  .nav-cta{ margin: 10px 6px 0; text-align:center; }
  .burger{ display:flex; }
  .grid-2, .grid-3, .grid-4, .grid-6{ grid-template-columns: 1fr; }
  .leader-card{ flex-direction:column; }
  .leader-card .photo{ width:140px; height:140px; }
  .footer-grid{ grid-template-columns: 1fr; }
  .hero{ padding: 150px 0 70px; }
  .page-hero{ padding: 140px 0 56px; }
}

/* =====================================================================
   MEDIA LAYER — added with the generated imagery (2026-07)
   Builds on the existing tokens and .reveal system; overrides nothing.
   ===================================================================== */

/* Hero art sits BEHIND the copy as a masked layer rather than as a block
   above it, so the headline stays the first thing read and the image never
   pushes the CTA below the fold. */
.hero{ position: relative; overflow: hidden; }
.hero-art{
  position:absolute; inset:0; z-index:0; pointer-events:none;
  /* background-image is set by JS directly on the element, NOT via a custom
     property: url() inside a custom property resolves against the STYLESHEET's
     base URL, not the document's, so var(--hero-src) here resolved to
     assets/css/assets/img/... and 404'd. */
  background-size: cover; background-position: 62% 42%;
  opacity: 0; transform: scale(1.04);
  transition: opacity 1.4s ease, transform 2.4s ease;
  /* Fade the art out toward the left and bottom so text always lands on
     near-black — legibility comes from the mask, not from dimming the art. */
  -webkit-mask-image: linear-gradient(100deg, transparent 0%, transparent 32%, #000 78%);
          mask-image: linear-gradient(100deg, transparent 0%, transparent 32%, #000 78%);
}
.hero-art.in{ opacity:.72; transform: none; }
.hero > .container{ position: relative; z-index: 1; }

/* Section art: fixed aspect box so the layout never shifts when the image
   lands (cumulative layout shift), with the LQIP held underneath. */
.media{
  position: relative; margin: 0; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--line-soft);
  background: var(--black-2) var(--lqip) center/cover no-repeat;
  aspect-ratio: 16 / 9;
}
.media img{
  display:block; width:100%; height:100%; object-fit: cover;
  opacity:0; transition: opacity .8s ease;
}
.media img.loaded{ opacity:1; }
.media::after{
  content:""; position:absolute; inset:0; pointer-events:none;
  background: linear-gradient(180deg, transparent 55%, rgba(29,28,26,.55) 100%);
}
.media-wide{ aspect-ratio: 21 / 9; }

/* Service card art — 4:3 source, cropped to a letterbox band above the copy. */
.card-media{
  margin: -30px -30px 22px; border-radius: var(--radius) var(--radius) 0 0;
  overflow:hidden; aspect-ratio: 20 / 9; background: var(--black-3);
}
.card-media img{
  display:block; width:100%; height:100%; object-fit: cover;
  opacity:.86; transform: scale(1.02);
  transition: opacity .4s ease, transform .6s ease;
}
.card:hover .card-media img{ opacity:1; transform: scale(1.06); }

/* Depth: a soft gold bloom behind key sections, cheap and GPU-friendly. */
.bloom{ position: relative; }
.bloom::before{
  content:""; position:absolute; z-index:0; inset:auto;
  left:50%; top:-140px; width:min(900px, 90vw); height:420px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(232,182,64,.10), transparent 68%);
  pointer-events:none;
}
.bloom > *{ position:relative; z-index:1; }

/* The site had no reduced-motion handling at all. Adding imagery and motion
   without this would make it worse for anyone who has asked the OS to stop. */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration:.001ms !important; animation-iteration-count:1 !important;
    transition-duration:.001ms !important; scroll-behavior:auto !important;
  }
  .hero-art{ opacity:.72; transform:none; }
  .media img, .media img.loaded{ opacity:1; }
  .reveal{ opacity:1; transform:none; }
}

@media (max-width: 720px){
  .hero-art{ -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 70%);
                      mask-image: linear-gradient(180deg, transparent 0%, #000 70%); }
  .hero-art.in{ opacity:.42; }
  .card-media{ margin: -22px -22px 18px; }
}


/* Contact form status + honeypot (2026-07) */
.form-status{ margin-top:14px; font-size:0.92rem; min-height:1.4em; color: var(--text-dim); }
.form-status.is-ok{ color: var(--gold); }
.form-status.is-err{ color:#E9A0A0; }
/* Hidden from people, still reachable by naive bots. Not display:none — some
   bots skip those; this is off-screen but present in the DOM. */
.hp{ position:absolute !important; left:-9999px; width:1px; height:1px; overflow:hidden; }
