/* ==========================================================================
   Xtrude — site styles (ported from _reference/Xtrude)
   ========================================================================== */

:root {
  --forest: #103A29;
  --forest-deep: #0B2A1E;
  --bone: #F1F2EA;
  --ink: #0E0E0C;
  --ink-mute: #6B6B63;
  --serif: "freight-big-pro", "Times New Roman", Georgia, serif;
  --sans-inter: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --sans-forma: "forma-djr-deck", "Helvetica Neue", Helvetica, Arial, sans-serif;
  /* swappable at runtime via body class — defaults to Inter Tight */
  --sans-active: var(--sans-inter);
  --sans: var(--sans-active);
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --maxw: 1440px;
  --gutter: clamp(20px, 4vw, 64px);
  --ease: cubic-bezier(0.65, 0.05, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ----- Hero typography helpers ----- */
.hero-display {
  font-family: var(--sans-active);
  font-weight: 500;
  font-size: clamp(34px, 4.5vw, 66px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--bone);
  margin: 0;
}
.hero-display em {
  font-style: italic;
  font-weight: 500;
}
/* Word-spacing for per-word mask-reveal spans (inline-block strips whitespace partially) */
.hero-display .mask-reveal + .mask-reveal { margin-left: 0.28em; }

/* ----- Mask reveal ----- */
.mask-reveal {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.18em; /* room for descenders so overflow:hidden doesn't clip them */
}
.mask-reveal > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1.1s var(--ease-out);
}
.mask-reveal.in > span,
.in .mask-reveal > span { transform: translateY(0); }
/* Word-spacing for adjacent mask-reveal spans */
.mask-reveal + .mask-reveal { margin-left: 0.1em; }

/* ----- Generic reveal (fade + slide up) ----- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ----- Section typography (centralised) ----- */
.heading {
  font-family: var(--sans-forma);
  font-size: 48px;
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: -0.02em;
}
/* Dual-font heading pairings — italic serif + bold sans (Forma DJR Deck) */
.h-serif {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
}
.h-sans {
  font-family: var(--sans-forma);
  font-style: normal;
  font-weight: 500;
  font-size: 0.9em;
  letter-spacing: -0.02em;
}
.subhead {
  font-family: var(--sans-forma);
  font-size: 28px;
  line-height: 1.375;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.subhead .italic,
.subhead em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.005em;
}
@media (max-width: 767px) {
  .heading { font-size: 36px; }
  .subhead { font-size: 22px; }
}

/* ----- Full-bleed hero ----- */
.hero-fullbleed {
  position: relative;
  height: calc(100dvh - var(--nav-h, 92px));
  min-height: 640px;
  overflow: hidden;
  color: var(--bone);
}
.hero-fullbleed .hero-img-wrap {
  position: absolute; inset: 0;
  overflow: hidden;
}
.hero-fullbleed .hero-img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  will-change: transform;
}
.hero-fullbleed .hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(11,42,30,0.35) 0%, rgba(11,42,30,0.05) 35%, rgba(11,42,30,0.55) 100%);
}
.hero-fullbleed .hero-text {
  position: relative;
  height: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter) 8vh;
  display: flex; flex-direction: column; justify-content: flex-end;
  z-index: 2;
  will-change: transform;
}
/* Minimal hero variant — single line flush bottom-left, outside the grid */
.hero-fullbleed--minimal .hero-text {
  max-width: none;
  margin: 0;
  padding: 0 var(--gutter) 6vh;
}
.hero-fullbleed .hero-eyebrow {
  display: flex; justify-content: space-between;
  margin-bottom: 28px;
  color: var(--bone);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero-fullbleed .hero-meta { margin-top: 56px; max-width: 720px; }
.hero-fullbleed .hero-meta-row {
  display: flex; align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.hero-fullbleed .hero-meta-line {
  flex: 1; height: 1px;
  background: rgba(241,242,234,0.3);
  margin: 0 24px;
}
.hero-fullbleed .hero-lede {
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  color: var(--bone);
  max-width: 540px;
  margin-top: 28px;
  opacity: 0.92;
}

/* ----- Scroll hint ----- */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  opacity: 0.7;
  color: var(--bone);
  z-index: 2;
}
.scroll-hint::after {
  content: '';
  width: 1px;
  height: 40px;
  background: currentColor;
  animation: scroll-line 2s var(--ease-out) infinite;
  transform-origin: top;
}
@keyframes scroll-line {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  50.001% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* ----- Site access gate (pre-launch) ----- */
html.gated body > *:not(#site-gate) { display: none !important; }
html.gated body { overflow: hidden; }

#site-gate {
  position: fixed;
  inset: 0;
  background: var(--forest);
  color: var(--bone);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  font-family: var(--sans);
}
.site-gate__inner {
  text-align: center;
  max-width: 480px;
  width: 100%;
}
.site-gate__logo {
  width: 140px;
  height: auto;
  margin: 0 auto 48px;
  display: block;
}
.site-gate__title {
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0 0 24px;
  color: var(--bone);
}
.site-gate__title-em {
  font-style: italic;
  color: #a5d0b8;
}
.site-gate__copy {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: rgba(241, 242, 234, 0.75);
  margin: 0 auto 40px;
  max-width: 36ch;
}
.site-gate__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: 320px;
  margin: 0 auto;
}
.site-gate__input {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(165, 208, 184, 0.45);
  padding: 14px 0;
  color: #a5d0b8;
  font-family: var(--sans);
  font-size: 17px;
  text-align: center;
  outline: none;
  letter-spacing: 0.02em;
  transition: border-color 0.3s var(--ease-out);
}
.site-gate__input:focus { border-bottom-color: #a5d0b8; }
.site-gate__input::placeholder { color: rgba(165, 208, 184, 0.55); }
.site-gate__btn {
  background: var(--bone);
  color: var(--forest);
  border: 0;
  padding: 16px 28px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.3s var(--ease-out), background 0.3s var(--ease-out);
  margin-top: 8px;
}
.site-gate__btn:hover { opacity: 0.92; }
.site-gate__error {
  margin: 24px 0 0;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f6b7b5;
}

/* ----- Page transition overlay -----
   Default: covering the viewport (translateY 0)
   On page load: JS adds .revealed → slides up and off the top
   On internal link click: JS adds .exit → snaps below, slides up to cover, then navigates */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--forest);
  z-index: 9000;
  pointer-events: none;
  transform: translateY(0);
  transition: transform 0.9s var(--ease-out);
  will-change: transform;
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-transition__logo {
  width: clamp(140px, 18vw, 240px);
  height: auto;
  opacity: 0.95;
  /* The logo file is light-on-dark; this keeps it sharp at scale */
}
.page-transition.revealed {
  transform: translateY(-100%);
}
.page-transition.exit {
  transform: translateY(0);
  transition: transform 0.6s var(--ease-out);
}

::selection { background: var(--forest); color: var(--bone); }

/* ----- Body-font toggle (dev tool) ----- */
body.use-inter { --sans-active: var(--sans-inter); }
body.use-forma { --sans-active: var(--sans-forma); }
body { font-weight: var(--body-weight, 500); }

.font-toggle {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9990;
  display: none; /* dev-only tool — hidden on live site */
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: var(--forest);
  color: var(--bone);
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.22);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.font-toggle-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.font-toggle-label {
  width: 56px;
  flex-shrink: 0;
  opacity: 0.6;
}
.font-toggle button {
  padding: 6px 10px;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  border: 0;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.font-toggle button:hover:not(.active) { background: rgba(241,242,234,0.08); }
.font-toggle button.active {
  background: var(--bone);
  color: var(--forest);
}
@media (max-width: 600px) {
  .font-toggle { right: 12px; bottom: 12px; font-size: 9px; padding: 10px; }
  .font-toggle-label { width: 44px; }
  .font-toggle button { padding: 5px 8px; }
}

/* ----- Inline link (with arrow) ----- */
.link-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  position: relative;
}
.link-inline::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 0.5s var(--ease-out);
}
.link-inline:hover::after {
  transform-origin: left;
  transform: scaleX(1);
}

/* ----- Overlay menu ----- */
.overlay-menu {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
}
.overlay-menu__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 22, 20, 0.55);
  backdrop-filter: blur(2px);
  opacity: 0;
  transition: opacity 0.6s var(--ease-out);
}
.overlay-menu__panel {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: 50vw;
  background: #08140D;
  color: var(--bone);
  padding: 48px 64px;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.7s var(--ease-out);
  will-change: transform;
}
.overlay-menu.is-open {
  pointer-events: auto;
}
.overlay-menu.is-open .overlay-menu__backdrop {
  opacity: 1;
}
.overlay-menu.is-open .overlay-menu__panel {
  transform: translateX(0);
}
.overlay-menu__close {
  align-self: flex-end;
  background: transparent;
  border: 0;
  color: var(--bone);
  font-family: var(--sans);
  font-size: 16px;
  letter-spacing: 0.02em;
  cursor: pointer;
  padding: 8px 4px;
  transition: opacity 0.2s var(--ease);
}
.overlay-menu__close:hover { opacity: 0.7; }
.overlay-menu__nav {
  display: flex;
  flex-direction: column;
  gap: 40px;
  margin: auto 0;
  font-family: var(--sans-forma);
  font-size: clamp(28px, 2.8vw, 44px);
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.overlay-menu__nav a {
  color: var(--bone);
  text-decoration: none;
  width: fit-content;
  transition: opacity 0.3s var(--ease);
}
.overlay-menu__nav > .menu-item .menu-row__link,
.overlay-menu__nav > a {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
  transition: background-size 0.9s var(--ease-out), opacity 0.3s var(--ease);
  padding-bottom: 0.25em;
}
.overlay-menu__nav > .menu-item .menu-row__link:hover,
.overlay-menu__nav > a:hover {
  background-size: 100% 2px;
  opacity: 1;
}
.overlay-menu__caret {
  display: inline-block;
  margin-left: 0.4em;
  transform: rotate(90deg);
  font-size: 0.75em;
  vertical-align: middle;
  opacity: 0.7;
}

/* Expandable menu items */
.menu-item { display: flex; flex-direction: column; }
.menu-row {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  width: auto;
}
.menu-toggle {
  background: transparent;
  border: 0;
  color: var(--bone);
  cursor: pointer;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  line-height: 1;
  padding: 0;
  font-family: var(--sans);
  opacity: 0.55;
  transform: rotate(90deg);
  transition: transform 0.4s var(--ease-out), opacity 0.3s var(--ease-out);
}
.menu-toggle:hover { opacity: 1; }
.menu-toggle[aria-expanded="true"] {
  transform: rotate(-90deg);
  opacity: 1;
}
.menu-sub {
  overflow: hidden;
  height: 0;
  opacity: 0;
  transition: height 0.45s var(--ease-out), opacity 0.35s var(--ease-out);
}
.menu-sub__list {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 0 12px 32px;
  font-family: var(--sans);
  font-size: clamp(20px, 1.9vw, 28px);
  font-weight: 400;
  letter-spacing: -0.005em;
}
.menu-sub__list a {
  opacity: 0.65;
  font-size: inherit;
}
.menu-sub__list a:hover { opacity: 1; }
@media (max-width: 760px) {
  .overlay-menu__panel {
    width: 100vw;
    padding: 32px 28px;
  }
}
body.menu-open { overflow: hidden; }

/* ============ Brand logo (masked, recolourable) ============ */
.brand-logo {
  display: inline-block;
  aspect-ratio: 650.88 / 251.67;
  -webkit-mask: url('../logo/logo.svg') no-repeat center;
          mask: url('../logo/logo.svg') no-repeat center;
  -webkit-mask-size: contain;
          mask-size: contain;
}
.brand-logo--header { height: 60px; background-color: var(--forest); }
.brand-logo--footer {
  display: block;
  width: clamp(170px, 18vw, 240px);
  background-color: var(--bone);
}

/* ============ Site footer (large) ============ */
.site-footer { background: var(--forest-deep); color: var(--bone); }
.site-footer__inner { padding-top: 96px; padding-bottom: 40px; }
.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(241, 242, 234, 0.14);
}
@media (min-width: 1024px) {
  .footer-top { grid-template-columns: 1.25fr 2fr; gap: 64px; }
}
.footer-tagline {
  font-family: var(--sans-forma);
  font-size: 16px;
  line-height: 1.6;
  color: rgba(241, 242, 234, 0.6);
  max-width: 32ch;
  margin-top: 24px;
}
.footer-social { display: flex; gap: 28px; margin-top: 32px; }
.footer-social a {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(241, 242, 234, 0.7);
  text-decoration: none;
  transition: color 0.3s var(--ease-out);
}
.footer-social a:hover { color: var(--bone); }
.footer-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px 24px;
}
@media (min-width: 640px) { .footer-cols { grid-template-columns: repeat(3, 1fr); } }
.footer-col { display: flex; flex-direction: column; gap: 14px; }
.footer-col__head {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #a5d0b8;
  margin-bottom: 6px;
}
.footer-col a {
  font-family: var(--sans-forma);
  font-size: 16px;
  line-height: 1.4;
  color: rgba(241, 242, 234, 0.78);
  text-decoration: none;
  transition: color 0.3s var(--ease-out);
}
.footer-col a:hover { color: var(--bone); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 32px;
}
.footer-bottom p, .footer-totop {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(241, 242, 234, 0.5);
}
.footer-totop {
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  transition: color 0.3s var(--ease-out);
}
.footer-totop:hover { color: var(--bone); }
.footer-totop .material-symbols-outlined { font-size: 16px; }

/* ============ Mobile responsive refinements ============ */
@media (max-width: 767px) {
  /* Tighter edge padding so content isn't cramped on phones */
  .px-margin-edge { padding-left: 24px !important; padding-right: 24px !important; }
  /* Trim the very large vertical section rhythm on mobile */
  .py-section-gap { padding-top: 72px !important; padding-bottom: 72px !important; }
  .pt-section-gap { padding-top: 72px !important; }
  .pb-section-gap { padding-bottom: 72px !important; }
  .mt-section-gap { margin-top: 64px !important; }
  /* Let pill / CTA buttons wrap instead of forcing horizontal overflow */
  .jv-cta__btn,
  .lo-cta__btn,
  .home-cta__btn,
  .feas-submit,
  .inq-submit,
  .proc-cta__arrow { white-space: normal !important; text-align: center; }
}
