/* ============================================================ Pine Labs
   Type: Instrument Serif (display) + Instrument Sans (text), vendored.
   No italics, no positive tracking, no accent borders anywhere.
   ==================================================================== */

@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/instrument-serif-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Serif';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/instrument-serif-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/instrument-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/instrument-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ====================================================================
   SYSTEM
   Three scales, one grid. Every value below comes from these — nothing
   is hand-tuned per element, which is what produced the previous mess
   (10 font sizes, four of them within 1.5px of each other).
   ==================================================================== */

:root {
  /* --- type scale: text steps on ~1.22, display steps on ~1.6 --------- */
  --t-xs: clamp(13px, 0.95vw, 14px);
  --t-s: clamp(15.5px, 1.18vw, 17px);
  --t-m: clamp(18px, 1.5vw, 21px);
  --t-l: clamp(22px, 2vw, 28px);
  --t-xl: clamp(27px, 2.9vw, 40px);
  --t-2xl: clamp(38px, 4.6vw, 64px);
  /* The viewport-height cap keeps the hero composed in phone landscape and
     short split-screen windows instead of letting the headline hit the nav. */
  --t-display: clamp(40px, min(8.2vw, 15vh), 118px);

  /* line-height belongs to the size, not to the element */
  --lh-xs: 1.45;
  --lh-s: 1.6;
  --lh-m: 1.55;
  --lh-l: 1.2;
  --lh-xl: 1.14;
  --lh-2xl: 1;
  --lh-display: 0.94;

  /* --- spacing scale, 8px base --------------------------------------- */
  --s2: 16px;
  --s3: 24px;
  --s4: 40px;
  --s5: clamp(44px, 5vw, 64px);
  --s6: clamp(56px, 8vw, 96px);
  --s7: clamp(80px, 11vw, 144px);

  /* --- grid ----------------------------------------------------------- */
  --shell: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --col-gap: clamp(16px, 1.9vw, 24px);

  /* --- colour --------------------------------------------------------- */
  --bone: #eaf0e6;
  --bone-hi: #f6faf2;
  --bone-80: rgba(234, 240, 230, 0.82);
  --bone-66: rgba(234, 240, 230, 0.66);
  --bone-56: rgba(234, 240, 230, 0.56);
  --spruce: #08150f;
  --ember: #ffd79a;
  --ease: cubic-bezier(0.16, 0.72, 0.16, 1);

  /* Instrument Serif pairs with Instrument Sans by design. Display sizes only:
     it is a high-contrast display face and goes spindly below ~24px. */
  --display: 'Instrument Serif', 'Iowan Old Style', 'Palatino Linotype', Palatino,
    Georgia, 'Times New Roman', serif;
  --text: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    Helvetica, Arial, sans-serif;
}

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--spruce);
  color: var(--bone);
  font-family: var(--text);
  font-size: 16px;
  line-height: var(--lh-s);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(255, 196, 120, 0.28);
  color: #fff;
}

/* ============================================================ background */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  transform: translateZ(0);
  background:
    radial-gradient(
      70vmax 52vmax at 74% 40%,
      rgba(255, 176, 96, 0.3),
      rgba(255, 140, 70, 0.07) 46%,
      transparent 72%
    ),
    linear-gradient(
      to bottom,
      #0a1c22 0%,
      #123028 34%,
      #2b3823 50%,
      #0d1a13 66%,
      #060f0b 100%
    );
}

.scene {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transform: translateZ(0);
  backface-visibility: hidden;
  opacity: 0;
  transition: opacity 1.1s ease;
}
.scene.is-live {
  opacity: 1;
}
.scene.is-gone {
  opacity: 0;
}

.scrim {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  transform: translateZ(0);
  background: linear-gradient(
    to bottom,
    rgba(4, 11, 9, 0.6) 0%,
    rgba(4, 11, 9, 0.32) 16%,
    rgba(4, 11, 9, 0.1) 32%,
    rgba(4, 11, 9, 0) 48%,
    rgba(4, 11, 9, 0.34) 78%,
    rgba(4, 11, 9, 0.72) 100%
  );
}

/* ================================================================= grid */

/* One grid, used by every section. All placement is expressed in columns
   of this grid so the page has a single set of vertical edges. */
.shell {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--col-gap);
  width: 100%;
  max-width: var(--shell);
  margin: 0 auto;
  padding-inline: var(--gutter);
}

main,
.foot,
.masthead {
  position: relative;
  z-index: 3;
}

/* Below the grid breakpoint everything is one column. */
@media (max-width: 999px) {
  .shell > * {
    grid-column: 1 / -1;
  }
  /* the masthead keeps its two ends at every width */
  .masthead .shell > .wordmark {
    grid-column: 1 / span 8;
  }
  .masthead .shell > .mark {
    grid-column: 9 / -1;
  }
}

/* ============================================================= masthead */

.masthead {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 6;
  padding-block: var(--s4);
  pointer-events: none;
}

.wordmark {
  pointer-events: auto;
  justify-self: start;
  font-family: var(--text);
  font-size: var(--t-s);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  color: var(--bone);
  text-decoration: none;
  opacity: 0.92;
  transition: opacity 0.4s var(--ease);
}
.wordmark:hover {
  opacity: 1;
}
.mark {
  align-self: center;
  justify-self: end;
  color: var(--bone);
  opacity: 1;
  pointer-events: none;
}

@media (min-width: 1000px) {
  .mark {
    grid-column: 12;
  }
}

.wordmark:focus-visible {
  opacity: 1;
  outline: 2px solid var(--ember);
  outline-offset: 4px;
  border-radius: 2px;
}

@media (min-width: 1000px) {
  .wordmark {
    grid-column: 1 / span 4;
  }
}

/* ================================================================= hero */

.hero {
  display: grid;
  align-content: end;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: var(--s6) var(--s6);
}

.hero__headline {
  margin: 0;
  font-family: var(--display);
  font-size: var(--t-display);
  font-weight: 400;
  line-height: var(--lh-display);
  letter-spacing: -0.022em;
  text-wrap: balance;
  color: var(--bone-hi);
}


.hero__lead {
  margin: var(--s4) 0 0;
  font-size: var(--t-m);
  line-height: var(--lh-m);
  color: var(--bone-80);
}

@media (max-width: 600px) {
  :root {
    --t-m: 17px;
    --s4: 32px;
    --s6: 44px;
    --s7: 72px;
  }

  .hero__headline {
    text-wrap: pretty;
  }
}

/* Preserve a calm first composition on very short landscape viewports. The
   hero becomes scrollable rather than allowing the masthead and copy to collide. */
@media (max-height: 560px) {
  .masthead {
    padding-block: 28px;
  }

  .hero {
    min-height: 560px;
  }
}

@media (min-width: 1000px) {
  /* Headline and lead share the left edge with the wordmark and the footer
     name. Columns 11-12 stay open on purpose: that is where the sun sits. */
  .hero__headline {
    grid-column: 1 / span 11;
  }
  .hero__lead {
    grid-column: 1 / span 6;
  }
}

/* ================================================================ bands */

/* Asymmetric on purpose: the space belongs to the break BEFORE a section,
   not split evenly either side of it. Previously 207px top and bottom on
   both bands put 414px of dead air between two paragraphs. */
.band {
  padding-block: var(--s7) 0;
}

.label {
  margin: 0;
  /* sans, not the display serif: Instrument Serif at 14px is spindly */
  font-family: var(--text);
  font-size: var(--t-xs);
  font-weight: 500;
  line-height: var(--lh-xs);
  color: var(--bone-80);
}

.prose {
  display: grid;
  gap: var(--s4);
}
.prose p {
  margin: 0;
  font-size: var(--t-m);
  line-height: var(--lh-m);
  color: var(--bone-80);
}
.prose p:first-child {
  font-family: var(--display);
  font-size: var(--t-xl);
  font-weight: 400;
  line-height: var(--lh-xl);
  letter-spacing: -0.012em;
  color: var(--bone-hi);
}

@media (max-width: 999px) {
  .label {
    margin-bottom: var(--s4);
  }
}

@media (min-width: 1000px) {
  .label {
    grid-column: 1 / span 2;
    /* nudged so the label's cap-height sits with the body's first line */
    margin-top: var(--label-shift, 10px);
    position: sticky;
    top: var(--s6);
    align-self: start;
  }
  /* Body copy stops at column 9 — 68ch measure, and it leaves the sunlit
     right of the frame uncovered. */
  .prose {
    grid-column: 3 / span 8;
  }
  .work {
    grid-column: 3 / span 10;
  }
}

/* ========================================================= how we work */

.band--work {
  --label-shift: 6px;
}

.work {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--s5) var(--col-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 700px) {
  .work {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.work__item {
  position: relative;
  isolation: isolate;
}
.work__item::before {
  content: '';
  position: absolute;
  inset: calc(var(--s3) * -1) calc(var(--s2) * -1);
  z-index: -1;
  border-radius: 3px;
  background: radial-gradient(
    120% 100% at 12% 0%,
    rgba(255, 198, 132, 0.1),
    rgba(255, 198, 132, 0) 68%
  );
  opacity: 0;
  transition: opacity 0.55s var(--ease);
}
.work__item:hover::before {
  opacity: 1;
}

.work__heading {
  margin: 0 0 var(--s2);
  font-family: var(--display);
  font-size: var(--t-l);
  font-weight: 400;
  line-height: var(--lh-l);
  letter-spacing: -0.012em;
  color: var(--bone-hi);
}
.work__body {
  margin: 0;
  font-size: var(--t-s);
  line-height: var(--lh-s);
  color: var(--bone-66);
}

/* =============================================================== footer */

.foot {
  padding-block: var(--s7) var(--s5);
}

.foot__name {
  margin: 0;
  font-family: var(--display);
  font-size: var(--t-2xl);
  font-weight: 400;
  line-height: var(--lh-2xl);
  letter-spacing: -0.018em;
  color: var(--bone-hi);
}
.foot__copy {
  margin: 0;
  font-size: var(--t-xs);
  font-style: normal; /* <address> defaults to italic */
  line-height: var(--lh-xs);
  color: var(--bone-56);
}

@media (max-width: 999px) {
  .foot__copy {
    margin-top: var(--s4);
  }
}

@media (min-width: 1000px) {
  .foot__shell {
    align-items: end;
  }
  .foot__name {
    grid-column: 1 / span 8;
  }
  .foot__copy {
    grid-column: 10 / span 3;
  }
}

/* ============================================================== reveals */

.js [data-reveal] {
  opacity: 0;
  translate: 0 var(--s3);
  transition:
    opacity 1s var(--ease),
    translate 1s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].is-in {
  opacity: 1;
  translate: 0 0;
}

.js .hero__headline .w {
  display: inline-block;
  opacity: 0;
  translate: 0 0.42em;
  filter: blur(5px);
  transition:
    opacity 1.05s var(--ease),
    translate 1.05s var(--ease),
    filter 1.05s var(--ease);
  transition-delay: calc(var(--i, 0) * 52ms + 120ms);
}
.js .hero__headline.is-in .w {
  opacity: 1;
  translate: 0 0;
  filter: blur(0);
}

.prose p:nth-child(2) {
  --d: 110ms;
}
.work__item:nth-child(2) {
  --d: 120ms;
}
.work__item:nth-child(3) {
  --d: 240ms;
}
.foot__copy {
  --d: 90ms;
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal],
  .js .hero__headline,
  .js .hero__headline .w {
    opacity: 1;
    translate: 0 0;
    filter: none;
    transition: none;
  }
  .scene {
    transition: none;
  }
}

@media (prefers-reduced-transparency: reduce) {
  .scene.is-live {
    opacity: 0.5;
  }
}

/* ======================================================= narrow art direction
   A tall/narrow viewport is a distinct composition, not a compressed desktop.
   Aspect ratio is the trigger so this also works in a skinny desktop window. */

@media (max-aspect-ratio: 9/10) {
  :root {
    --gutter: clamp(24px, 5.4vw, 52px);
    --s7: clamp(72px, 9svh, 112px);
  }

  .scrim {
    background:
      linear-gradient(to right, rgba(4, 11, 9, 0.24), rgba(4, 11, 9, 0) 78%),
      linear-gradient(
        to bottom,
        rgba(4, 11, 9, 0.56) 0%,
        rgba(4, 11, 9, 0.18) 19%,
        rgba(4, 11, 9, 0.04) 31%,
        rgba(4, 11, 9, 0.20) 48%,
        rgba(4, 11, 9, 0.58) 73%,
        rgba(4, 11, 9, 0.78) 100%
      );
  }

  .masthead {
    padding-block: clamp(28px, 4.8svh, 44px);
  }

  .masthead .shell > .wordmark {
    grid-column: 1 / span 8;
  }

  .masthead .shell > .mark {
    grid-column: 9 / -1;
  }

  .hero {
    align-content: start;
    /* Leave only a restrained preview of the next chapter: enough to imply
       continuation without letting it compete with the opening composition. */
    min-height: 83svh;
    padding-block: clamp(220px, 30svh, 520px) clamp(64px, 8svh, 96px);
  }

  .hero__headline,
  .hero__lead {
    grid-column: 1 / -1;
  }

  .hero__headline {
    max-width: 12em;
    font-size: clamp(48px, 7.6vmin, 78px);
    line-height: 0.91;
    letter-spacing: -0.028em;
    text-wrap: initial;
  }

  .hero__line {
    display: block;
  }

  .hero__lead {
    max-width: 31em;
    margin-top: clamp(28px, 4svh, 38px);
    font-size: clamp(18px, 2.25vmin, 23px);
    line-height: 1.48;
    color: rgba(234, 240, 230, 0.86);
  }

  .band {
    padding-top: var(--s7);
  }

  .band__shell > *,
  .foot__shell > * {
    grid-column: 1 / -1;
  }

  .label {
    position: static;
    top: auto;
    margin: 0 0 32px;
    font-size: 14px;
  }

  .prose,
  .work {
    grid-column: 1 / -1;
    max-width: 44rem;
  }

  .prose {
    gap: 32px;
  }

  .prose p {
    font-size: clamp(18px, 2.15vmin, 22px);
    line-height: 1.52;
  }

  .prose p:first-child {
    font-size: clamp(36px, 5.2vmin, 52px);
    line-height: 1.07;
  }

  .work {
    grid-template-columns: 1fr;
    gap: clamp(52px, 8svh, 84px);
  }

  .work__item {
    max-width: 38rem;
  }

  .work__heading {
    font-size: clamp(31px, 4.4vmin, 44px);
    line-height: 1.08;
  }

  .work__body {
    font-size: clamp(17px, 2vmin, 20px);
    line-height: 1.58;
    color: rgba(234, 240, 230, 0.74);
  }

  .foot__name,
  .foot__copy {
    grid-column: 1 / -1;
  }

  .foot__name {
    font-size: clamp(44px, 6vmin, 62px);
  }

  .foot__copy {
    margin-top: 32px;
  }
}
