/* ─── FONTS ───────────────────────────────────────────── */
@font-face {
  font-family: "PP Neue Montreal";
  src: url(fonts/PPNeueMontreal-Regular.woff2) format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PP Neue Montreal";
  src: url(fonts/PPNeueMontreal-Medium.woff2) format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PP Neue Montreal";
  src: url(fonts/PPNeueMontreal-SemiBold.woff2) format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ─── RESET ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
img { max-width: 100%; vertical-align: middle; }
a { background-color: transparent; }
b, strong { font-weight: 700; }

:root {
  --cream: #EFEEED;
  --black: #000;
  --dark: #131313;
  --font: "PP Neue Montreal", Arial, sans-serif;

  /* ── Fluid type system ── */
  --size-unit: 16;           /* base font-size at design viewport, no px */
  --size-container-ideal: 1440;
  --size-container-min: 1440px; /* = ideal → base never drops below 16px (1em) */
  --size-container-max: 1920px;
  --size-container: clamp(var(--size-container-min), 100vw, var(--size-container-max));
  --size-font: calc(var(--size-container) / (var(--size-container-ideal) / var(--size-unit)));

  --pad: 2em; /* 32px at 16px base */
}

/* Tablet */
@media (max-width: 991px) {
  :root {
    --size-container-ideal: 1080;
    --size-container-min: 1080px;
    --size-container-max: 991px;
  }
}

/* Large mobile */
@media (max-width: 767px) {
  :root {
    --size-container-ideal: 550;
    --size-container-min: 550px;
    --size-container-max: 767px;
  }
}

/* Small mobile */
@media (max-width: 479px) {
  :root {
    --size-container-ideal: 402;
    --size-container-min: 402px;
    --size-container-max: 479px;
  }
}

html, body {
  font-size: var(--size-font);
  background: var(--black);
  color: var(--cream);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─── NAV ─────────────────────────────────────────────── */
.sg-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: var(--pad) var(--pad) 0;
}

.sg-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 140px;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.9) 0%,
    rgba(0,0,0,0.3) 55%,
    rgba(0,0,0,0) 100%
  );
  pointer-events: none;
  z-index: -1;
}

.sg-nav {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.sg-header__logo {
  text-decoration: none;
  color: var(--cream);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Center links — absolutely centered independent of logo/button widths */
.sg-nav__links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
}

.sg-nav__links a {
  text-decoration: none;
  color: var(--cream);
  font-size: 0.875em;
  font-weight: 500;
  padding: 0.375em 0.875em;
  opacity: 0.75;
  transition: opacity 0.2s;
}

.sg-nav__links a:hover { opacity: 1; }

.sg-nav__links a.current {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sg-nav__links .sg-badge sup {
  font-size: 0.531em; /* 8.5px */
  opacity: 0.6;
}

.sg-nav__item--inactive {
  display: flex;
  align-items: center;
  gap: 0.375em;
  font-size: 0.875em;
  font-weight: 500;
  padding: 0.375em 0.875em;
  opacity: 0.4;
  cursor: not-allowed;
  color: var(--cream);
}

.sg-pill {
  font-size: 0.5625em; /* 9px */
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: lowercase;
  color: var(--cream);
  background: rgba(239,238,236,0.12);
  border: 1px solid rgba(239,238,236,0.2);
  border-radius: 8px;
  padding: 0.22em 0.7em;
  white-space: nowrap;
}

/* Rotating word in description */
.sg-rotating-word {
  display: inline-block;
  min-width: -webkit-fit-content;
  min-width: fit-content;
  font-style: italic;
}

/* Right actions */
.sg-nav__actions {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-left: auto;
}

.sg-btn--primary {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--dark);
  font-size: 0.875em;
  font-weight: 500;
  letter-spacing: -0.01em;
  height: 2.5em;
  padding: 0 1em;
  border: none;
  background: none;
  white-space: nowrap;
  cursor: pointer;
}

.sg-btn--primary:hover .sg-btn__bg { transform: scale(0.95); }

/* ─── HERO ────────────────────────────────────────────── */
.sg-hero {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  padding-bottom: var(--pad);
}

.sg-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.sg-hero__bg-wrapper {
  width: 100%;
  height: 100%;
}

.sg-hero__fade {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 45%,
    rgba(0,0,0,0.55) 100%
  );
  pointer-events: none;
}

/* ── Inner grid ── */
.sg-hero__inner {
  position: relative;
  z-index: 2;
  max-width: 750px;
  margin: 100px auto 0;
  min-height: 50vh;
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
}

/* Headline */
.sg-hero__title {
  align-self: end;
}

.sg-hero__title h1 {
  font-size: 5.625em; /* 90px at 16px base → scales with fluid system */
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--cream);
}

/* Description */
.sg-hero__desc {
  align-self: end;
  margin-top: 0.75em;
}

.sg-hero__desc p {
  font-size: 1.125em;
  line-height: 1.6;
  color: rgba(239,238,236,0.5);
  width: -webkit-fit-content;
  width: fit-content;
}

/* CTA buttons */
.sg-hero__ctas {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75em;
  align-self: start;
  margin-top: 3em;
}

/* ── Buttons ── */
.sg-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 3.125em;
  padding: 0 1.5em;
  font-size: 0.875em;
  font-weight: 500;
  color: var(--dark);
  letter-spacing: -0.01em;
  text-decoration: none;
  border: none;
  background: none;
  cursor: pointer;
  white-space: nowrap;
}

.sg-btn--secondary { color: var(--cream); }
.sg-btn--disabled { opacity: 0.4; cursor: not-allowed; }

.sg-btn__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: 0.25em;
  background: var(--cream);
  transition: transform 0.8s cubic-bezier(0.625, 0.05, 0, 1), background-color 0.2s ease-in-out;
}

.sg-btn__bg--secondary {
  background: rgba(239, 238, 236, 0.15);
  backdrop-filter: blur(1em);
}

.sg-btn:hover .sg-btn__bg { transform: scale(0.95); }

.sg-btn__inner {
  display: flex;
  align-items: center;
  gap: 0.5em;
  position: relative;
}

/* ── Letter slide animation ── */
.sg-u-clip { overflow: hidden; }

.sg-btn p, .sg-btn--primary p {
  margin: 0;
  line-height: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-shadow: 0px 1.25em currentColor;
}

.sg-btn .single-letter, .sg-btn--primary .single-letter {
  display: inline-block;
  transition: transform 0.735s cubic-bezier(0.65, 0.05, 0, 1);
}

.sg-btn:hover .single-letter,
.sg-btn--primary:hover .single-letter { transform: translateY(-1.25em); }

/* ─── TABLET (768–1280px) ──────────────────────────── */
@media (min-width: 768px) and (max-width: 1280px) {
  .sg-hero {
    align-items: center;
    padding-bottom: 0;
    padding-top: 4em;
  }
  .sg-hero__title h1 { font-size: 4em; }
}

/* ─── MOBILE HAMBURGER ──────────────────────────────── */
.sg-nav__menu {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid rgba(239,238,236,0.25);
  border-radius: 6px;
  color: var(--cream);
  font-size: 1.125em;
  line-height: 1;
  cursor: pointer;
  margin-left: 0.5em;
  flex-shrink: 0;
}

/* ─── MOBILE ─────────────────────────────────────────── */
@media (max-width: 767px) {
  :root { --pad: 1.25em; }

  .sg-hero__title h1 { font-size: 3em; }

  .sg-nav__links { display: none; }
  .sg-nav__menu { display: flex; }

  .sg-hero {
    align-items: flex-start;
    padding-top: 8.75em;
    height: auto;
    min-height: 100svh;
  }

  .sg-hero__inner {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 0 var(--pad);
  }
}

/* ─── SMALL MOBILE (≤479px) ─────────────────────────── */
@media (max-width: 479px) {
  :root { --pad: 1em; }
  .sg-btn--primary { display: none; }
}

/* ─── PAGE LOAD ANIMATION — initial hidden state ─────── */
html.js .sg-header {
  opacity: 0;
  transform: translateY(-100%);
  will-change: opacity, transform;
}
html.js .sg-hero__title .hero-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  will-change: opacity, transform;
}
html.js .sg-hero__desc {
  opacity: 0;
  transform: translateY(20px);
  will-change: opacity, transform;
}
html.js .sg-hero__ctas .sg-btn {
  opacity: 0;
  transform: translateY(20px);
  will-change: opacity, transform;
}
