/* ==========================================================================
   GROUP-BHD — Base design system
   Tokens, reset, typography, navigation, footer, shared components
   ========================================================================== */

:root{
  /* --- Group palette (desert / midnight / gold) --- */
  --ink:            #0a0d12;
  --ink-soft:       #10141c;
  --ink-panel:      #151a24;
  --line:           rgba(237,230,214,0.10);
  --line-strong:    rgba(237,230,214,0.20);

  --parchment:      #ede6d6;
  --parchment-dim:  #a79f8e;
  --parchment-faint: #6f6a5f;

  --gold:           #c9a24b;
  --gold-bright:    #e9cb7d;
  --gold-dim:       #8a723a;

  --bronze:         #a8642a;
  --crimson:        #8c1f2e;
  --crimson-bright: #c22e40;
  --steel:          #8b93a1;
  --teal:           #1f6f6b;
  --azure:          #3a63b8;
  --orange:         #d9832b;

  /* --- Type --- */
  --font-display: 'Fraunces', 'Iowan Old Style', serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'Space Mono', 'JetBrains Mono', monospace;

  /* --- Layout --- */
  --container: 1240px;
  --nav-h: 84px;
  --radius: 2px;

  /* --- Motion --- */
  --ease: cubic-bezier(.16,.84,.32,1);
}

/* Per-page accent override hook — each page sets --accent / --accent-bright on <body> */
body{
  --accent: var(--gold);
  --accent-bright: var(--gold-bright);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){
  html{ scroll-behavior: auto; }
  *, *::before, *::after{ animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

body{
  margin: 0;
  background: var(--ink);
  color: var(--parchment);
  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{ list-style: none; margin: 0; padding: 0; }
h1,h2,h3,h4,p,figure{ margin: 0; }
button{ font-family: inherit; cursor: pointer; }

:focus-visible{
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

::selection{ background: var(--accent); color: var(--ink); }

.container{
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 640px){
  .container{ padding: 0 20px; }
}

/* --- Eyebrow / mono labels --- */
.eyebrow{
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before{
  content: '';
  width: 22px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}

h1, h2, h3{
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--parchment);
}

.text-accent{ color: var(--accent); }
.italic{ font-style: italic; font-weight: 400; }

/* ==========================================================================
   GROUP-BHD crest mark — the real group logo, used everywhere
   ========================================================================== */
.crest{
  display: inline-block;
  line-height: 0;
}
.crest-img{ display: block; }

/* ==========================================================================
   Scroll progress bar
   ========================================================================== */
.scroll-progress{
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--accent, var(--gold));
  z-index: 200;
  transition: width .12s linear;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.site-header{
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: rgba(10,13,18,0.72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
  transition: background .3s var(--ease), border-color .3s var(--ease);
}

.site-header .container{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand{
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--parchment);
}
.brand .crest{ margin-right: 2px; }
.brand-word{
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}
.brand-word b{ color: var(--gold); font-weight: 600; }

.nav-links{
  display: flex;
  align-items: center;
  gap: 2px;
}
.nav-links a{
  position: relative;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--parchment-dim);
  padding: 10px 16px;
  transition: color .25s var(--ease);
}
.nav-links a:hover{ color: var(--parchment); }
.nav-links a::after{
  content:'';
  position: absolute;
  left: 16px; right: 16px; bottom: 6px;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav-links a:hover::after{ transform: scaleX(1); }
.nav-links a.active{ color: var(--parchment); }
.nav-links a.active::after{ transform: scaleX(1); background: var(--accent-bright); }

.nav-cta{
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--accent);
  padding: 11px 20px;
  border: 1px solid var(--accent);
  transition: background .25s var(--ease), color .25s var(--ease), transform .25s var(--ease);
}
.nav-cta:hover{ background: transparent; color: var(--accent-bright); border-color: var(--accent-bright); }

.nav-toggle{
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
}
.nav-toggle span{
  width: 22px; height: 1px; background: var(--parchment);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle.open span:nth-child(1){ transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2){ opacity: 0; }
.nav-toggle.open span:nth-child(3){ transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 920px){
  .nav-links{
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(10,13,18,0.98);
    border-bottom: 1px solid var(--line);
    padding: 8px 20px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
  }
  .nav-links.open{
    opacity: 1; transform: translateY(0); pointer-events: auto;
  }
  .nav-links a{ padding: 14px 4px; border-bottom: 1px solid var(--line); }
  .nav-links a::after{ display: none; }
  .nav-cta{ display: none; }
  .nav-toggle{ display: flex; }
  .brand-word{ font-size: 15px; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 16px 28px;
  border: 1px solid var(--accent);
  transition: all .3s var(--ease);
  white-space: nowrap;
}
.btn-solid{ background: var(--accent); color: var(--ink); }
.btn-solid:hover{ background: var(--accent-bright); border-color: var(--accent-bright); transform: translateY(-2px); }
.btn-ghost{ color: var(--parchment); border-color: var(--line-strong); }
.btn-ghost:hover{ border-color: var(--accent); color: var(--accent-bright); transform: translateY(-2px); }
.btn svg{ width: 14px; height: 14px; transition: transform .3s var(--ease); }
.btn:hover svg{ transform: translateX(4px); }

/* ==========================================================================
   Logo mark — displays a brand logo (real transparent background) on dark
   surfaces, with a soft drop-shadow for lift instead of a background plate.
   ========================================================================== */
.logo-plaque{
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.logo-plaque img{
  width: auto;
  filter: drop-shadow(0 18px 34px rgba(0,0,0,0.55));
}

/* ==========================================================================
   Ambient particle canvas — sits behind hero content
   ========================================================================== */
.particle-canvas{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* ==========================================================================
   Ken Burns — slow idle zoom on media, pauses on hover
   ========================================================================== */
.kenburns{ overflow: hidden; }
.kenburns img{
  animation: kenburnsMove 16s ease-in-out infinite alternate;
  will-change: transform;
}
.kenburns.kb-hover img{ animation-play-state: paused; }
@keyframes kenburnsMove{
  0%   { transform: scale(1.0) translate(0,0); }
  100% { transform: scale(1.09) translate(-1.5%, -1.5%); }
}
@media (prefers-reduced-motion: reduce){
  .kenburns img{ animation: none; }
}

/* ==========================================================================
   Gentle floating bob — used on watermarks / badges for ambient life
   ========================================================================== */
.float-slow{ animation: floatSlow 7s ease-in-out infinite; }
@keyframes floatSlow{
  0%, 100%{ transform: translateY(-50%) translateX(0); }
  50%{ transform: translateY(calc(-50% - 14px)) translateX(-6px); }
}
@media (prefers-reduced-motion: reduce){
  .float-slow{ animation: none; }
}

/* ==========================================================================
   Reveal-on-scroll utility
   ========================================================================== */
.reveal{
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.reveal.in{ opacity: 1; transform: translateY(0); }
.reveal-delay-1{ transition-delay: .08s; }
.reveal-delay-2{ transition-delay: .16s; }
.reveal-delay-3{ transition-delay: .24s; }
.reveal-delay-4{ transition-delay: .32s; }

/* ==========================================================================
   Section dividers using the crest
   ========================================================================== */
.crest-divider{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 64px 0;
  color: var(--line-strong);
}
.crest-divider .line{
  height: 1px; flex: 1;
  max-width: 220px;
  background: linear-gradient(90deg, transparent, var(--line-strong));
}
.crest-divider .line.right{ background: linear-gradient(270deg, transparent, var(--line-strong)); }
.crest-divider .crest{ opacity: .7; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer{
  background: #06070a;
  border-top: 1px solid var(--line);
  padding: 80px 0 28px;
}
.footer-top{
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line);
}
.footer-brand .crest{ margin-bottom: 18px; }
.footer-brand p{
  color: var(--parchment-dim);
  font-size: 14px;
  max-width: 280px;
  line-height: 1.7;
}
.footer-col h4{
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--parchment-faint);
  margin-bottom: 18px;
}
.footer-col a, .footer-col p{
  display: block;
  color: var(--parchment-dim);
  font-size: 14px;
  padding: 6px 0;
  transition: color .2s var(--ease);
}
.footer-col a:hover{ color: var(--gold-bright); }
.footer-bottom{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--parchment-faint);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom a{ color: var(--parchment-dim); text-decoration: underline; text-underline-offset: 2px; transition: color .2s var(--ease); }
.footer-bottom a:hover{ color: var(--gold-bright); }

@media (max-width: 860px){
  .footer-top{ grid-template-columns: 1fr 1fr; row-gap: 40px; }
}
@media (max-width: 560px){
  .footer-top{ grid-template-columns: 1fr; }
}

/* ==========================================================================
   Generic section rhythm
   ========================================================================== */
section{ position: relative; }
.pad{ padding: 140px 0; }
.pad-sm{ padding: 88px 0; }
@media (max-width: 720px){
  .pad{ padding: 96px 0; }
  .pad-sm{ padding: 64px 0; }
}

.kicker-row{
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}
.kicker-row .lede{
  max-width: 380px;
  color: var(--parchment-dim);
  font-size: 15px;
  line-height: 1.75;
}

/* --- Shared hero action row --- */
.hero-actions{ display: flex; gap: 16px; flex-wrap: wrap; margin-top: 40px; }

/* --- Shared two-column "manifesto" text block --- */
.manifesto-grid{ display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 64px; }
.manifesto-grid h2{ font-size: clamp(1.8rem, 3vw, 2.6rem); margin-top: 14px; line-height: 1.18; }
.manifesto-copy p{ color: var(--parchment-dim); font-size: 16px; line-height: 1.85; margin-bottom: 20px; }
.manifesto-copy .pull{
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: 24px; color: var(--accent-bright); line-height: 1.5;
  margin-top: 36px; border-left: 2px solid var(--accent); padding-left: 24px;
}
@media (max-width: 860px){ .manifesto-grid{ grid-template-columns: 1fr; gap: 32px; } }

/* --- Shared numbered step row (used where content is a real sequence) --- */
.step-row{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.step-row li{ background: var(--ink); padding: 36px 30px; }
.step-no{
  display: block;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.1em;
  margin-bottom: 18px;
}
.step-row h3{ font-size: 19px; margin-bottom: 10px; }
.step-row p{ color: var(--parchment-dim); font-size: 14px; line-height: 1.65; }
@media (max-width: 860px){ .step-row{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .step-row{ grid-template-columns: 1fr; } }

/* --- Shared inline tag/word row (materials, stack, activities…) --- */
.tag-row{
  margin-top: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.1rem, 2.4vw, 1.7rem);
  color: var(--parchment-dim);
}
.tag-row span:nth-child(odd){ color: var(--parchment); }
.tag-row span:nth-child(even){ color: var(--accent); font-style: normal; font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.06em; }

/* --- Shared feature/service card grid --- */
.feature-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.feature-card{
  background: var(--ink);
  padding: 40px 34px;
  transition: background .35s var(--ease);
}
.feature-card:hover{ background: var(--ink-soft); }
.feature-icon{
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  margin-bottom: 22px;
}
.feature-icon svg{ width: 100%; height: 100%; }
.feature-card h3{ font-size: 19px; margin-bottom: 10px; }
.feature-card p{ color: var(--parchment-dim); font-size: 14px; line-height: 1.7; }
@media (max-width: 860px){ .feature-grid{ grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px){ .feature-grid{ grid-template-columns: 1fr; } }

/* --- Shared closing CTA band --- */
.cta-band{
  background: radial-gradient(ellipse 800px 400px at 50% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 65%), var(--ink);
  border-top: 1px solid var(--line);
  text-align: center;
}
.cta-band-inner{ max-width: 640px; margin: 0 auto; }
.cta-crest{ margin: 0 auto 28px; width: fit-content; opacity: 0.92; }
.cta-band h2{ font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.2; }
.cta-band p{ color: var(--parchment-dim); margin-top: 20px; font-size: 15.5px; }
.cta-actions{ display: flex; gap: 16px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }

/* Noise/grain overlay for texture on dark hero surfaces */
.grain{
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
