/* ==========================================================================
   BLACKLINE BARBER — base: tokens, fonts, reset, typography, utilities
   ========================================================================== */

@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-var-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("../assets/fonts/instrument-serif-italic-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  /* Colour */
  --ink: #0a0a0b;
  --coal: #101011;
  --graphite: #171718;
  --steel: #242426;
  --bone: #efe9dd;
  --bone-dim: #b9b3a7;
  --mute: #8f8a80;
  --gold: #b9985c;
  --gold-hi: #d8bb82;
  --line: rgba(239, 233, 221, 0.14);
  --line-strong: rgba(239, 233, 221, 0.3);

  /* Type */
  --font-sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Instrument Serif", "Times New Roman", serif;

  /* Layout */
  --gutter: clamp(20px, 4.5vw, 72px);
  --maxw: 1480px;
  --section-y: clamp(88px, 12vw, 200px);
  --header-h: 76px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  background: var(--ink);
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked {
  overflow: hidden;
}

img,
picture,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd,
ul,
ol {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

address {
  font-style: normal;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

/* Focus — visible, consistent, high contrast */
:focus-visible {
  outline: 2px solid var(--gold-hi);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 0.8em 1.2em;
  background: var(--bone);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: translateY(-200%);
  transition: transform 0.25s var(--ease);
}

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

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

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-y);
  position: relative;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

.display {
  font-family: var(--font-sans);
  font-weight: 800;
  font-stretch: 74%;
  text-transform: uppercase;
  line-height: 0.93;
  letter-spacing: -0.005em;
  word-spacing: 0.1em;
  text-wrap: balance;
}

.h2 {
  font-size: clamp(2.6rem, 6.4vw, 6rem);
}

/* Italic serif accent used inside display headings */
.accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-stretch: 100%;
  text-transform: none;
  letter-spacing: -0.01em;
  color: var(--gold-hi);
  font-size: 1.06em;
  line-height: 0.8;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.9em;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  line-height: 1;
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
}

.lede {
  font-size: clamp(1.02rem, 1.25vw, 1.2rem);
  line-height: 1.65;
  color: var(--bone-dim);
  max-width: 34em;
}

.prose p + p {
  margin-top: 1.25em;
}

.prose p {
  color: var(--bone-dim);
  max-width: 34em;
}

/* --------------------------------------------------------------------------
   Reveal on scroll (only when JS is running)
   -------------------------------------------------------------------------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0ms);
  will-change: opacity, transform;
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  will-change: auto;
}

/* Image mask reveal — a clean wipe, no fades */
.js [data-reveal="mask"] {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 calc(100% - 2px) 0); /* 2px sliver keeps IntersectionObserver aware of the element */
  transition: clip-path 1.2s var(--ease);
  transition-delay: var(--d, 0ms);
}

.js [data-reveal="mask"].is-in {
  clip-path: inset(0 0 0 0);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js [data-reveal],
  .js [data-reveal="mask"] {
    opacity: 1;
    transform: none;
    clip-path: none;
    transition: none;
  }
}
