/* ═══════════════════════════════════════════════════════════════════════
   site.css · robertdaniel.consulting
   ───────────────────────────────────────────────────────────────────────
   The shared chrome: tokens, reset, base type, nav, eyebrow, buttons,
   footer. Everything a page does NOT share stays in that page's own
   <style> block.

   Load order in <head> — two separate <link> tags, never an @import:
     <link rel="stylesheet" href="/visual-assets/fonts.css">
     <link rel="stylesheet" href="/visual-assets/site.css">
   An @import inside this file would chain the requests and block paint
   for a round trip. Two links fetch in parallel.

   PAGE CONTRACT — three things a page must declare:

   1. BACKGROUND. Dark is the default. A paper page adds class="paper"
      to <body>, which flips background, text colour and --accent in one
      move. The nav and footer stay dark on every page regardless.

   2. NAV SHAPE. Default is the three-column English nav (logo · links ·
      right). A German page adds class="nav--split" to <nav>, which drops
      to two columns for logo + right group with no centre cell.

   3. LOGO. <img src="/visual-assets/logo-rd.svg"> inside .nav-logo.
      Not inline SVG. Sixteen inline copies drifted — /field's had a
      dropped digit in a bézier control point and drew one letter wrong.

   TOKENS: --gold is the dark-surface accent, --gold-ink the paper one.
   Use var(--accent) for anything that must follow the page background;
   use --gold or --gold-ink directly only when the surface is fixed
   (nav, footer).
   ═══════════════════════════════════════════════════════════════════════ */


/* ═════════ TOKENS ═════════ */

:root {
  /* dark surfaces */
  --dark:            #0f0e0d;
  --dark-soft:       #14130f;
  --light:           #EFEFEF;

  /* paper surfaces */
  --paper:           #f5f4f0;
  --paper-card:      #fbfaf7;

  /* ink — text on paper */
  --ink:             #1a1a1a;
  --ink-body:        #3a3a3a;
  --ink-dim:         #5a5a5a;
  --ink-faint:       #8a8a8a;
  --ink-line:        rgba(26,26,26,0.12);

  /* light text on dark */
  --white-dim:       rgba(239,239,239,0.72);
  --white-quiet:     rgba(239,239,239,0.58);
  --white-faint:     rgba(239,239,239,0.10);

  /* gold — two surface variants */
  --gold:            #c8a96e;
  --gold-line:       rgba(200,169,110,0.35);
  --gold-ink:        #8c7a5e;
  --gold-ink-line:   rgba(140,122,94,0.32);
  --gold-ink-faint:  rgba(140,122,94,0.14);

  /* surface-following accent — dark default, flipped by body.paper */
  --accent:          var(--gold);
  --accent-line:     var(--gold-line);
}


/* ═════════ RESET · BASE ═════════ */

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

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

body {
  background: var(--dark);
  color: var(--light);
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
}

/* ── SURFACE CONTEXT ──
   --accent follows the surface it sits on. Apply .on-paper / .on-dark to
   any element and everything inside inherits the right gold: eyebrows,
   secondary buttons, rules, focus outlines.

   Whole-page surface  -> body.paper
   Per-section surface -> <section class="... on-paper"> on a page whose
                          body stays dark (HOME, WORK, POV all alternate).
   Nav and footer are exempt: they are dark on every page and hard-code
   --gold rather than following context. */

.on-dark  { --accent: var(--gold);     --accent-line: var(--gold-line); }
.on-paper { --accent: var(--gold-ink); --accent-line: var(--gold-ink-line); }

body.paper {
  background: var(--paper);
  color: var(--ink);
  --accent: var(--gold-ink);
  --accent-line: var(--gold-ink-line);
}

/* Short pages that need the footer pinned to the bottom of the viewport
   rather than sitting directly under the content (/field). */
body.sticky-footer {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.sticky-footer main { flex: 1; }


/* ═════════ NAV ═════════ */
/* Always dark, on every page. Gold is hard-coded here, not var(--accent),
   because the surface under the nav never changes. */

nav.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 48px; height: 88px;
  border-bottom: 0.5px solid rgba(239,239,239,0.08);
  background: rgba(15,14,13,0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--light);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              opacity   0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* German pages: logo + right group, no centre cell. */
nav.site-nav.nav--split { grid-template-columns: 1fr auto; }

nav.site-nav.nav-hidden { transform: translateY(-100%); opacity: 0; }

.nav-logo {
  justify-self: start;
  display: flex; align-items: center;
  cursor: pointer; text-decoration: none;
}
/* height + width reserve the box before the SVG lands, so the nav does
   not reflow on first paint. */
.nav-logo img {
  height: 48px; width: auto;
  display: block;
}

.nav-links {
  justify-self: center;
  display: flex; gap: 31px; list-style: none;
  font-family: 'Inter', sans-serif;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase;
}
.nav-links a {
  color: var(--light); text-decoration: none;
  transition: color 0.2s; cursor: pointer;
  padding: 6px 0; position: relative;
}
.nav-links a:hover { color: var(--gold); }
.nav-links a.w--current { color: var(--gold); }
.nav-links a.w--current::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0;
  height: 0.5px; background: var(--gold);
}

.nav-right { justify-self: end; display: flex; align-items: center; gap: 20px; }

.nav-lang {
  font-family: 'Inter', sans-serif;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.20em; text-transform: uppercase;
  color: var(--light); text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color 0.2s;
}
.nav-lang:hover { color: var(--gold); }
.nav-lang .lang-note {
  font-weight: 300; letter-spacing: 0.06em; text-transform: none;
  color: rgba(239,239,239,0.42); font-size: 11px;
}

.nav-icon {
  color: var(--light); display: flex; align-items: center;
  text-decoration: none; transition: color 0.2s;
}
.nav-icon:hover { color: var(--gold); }

.nav-hamburger {
  display: none; background: transparent; border: none; cursor: pointer;
  width: 32px; height: 32px; padding: 0; position: relative;
  color: var(--light);
}
.nav-hamburger span {
  display: block; position: absolute; left: 4px; right: 4px;
  height: 0.5px; background: currentColor;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              top       0.3s cubic-bezier(0.16, 1, 0.3, 1),
              opacity   0.3s ease;
}
.nav-hamburger span:nth-child(1) { top: 11px; }
.nav-hamburger span:nth-child(2) { top: 16px; }
.nav-hamburger span:nth-child(3) { top: 21px; }
.nav-hamburger.open span:nth-child(1) { top: 16px; transform: rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { top: 16px; transform: rotate(-45deg); }

.nav-mobile-menu {
  position: fixed; top: 88px; left: 0; right: 0;
  background: rgba(15,14,13,0.98);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 0.5px solid rgba(239,239,239,0.08);
  padding: 32px 24px 40px;
  transform: translateY(-120%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 99; pointer-events: none;
}
.nav-mobile-menu.open { transform: translateY(0); pointer-events: all; }
.nav-mobile-menu ul { list-style: none; display: flex; flex-direction: column; gap: 4px; }
.nav-mobile-menu a {
  display: block; padding: 16px 0;
  font-size: 11px; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--light); text-decoration: none;
  border-bottom: 0.5px solid rgba(239,239,239,0.08);
  transition: color 0.2s;
}
.nav-mobile-menu a:hover,
.nav-mobile-menu a.w--current { color: var(--gold); }


/* ═════════ EYEBROW ═════════ */

.eyebrow {
  font-size: 11.5px; letter-spacing: 0.26em; text-transform: uppercase;
  color: var(--accent);
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 28px;
}
.eyebrow::before {
  content: ''; width: 32px; height: 0.5px;
  background: var(--accent); flex-shrink: 0;
}

/* Centred variant: rule on both sides, drawn off the inner <span>. */
.eyebrow-center { justify-content: center; }
.eyebrow-center::before { display: none; }
.eyebrow-center span { display: flex; align-items: center; gap: 16px; }
.eyebrow-center span::before,
.eyebrow-center span::after {
  content: ''; width: 32px; height: 0.5px;
  background: var(--accent); flex-shrink: 0;
}


/* ═════════ BUTTONS ═════════ */

.btn-primary {
  display: inline-flex; align-items: center; gap: 14px;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase;
  background: var(--gold); color: var(--dark);
  padding: 17px 34px; border: none; border-radius: 999px; cursor: pointer;
  transition: transform  0.28s cubic-bezier(0.16,1,0.3,1),
              box-shadow 0.28s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px -12px rgba(200,169,110,0.55);
}
/* Optional trailing icon. Absent markup costs nothing. */
.btn-primary .ico {
  width: 17px; height: 17px; flex-shrink: 0;
  transition: transform 0.28s cubic-bezier(0.16,1,0.3,1);
}
.btn-primary:hover .ico { transform: translate(3px, -3px); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 14px;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
  font-size: 12px; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase;
  background: transparent; color: var(--accent);
  padding: 17px 34px;
  border: 0.5px solid var(--accent-line); border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.28s ease, color 0.28s ease;
}
.btn-secondary:hover { border-color: var(--accent); }

/* On paper, a gold-ink hairline outline all but disappears. Ink border and
   ink text give the secondary real weight at rest; hover fills it, so it
   still resolves as the quieter of the two without being invisible. */
body.paper .btn-secondary,
.on-paper .btn-secondary {
  color: var(--ink);
  border-color: rgba(26,26,26,0.55);
}
body.paper .btn-secondary:hover,
.on-paper .btn-secondary:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}


/* ═════════ FOOTER ═════════ */
/* Dark on every page, like the nav. */

footer {
  background: var(--dark); color: var(--light);
  padding: 20px 48px;
  border-top: 0.5px solid var(--white-faint);
}
.footer-bottom {
  display: flex; justify-content: center; align-items: center;
  font-family: 'Inter', sans-serif;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.20em; text-transform: uppercase;
  color: rgba(239,239,239,0.50);
  gap: 0;
}
.footer-bottom a {
  color: rgba(239,239,239,0.42); text-decoration: none;
  transition: color 0.2s;
}
.footer-bottom a:hover { color: var(--gold); }
.footer-bottom a.w--current { color: var(--gold); }
.footer-bottom .sep { color: var(--white-faint); padding: 0 10px; }
.footer-pipe {
  color: rgba(239,239,239,0.22);
  padding: 0 20px; letter-spacing: 0; font-weight: 300;
}


/* ═════════ FOCUS ═════════ */

a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px;
}


/* ═════════ MOBILE ═════════ */

@media (max-width: 900px) {
  nav.site-nav {
    grid-template-columns: 1fr auto;
    padding: 0 24px; height: 72px;
  }
  .nav-links { display: none; }
  .nav-logo img { height: 34px; }
  .nav-right { gap: 14px; }
  .nav-right .linkedin-link { display: none; }
  .nav-lang .lang-note { display: none; }
  .nav-hamburger { display: flex; align-items: center; justify-content: center; }
  .nav-mobile-menu { top: 72px; }

  .eyebrow::before { width: 20px; }

  footer { padding: 16px 24px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 8px; }
}


/* ═════════ REDUCED MOTION ═════════ */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
