/* =============================================================
   CVD — Coerte Voorhees Design
   Foundation / Design Tokens — Session 1
   coertevoorhees.com v2
   -------------------------------------------------------------
   Refined minimalism with typographic character:
   the precision of a Swiss engineering manual meeting
   the warmth of a Berlin design studio.
   ============================================================= */

/* ---- Self-hosted web fonts ---------------------------------
   Served locally from /assets/fonts — no third-party (Google)
   connection, no IP transfer on page load.
   Archivo : single variable file (weight 100–900 + width 62–125)
   Hanken  : three static weights (300 / 400 / 500)
   --------------------------------------------------------- */
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url('../assets/fonts/archivo-latin-standard-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../assets/fonts/hanken-grotesk-300.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../assets/fonts/hanken-grotesk-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/hanken-grotesk-500.woff2') format('woff2');
}

/* ---- Fonts -------------------------------------------------
   Display : Archivo (Expanded width axis, wdth 125, Light)
             free stand-in for Aktiv Grotesk Extended
   Body/UI : Hanken Grotesk (300/400/500)
             free stand-in for Söhne / Neue Haas Grotesk
   --------------------------------------------------------- */

:root {
  /* ---------- Color ---------- */
  --color-bg:          #F7F5F2;  /* Warm off-white. Like uncoated paper. NOT pure white. */
  --color-surface:     #FFFFFF;  /* White — for image lift or inset surfaces only */
  --color-text:        #111010;  /* Near-black with warmth. NOT #000000. */
  --color-text-muted:  #6E6A65;  /* Warm mid-gray — metadata, captions, labels. Darkened from #888480 for WCAG AA contrast on --color-bg (was ~3.4:1, now ~4.6:1) */
  --color-text-subtle: #C4C0BB;  /* Very light — decorative, dividers */
  --color-border:      #E4E1DC;  /* Hairline warm border */
  --color-link:        #111010;
  --color-link-hover:  #888480;  /* Quiet withdrawal */

  /* ---------- Typography ---------- */
  --font-display: 'Archivo', system-ui, sans-serif;
  --font-body:    'Hanken Grotesk', system-ui, sans-serif;
  --font-mono:    ui-monospace, 'SF Mono', Menlo, monospace;
  /* Display width axis. 100 = normal & balanced, 125 = fully extended.
     A touch of width (100) keeps the headline composed, not stretched. */
  --display-wdth: 100;

  --type-display: clamp(48px, 6vw, 72px);
  --type-h1:      clamp(32px, 4vw, 44px);
  --type-h2:      clamp(22px, 2.5vw, 28px);
  --type-h3:      18px;
  --type-body:    16px;
  --type-small:   13px;
  --type-micro:   11px;

  --weight-light:   300;
  --weight-regular: 400;
  --weight-medium:  500;

  --leading-display: 1.05;
  --leading-head:    1.15;
  --leading-body:    1.7;
  --leading-small:   1.5;

  --track-display: -0.02em;
  --track-h1:      -0.01em;
  --track-micro:    0.1em;

  /* ---------- Spacing (8px base) ---------- */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  16px;
  --space-4:  24px;
  --space-5:  32px;
  --space-6:  48px;
  --space-7:  64px;
  --space-8:  96px;
  --space-9:  128px;
  --space-10: 192px;

  /* ---------- Layout ---------- */
  --max-width:       1320px;
  --max-width-text:  640px;
  --page-margin:     80px;
  --page-margin-mob: 24px;
  --nav-height:      72px;
  --grid-gap:        32px;

  /* ---------- Motion ---------- */
  --ease-standard: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-soft:     ease;
  --dur-fast:      0.2s;
  --dur-mid:       0.35s;
  --dur-slow:      0.5s;
}

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

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--type-body);
  font-weight: var(--weight-regular);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-soft);
}
a:hover { color: var(--color-link-hover); }

::selection { background: #111010; color: #F7F5F2; }

/* ---- Type roles ------------------------------------------- */
.display {
  font-family: var(--font-display);
  font-variation-settings: 'wdth' var(--display-wdth);
  font-weight: var(--weight-light);
  font-size: var(--type-display);
  line-height: var(--leading-display);
  letter-spacing: var(--track-display);
  margin: 0;
}

.h1 {
  font-family: var(--font-display);
  font-variation-settings: 'wdth' var(--display-wdth);
  font-weight: var(--weight-light);
  font-size: var(--type-h1);
  line-height: var(--leading-head);
  letter-spacing: var(--track-h1);
  margin: 0;
}

.h2 {
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  font-size: var(--type-h2);
  line-height: var(--leading-head);
  letter-spacing: -0.005em;
  margin: 0;
}

.h3 {
  font-family: var(--font-body);
  font-weight: var(--weight-regular);
  font-size: var(--type-h3);
  line-height: 1.3;
  margin: 0;
}

.body {
  font-size: var(--type-body);
  line-height: var(--leading-body);
  font-weight: var(--weight-regular);
}

.small {
  font-size: var(--type-small);
  line-height: var(--leading-small);
}

.micro {
  font-size: var(--type-micro);
  line-height: 1.4;
  letter-spacing: var(--track-micro);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.muted { color: var(--color-text-muted); }
.subtle { color: var(--color-text-subtle); }

.text-measure { max-width: var(--max-width-text); }

/* ---- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-size: var(--type-small);
  font-weight: var(--weight-regular);
  letter-spacing: 0.06em;
  padding: 14px 32px;
  border-radius: 0;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-soft),
              color var(--dur-fast) var(--ease-soft);
}

.btn-primary {
  background: var(--color-text);
  color: var(--color-bg);
}
.btn-primary:hover { background: #2c2a29; color: var(--color-bg); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--color-text);
  color: var(--color-text);
}
.btn-ghost:hover { background: var(--color-text); color: var(--color-bg); }

/* ---- Nav link (underline slides in from left) ------------- */
.nav-link {
  position: relative;
  font-size: var(--type-small);
  color: var(--color-text);
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 1px;
  background: var(--color-text);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-fast) var(--ease-soft);
}
.nav-link:hover { color: var(--color-text); }
.nav-link:hover::after,
.nav-link.is-active::after { transform: scaleX(1); }

/* ---- Featured card (Tier 1) ------------------------------- */
.feat-card { display: block; border-bottom: 1px solid var(--color-border); padding-bottom: var(--space-4); }
.feat-card__media { overflow: hidden; }
.feat-card__media > * {
  transition: transform var(--dur-mid) var(--ease-standard);
}
.feat-card:hover .feat-card__media > * { transform: scale(1.02); }
.feat-card__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  margin-top: var(--space-4);
}
.feat-card__title { transition: color var(--dur-fast) var(--ease-soft); }
.feat-card:hover .feat-card__title { color: var(--color-text-muted); }

/* ---- Grid card (Tier 2/3) --------------------------------- */
.grid-card { display: block; }
.grid-card__media { overflow: hidden; }
.grid-card__media > * {
  transition: transform var(--dur-mid) var(--ease-standard);
}
.grid-card:hover .grid-card__media > * { transform: scale(1.03); }
.grid-card__title {
  margin-top: var(--space-3);
  font-size: var(--type-small);
  transition: color var(--dur-fast) var(--ease-soft);
}
.grid-card:hover .grid-card__title { color: var(--color-text-muted); }

/* ---- Image placeholders (striped, labelled) --------------- */
.ph {
  position: relative;
  background-color: #ECE9E4;
  background-image: repeating-linear-gradient(
    45deg,
    transparent 0 11px,
    rgba(17, 16, 16, 0.035) 11px 12px
  );
  display: flex;
  align-items: center;
  justify-content: center;
}
.ph__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  background: var(--color-bg);
  padding: 4px 8px;
}
.ratio-16-9 { aspect-ratio: 16 / 9; }
.ratio-4-3  { aspect-ratio: 4 / 3; }
.ratio-1-1  { aspect-ratio: 1 / 1; }
.ratio-3-4  { aspect-ratio: 3 / 4; }

/* ---- Motion: staggered fade-in ---------------------------- */
/* Only hide when JS is confirmed (html.js) so content is never
   stranded invisible if scripting or the observer fails. */
.js .fade-up {
  opacity: 0;
  transform: translateY(16px);
}
.js .fade-up.is-in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity var(--dur-slow) var(--ease-soft),
              transform var(--dur-slow) var(--ease-soft);
  transition-delay: var(--fade-delay, 0ms);
}

@media (prefers-reduced-motion: reduce) {
  .js .fade-up { opacity: 1; transform: none; transition: none; }
  * { scroll-behavior: auto !important; }
}
