/* Toner Farms · hero mockup
   One family (Mona Sans), the footage carries the colour, the logo carries the brand. */

:root {
  --ink: #070a0f;
  --paper: #f7f5f0;
  --paper-2: rgba(247, 245, 240, 0.78);
  --paper-3: rgba(247, 245, 240, 0.56);
  --hair: rgba(247, 245, 240, 0.2);
  --pad: clamp(20px, 3.3vw, 56px);
  --gap: 24px;
  --aside: clamp(380px, 30vw, 540px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font: "Mona Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

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

html { background: var(--ink); }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
img, svg, video { display: block; }
::selection { background: var(--paper); color: var(--ink); }
:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; border-radius: 4px; }

.skip {
  position: fixed; left: var(--pad); top: 12px; z-index: 100;
  padding: 10px 14px; border-radius: 999px; background: var(--paper); color: var(--ink);
  font-size: 14px; font-weight: 550; transform: translateY(-160%);
}
.skip:focus { transform: none; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 24px; border-radius: 999px;
  font-size: 15.5px; font-weight: 550; letter-spacing: -0.005em; white-space: nowrap;
  transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}
.btn--sm { height: 40px; padding: 0 18px; font-size: 14.5px; }
.btn--solid { background: var(--paper); color: var(--ink); }
.btn--solid:hover { background: #fff; }
.btn--line { box-shadow: inset 0 0 0 1px rgba(247, 245, 240, 0.42); }
.btn--line:hover { background: rgba(247, 245, 240, 0.1); box-shadow: inset 0 0 0 1px rgba(247, 245, 240, 0.7); }

.arrow { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.45s var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }

.tag {
  display: inline-block; margin-left: 6px; padding: 3px 8px 3px; border-radius: 999px;
  font-size: 11px; font-weight: 600; line-height: 1; letter-spacing: 0.01em; vertical-align: 2px;
  background: rgba(247, 245, 240, 0.14); color: var(--paper);
}

/* ---------- Nav ---------- */

.nav {
  position: fixed; inset: 0 0 auto; z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 20px var(--pad);
}
.nav__logo { justify-self: start; width: 72px; height: 72px; border-radius: 50%; }
.nav__logo img { width: 100%; height: 100%; filter: drop-shadow(0 2px 14px rgba(0, 0, 0, 0.28)); }

.nav__links { display: flex; gap: 36px; font-size: 15px; font-weight: 500; letter-spacing: -0.005em; }
.nav__links a { position: relative; padding: 8px 0; }
.nav__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease-out);
}
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__links .tag::after { content: none; }

.nav__actions { justify-self: end; display: flex; align-items: center; gap: 20px; }
.nav__lang { font-size: 14.5px; font-weight: 500; color: var(--paper-2); transition: color 0.3s; }
.nav__lang:hover { color: var(--paper); }
.nav__menu { display: none; height: 40px; padding: 0 18px; border-radius: 999px; box-shadow: inset 0 0 0 1px rgba(247, 245, 240, 0.42); font-size: 14.5px; font-weight: 550; }

/* ---------- Hero ---------- */

.hero {
  position: relative; isolation: isolate; overflow: hidden;
  height: 100vh; height: 100svh; min-height: 680px;
  display: grid; grid-template-rows: 1fr auto;
}

.hero__media { position: absolute; inset: 0; z-index: -2; background: #1b2418 url("assets/hero-poster.jpg") center / cover no-repeat; }
.hero__video { width: 100%; height: 100%; object-fit: cover; }

.hero__scrim {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 10, 15, 0.5) 0%, rgba(7, 10, 15, 0.18) 13%, rgba(7, 10, 15, 0) 26%),
    linear-gradient(0deg, rgba(7, 10, 15, 0.88) 0%, rgba(7, 10, 15, 0.66) 22%, rgba(7, 10, 15, 0.32) 46%, rgba(7, 10, 15, 0) 68%),
    linear-gradient(90deg, rgba(7, 10, 15, 0.3) 0%, rgba(7, 10, 15, 0) 58%);
}

/* The aside and the 4th chapter share one column (--aside), so the lede, the buttons and "04" line up. */
.hero__body {
  align-self: end;
  display: grid; grid-template-columns: minmax(0, 1fr) var(--aside); column-gap: var(--gap); align-items: end;
  padding: 0 var(--pad) clamp(40px, 5.6vh, 64px);
}

.hero__title {
  grid-column: 1;
  margin: 0;
  font-size: clamp(3.1rem, 7.5vw, 8rem);
  font-weight: 520; font-stretch: 100%;
  line-height: 0.93; letter-spacing: -0.045em;
  text-wrap: balance;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: 0.22em; margin-bottom: -0.22em; }
.hero__title .line > span { display: block; }

.hero__aside { grid-column: 2; padding-bottom: 0.55rem; }
.hero__lede { margin: 0 0 28px; max-width: 30rem; font-size: 17.5px; line-height: 1.52; letter-spacing: -0.003em; color: rgba(247, 245, 240, 0.93); text-wrap: pretty; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Chapter reel ---------- */

.reel {
  position: relative;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) var(--aside); align-items: start; column-gap: var(--gap);
  margin: 0 var(--pad);
  border-top: 1px solid var(--hair);
}
.reel__steps { display: contents; }
.reel__steps > li { list-style: none; min-width: 0; }
.reel__steps > li:last-child .step { padding-right: 64px; }

.step {
  position: relative; display: block; width: 100%; text-align: left;
  padding: 20px 0 clamp(24px, 3.4vh, 34px);
}
.step__bar { position: absolute; left: 0; right: 0; top: -1px; height: 1px; overflow: hidden; }
.step__bar > span { display: block; height: 100%; background: var(--paper); transform: scaleX(0); transform-origin: left; will-change: transform; }

.step__label { display: flex; align-items: baseline; gap: 10px; font-size: 14.5px; font-weight: 550; letter-spacing: -0.005em; color: var(--paper-3); transition: color 0.5s var(--ease-out); }
.step__num { font-weight: 450; opacity: 0.62; }
.step__text { display: block; margin-top: 6px; max-width: 24rem; font-size: 14px; line-height: 1.45; color: var(--paper-3); opacity: 0.75; transition: color 0.5s var(--ease-out), opacity 0.5s var(--ease-out); text-wrap: pretty; }

.step__short { display: none; }
.reel__caption { display: none; }

.step[aria-current="true"] .step__label { color: var(--paper); }
.step[aria-current="true"] .step__text { color: var(--paper-2); opacity: 1; }
.step:hover .step__label { color: var(--paper); }

.reel__toggle {
  position: absolute; right: 0; top: 14px;
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(247, 245, 240, 0.32); transition: box-shadow 0.3s;
}
.reel__toggle:hover { box-shadow: inset 0 0 0 1px rgba(247, 245, 240, 0.7); }
.reel__toggle svg { width: 14px; height: 14px; }
.i-pause { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.i-play { fill: currentColor; display: none; }
.reel__toggle[aria-pressed="true"] .i-pause { display: none; }
.reel__toggle[aria-pressed="true"] .i-play { display: block; }

/* ---------- Mobile menu ---------- */

.menu {
  position: fixed; inset: 0; z-index: 15;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 120px var(--pad) 40px;
  background: rgba(7, 10, 15, 0.94);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.menu[hidden] { display: none; }
.menu nav { display: flex; flex-direction: column; }
.menu nav a { padding: 10px 0; font-size: 34px; font-weight: 520; letter-spacing: -0.035em; line-height: 1.1; border-bottom: 1px solid var(--hair); }
.menu nav a .tag { vertical-align: 8px; }
.menu__lang { font-size: 16px; color: var(--paper-2); }

/* ---------- Intro ---------- */

.js .hero__media { opacity: 0; transform: scale(1.06); }
.js .hero__title .line > span { transform: translateY(105%); }
.js [data-reveal] { opacity: 0; transform: translateY(14px); }
.js .nav[data-reveal] { transform: translateY(-10px); }

.is-in .hero__media { opacity: 1; transform: none; transition: opacity 1.4s var(--ease-out), transform 3.2s var(--ease-out); }
.is-in .hero__title .line > span { transform: none; transition: transform 1.25s var(--ease-out) calc(0.25s + var(--i, 0) * 0.09s); }
.is-in [data-reveal] { opacity: 1; transform: none; transition: opacity 1s var(--ease-out) var(--d, 0.7s), transform 1.2s var(--ease-out) var(--d, 0.7s); }
.is-in .nav[data-reveal] { --d: 0.15s; }
.is-in .hero__aside { --d: 0.6s; }
.is-in .reel { --d: 0.8s; }

@media (prefers-reduced-motion: reduce) {
  .js .hero__media, .js .hero__title .line > span, .js [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1180px) {
  .nav__links { gap: 28px; }
  .hero__body { grid-template-columns: minmax(0, 1fr); }
  .hero__title { font-size: clamp(3.1rem, min(7.5vw, 9vh), 8rem); }
  .hero__scrim {
    background:
      linear-gradient(180deg, rgba(7, 10, 15, 0.5) 0%, rgba(7, 10, 15, 0.18) 13%, rgba(7, 10, 15, 0) 26%),
      linear-gradient(0deg, rgba(7, 10, 15, 0.9) 0%, rgba(7, 10, 15, 0.7) 30%, rgba(7, 10, 15, 0.36) 56%, rgba(7, 10, 15, 0) 78%);
  }
  .hero__aside { grid-column: 1; padding-top: 28px; padding-bottom: 0; }
  .hero__lede { max-width: 34rem; }
  .reel { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .nav { grid-template-columns: auto 1fr; padding-top: 16px; }
  .nav__logo { width: 60px; height: 60px; }
  .nav__links, .nav__actions .btn, .nav__lang { display: none; }
  .nav__menu { display: inline-flex; align-items: center; }
  .reel { column-gap: 16px; padding-right: 56px; }
  .step, .reel__steps > li:last-child .step { padding: 20px 0 8px; }
  .step__text { display: none; }
  .reel__caption {
    display: block; grid-column: 1 / -1; margin: 0; padding-bottom: clamp(22px, 3vh, 30px);
    min-height: calc(2 * 1.45em + clamp(22px, 3vh, 30px));
    font-size: 14px; line-height: 1.45; color: var(--paper-2); text-wrap: pretty;
  }
}

@media (max-width: 640px) {
  .hero { min-height: 600px; }
  .nav__logo { width: 54px; height: 54px; }
  .hero__body { padding-bottom: 28px; }
  .hero__title { font-size: clamp(2.65rem, 12.4vw, 3.6rem); line-height: 0.95; letter-spacing: -0.04em; }
  .hero__aside { padding-top: 18px; }
  .hero__lede { font-size: 16px; margin-bottom: 22px; }
  .hero__ctas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .hero__ctas .btn { justify-content: center; gap: 8px; height: 48px; padding: 0 12px; font-size: 14.5px; }
  .reel { column-gap: 10px; padding-right: 46px; }
  .step, .reel__steps > li:last-child .step { padding: 14px 0 8px; }
  .step__num, .step__long { display: none; }
  .step__short { display: inline; }
  .step__label { font-size: 13.5px; }
  .reel__caption { font-size: 13.5px; }
  .reel__toggle { width: 34px; height: 34px; top: 8px; }
}

@media (max-width: 360px) {
  .hero__ctas { grid-template-columns: 1fr; }
}
