/* =========================================================
   Mads Nielsen — foredragsholder
   Clean speaker-pro: navy ink · ocean-blue accent · warm sand
   Display: Newsreader · Body: Hanken Grotesk
   ========================================================= */

:root {
  /* palette */
  --ink:        #0E1A2B;   /* deep navy text */
  --ink-soft:   #3A4A5E;
  --ink-faint:  #5A6A7D;   /* darkened from #6B7A8D for WCAG AA on light bg (was ~4.1–4.4:1) — PRELAUNCH-AUDIT A11Y-1 */
  --paper:      #F7F9FB;   /* off-white base */
  --paper-2:    #FFFFFF;   /* cards */
  --sand:       #EDE6D8;   /* warm neutral surface */
  --sand-line:  #E0D6C4;
  --ocean:      #0E6BA8;   /* primary accent */
  --ocean-deep: #0A4F7E;
  --ocean-tint: #E5F0F7;
  --amber:      #C8842B;   /* sparing warm accent */
  --line:       #E2E8EE;

  /* type */
  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --body:    "Hanken Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* layout */
  --container: 1280px;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(14,26,43,.04), 0 12px 32px -12px rgba(14,26,43,.16);
  --shadow-lg: 0 24px 64px -20px rgba(14,26,43,.28);

  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: clamp(1rem, .96rem + .25vw, 1.075rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--pad); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 200;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 8px;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 3px solid var(--ocean); outline-offset: 2px; border-radius: 4px; }

/* ---------- typography ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.08; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 1.4rem + 4.4vw, 4.4rem); font-weight: 500; }
h1 em { font-style: italic; color: var(--ocean-deep); font-weight: 400; }
.section-title { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); }

.eyebrow, .section-eyebrow {
  font-family: var(--body); font-weight: 700; text-transform: uppercase;
  letter-spacing: .16em; font-size: .78rem; color: var(--ocean);
}
.section-eyebrow { margin-bottom: .75rem; }
.section-intro { max-width: 60ch; color: var(--ink-soft); font-size: 1.1rem; margin-top: 1rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .85rem 1.5rem; border-radius: 999px; font-weight: 600;
  text-decoration: none; border: 1.5px solid transparent;
  transition: transform .18s var(--ease), background .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}
.btn-primary { background: var(--ocean); color: #fff; box-shadow: 0 10px 24px -10px rgba(14,107,168,.7); }
.btn-primary:hover { background: var(--ocean-deep); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ocean); color: var(--ocean-deep); transform: translateY(-2px); }

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247,249,251,.82);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; }

.brand { display: flex; flex-direction: column; line-height: 1.1; text-decoration: none; }
.brand-name { font-family: var(--display); font-weight: 600; font-size: 1.3rem; letter-spacing: -.01em; }
.brand-role { font-size: .72rem; text-transform: uppercase; letter-spacing: .18em; color: var(--ocean); font-weight: 600; }

.nav-list { list-style: none; display: flex; align-items: center; gap: .35rem; padding: 0; }
.nav-list a {
  text-decoration: none; color: var(--ink-soft); font-weight: 600; font-size: .95rem;
  padding: .5rem .8rem; border-radius: 999px; transition: color .2s, background .2s;
}
.nav-list a:hover, .nav-list a.active { color: var(--ink); background: var(--ocean-tint); }
.nav-cta { background: var(--ink); color: #fff !important; }
.nav-cta:hover { background: var(--ocean-deep) !important; }

.nav-toggle { display: none; }

/* =========================================================
   HERO
   ========================================================= */
.hero { position: relative; padding-block: clamp(3rem, 6vw, 6rem) clamp(2rem, 4vw, 4rem); overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 80% at 85% 10%, var(--ocean-tint) 0%, transparent 60%),
    radial-gradient(50% 60% at 0% 100%, #EFEAE0 0%, transparent 55%);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(14,26,43,.04) 1px, transparent 1px);
  background-size: 22px 22px; mask-image: linear-gradient(180deg, #000, transparent 70%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 5.5rem);
  align-items: center;
}
.hero-copy { max-width: none; }
.hero-copy h1 { max-width: 15ch; }
.hero-lead { max-width: 46ch; }
.hero-lead { font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem); color: var(--ink-soft); margin-top: 1.5rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2rem; }
.hero-meta { margin-top: 1.5rem; font-size: .92rem; color: var(--ink-faint); }
.hero-meta strong { color: var(--ink); font-weight: 700; }

.hero-portrait { position: relative; }
.hero-portrait img {
  width: 100%; aspect-ratio: 5/6; object-fit: cover;
  object-position: 38% center; /* slightly taller to match text height; bias keeps his face in frame */
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  background: var(--sand);
  filter: saturate(.92) contrast(1.04); /* B3: unify temp-selfie tone — remove with the ::after below */
}
/* B3 (DESIGN-NOTES): TEMPORARY treatment for the placeholder selfie — a navy↓ + ocean duotone
   wash so the low-res photo reads as intentional and on-palette (also lifts the name tag's
   legibility). When a licensed pro portrait replaces assets/mads-at-sea.jpg, delete this
   ::after rule and the img `filter` above to show the photo untouched. */
.hero-portrait::after {
  content: ""; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); pointer-events: none;
  background:
    linear-gradient(180deg, rgba(14,26,43,0) 45%, rgba(14,26,43,.42) 100%),
    linear-gradient(125deg, rgba(14,107,168,.20), rgba(14,26,43,0) 55%);
}
.portrait-tag {
  position: absolute; z-index: 2; bottom: 14px; left: 14px;
  background: rgba(14,26,43,.85); color: #fff; backdrop-filter: blur(4px);
  font-family: var(--display); font-size: .95rem; padding: .4rem .9rem; border-radius: 999px;
}

/* =========================================================
   STATS
   ========================================================= */
.stats { background: var(--ink); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; padding-block: clamp(2rem,4vw,3rem); }
.stat { display: flex; flex-direction: column; gap: .25rem; padding-inline: 1rem; }
.stat + .stat { border-left: 1px solid rgba(255,255,255,.12); }
.stat-num { font-family: var(--display); font-size: clamp(2rem,1.4rem+2.4vw,3.2rem); font-weight: 600; color: #fff; line-height: 1; }
.stat-label { color: #B7C4D2; font-size: .92rem; }

/* =========================================================
   SECTIONS
   ========================================================= */
.section { padding-block: clamp(3.5rem, 7vw, 7rem); }
/* B4 (DESIGN-NOTES): crisp edges where a sand band meets the paper sections. Revert: remove border-block. */
.section-alt { background: var(--sand); border-block: 1px solid var(--sand-line); }

/* ---- Story ---- */
.story-layout { display: grid; grid-template-columns: 1.4fr .9fr; gap: clamp(2rem,4vw,4rem); margin-top: 2.5rem; }
.story-body { max-width: 60ch; }
.story-body p { margin-bottom: 1.25rem; color: var(--ink-soft); }
/* B2 SIGNATURE (DESIGN-NOTES): the raw quote is the page's one bold typographic moment —
   oversized Newsreader italic with a ghosted „ glyph behind it (no left rule).
   Revert to a plain pull-quote: delete the ::before, drop font-size to
   clamp(1.5rem,1.1rem+1.6vw,2.2rem), remove max-width/padding-top, and add
   `padding-left:1.5rem; border-left:4px solid var(--ocean)`. */
.pull-quote {
  position: relative;
  font-family: var(--display); font-style: italic;
  font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.3rem);
  line-height: 1.14; color: var(--ink);
  margin: 2.75rem 0; padding-top: 2.25rem; max-width: 18ch;
}
.pull-quote::before {
  content: "\201E"; /* „ */
  position: absolute; top: -.32em; left: -.04em;
  font-size: 4.5em; line-height: 1; color: var(--ocean); opacity: .16;
  font-style: normal; pointer-events: none;
}
.pull-quote p { margin: 0; }
.pull-quote cite { display: block; font-style: normal; font-family: var(--body); font-size: .95rem; color: var(--ink-faint); margin-top: 1rem; }

.timeline { list-style: none; padding: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 7px; top: .4rem; bottom: .4rem; width: 2px; background: var(--line); }
.timeline li { position: relative; padding: 0 0 1.4rem 2.2rem; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: .45rem; width: 16px; height: 16px;
  border-radius: 50%; background: var(--paper); border: 3px solid var(--ocean);
}
.timeline li:last-child::before { background: var(--ocean); }
.t-year { display: block; font-family: var(--display); font-weight: 600; color: var(--ink); }
.t-text { display: block; color: var(--ink-soft); font-size: .95rem; }

/* ---- Cards (shared) ---- */
.cards { display: grid; gap: 1.25rem; margin-top: 2.5rem; }
.card { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.75rem; box-shadow: var(--shadow); }
.section-alt .card { border-color: var(--sand-line); }

.themes { grid-template-columns: repeat(4,1fr); }
.theme { transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.theme:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
/* B1 (DESIGN-NOTES): theme-card icons are inline SVGs (anchor/chain/compass/target) in
   index.html, drawn in the ocean accent via currentColor. Revert: set font-size:1.8rem and
   put the emoji back into the .card-icon elements. */
.card-icon { width: 34px; height: 34px; color: var(--ocean); margin-bottom: .9rem; }
.theme h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.theme p { color: var(--ink-soft); font-size: .95rem; }

.talk-meta { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem,3vw,3rem); margin-top: 3rem; align-items: start; }
.mini-title { font-size: 1.1rem; margin-bottom: 1rem; }
.chip-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.chip-list li { background: var(--paper-2); border: 1px solid var(--sand-line); padding: .5rem 1rem; border-radius: 999px; font-size: .92rem; font-weight: 500; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: .5rem 1.25rem; margin-bottom: 1.5rem; }
.facts dt { font-weight: 700; color: var(--ink); }
.facts dd { color: var(--ink-soft); }
.todo-note { color: #8A5A12; font-size: .82em; font-weight: 600; } /* darker amber for AA on sand (--amber was 2.49:1); temp markers — PRELAUNCH-AUDIT A11Y-1 */

/* ---- Reviews ---- */
.placeholder-banner {
  margin-top: 1.25rem; display: inline-block; background: #FBF3E2; color: #8A5A12;
  border: 1px dashed var(--amber); padding: .5rem 1rem; border-radius: 8px; font-size: .9rem; font-weight: 600;
}
.quotes { grid-template-columns: repeat(3,1fr); }
.quote p { font-family: var(--display); font-size: 1.15rem; line-height: 1.45; color: var(--ink); }
.quote footer { margin-top: 1.25rem; display: flex; flex-direction: column; }
.q-name { font-weight: 700; }
.q-org { font-size: .9rem; color: var(--ink-faint); }

/* ---- Media ---- */
.media-cards { grid-template-columns: repeat(2,1fr); }
.media-card { text-decoration: none; display: flex; flex-direction: column; gap: .5rem; transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
a.media-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--ocean); }
.media-kind { font-size: .72rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 700; color: var(--ocean); }
.media-card h3 { font-size: 1.3rem; }
.media-host { font-family: var(--body); font-size: .92rem; font-weight: 500; color: var(--ink-faint); }
.media-card p { color: var(--ink-soft); font-size: .95rem; }
.media-link { margin-top: auto; font-weight: 700; color: var(--ocean-deep); }
.media-card--book { background: linear-gradient(135deg, var(--ocean-tint), var(--paper-2)); }

/* =========================================================
   BOOK / CONTACT
   ========================================================= */
.book-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(2rem,4vw,4rem); align-items: start; }
.book-intro p { color: var(--ink-soft); margin-top: 1rem; max-width: 42ch; }
.contact-list { list-style: none; padding: 0; margin-top: 2rem; display: grid; gap: 1rem; }
.contact-list li { display: flex; flex-direction: column; }
.contact-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-faint); font-weight: 700; }
.contact-list a { font-family: var(--display); font-size: 1.2rem; color: var(--ocean-deep); text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }

.book-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem;
  background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem); box-shadow: var(--shadow);
}
.field { display: flex; flex-direction: column; gap: .4rem; }
.field--full { grid-column: 1 / -1; }
.field--hp { position: absolute; left: -9999px; }
.field label { font-weight: 600; font-size: .9rem; }
.field input, .field textarea {
  font: inherit; padding: .75rem .9rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: var(--paper); color: var(--ink); transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ocean); box-shadow: 0 0 0 3px var(--ocean-tint); }
.field textarea { resize: vertical; }
.form-foot { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.form-status { font-size: .92rem; font-weight: 600; }
.form-status.ok { color: #1E7A46; }
.form-status.err { color: #B3261E; }
.form-consent { font-size: .85rem; color: var(--ink-faint); margin-top: -.25rem; }
.form-consent a { color: var(--ocean-deep); font-weight: 600; }
.cf-turnstile { min-height: 65px; }

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer { background: var(--ink); color: #C2CDDA; padding-block: 3rem; margin-top: 0; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-role { color: #4D9BD6; } /* lighter ocean for AA on navy (plain --ocean was 3.06:1) — PRELAUNCH-AUDIT A11Y-1 */
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.footer-nav a { color: #C2CDDA; text-decoration: none; font-weight: 600; font-size: .95rem; }
.footer-nav a:hover { color: #fff; }
.footer-copy { width: 100%; font-size: .85rem; color: #7E8EA0; border-top: 1px solid rgba(255,255,255,.1); padding-top: 1.25rem; }

/* =========================================================
   STATIC SUB-PAGES (404, privatlivspolitik)
   ========================================================= */
.subpage-top { border-bottom: 1px solid var(--line); }
.subpage-top .container { display: flex; align-items: center; min-height: 72px; }
.legal { max-width: 72ch; padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.legal h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); }
.legal .updated { color: var(--ink-faint); font-size: .9rem; margin: .5rem 0 2rem; }
.legal h2 { font-size: 1.35rem; margin: 2rem 0 .6rem; }
.legal p, .legal li { color: var(--ink-soft); margin-bottom: .8rem; }
.legal ul { padding-left: 1.25rem; }
.legal a { color: var(--ocean-deep); }
.nf-wrap { min-height: 72vh; display: grid; place-content: center; text-align: center; gap: 1rem; padding-block: clamp(3rem, 8vw, 6rem); }
.nf-eyebrow { font-family: var(--body); font-weight: 700; text-transform: uppercase; letter-spacing: .18em; font-size: .8rem; color: var(--ocean); }
.nf-title { font-family: var(--display); font-weight: 500; font-size: clamp(2.4rem, 1.4rem + 4vw, 4rem); line-height: 1.05; }
.nf-wrap p.lead { color: var(--ink-soft); max-width: 46ch; margin: .25rem auto 1.5rem; font-size: 1.1rem; }

/* =========================================================
   REVEAL ANIMATION
   ========================================================= */
/* Hero load-in only (above the fold, fires on page load — never leaves content
   invisible during scroll). Lower sections are always visible. */
.reveal { opacity: 0; transform: translateY(18px); animation: reveal .7s var(--ease) forwards; animation-delay: calc(var(--d, 0) * .09s); }
@keyframes reveal { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; animation: none; }
}
/* reveal stagger — moved off inline styles so the CSP can drop style-src 'unsafe-inline' */
.d-1 { --d: 1; } .d-2 { --d: 2; } .d-3 { --d: 3; } .d-4 { --d: 4; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-portrait { order: -1; max-width: 360px; }
  .story-layout { grid-template-columns: 1fr; }
  .themes { grid-template-columns: repeat(2,1fr); }
  .quotes { grid-template-columns: 1fr; }
  .media-cards { grid-template-columns: 1fr; }
  .talk-meta { grid-template-columns: 1fr; }
  .book-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  /* mobile nav */
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; background: transparent; border: 0; position: relative; z-index: 110;
  }
  .nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
    content: ""; display: block; width: 24px; height: 2px; background: var(--ink); border-radius: 2px;
    transition: transform .25s var(--ease), opacity .2s;
  }
  .nav-toggle-bar::before { position: absolute; transform: translateY(-7px); }
  .nav-toggle-bar::after { position: absolute; transform: translateY(7px); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: rotate(-45deg); }

  .nav-list {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); padding: 1rem var(--pad) 1.5rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(-12px); opacity: 0; pointer-events: none; visibility: hidden;
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .nav-list.open { transform: none; opacity: 1; pointer-events: auto; visibility: visible; }
  .nav-list a { padding: .9rem 1rem; font-size: 1.05rem; border-radius: var(--radius-sm); }
  .nav-cta { text-align: center; margin-top: .5rem; }

  .stats-grid { grid-template-columns: 1fr; }
  .stat + .stat { border-left: 0; border-top: 1px solid rgba(255,255,255,.12); padding-top: 1rem; margin-top: 1rem; }
  .themes { grid-template-columns: 1fr; }
  .book-form { grid-template-columns: 1fr; }
}
