/* ==========================================================================
   AMLGM Lab — base: fonts, design tokens, reset, shared primitives
   ========================================================================== */

@font-face { font-family: "Switzer"; src: url("../assets/fonts/switzer-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("../assets/fonts/switzer-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("../assets/fonts/switzer-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("../assets/fonts/switzer-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Switzer"; src: url("../assets/fonts/switzer-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../assets/fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../assets/fonts/inter-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../assets/fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../assets/fonts/inter-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("../assets/fonts/ibm-plex-mono-500-latin.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Fragment Mono"; src: url("../assets/fonts/fragment-mono-400-latin.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  /* colour */
  --c-ink: #020108;          /* near-black used for dark panels and text */
  --c-ink-2: #090a12;
  --c-text: #25262d;
  --c-grey: #808083;         /* secondary grey (labels, "LAB") */
  --c-page: #f5f5f5;         /* page background */
  --c-panel: #f0f0f0;        /* light section background */
  --c-blue: #4b56d8;         /* accent */
  --c-white: #fff;

  /* type */
  --f-sans: "Switzer", "Inter", Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, monospace;
  --f-mono-alt: "Fragment Mono", "IBM Plex Mono", monospace;

  /* small mono labels (section kickers, scroll notes) */
  --amlgm-label-font: "IBM Plex Mono", monospace;
  --amlgm-label-heading-size: clamp(13px, 1.12vw, 17px);
  --amlgm-label-small-size: 11px;

  /* layout */
  --nav-h: 106px;
}
@media (max-width: 809.98px) {
  :root { --nav-h: 86px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--c-page);
  color: var(--c-ink);
  font-family: var(--f-sans);
  font-size: 12px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6, p, ul, figure, blockquote { margin: 0; }
ul { padding: 0; list-style: none; }
img, svg, video, canvas { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* Small mono kicker with a blue dot ("STUDIO", "FEATURED WORKS", …) */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-mono-alt);
  font-weight: 600;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--c-grey);
}
.kicker::before {
  content: "";
  flex: none;
  width: 6px; height: 6px;
  border-radius: 100px;
  background: var(--c-blue);
}

/* Soft blur strip fixed to the bottom of the viewport */
.viewport-blur {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 20vh;
  z-index: 9;
  pointer-events: none;
  border-radius: 0 0 20px 20px;
  -webkit-backdrop-filter: blur(25px);
  backdrop-filter: blur(25px);
  -webkit-mask-image: linear-gradient(transparent 0%, #000 90%);
  mask-image: linear-gradient(transparent 0%, #000 90%);
  transition: opacity .4s ease;
}
.viewport-blur.is-hidden { opacity: 0; }

/* Intro preloader ("AMLGM LAB" letters) */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 2147483640;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--c-ink);
  transform: translate3d(0, 0, 0);
  transition: transform 1s cubic-bezier(.96, -.02, .38, 1.01);
  will-change: transform;
}
.preloader.is-finished { transform: translate3d(0, -100%, 0); }
.preloader__word {
  display: flex;
  align-items: center;
  white-space: nowrap;
  color: #fff;
  font: 600 32px/1.3 "Inter", sans-serif;
  letter-spacing: -.8px;
}
.preloader__gap { display: inline-block; width: .35em; }
.preloader__letter {
  display: inline-block;
  opacity: 0;
  filter: blur(15px);
  transform: translateY(200px);
  animation: preloader-letter .86s cubic-bezier(.18, .75, .26, 1.02) both;
  animation-play-state: paused;
}
.preloader.is-started .preloader__letter { animation-play-state: running; }
@keyframes preloader-letter {
  from { opacity: 0; filter: blur(15px); transform: translateY(200px); }
  to   { opacity: 1; filter: blur(0);    transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .preloader { display: none; }
}

/* Phones in landscape: full-screen "rotate your phone" notice.
   Foldables and tablets (taller than 540px) are not blocked. */
.rotate-notice { display: none; }
@media (orientation: landscape) and (max-height: 540px) and (pointer: coarse) and (hover: none) {
  .rotate-notice {
    position: fixed;
    inset: 0;
    z-index: 2147483646;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100dvh;
    padding: 20px 34px;
    background: #05060f;
    color: #f5f5f7;
    text-align: center;
    overflow: hidden;
    touch-action: none;
  }
  .rotate-notice__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    max-width: 460px;
  }
  .rotate-notice__icon { flex: none; width: 66px; height: 66px; color: #7a85ff; }
  .rotate-notice h2 {
    font: 600 clamp(24px, 5vw, 32px)/1.1 var(--f-sans);
    letter-spacing: -.045em;
  }
  .rotate-notice p {
    font: 400 15px/1.35 var(--f-sans);
    color: #a9aab8;
  }
}
