:root {
  --ink: #10100f;
  --paper: #f1eee7;
  --acid: #dfff00;
  --muted: #77766f;
  --line: rgba(16, 16, 15, 0.22);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html {
  overflow-x: hidden;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: "Satoshi", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
img { display: block; width: 100%; }

.skip-link {
  position: fixed;
  z-index: 30;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  background: var(--acid);
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.brand {
  display: inline-flex;
  width: max-content;
  flex-direction: column;
  font-size: 0.83rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 0.82;
}

.paper-nav {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: calc(100% - clamp(36px, 7vw, 132px));
  min-height: 86px;
  margin: 0 auto;
  border-bottom: 1px solid var(--ink);
}

.paper-nav__title,
.paper-nav__apply {
  font-size: 0.73rem;
  font-weight: 700;
}

.paper-nav__title { text-transform: uppercase; }
.paper-nav__apply { justify-self: end; }

.paper-nav__apply::after,
footer > a:last-child::after {
  display: block;
  height: 1px;
  margin-top: 5px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 400ms var(--ease);
}

.paper-nav__apply:hover::after,
footer > a:last-child:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

main { width: 100%; max-width: 100%; overflow-x: hidden; }

.paper-hero {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  min-height: calc(100svh - 86px);
  padding: clamp(70px, 9vw, 142px) clamp(18px, 7vw, 132px) clamp(70px, 8vw, 120px);
}

.paper-hero__copy {
  z-index: 2;
  grid-column: 1 / span 8;
  align-self: center;
}

.hero-kicker,
.chapter-heading > p:first-child,
.conditions__intro > p:first-child,
.boundaries header > p,
.paper-cta > p {
  margin: 0;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.hero-kicker { margin-bottom: 34px; }

.paper-hero h1 {
  width: min(100%, 1020px);
  margin: 0;
  font-size: clamp(4rem, 7.1vw, 8.4rem);
  font-weight: 500;
  letter-spacing: -0.078em;
  line-height: 0.84;
}

.paper-hero h1 > span { white-space: nowrap; }

.inline-room {
  display: inline-block;
  width: 1.08em;
  height: 0.41em;
  margin: 0 0.08em;
  overflow: hidden;
  background: url("../assets/hotel-control-corridor.webp") center 58% / 180% auto no-repeat;
  vertical-align: 0.09em;
  border-radius: 999px;
}

.paper-hero__intro {
  max-width: 670px;
  margin: 42px 0 0;
  font-size: clamp(1.15rem, 1.7vw, 1.65rem);
  letter-spacing: -0.025em;
  line-height: 1.3;
}

.hero-jump {
  display: inline-flex;
  gap: 55px;
  align-items: center;
  margin-top: 42px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
}

.hero-jump span { transition: transform 350ms var(--ease); }
.hero-jump:hover span { transform: translateY(4px); }

.paper-hero__image {
  position: relative;
  grid-column: 10 / span 3;
  align-self: stretch;
  min-height: 560px;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
}

.paper-hero__image img {
  height: 100%;
  object-fit: cover;
  filter: saturate(0.55) contrast(1.15);
}

.paper-hero__image figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  justify-content: space-between;
  padding: 16px;
  background: var(--acid);
  font-size: 0.68rem;
  font-weight: 700;
}

.thesis-marquee,
.cost-marquee {
  overflow: hidden;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.thesis-marquee { background: var(--ink); color: var(--paper); }

.thesis-marquee__track,
.cost-marquee__track,
.thesis-marquee__track > div,
.cost-marquee__track > div {
  display: flex;
  width: max-content;
  align-items: center;
}

.thesis-marquee__track {
  animation: marquee-left 28s linear infinite;
}

.thesis-marquee__track > div {
  min-height: 86px;
  gap: 28px;
  padding-right: 28px;
  white-space: nowrap;
}

.thesis-marquee span,
.thesis-marquee i {
  font-size: clamp(1.4rem, 2.2vw, 2.3rem);
  font-style: normal;
  font-weight: 500;
  letter-spacing: -0.035em;
}

.thesis-marquee i { color: var(--acid); }
.thesis-marquee b { color: var(--acid); font-size: 0.55rem; }

.worked-example,
.conditions,
.boundaries {
  padding: clamp(110px, 14vw, 210px) clamp(18px, 7vw, 132px);
}

.chapter-heading {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: clamp(70px, 9vw, 130px);
}

.chapter-heading > p:first-child { grid-column: 1 / span 3; }

.chapter-heading h2,
.conditions h2,
.boundaries h2,
.paper-cta h2 {
  margin: 0;
  font-size: clamp(3rem, 5.8vw, 6.8rem);
  font-weight: 500;
  letter-spacing: -0.068em;
  line-height: 0.9;
}

.chapter-heading h2 { grid-column: 4 / span 7; max-width: 11ch; }

.chapter-heading > p:last-child {
  grid-column: 11 / span 2;
  align-self: end;
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.economics-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(255px, auto));
  grid-auto-flow: dense;
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.economics-grid > article {
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.economics-flow {
  grid-column: span 7;
  grid-row: span 2;
  padding: clamp(28px, 4vw, 58px);
  background: var(--ink);
  color: var(--paper);
}

.economics-flow__title {
  margin: 0 0 70px;
  color: var(--acid);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.flow-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: baseline;
  padding: 20px 0;
  border-top: 1px solid rgba(241, 238, 231, 0.28);
}

.flow-row span { max-width: 340px; }
.flow-row strong { font-size: clamp(2.2rem, 4vw, 4.5rem); letter-spacing: -0.06em; }
.flow-row small { grid-column: 1 / -1; color: var(--acid); }
.flow-row--discount strong { color: var(--acid); }
.economics-flow__note { margin: 55px 0 0; color: #aaa9a2; font-size: 0.72rem; }

.economics-cost,
.economics-result {
  grid-column: span 5;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(26px, 3vw, 46px);
}

.economics-cost span,
.economics-result span {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

.economics-cost strong,
.economics-result strong {
  display: block;
  margin: 26px 0;
  font-size: clamp(4rem, 7vw, 8rem);
  letter-spacing: -0.085em;
  line-height: 0.8;
}

.economics-cost p,
.economics-result p {
  max-width: 360px;
  margin: 0;
  line-height: 1.4;
}

.economics-result { background: var(--acid); }

.cost-marquee { background: var(--acid); }
.cost-marquee__track { animation: marquee-right 34s linear infinite; }

.cost-marquee__track > div {
  min-height: 64px;
  gap: 24px;
  padding-right: 24px;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.cost-marquee__track i { font-size: 0.48rem; font-style: normal; }

.conditions {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
  background: var(--ink);
  color: var(--paper);
}

.conditions__intro {
  grid-column: 1 / span 5;
  align-self: start;
  padding-top: 40px;
}

.conditions__intro h2 { margin-top: 30px; font-size: clamp(3rem, 4.6vw, 5.2rem); }

.conditions__intro > p:last-child {
  max-width: 430px;
  margin: 42px 0 0;
  color: #aaa9a2;
  font-size: 1.02rem;
  line-height: 1.5;
}

.condition-stack {
  grid-column: 6 / span 7;
  display: flex;
  flex-direction: column;
  gap: 72px;
  padding-bottom: 15vh;
}

.condition-card {
  position: sticky;
  top: 9vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  min-height: 560px;
  overflow: hidden;
  border: 1px solid currentColor;
}

.condition-card:nth-child(2) { top: 13vh; }
.condition-card:nth-child(3) { top: 17vh; }
.condition-card--dark { background: var(--ink); color: var(--paper); }
.condition-card--acid { background: var(--acid); color: var(--ink); }
.condition-card--paper { background: var(--paper); color: var(--ink); }

.condition-card__copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(26px, 4vw, 58px);
}

.condition-card__copy span {
  font-size: 0.73rem;
  font-weight: 700;
  text-transform: uppercase;
}

.condition-card__copy h3 {
  margin: auto 0 30px;
  font-size: clamp(2.5rem, 4.4vw, 5rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.9;
}

.condition-card__copy p { max-width: 430px; margin: 0; line-height: 1.45; }

.condition-card__image { overflow: hidden; }
.condition-card__image img { height: 100%; object-fit: cover; filter: saturate(0.55) contrast(1.12); }

.condition-card__signal {
  display: grid;
  place-items: center;
  border-left: 1px solid var(--ink);
}

.condition-card__signal b {
  font-size: clamp(10rem, 18vw, 18rem);
  font-weight: 500;
  letter-spacing: -0.1em;
  line-height: 0.7;
}

.condition-card__signal i { font-size: 0.76rem; font-style: normal; font-weight: 700; text-transform: uppercase; }

.boundaries {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.boundaries header { grid-column: 1 / span 5; }
.boundaries h2 { margin-top: 28px; font-size: clamp(3rem, 5vw, 5.8rem); }

.boundary-carousel {
  position: relative;
  grid-column: 7 / span 6;
  min-height: 520px;
  border-top: 5px solid var(--ink);
}

.boundary-slide {
  position: absolute;
  inset: 0 0 96px;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px 0;
}

.boundary-slide.is-current { display: flex; }

.boundary-slide span {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
}

.boundary-slide p {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2rem, 3.5vw, 4.2rem);
  letter-spacing: -0.05em;
  line-height: 1.03;
}

.boundary-controls {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  border-top: 1px solid var(--ink);
}

.boundary-controls button {
  width: 76px;
  height: 76px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 1.35rem;
  transition: background 250ms ease, color 250ms ease;
}

.boundary-controls button:hover { background: var(--ink); color: var(--paper); }
.boundary-controls span { justify-self: center; font-size: 0.74rem; }

.paper-cta {
  min-height: 86svh;
  padding: clamp(110px, 14vw, 210px) clamp(18px, 7vw, 132px);
  background: var(--acid);
  color: var(--ink);
}

.paper-cta h2 { max-width: 10ch; margin-top: 34px; }

.paper-cta > a {
  display: inline-flex;
  align-items: center;
  gap: 64px;
  margin-top: 70px;
  padding: 17px 0;
  border-bottom: 2px solid currentColor;
  font-size: 1.12rem;
  font-weight: 700;
}

.paper-cta > a span { font-size: 1.6rem; transition: transform 350ms var(--ease); }
.paper-cta > a:hover span { transform: translate(4px, -4px); }

footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 24px;
  padding: 55px clamp(18px, 7vw, 132px);
  background: var(--ink);
  color: var(--paper);
  font-size: 0.72rem;
}

footer p { margin: 0; color: #aaa9a2; text-align: center; }
footer > a:last-child { justify-self: end; }

@keyframes marquee-left { to { transform: translateX(-50%); } }
@keyframes marquee-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }

@media (max-width: 1050px) {
  .paper-hero__copy { grid-column: 1 / span 9; }
  .paper-hero__image { grid-column: 10 / span 3; }
  .chapter-heading h2 { grid-column: 4 / span 9; }
  .chapter-heading > p:last-child { grid-column: 4 / span 5; margin-top: 28px; }
  .conditions__intro { grid-column: 1 / span 5; }
  .condition-stack { grid-column: 6 / span 7; }
}

@media (max-width: 820px) {
  .paper-nav { grid-template-columns: 1fr 1fr; }
  .paper-nav__title { display: none; }

  .paper-hero { grid-template-columns: 1fr; min-height: auto; }
  .paper-hero__copy,
  .paper-hero__image { grid-column: 1; }
  .paper-hero h1 { font-size: clamp(3.4rem, 12vw, 6rem); }
  .paper-hero__image { min-height: 420px; margin-top: 70px; }

  .chapter-heading { grid-template-columns: 1fr; }
  .chapter-heading > p:first-child,
  .chapter-heading h2,
  .chapter-heading > p:last-child { grid-column: 1; }
  .chapter-heading > p:last-child { max-width: 420px; }

  .economics-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
  .economics-flow,
  .economics-cost,
  .economics-result { grid-column: 1; grid-row: auto; min-height: 320px; }

  .conditions { grid-template-columns: 1fr; }
  .conditions__intro,
  .condition-stack { grid-column: 1; }
  .conditions__intro { margin-bottom: 70px; }
  .condition-card { min-height: 520px; }

  .boundaries { grid-template-columns: 1fr; }
  .boundaries header,
  .boundary-carousel { grid-column: 1; }
  .boundary-carousel { margin-top: 80px; }
}

@media (max-width: 560px) {
  .paper-nav { width: calc(100% - 36px); min-height: 70px; }
  .paper-nav__apply { font-size: 0.68rem; }

  .paper-hero { padding-top: 78px; }
  .paper-hero h1 { font-size: clamp(2.8rem, 13vw, 4.3rem); }
  .paper-hero h1 > span { white-space: normal; }
  .paper-hero__image { min-height: 350px; }

  .worked-example,
  .conditions,
  .boundaries { padding-top: 100px; padding-bottom: 100px; }

  .chapter-heading h2,
  .conditions h2,
  .boundaries h2,
  .paper-cta h2 { font-size: clamp(2.7rem, 12vw, 4rem); }

  .flow-row { grid-template-columns: 1fr; }
  .flow-row strong { justify-self: start; }

  .condition-card { grid-template-columns: 1fr; min-height: 610px; }
  .condition-card__image { min-height: 230px; }
  .condition-card__signal { min-height: 230px; border-top: 1px solid var(--ink); border-left: 0; }
  .condition-card__signal b { font-size: 9rem; }

  .boundary-carousel { min-height: 600px; }
  .boundary-slide p { font-size: clamp(2.15rem, 9vw, 3.2rem); }

  footer { grid-template-columns: 1fr; }
  footer p { text-align: left; }
  footer > a:last-child { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
