/* Shared tokens, type styles, base, buttons and layout helpers.

   Every component imports this file, so it is injected into each
   component's shadow root (Webflow renders code components in Shadow DOM:
   page styles don't reach in, and these don't leak out). Tokens are set on
   :host (the component element) as well as :root so they resolve inside a
   shadow root and in the light-DOM preview alike. Document-level rules
   (html, body, scrollbars, Lenis) live in webflow/site-head.html. */

:host,
:host {
  --manhattan-base: #f0e7d5;
  --manhattan-200: #dfd6c3;
  --hudsons-blue-base: #00677f;
  --hudsons-blue-600: #005468;
  --hot-sauce-base: #fe5000;
  --char-grilled-base: #181819;
  --lady-liberty-base: #9adbe8;
  --slightly-toasted-base: #4b3626;
  --slightly-toasted-700: #302319;
  --location-idle: #886a54;
  --dot-idle: #ccb78f;

  --background-primary: var(--manhattan-base);
  --background-secondary: var(--hudsons-blue-base);
  --background-dark: var(--char-grilled-base);
  --surface-card: var(--manhattan-base);

  --text-primary: var(--char-grilled-base);
  --text-secondary: var(--slightly-toasted-base);
  --text-accent: var(--hot-sauce-base);
  --text-brand: var(--hudsons-blue-base);
  --text-on-dark: var(--manhattan-base);

  --brand-primary: var(--hudsons-blue-base);
  --brand-accent: var(--hot-sauce-base);
  --brand-light: var(--lady-liberty-base);

  --font-display: "gamay", "Arial Black", sans-serif;
  --font-body: "gamay", system-ui, sans-serif;
  --font-script: "adobe-handwriting-ernie", "Adobe Handwriting", cursive;

  /* Fluid scale: t is 0 at 430px wide, 1 at 1512px */
  --t: (100vw - 430px) / 1082;

  --fs-heading:    clamp(48px,   calc(48px   + 2    * var(--t)), 50px);
  --fs-accent:     clamp(50px,   calc(50px   + 10   * var(--t)), 60px);
  --fs-stat:       clamp(42px,   calc(42px   + 7.14 * var(--t)), 49.14px);
  --fs-stat-sm:    clamp(30px,   calc(30px   + 6.14 * var(--t)), 36.14px);
  --fs-stat-label: clamp(14px,   calc(14px   + 2    * var(--t)), 16px);
  --fs-body:       clamp(16px,   calc(17.6px - 1.6  * var(--t)), 17.6px);
  --fs-kicker:     clamp(15.4px, calc(15.4px + 0.6  * var(--t)), 16px);
  --fs-button:     clamp(14px,   calc(15.4px - 1.4  * var(--t)), 15.4px);
  --fs-caption:    12px;
  --fs-body-sm:    16px;

  --size-label-small: 13px;

  --container: 1512px;
  --content: 1352px;
  --gutter: clamp(16px, calc(16px + 56 * var(--t)), 80px);
  /* 10% tighter than the design (client request, 2026-11-30) */
  --section-pad: clamp(72px, calc(72px + 54 * var(--t)), 126px);
  --section-pad-lg: clamp(90px, calc(72px + 72 * var(--t)), 180px);

  --ease-expo: cubic-bezier(0.19, 1, 0.22, 1);
  --ease-power3: cubic-bezier(0.165, 0.84, 0.44, 1);   /* GSAP power3.out */
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);       /* power4.inOut */
  --ease-in: cubic-bezier(0.7, 0, 0.84, 0);            /* expo.in */
}

/* the component element itself: a custom element is inline by default */
:host {
  display: block;
  color: var(--text-secondary);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

.t-heading {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-heading);
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: uppercase;
}

.t-accent {
  font-family: var(--font-script);
  font-weight: 400;
  font-style: normal;
  font-size: var(--fs-accent);
  line-height: 1;
}

.t-body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-body);
  line-height: 1.22;
}

.t-kicker {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--fs-kicker);
  line-height: 1.22;
  text-transform: uppercase;
}

.t-nav {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-kicker);
  line-height: 1;
  text-transform: uppercase;
}

.t-button {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-button);
  line-height: 1.22;
  text-transform: uppercase;
}

.t-label {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--size-label-small);
  line-height: 1;
  letter-spacing: 6px;
  text-transform: uppercase;
}

.t-eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.2;
  letter-spacing: 0.96px;
  text-transform: uppercase;
  color: var(--text-brand);
  margin-bottom: 16px;
}
@media (max-width: 900px) {
  .t-eyebrow { margin-bottom: 17.6px; }
}

*, *::before, *::after { box-sizing: border-box; }

img { display: block; max-width: 100%; }
a   { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p, h1, h2, h3, figure { margin: 0; }

/* read by assistive technology, drawn nowhere */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* a rich-text prop arrives as a wrapper with the paragraphs inside */
.rich-text > * + * { margin-top: 1em; }
.rich-text a { text-decoration: underline; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-pad); }

/* The page layer. On desktop the footer is fixed at z-index 0 under the
   page (Footer.css) and the page slides up off it, so every section sits
   on this layer above it, as .page did on the Astro site. The Site Header
   stays off it: the bar, the mobile menu and the transition panel keep
   their own z-indexes in the page's stacking context, as does the Hero's
   preloader, which is why the Hero puts the class on its section, not on
   its root. */
.page-layer { position: relative; z-index: 1; }

/* the brown logo artwork, inline and coloured by `color` */
.logo {
  display: block;
  width: clamp(156px, calc(156px + 35 * var(--t)), 191px);
  aspect-ratio: 191 / 46;
  overflow: hidden;
  color: var(--manhattan-base);
}
.logo svg { display: block; width: 100%; height: 100%; }

/* Buttons: two stacked faces, each a panel of colour with the label in
   it; on hover the top one sinks while the second, in the hover colour,
   rises over it. --face-bg is the resting colour, --swap-bg / --swap-fg
   the hover one. */
.btn {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
  min-width: 150px;
  white-space: nowrap;
  transition: border-color 200ms ease;
}

.btn__label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 14px 20px;
  border: var(--face-border, 0 solid transparent);
  background: var(--face-bg, transparent);
  transition: transform 650ms var(--ease-expo);
}
.btn__txt { display: block; }
.btn__arrow {
  display: inline-block;
  width: 0.563em;
  height: 0.563em;
  margin-left: 0.284em;
  vertical-align: baseline;
  translate: 0 0.012em;
  fill: currentColor;
}
.btn__label--swap {
  position: absolute;
  inset: 0;
  background: var(--swap-bg, var(--background-dark));
  /* the hover face is one colour, border included: never a brown fill
     inside a white or blue outline */
  border-color: var(--swap-bg, var(--background-dark));
  color: var(--swap-fg, var(--text-on-dark));
  transform: translateY(100%);
  transition: transform 700ms var(--ease-expo);
}
.btn:hover .btn__label,
.btn:focus-visible .btn__label { transform: translateY(50%); }
.btn:hover .btn__label--swap,
.btn:focus-visible .btn__label--swap { transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .btn__label, .btn__label--swap { transition: none; }
}

/* blue; fills orange on hover */
.btn--solid {
  --face-bg: var(--brand-primary);
  --swap-bg: var(--brand-accent);
  color: var(--text-on-dark);
}
.btn--outline {
  --face-border: 1.5px solid var(--background-dark);
  --swap-bg: var(--background-dark);
  color: var(--text-primary);
}
/* blue border on a light ground; fills brown on hover */
.btn--outline-blue {
  --face-border: 1.5px solid var(--brand-primary);
  --swap-bg: var(--slightly-toasted-base);
  --swap-fg: var(--text-on-dark);
  color: var(--text-brand);
}
/* white border on a dark ground; fills brown on hover */
.btn--outline-light {
  --face-border: 1.5px solid var(--manhattan-base);
  --swap-bg: var(--slightly-toasted-base);
  --swap-fg: var(--text-on-dark);
  color: var(--text-on-dark);
}
.btn--accent {
  --face-bg: var(--brand-accent);
  --swap-bg: var(--char-grilled-base);
  color: var(--text-on-dark);
}
.btn--brown {
  --face-bg: var(--slightly-toasted-base);
  --swap-bg: var(--slightly-toasted-700);
  color: var(--text-on-dark);
}
.btn--cream {
  --face-bg: var(--manhattan-base);
  --swap-bg: var(--brand-primary);
  color: var(--text-primary);
}

@media (max-width: 900px) {
  .btn__label { padding: 15.4px 22px; }
}

/* Links only dim on hover; buttons keep their own moves */
a:not(.btn) { transition: opacity 250ms ease; }
a:not(.btn):hover,
a:not(.btn):focus-visible { opacity: 0.7; }

/* .hero-pin is the component's root: the hero scrolls away like any
   section, and hero-scroll.ts animates it on the way out */

.hero {
  --hero-media: 100%;          /* how far down the hero the shot runs */
  position: relative;
  min-height: var(--hud-vh, 100svh);
  background: var(--background-primary);
  color: var(--text-on-dark);
  overflow: hidden;
}

/* kept out of sight until hero-intro.ts has staged them (--hud-stage is
   set on <html> by the head snippet through the preloader and the intro) */
.hero__media, .hero__inner, .hero__wedge { visibility: var(--hud-stage, visible); }

.hero__media {
  position: absolute;
  inset: 0 0 auto;
  height: var(--hero-media);
  background: var(--background-dark);
}
.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* --shade is faded up by hero-intro.ts as the loader's shot grows into
   the hero */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0) 19%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.9)),
    rgba(0, 0, 0, 0.3);
  opacity: var(--shade, 1);
}

.hero__wedge {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  /* positioned, not translated: GSAP moves the wedge for the intro and
     would fold a CSS translate into its own transform */
  bottom: calc(100% - var(--hero-media));
  box-sizing: content-box;
  aspect-ratio: 1512 / 53;
  border-bottom: 5px solid var(--manhattan-base);
  background: var(--manhattan-base);
  /* --wedge-l / --wedge-r: where the top edge sits at each end, 0% deep
     to 100% thin; hero-scroll.ts swings them so the deep end moves across */
  clip-path: polygon(
    0 var(--wedge-l, 0%),
    100% var(--wedge-r, 100%),
    100% 100%,
    0 100%
  );
}

.hero__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: var(--hud-vh, 100svh);
  padding-block: 96px 90px;
}

.hero__head { margin-top: auto; }

.hero__kicker {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
  color: var(--text-on-dark);
}

/* the artwork runs below its visible box; the svg clips what rises up
   through it */
.hero__wordmark { aspect-ratio: 1352 / 316; }
.hero__mark { display: block; width: 100%; height: 100%; overflow: hidden; fill: var(--manhattan-base); }

.hero__stats {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  margin-top: 42px;
  color: var(--text-on-dark);
}

/* each stat rises out from under its own bottom edge (hero-intro.ts) */
.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  text-align: center;
  clip-path: inset(-0.5em -2em 0 -2em);
}
.stat > * { display: block; }

.stat__figure {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--fs-stat);
  line-height: 1;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  color: var(--manhattan-200);
}

.stat__figure--sm { font-size: var(--fs-stat-sm); }

.stat__label {
  font-size: var(--fs-stat-label);
  text-transform: uppercase;
}

.hero__actions { display: none; }

@media (max-width: 900px) {
  .hero {
    --hero-media: min(var(--hud-vh, 100svh), 196vw);
    min-height: 0;
  }

  .hero__inner { min-height: 0; padding-block: 0; }

  .hero__head,
  .hero__actions {
    width: 100%;
    margin-inline: auto;
  }
  .hero__head { padding-top: calc(var(--hero-media) * 0.547); }

  .hero__actions {
    display: flex;
    flex-direction: column;
    gap: 8.8px;
    margin-top: 60px;
  }
  .hero__actions .btn { width: 100%; }
  /* white with a white border; fills brown on hover */
  .hero__actions .btn--outline {
    --face-bg: var(--manhattan-base);
    --face-border: 1.5px solid var(--manhattan-base);
    --swap-bg: var(--slightly-toasted-base);
    --swap-fg: var(--text-on-dark);
    color: var(--text-brand);
  }

  .hero__stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px 34px;
    margin-top: 120px;
    color: var(--text-secondary);
  }
  .stat { align-items: flex-start; gap: 5.4px; text-align: left; }
  .stat__figure { color: inherit; }
  .stat__label { font-family: var(--font-display); }
}

/* ---------- the preloader ----------
   hero-intro.ts drives it; it only shows while <html> has is-loading
   (--hud-loader from the head snippet) */
.loader {
  display: var(--hud-loader, none);
  position: fixed;
  inset: 0;
  z-index: 30;
  place-items: center;
  background: var(--background-primary);
  color: var(--brand-primary);
}

.loader__stage {
  --frame: clamp(200px, 17.33vw, 262px);
  display: grid;
  grid-template-columns: 1fr var(--frame) 1fr;
  align-items: center;
  column-gap: clamp(36px, 3.9vw, 60px);
  width: 100%;
  padding-inline: var(--gutter);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 26px;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}
.loader__words { justify-self: end; display: flex; align-items: center; gap: 10px; }
.loader__label { justify-self: start; }

/* every word in one grid cell, right-aligned against "times" so it never
   moves */
.loader__flip {
  display: inline-grid;
  justify-items: end;
  overflow: hidden;
  padding-block: 0.14em;
  margin-block: -0.14em;
}
.loader__word { grid-area: 1 / 1; display: flex; }
.loader__word > * { display: block; }

.loader__frame { position: relative; width: var(--frame); aspect-ratio: 1; }
/* the opening state, held until the script takes over */
.loader__pics { position: absolute; inset: 0; overflow: hidden; clip-path: inset(50% 50% 50% 50%); }
.loader__img + .loader__img { clip-path: inset(100% 0 0 0); }
.loader__words, .loader__label { visibility: hidden; }
.loader.is-set .loader__words, .loader.is-set .loader__label { visibility: visible; }
.loader__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform, clip-path;
}
.loader__bar {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 16px);
  height: 10px;
  overflow: hidden;
  background: var(--hot-sauce-base);
  transform: scaleX(0);
}
.loader__fill {
  position: absolute;
  inset: 0;
  background: var(--brand-primary);
  transform-origin: left;
  transform: scaleX(0);
}

@media (max-width: 700px) {
  .loader__stage {
    --frame: min(262px, 58vw);
    grid-template-columns: 1fr;
    justify-items: center;
    row-gap: 22px;
    font-size: 24px;
  }
  .loader__words,
  .loader__label { justify-self: center; }
  .loader__label { margin-top: 26px; }
}


