/* ============================================================
   dionpieters.dev replica — design system
   Palette:  index  → bg #FF3D00 (orange) / ink #C5F0C9 (mint)
             about  → bg #FFD703 (yellow) / ink #101010 (dark)
   Type:     Rainer (display, condensed caps) + Lausanne 300 (body)
   All text is drawn on the WebGL canvas; DOM copies stay
   transparent for selection & accessibility (like the original).
   ============================================================ */

/* ---- fonts (hotlinked from the live site, CORS-enabled) ---- */
@font-face {
  font-family: 'Rainer';
  src: url('https://www.dionpieters.dev/_next/static/media/e7c44da1d0783937-s.p.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Rainer Fallback';
  src: local('Arial');
  ascent-override: 194%;
  descent-override: 21.77%;
  line-gap-override: 0%;
  size-adjust: 46.44%;
}
@font-face {
  font-family: 'Lausanne';
  src: url('https://www.dionpieters.dev/_next/static/media/e56da74d92fc6cd3-s.p.woff2') format('woff2');
  font-display: swap;
}
@font-face {
  font-family: 'Lausanne Fallback';
  src: local('Arial');
  ascent-override: 70.74%;
  descent-override: 19.82%;
  line-gap-override: 19.82%;
  size-adjust: 100.93%;
}

/* ---- tokens ---- */
:root {
  color-scheme: dark;
  --dark: #101010;
  --mint: #c5f0c9;
  --orange: #e4201c;
  --yellow: #ffd703;
  --img-bg: #ab2900;

  --page-bg: var(--orange);   /* canvas clear color        */
  --ink: var(--mint);         /* primary text on this page */
  --edge: var(--mint);        /* out-of-bounds warp bars    */

  --font-base: 'Lausanne', 'Lausanne Fallback', Arial, sans-serif;
  --font-display: 'Rainer', 'Rainer Fallback', Impact, sans-serif;
  --ease-out-cubic: cubic-bezier(.215, .61, .355, 1);
}
[data-page="about"] {
  --page-bg: var(--yellow);
  --ink: var(--dark);
  --edge: var(--dark);
}

/* ---- reset / base (mirrors the original) ---- */
*, ::before, ::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  overflow: hidden;
  height: 100%;
  max-height: calc(var(--vh, 1vh) * 100);
  width: 100%;
  max-width: 100vw;
}
html {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  font-size: max(10px, min(12px, 1.3020833333vw));
  font-family: var(--font-base);
  font-weight: 600;
  color: var(--dark);
  background: var(--dark);
}
@media only screen and (min-width: 1200px) {
  html { font-size: max(8px, min(12px, .5208333333vw)); }
}
body { cursor: wait; }
body.is-ready { cursor: auto; }

ul { list-style: none; }
a { color: currentColor; text-decoration: none; cursor: pointer; }
button { border: 0; font: inherit; color: inherit; background: transparent; }

/* ---- canvas ---- */
canvas#gl {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(var(--vh, 1vh) * 100);
  pointer-events: none;
  z-index: -1;
}

/* ---- loader ---- */
.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  z-index: 99;
}
.loader-inner {
  width: 100%;
  height: 100%;
  background: var(--mint);
  transform: scaleX(0);
  transform-origin: left;
}

/* ---- scroll structure (Lenis wrapper) ---- */
.site {
  position: relative;
  pointer-events: none;
  width: 100%;
  z-index: 2;
}
.scroller {
  width: 100%;
  height: calc(var(--vh, 1vh) * 100);
  overflow-x: hidden;
  overflow-y: auto;
  pointer-events: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.scroller::-webkit-scrollbar { display: none; }
.page { position: relative; }

/* ---- GL-drawn text: DOM copy stays invisible but selectable ---- */
.gl-text span { color: transparent; }
.gl-text span::selection { color: var(--mint) !important; background: var(--orange); }
[data-page="about"] .gl-text span::selection { color: var(--orange) !important; background: var(--mint); }

/* lines and images are drawn on the canvas too — their DOM copies
   must never paint over it (no-gl mode flips them back on) */
.gl-line,
.gl-image { visibility: hidden; }

/* hide everything until the intro reveals it (SSR parity) */
.is-booting .gl-text,
.is-booting .gl-line,
.is-booting .gl-image { visibility: hidden; }

/* ============================================================
   INDEX — hero
   ============================================================ */
.hero {
  position: relative;
  height: calc(var(--vh, 1vh) * 100);
  margin-bottom: 10rem;
}
@media only screen and (min-width: 1200px) {
  .hero { margin-bottom: 45rem; }
}

.hero-title {
  position: relative;
  width: fit-content;
  margin: auto;
  padding-top: 1rem;
  font-size: 10px;          /* JS scales this until it spans the viewport */
  font-weight: 400;
  line-height: 1;
  color: var(--mint);
  text-transform: uppercase;
  white-space: nowrap;
}
@media only screen and (min-width: 1200px) {
  .hero-title { padding-top: 0; }
}

/* ---- footer (lives inside the hero) ---- */
.footer {
  position: absolute;
  bottom: 3rem;
  left: 2.5rem;
  width: calc(100% - 5rem);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 9;
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: -.02em;
  font-weight: 400;
  color: var(--dark);
}
@media only screen and (min-width: 1200px) {
  .footer {
    bottom: 6.5rem;
    left: 6rem;
    width: calc(100% - 12rem);
    font-size: 1.6rem;
  }
}
.footer .is-ink { color: var(--mint); }

.footer-left {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  flex: 1 1;
  gap: 2.5rem;
}
@media only screen and (min-width: 1200px) {
  .footer-left { align-items: flex-end; }
}
.footer-center {
  flex-direction: column;
  align-items: center;
  flex: 1 1;
  display: none;
}
.footer-right {
  flex-direction: column;
  align-items: flex-end;
  flex: 1 1;
  display: none;
}
@media only screen and (min-width: 1200px) {
  .footer-center, .footer-right { display: flex; }
}

/* hover hitbox extends left + below, like the original */
.footer-link {
  position: relative;
  padding-left: 3rem;
  padding-bottom: 3rem;
  margin-bottom: -3rem;
  margin-left: -3rem;
}
.footer-underline {
  position: absolute;
  bottom: calc(3rem + 2px);
  left: 3rem;
  width: calc(100% - 3rem);
  height: 1px;
  background: var(--dark);
  transform: scaleX(0);
  transform-origin: left;
}

/* ============================================================
   INDEX — works list
   ============================================================ */
.works {
  padding: 2.5rem;
  margin-bottom: 1.5rem;
}
@media only screen and (min-width: 1200px) {
  .works { padding: 7.5rem; margin-bottom: 0; }
}
.works-title {
  width: fit-content;
  margin: auto auto 4.4rem;
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: -.02em;
  font-weight: 400;
  color: var(--mint);
}
@media only screen and (min-width: 1200px) {
  .works-title { font-size: 1.6rem; }
}

.item {
  position: relative;
  padding: 2rem 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  color: var(--mint);
}
@media only screen and (min-width: 1200px) {
  .item { padding: 3.5rem 0; align-items: normal; }
}
.item-inner {
  position: relative;
  display: flex;
  width: 100%;
  gap: 5%;
}
.item-media {
  position: relative;
  width: 45%;
  height: 100%;
  overflow: hidden;
  display: none;
  background: var(--img-bg);
}
@media only screen and (min-width: 1200px) {
  /* out of the flex flow: the title rests at the left edge and the
     hovered row's title mesh slides right as the image wipes in */
  .item-media { display: block; position: absolute; left: 0; top: 0; }
}
.item-title {
  font-size: 4.8rem;
  line-height: .8;
  letter-spacing: -.01em;
  text-transform: uppercase;
  white-space: nowrap;
}
@media only screen and (min-width: 1200px) {
  .item-title { font-size: 15rem; }
}
.item-client {
  position: absolute;
  right: 0;
  bottom: 2rem;
  align-self: flex-end;
  margin-bottom: -.1rem;
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: -.02em;
  font-weight: 400;
}
@media only screen and (min-width: 1200px) {
  .item-client { font-size: 1.6rem; bottom: 3.5rem; }
}
.item-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--mint);
}
.item-line--top { top: 0; }
.item-line--bottom { bottom: 0; }

/* ============================================================
   ABOUT
   ============================================================ */
.about-page { padding: 2.5rem; color: var(--dark); }
@media only screen and (min-width: 1200px) {
  .about-page { padding: 6.5rem; }
}
.about-header {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 8rem;
}
@media only screen and (min-width: 1200px) {
  .about-header { margin-bottom: 16rem; }
}
.about-title {
  font-size: 38vw;
  line-height: .8;
  letter-spacing: -.01em;
  text-transform: uppercase;
}
.about-home {
  position: absolute;
  right: 0;
  top: 0;
  width: 5rem;
  height: 5rem;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: center;
}
.about-home > div { position: relative; width: 3rem; height: 3rem; }
@media only screen and (min-width: 1200px) {
  .about-home { width: 12.3rem; height: 12.3rem; }
  .about-home > div { width: 6.3rem; height: 6.3rem; }
}
.about-home img { width: 100%; height: auto; }

.about-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}
.about-block {
  display: flex;
  flex-direction: column;
  width: 100%;
}
.about-block:last-child { margin-top: 8rem; }
@media only screen and (min-width: 1200px) {
  .about-block { width: 45vw; }
  .about-block:last-child { margin-top: 0; width: 22.5vw; }
}
.about-block-title {
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: -.02em;
  font-weight: 400;
  margin-bottom: 1rem;
}
@media only screen and (min-width: 1200px) {
  .about-block-title { font-size: 1.6rem; }
}
.about-line {
  width: 100%;
  height: 3px;
  background: var(--dark);
  margin-bottom: 4.5rem;
}
.about-experiences {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 5rem;
}
@media only screen and (min-width: 1200px) {
  .about-experiences { margin-bottom: 10rem; }
}
.about-exp { display: flex; gap: 1rem; }
.about-exp-label {
  font-size: 4.8rem;
  line-height: .8;
  letter-spacing: -.01em;
  text-transform: uppercase;
}
@media only screen and (min-width: 1200px) {
  .about-exp-label { font-size: 15rem; }
}
.about-exp-year {
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: -.02em;
  font-weight: 400;
  align-self: flex-end;
}
@media only screen and (min-width: 1200px) {
  .about-exp-year { font-size: 1.6rem; }
}
.about-copy {
  margin-left: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1em;
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: -.02em;
  font-weight: 400;
}
@media only screen and (min-width: 1200px) {
  .about-copy { font-size: 1.6rem; width: 50%; }
}
.about-awards {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  column-gap: 1rem;
  row-gap: 1.5rem;
}
@media only screen and (min-width: 1200px) {
  .about-awards { flex-direction: column; gap: 1rem; }
}
.about-award { display: flex; gap: 1rem; width: calc(50% - .5rem); }
@media only screen and (min-width: 1200px) {
  .about-award { width: 100%; }
}
.about-award-amount {
  font-size: 4.8rem;
  line-height: .8;
  letter-spacing: -.01em;
}
@media only screen and (min-width: 1200px) {
  .about-award-amount { font-size: 15rem; }
}
.about-award-label {
  font-size: 1.2rem;
  line-height: 1.25;
  letter-spacing: -.02em;
  font-weight: 400;
  align-self: flex-end;
}
@media only screen and (min-width: 1200px) {
  .about-award-label { font-size: 1.6rem; }
}

/* ============================================================
   typography helpers
   ============================================================ */
.font-display { font-family: var(--font-display); }
.font-base { font-family: var(--font-base); }

/* ============================================================
   no-WebGL fallback — the site stays fully readable
   ============================================================ */
.no-gl { background: var(--page-bg); }
.no-gl body { background: var(--page-bg); }
.no-gl .gl-text { visibility: visible !important; }
.no-gl .gl-text span { color: currentColor; }
.no-gl .gl-line { visibility: visible !important; }
.no-gl .gl-image { visibility: visible !important; }
.no-gl .item-media { position: relative; left: auto; top: auto; }
.no-gl .footer-link:hover .footer-underline {
  transform: scaleX(1);
  transition: transform .45s var(--ease-out-cubic);
}
.no-gl canvas#gl { display: none; }

/* reduced motion: no scroll-warp, no spin (handled in JS too) */
@media (prefers-reduced-motion: reduce) {
  .loader-inner { transition: none; }
}
