/* ═══════════════════════════════════════════════════════════
   FREDERIK FREDE — Global Style System
   style.css — single source of truth for all pages
   ═══════════════════════════════════════════════════════════ */

/* ─── TOKENS ──────────────────────────────────────────────── */

:root {
  /* Typefaces */
  --font:      'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-frak: 'UnifrakturMaguntia', serif;

  /* Type scale */
  --t-hero:    clamp(48px, 8vw, 100px);
  --t-large:   clamp(22px, 2.8vw, 36px);
  --t-ui:      15px;
  --t-label:   11px;

  /* Weights */
  --bold:      700;
  --regular:   400;

  /* Tracking */
  --ls-hero:   -0.035em;
  --ls-large:  -0.015em;
  --ls-ui:      0em;
  --ls-label:   0.09em;

  /* Leading */
  --lh-hero:   0.91;
  --lh-large:  1.18;
  --lh-ui:     1.55;
  --lh-label:  1.4;

  /* Colours — default (light mode) */
  --grey-dark:  #4a4540;
  --grey-mid:   #7a7470;
  --grey-light: #a8a39f;
  --border:     #c8c3be;
  --bg:         #fff;
  --bg-card:    #f5f3f1;

  /* Aliases used by colour switcher JS */
  --fg:         #4a4540;
  --fg-mid:     #7a7470;
  --fg-light:   #a8a39f;

  /* Shorthand aliases */
  --dark:   var(--grey-dark);
  --mid:    var(--grey-mid);
  --light:  var(--grey-light);
}

/* ─── RESET ───────────────────────────────────────────────── */

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  font-weight: 700;
  background: var(--bg);
  color: var(--grey-dark);
}

/* ─── NAV ─────────────────────────────────────────────────── */

.nav {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}

.nav-left { display: flex; align-items: baseline; }

.nav-logo {
  font-size: var(--t-ui);
  font-weight: var(--bold);
  letter-spacing: var(--ls-ui);
  color: var(--grey-dark);
  text-decoration: none;
}

.nav-studio {
  font-size: var(--t-ui);
  font-weight: var(--bold);
  color: var(--grey-mid);
  text-decoration: none;
}

.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-right { display: flex; align-items: center; }

/* nav-right with <ul> (index + work) */
.nav-right ul { list-style: none; display: flex; align-items: center; }
.nav-right ul li::after { content: ',\00a0'; color: var(--grey-light); font-size: var(--t-ui); }
.nav-right ul li:last-child::after { content: ''; }
.nav-right ul a { font-size: var(--t-ui); color: var(--grey-mid); text-decoration: none; font-weight: var(--bold); }
.nav-right ul a.active { color: var(--grey-dark); font-weight: var(--bold); }
.nav-right ul a:hover { color: var(--grey-dark); }

/* nav-links as flat div (about) */
.nav-links { font-size: var(--t-ui); color: var(--grey-mid); }
.nav-links a { color: var(--grey-mid); text-decoration: none; }
.nav-links a.active { color: var(--grey-dark); font-weight: var(--bold); }
.nav-links a:hover { color: var(--grey-dark); }

/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.hamburger span { display: block; width: 22px; height: 1.5px; background: var(--grey-dark); }

/* Close button inside mobile nav overlay — hidden by default, shown only when overlay is open */
.nav-close {
  display: none;
  position: fixed;
  top: 12px;
  right: 20px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  color: var(--grey-dark);
  z-index: 101;
  padding: 4px 8px;
  font-family: inherit;
}

/* Only show on mobile, only when overlay is open */
@media (max-width: 640px) {
  .nav-links.open .nav-close,
  .nav-right.open .nav-close { display: block; }
}

/* ─── FOOTER ──────────────────────────────────────────────── */

.footer-bar {
  padding: 24px 48px 32px;
}

.footer-top-row {
  margin-bottom: 16px;
}

.footer-logo-row {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 20px;
}

.footer-bottom-row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.footer-marker {
  display: block;
  width: 160px;
  overflow: visible;
  pointer-events: none;
  padding-top: 4px;
}

.footer-logo {
  height: 48px;
  width: auto;
  display: block;
}

[data-theme="black"] .footer-logo {
  filter: invert(1);
}

.footer-copy {
  font-size: var(--t-label);
  color: var(--grey-light);
}

.footer-copy-link {
  color: var(--grey-light);
  text-decoration: none;
}
.footer-copy-link:hover { color: var(--grey-dark); }

.footer-frak {
  font-family: var(--font-frak);
  font-size: 15px;
  letter-spacing: 0;
  text-transform: none;
}

.footer-links { display: flex; gap: 24px; }

.footer-links a {
  font-size: var(--t-label);
  color: var(--grey-light);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--grey-dark); }

.footer-subscribe {
  display: flex;
  align-items: center;
  gap: 8px;
}
.subscribe-input {
  font-family: var(--font);
  font-size: var(--t-label);
  letter-spacing: var(--ls-label);
  color: var(--grey-dark);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--grey-light);
  padding: 4px 0;
  width: 160px;
  outline: none;
}
.subscribe-input::placeholder { color: var(--grey-light); }
.subscribe-input:focus { border-bottom-color: var(--grey-dark); }
.subscribe-btn {
  font-family: var(--font);
  font-size: var(--t-label);
  color: var(--grey-light);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}
.subscribe-btn:hover { color: var(--grey-dark); }

/* ─── TYPE UTILITIES ──────────────────────────────────────── */

.t-hero {
  font-size: var(--t-hero);
  font-weight: var(--bold);
  letter-spacing: var(--ls-hero);
  line-height: var(--lh-hero);
  color: var(--grey-dark);
}

.t-large {
  font-size: var(--t-large);
  font-weight: var(--bold);
  letter-spacing: var(--ls-large);
  line-height: var(--lh-large);
  color: var(--grey-mid);
}

.t-large.dark { color: var(--grey-dark); }
.t-large.indent { text-indent: 2em; }

.t-ui {
  font-size: var(--t-ui);
  font-weight: var(--bold);
  letter-spacing: var(--ls-ui);
  line-height: var(--lh-ui);
  color: var(--grey-mid);
}

.t-ui.bold { font-weight: var(--bold); color: var(--grey-dark); }

.t-label {
  font-size: var(--t-label);
  font-weight: var(--bold);
  letter-spacing: var(--ls-label);
  line-height: var(--lh-label);
  text-transform: uppercase;
  color: var(--grey-light);
}

/* ─── COLOUR SWITCHER ─────────────────────────────────────── */

.swatches { display: flex; gap: 7px; align-items: center; }
.swatch {
  width: 9px; height: 9px; border-radius: 50%;
  cursor: pointer; border: none;
  outline: 1.5px solid rgba(128,128,128,0.3);
  outline-offset: 2px;
  transition: outline-color 0.2s, opacity 0.2s;
}
.swatch.active { outline-color: var(--grey-dark); }
.swatch:hover { opacity: 0.6; }

/* ─── MOBILE ──────────────────────────────────────────────── */

@media (max-width: 640px) {
  .nav { padding: 0 20px; }
  .hamburger { display: flex; }

  /* index.html mobile nav */
  .nav-links {
    display: none;
    position: fixed; inset: 0;
    background: var(--bg);
    flex-direction: column;
    justify-content: center; align-items: center;
    gap: 32px; font-size: 28px; z-index: 100;
  }
  .nav-links.open { display: flex; }
  .nav-links li { list-style: none; }
  .nav-links.open li::after { display: none; }
  .nav-links.open a { font-size: 22px; color: var(--grey-dark); font-weight: var(--bold); }

  /* work.html mobile nav */
  .nav-right { display: none; }
  .nav-right.open {
    display: flex; position: fixed; inset: 0;
    background: var(--bg); z-index: 200;
    align-items: center; justify-content: center;
  }
  .nav-right.open ul { flex-direction: column; align-items: center; gap: 24px; }
  .nav-right.open ul li::after { display: none; }
  .nav-right.open ul a { font-size: 24px; }

  /* Footer — stack on mobile */
  .footer-bar { padding: 24px 20px 32px; }
  .footer-logo-row { gap: 12px; }
  .footer-logo { height: 40px; }
  .footer-marker { display: none; }
  .footer-bottom-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .footer-links { gap: 20px; }
  .footer-subscribe { flex-wrap: wrap; gap: 8px; }
  .subscribe-input { width: 100%; }
  .subscribe-btn { width: 100%; }

  /* Hide colour swatches on mobile — nav too narrow */
  .nav-center { display: none; }
}

/* ─── PAGE HERO — shared across all pages ──────────────────
   Same structure: nav → page-hero (headline + descriptor) → content
   Measurements match index.html hero-top exactly            */

.page-hero {
  padding: 160px 48px 56px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.page-headline {
  font-size: clamp(48px, 8vw, 100px);
  font-weight: var(--bold);
  line-height: 0.91;
  letter-spacing: -0.035em;
  color: var(--grey-dark);
}

.page-descriptor {
  font-size: var(--t-ui);
  font-weight: var(--bold);
  color: var(--grey-mid);
  text-align: right;
  line-height: var(--lh-ui);
  flex-shrink: 0;
  max-width: 260px;
  align-self: flex-end;
  padding-bottom: 6px;
}

@media (max-width: 640px) {
  .page-hero {
    padding: 80px 24px 40px;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }
  .page-descriptor { text-align: left; }
}

/* ── Inline text links ── */
.ar-client a,
.cs-desc a,
p a,
.text-body a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.ar-client a:hover,
.cs-desc a:hover,
p a:hover,
.text-body a:hover {
  color: #e63222;
  text-decoration: none;
}

/* ── Scroll reveal ── */
.case,
.cs-media-full,
.cs-grid > *,
.cs-grid-3 > * {
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.case.in-view,
.cs-media-full.in-view,
.cs-grid > *.in-view,
.cs-grid-3 > *.in-view {
  opacity: 1;
  transform: translateY(0) scale(1);
}
@media (prefers-reduced-motion: reduce) {
  .case, .cs-media-full, .cs-grid > *, .cs-grid-3 > * {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ─── COOKIE CONSENT ───────────────────────────────── */
.cookie-consent {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  font-size: var(--t-label);
  font-weight: var(--bold);
  color: var(--grey-mid);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.cookie-consent.visible { opacity: 1; transform: none; pointer-events: auto; }
.cookie-actions { display: flex; gap: 12px; }
.cookie-actions button {
  font-family: var(--font);
  font-size: var(--t-label);
  font-weight: var(--bold);
  background: none;
  border: none;
  padding: 0;
  color: var(--grey-mid);
  cursor: pointer;
}
.cookie-actions button:hover,
#cookieAccept { color: var(--grey-dark); }
@media (max-width: 640px) {
  .cookie-consent { left: 16px; right: 16px; bottom: 16px; }
}
