/* Harrison Hide, shared base
   Layout system taken from the Figma: 1920 desktop, 220 rail, 1700 main column,
   120 gutter inside the main column, 280 rail-label column on split sections. */

@import url('tokens.css');

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


html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--chalk);
  color: var(--hedge);
  font-family: 'Switzer', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  font-weight: 300; /* Light is the body weight */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }

/* ---------- Layout shell ---------- */

.shell { display: flex; min-height: 100vh; }

.main {
  flex: 1 1 auto;
  min-width: 0;
  max-width: var(--main-max);
}

:root {
  --rail-w: 220px;
  --main-max: 1700px;
  --gutter: 120px;
  --label-col: 280px;
}

/* ---------- The persistent rail ---------- */

.rail {
  position: sticky;
  top: 0;
  align-self: flex-start;
  flex: 0 0 var(--rail-w);
  width: var(--rail-w);
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--chalk);
  border-right: 1px solid var(--hedge);
  color: var(--hedge);
}

.rail__top { display: flex; flex-direction: column; gap: 64px; padding-top: 52px; }

.rail__wordmark { display: flex; flex-direction: column; gap: 7px; padding: 0 28px; }
.rail__name { font-weight: 500; font-size: 15px; letter-spacing: 1.2px; }
.rail__series { font-weight: 500; font-size: 10px; letter-spacing: 1.7px; }

.rail__nav { display: flex; flex-direction: column; font-weight: 500; }
.rail__link {
  display: flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 28px;
  transition: background 140ms ease;
}
.rail__link:hover { background: rgba(46, 58, 36, 0.06); }
.rail__link[aria-current='page'] { background: rgba(46, 58, 36, 0.10); }
.rail__num { font-size: 9px; letter-spacing: 0.72px; }
.rail__label { font-size: 12px; letter-spacing: 0.6px; }

.rail__bottom {
  margin-top: auto;
  display: flex; gap: 22px;
  padding: 40px 28px 44px;
  border-top: 1px solid var(--hedge);
}
.rail__social { width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
/* The YouTube export is 20x16 with preserveAspectRatio="none", so a forced
   square box stretches it out of shape. Contain keeps every icon true. */
.rail__social img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }

/* ---------- Section primitives ---------- */

.section { padding-left: var(--gutter); padding-right: var(--gutter); }

.split { display: flex; align-items: flex-start; }
.split__label {
  flex: 0 0 var(--label-col);
  width: var(--label-col);
  font-size: 10px; font-weight: 500; letter-spacing: 1.8px;
}
.split__body { flex: 1 1 0; min-width: 0; }

.eyebrow { font-size: 10px; font-weight: 500; letter-spacing: 1.8px; }

.link-arrow { display: inline-flex; align-items: center; gap: 12px; }
.link-arrow span { font-size: 12px; letter-spacing: 1.68px; }
.link-arrow img { width: 14px; height: 12px; }

/* ---------- Mobile rail, not in the Figma ----------
   The design is desktop 1920 only. Below 1100 the rail becomes a top bar
   with a disclosure, which is the smallest departure that keeps the nav
   numbering and the wordmark intact. */

.rail__toggle { display: none; }
.rail__burger { display: none; }

@media (max-width: 1100px) {
  :root { --gutter: 40px; --label-col: 100%; }

  .shell { display: block; }

  .rail {
    position: sticky; top: 0; z-index: 20;
    flex: none; width: 100%; height: auto;
    border-right: 0; border-bottom: 1px solid var(--hedge);
  }
  .rail__top { flex-direction: row; align-items: center; justify-content: space-between; gap: 0; padding: 18px 0; }
  .rail__nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--chalk);
    border-bottom: 1px solid var(--hedge);
  }
  .rail:has(.rail__toggle:checked) .rail__nav { display: flex; }
  .rail__toggle { position: absolute; opacity: 0; pointer-events: none; }
  .rail__burger {
    display: block; padding: 0 28px;
    font-size: 10px; font-weight: 500; letter-spacing: 1.8px;
    cursor: pointer;
  }
  .rail__bottom { display: none; }

  .split { flex-direction: column; gap: 28px; }
  .split__label { flex: none; width: 100%; }
}

/* ---------- Reveal ----------
   The hidden state only applies when JS has confirmed it can run, so the page
   is readable with JS off, with reduced motion on, and to a crawler. */

.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  will-change: opacity, transform;
}

.js-reveal [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity 760ms cubic-bezier(0.22, 0.61, 0.36, 1),
              transform 760ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* Media blocks scale back rather than rising, so the frame never shows an edge.
   The scale sits on the INNER media wrapper, never on the section itself. On a
   full bleed section a 1.04 scale is 4 percent wider than the viewport, which
   pushed the page 8px sideways on a phone. Inside an overflow:hidden parent it
   is clipped and costs nothing. */
.js-reveal [data-reveal='media'] { opacity: 0; }
.js-reveal [data-reveal='media'].is-in {
  opacity: 1;
  transition: opacity 1100ms ease;
}
.js-reveal [data-reveal='media'] .hero__media,
.js-reveal [data-reveal='media'] .featured__frame,
.js-reveal [data-reveal='media'] .renders__stack,
.js-reveal [data-reveal='media'] > img { transform: scale(1.05); }
.js-reveal [data-reveal='media'].is-in .hero__media,
.js-reveal [data-reveal='media'].is-in .featured__frame,
.js-reveal [data-reveal='media'].is-in .renders__stack,
.js-reveal [data-reveal='media'].is-in > img {
  transform: none;
  transition: transform 1400ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* A hairline draws itself instead of fading */
.js-reveal [data-reveal='rule'] { opacity: 1; transform: none; width: 0; }
.js-reveal [data-reveal='rule'].is-in {
  width: 460px;
  transition: width 900ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
  .js-reveal [data-reveal],
  .js-reveal [data-reveal].is-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
