/* =====================================================================
   GRUG GROUP — multipage layer (site-pages.css)
   Loaded LAST. Multipage nav, inner-page hero, story, contact.
   ===================================================================== */

:root {
  --teal: #7FE5D8;
}

/* ---------------------------------------------------------------
   GLOBAL SURFACE — every page is dark, regardless of body class
   --------------------------------------------------------------- */
html { background: var(--grug-navy-900, #03071F); }
body {
  background: var(--grug-navy-900, #03071F);
  color: var(--color-fg-1, #EAF1FB);
  font-family: var(--font-body, sans-serif);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  margin: 0;
}
#root { background: var(--grug-navy-900, #03071F); }

/* Stats — 3 metrics now (Active partners removed) */
.grug-stats__grid { grid-template-columns: repeat(3, 1fr) !important; max-width: 1040px !important; }
@media (max-width: 700px) { .grug-stats__grid { grid-template-columns: 1fr !important; } }

/* Links never get the browser default underline (no .grug-site wrapper here) */
a { text-decoration: none; color: inherit; }
a:hover { text-decoration: none; }
button { cursor: pointer; }
*, *::before, *::after { box-sizing: border-box; }

/* ---------------------------------------------------------------
   NAV — active state, burger, mobile drawer
   --------------------------------------------------------------- */
.grug-nav__link.is-active {
  color: #fff;
}
.grug-nav__link.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--grug-blue-400, #4F95EE);
  border-radius: 2px;
}
.grug-nav__link { position: relative; }

/* Burger (hidden on desktop) */
.grug-nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
  z-index: 80;
}
.grug-nav__burger span {
  display: block;
  width: 24px; height: 2px;
  margin: 0 auto;
  background: #fff;
  border-radius: 2px;
  transition: transform 320ms var(--ease-out, cubic-bezier(.22,1,.36,1)), opacity 200ms;
}
.grug-nav.is-open .grug-nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.grug-nav.is-open .grug-nav__burger span:nth-child(2) { opacity: 0; }
.grug-nav.is-open .grug-nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.grug-navmenu {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(2, 5, 15, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms var(--ease-out, ease);
}
.grug-navmenu.is-open { opacity: 1; pointer-events: auto; }
.grug-navmenu__inner {
  position: absolute;
  top: 0; right: 0;
  width: min(86vw, 420px);
  height: 100%;
  background: linear-gradient(180deg, #06112E 0%, #03071F 100%);
  border-left: 1px solid rgba(143, 188, 246, 0.12);
  padding: 110px 36px 48px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateX(40px);
  transition: transform 420ms var(--ease-out, cubic-bezier(.22,1,.36,1));
}
.grug-navmenu.is-open .grug-navmenu__inner { transform: translateX(0); }
.grug-navmenu__link {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(143, 188, 246, 0.08);
  font-family: var(--font-display, sans-serif);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.02em;
  color: #DCE6FA;
  text-decoration: none;
  transition: color 200ms, padding-left 280ms var(--ease-out, ease);
}
.grug-navmenu__link:hover { color: #fff; padding-left: 8px; }
.grug-navmenu__link.is-active { color: var(--teal); }
.grug-navmenu__n {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: #5F6A82;
}
.grug-navmenu__cta {
  margin-top: 28px;
  justify-content: center;
}

/* ---------------------------------------------------------------
   PAGE HERO — compact inner-page banner
   --------------------------------------------------------------- */
.grug-pagehero {
  position: relative;
  min-height: 66vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #02050F;
}
.grug-pagehero__img {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  animation: pageHeroZoom 16s ease-out forwards;
}
@keyframes pageHeroZoom { from { transform: scale(1.06); } to { transform: scale(1); } }
.grug-pagehero__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(2,5,15,0.7) 0%, transparent 30%, transparent 45%, rgba(2,5,15,0.95) 100%),
    linear-gradient(90deg, rgba(2,5,15,0.7) 0%, transparent 60%);
}
.grug-pagehero__grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(143,188,246,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(143,188,246,0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 80% at 30% 100%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 80% at 30% 100%, #000 30%, transparent 75%);
}
.grug-pagehero__content {
  position: relative;
  z-index: 2;
  padding: 0 64px 80px;
  max-width: 1100px;
}
.grug-pagehero__index {
  font-family: var(--font-mono, monospace);
  font-size: 12px;
  letter-spacing: 0.4em;
  color: var(--teal);
  margin-bottom: 22px;
}
.grug-pagehero__title {
  font-family: var(--font-display, sans-serif);
  font-weight: 700;
  font-size: clamp(48px, 7vw, 104px);
  line-height: 0.94;
  letter-spacing: -0.04em;
  color: #fff;
  margin: 14px 0 0;
}
.grug-pagehero__title .blu { color: var(--grug-blue-400, #4F95EE); }
.grug-pagehero__sub {
  margin-top: 26px;
  max-width: 600px;
  font-family: var(--font-body, sans-serif);
  font-size: 18px;
  line-height: 1.55;
  color: #DCE6FA;
}
.grug-pagehero__scroll {
  position: absolute;
  right: 64px; bottom: 40px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono, monospace);
  font-size: 9px;
  letter-spacing: 0.4em;
  color: rgba(199, 221, 251, 0.6);
  writing-mode: vertical-rl;
}
.grug-pagehero__scroll i {
  width: 1px; height: 48px;
  background: linear-gradient(180deg, var(--teal), transparent);
}

/* ---------------------------------------------------------------
   STORY (About narrative)
   --------------------------------------------------------------- */
.grug-story {
  padding: 160px 64px;
  position: relative;
}
.grug-story__head {
  max-width: 880px;
  margin: 0 auto 72px;
  text-align: center;
}
.grug-story__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1300px;
  margin: 0 auto;
}
.grug-story__card {
  padding: 40px 32px;
  border: 1px solid rgba(143, 188, 246, 0.14);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(10, 31, 74, 0.5), rgba(6, 17, 46, 0.25));
  transition: border-color 360ms var(--ease-out, ease), transform 360ms var(--ease-out, ease);
}
.grug-story__card:hover { border-color: rgba(127, 229, 216, 0.4); transform: translateY(-4px); }
.grug-story__k {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  letter-spacing: 0.32em;
  color: var(--teal);
  margin-bottom: 22px;
  display: inline-flex; align-items: center; gap: 12px;
}
.grug-story__k::before { content: ""; width: 20px; height: 1px; background: var(--teal); }
.grug-story__t {
  font-family: var(--font-display, sans-serif);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0 0 16px;
}
.grug-story__b {
  font-family: var(--font-body, sans-serif);
  font-size: 15px;
  line-height: 1.65;
  color: #B8C2D3;
  margin: 0;
}

/* ---------------------------------------------------------------
   PORTFOLIO "view all" button
   --------------------------------------------------------------- */
.grug-portfolio__more {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

/* ---------------------------------------------------------------
   CONTACT
   --------------------------------------------------------------- */
.grug-contact {
  padding: 140px 64px 110px;
  position: relative;
}
.grug-contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 72px;
  max-width: 1340px;
  margin: 0 auto;
  align-items: start;
}
.grug-contact__info { position: relative; }
.grug-contact__h {
  font-family: var(--font-display, sans-serif);
  font-weight: 700;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: #fff;
  margin: 18px 0 0;
}
.grug-contact__h .blu { color: var(--grug-blue-400, #4F95EE); }
.grug-contact__lede {
  margin: 28px 0 40px;
  font-family: var(--font-body, sans-serif);
  font-size: 17px;
  line-height: 1.6;
  color: #B8C2D3;
  max-width: 460px;
}
.grug-contact__channels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 36px;
}
.grug-contact__channel {
  display: block;
  padding: 18px 20px;
  border: 1px solid rgba(143, 188, 246, 0.16);
  border-radius: 10px;
  text-decoration: none;
  background: rgba(10, 31, 74, 0.4);
  transition: all 240ms var(--ease-out, ease);
}
.grug-contact__channel:hover {
  border-color: rgba(127, 229, 216, 0.45);
  background: rgba(127, 229, 216, 0.06);
  transform: translateY(-2px);
}
.grug-contact__channelK {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: var(--teal);
  margin-bottom: 6px;
}
.grug-contact__channelV {
  font-family: var(--font-display, sans-serif);
  font-size: 15px;
  color: #fff;
}
.grug-contact__hq {
  padding: 22px 0;
  border-top: 1px solid rgba(143, 188, 246, 0.12);
  border-bottom: 1px solid rgba(143, 188, 246, 0.12);
  margin-bottom: 28px;
}
.grug-contact__hqK {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  letter-spacing: 0.28em;
  color: #94A0B2;
  margin-bottom: 5px;
}
.grug-contact__hqV {
  font-family: var(--font-display, sans-serif);
  font-size: 17px;
  color: #fff;
}
.grug-contact__socials {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Form */
.grug-contact__formWrap {
  background: linear-gradient(180deg, rgba(6,17,46,0.6), rgba(3,7,31,0.4));
  border: 1px solid rgba(143, 188, 246, 0.14);
  border-radius: 16px;
  padding: 40px;
}
.grug-contact__form { display: flex; flex-direction: column; gap: 22px; }
.grug-field { display: flex; flex-direction: column; gap: 9px; }
.grug-field--row { flex-direction: row; gap: 16px; }
.grug-field--row > .grug-field { flex: 1; }
.grug-field label {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #94A0B2;
}
.grug-field input,
.grug-field textarea {
  font-family: var(--font-body, sans-serif);
  font-size: 15px;
  color: #fff;
  background: rgba(2, 5, 15, 0.5);
  border: 1px solid rgba(143, 188, 246, 0.18);
  border-radius: 10px;
  padding: 14px 16px;
  outline: none;
  transition: border-color 200ms, box-shadow 200ms;
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
}
.grug-field input::placeholder,
.grug-field textarea::placeholder { color: #5F6A82; }
.grug-field input:focus,
.grug-field textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(127, 229, 216, 0.12);
}
.grug-contact__types { display: flex; flex-wrap: wrap; gap: 8px; }
.grug-contact__type {
  font-family: var(--font-mono, monospace);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: #B8C2D3;
  background: rgba(2, 5, 15, 0.4);
  border: 1px solid rgba(143, 188, 246, 0.18);
  border-radius: 999px;
  padding: 9px 16px;
  cursor: pointer;
  transition: all 200ms var(--ease-out, ease);
}
.grug-contact__type:hover { border-color: rgba(127, 229, 216, 0.4); color: #fff; }
.grug-contact__type.is-active {
  background: var(--teal);
  border-color: var(--teal);
  color: #02050F;
  font-weight: 600;
}
.grug-contact__submit { justify-content: center; margin-top: 4px; }
.grug-contact__fine {
  font-family: var(--font-mono, monospace);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: #5F6A82;
  text-align: center;
  margin: 0;
  line-height: 1.5;
}
.grug-contact__sent {
  text-align: center;
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.grug-contact__sentMark {
  width: 64px; height: 64px;
  border-radius: 999px;
  display: grid; place-items: center;
  background: rgba(127, 229, 216, 0.14);
  border: 1px solid var(--teal);
  color: var(--teal);
  font-size: 30px;
  margin-bottom: 8px;
}
.grug-contact__sent h3 {
  font-family: var(--font-display, sans-serif);
  font-weight: 600;
  font-size: 24px;
  color: #fff;
  margin: 0;
}
.grug-contact__sent p {
  font-family: var(--font-body, sans-serif);
  font-size: 15px;
  color: #B8C2D3;
  max-width: 360px;
  line-height: 1.6;
  margin: 0 0 12px;
}
.grug-contact__sent a { color: var(--teal); }

/* ---------------------------------------------------------------
   MOBILE
   --------------------------------------------------------------- */
@media (max-width: 920px) {
  .grug-nav__items { display: none !important; }
  .grug-nav__extras { display: none !important; }
  .grug-nav__burger { display: flex; }

  .grug-pagehero { min-height: 56vh; }
  .grug-pagehero__content { padding: 0 24px 56px; }
  .grug-pagehero__scroll { display: none; }

  .grug-story { padding: 90px 22px; }
  .grug-story__grid { grid-template-columns: 1fr; gap: 14px; }
  .grug-story__head { margin-bottom: 44px; }

  .grug-contact { padding: 90px 22px 110px; }
  .grug-contact__grid { grid-template-columns: 1fr; gap: 44px; }
  .grug-contact__formWrap { padding: 26px; }
  .grug-contact__channels { grid-template-columns: 1fr 1fr; }
  .grug-field--row { flex-direction: column; gap: 22px; }
}
@media (max-width: 460px) {
  .grug-contact__channels { grid-template-columns: 1fr; }
}

/* ===============================================================
   MOBILE OVERHAUL — loads last, wins specificity.
   Fixes: cursor on touch, ugly reel scrollbar, stat centering,
   page-hero image visibility, footer + clients centering.
   =============================================================== */

/* 1 — Decorative custom cursor must NEVER show on touch / phones */
@media (hover: none), (pointer: coarse), (max-width: 920px) {
  .grug-cursor,
  .grug-cursor__dot { display: none !important; }
}

@media (max-width: 768px) {
  /* 2 — PAGE HERO: stack image above text so BOTH are appreciable.
         No more giant title cropping the aircraft, no nav overlap. */
  .grug-pagehero {
    min-height: 0 !important;
    display: block !important;
    background: var(--grug-navy-900, #03071F) !important;
  }
  .grug-pagehero__img {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: 42vh !important;
    animation: none !important;
  }
  .grug-pagehero__scrim,
  .grug-pagehero__grid,
  .grug-pagehero__scroll { display: none !important; }
  .grug-pagehero__content {
    position: static !important;
    padding: 26px 22px 6px !important;
    max-width: 100% !important;
  }
  .grug-pagehero__index { display: none !important; }
  .grug-pagehero__title {
    font-size: clamp(32px, 8.5vw, 46px) !important;
    margin-top: 10px !important;
  }
  .grug-pagehero__sub {
    font-size: 14px !important;
    margin-top: 14px !important;
    max-width: 100% !important;
  }

  /* 3 — HOME HERO: smaller headline so the render shows through */
  .grug-display { font-size: clamp(34px, 8.5vw, 50px) !important; }
  .grug-hero__sub { font-size: 14px !important; }

  /* 4 — STATS: centered 2×2, accent line centered, no left-border */
  .grug-stats__grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 32px 12px !important;
  }
  .grug-stat {
    align-items: center !important;
    text-align: center !important;
    border-left: 0 !important;
    padding: 22px 8px 0 !important;
  }
  .grug-stat__num,
  .grug-stat__label { width: 100% !important; text-align: center !important; }
  .grug-stat__num { font-size: clamp(44px, 13vw, 64px) !important; }
  /* center the teal accent line above each stat */
  .grug-stat::before,
  .grug-stat:first-child::before {
    left: 50% !important;
    transform: translateX(-50%) !important;
    background: linear-gradient(90deg, transparent, #19E5FF, transparent) !important;
  }

  /* 5 — SHOWREEL: kill the horizontal scrollbar, stack the chips */
  .grug-reel__index {
    flex-direction: column !important;
    overflow: visible !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .grug-reel__index li { width: 100% !important; }
  .grug-reel__chip { width: 100% !important; flex: 0 0 auto !important; }

  /* 6 — CLIENTS: centered cards */
  .grug-clients__row {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }
  .grug-client { text-align: center !important; align-items: center !important; }
  .grug-client__sub { text-align: center !important; }

  /* 7 — FOOTER: single centered column, sensible logo size */
  .grug-footer__inner {
    grid-template-columns: 1fr !important;
    text-align: center !important;
    justify-items: center !important;
    gap: 36px !important;
  }
  .grug-footer__brand {
    grid-template-columns: 1fr !important;
    justify-items: center !important;
    text-align: center !important;
    padding-right: 0 !important;
    gap: 18px !important;
  }
  .grug-footer__brand img { height: 92px !important; margin: 0 auto !important; }
  .grug-footer__brand p { max-width: 340px !important; margin: 0 auto !important; }
  .grug-footer__socialsTall { justify-content: center !important; }
  .grug-footer__col {
    align-items: center !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
  }
  /* footer legal: stack + center instead of space-between */
  .grug-footer__legal {
    flex-direction: column !important;
    justify-content: center !important;
    text-align: center !important;
    gap: 8px !important;
  }
}

@media (max-width: 460px) {
  .grug-pagehero__title { font-size: clamp(30px, 10vw, 42px) !important; }
  .grug-clients__row { grid-template-columns: 1fr !important; max-width: 280px; margin: 0 auto !important; }
}
