/* ==========================================================================
   Dataheimen · site.css
   Section-based layout — Inter Variable
   ========================================================================== */

/* ─── TOKENS ──────────────────────────────────────────────────────────────── */
:root {
  color-scheme: light;

  --bg:         #f4f1ec;
  --panel:      #ffffff;
  --panel-soft: #ede9e2;

  --ink:        #0d1b2a;
  --muted:      #5d7a8f;

  --red:        #ba0c2f;
  --blue:       #00205b;

  --line:       rgba(0 0 0 / .09);
  --line-hi:    rgba(0 0 0 / .18);

  --r-sm: 12px;
  --r:    20px;
  --r-lg: 26px;

  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

/* ─── RESET ───────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html                   { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
img, video             { display: block; }
a                      { color: inherit; text-decoration: none; }
button                 { cursor: pointer; font: inherit; background: none; border: none; color: inherit; }
*:focus-visible        { outline: 2px solid var(--red); outline-offset: 3px; }

/* ─── BASE ────────────────────────────────────────────────────────────────── */
body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ─── SCROLL ANCHOR OFFSET ────────────────────────────────────────────────── */
[id] { scroll-margin-top: 80px; }

/* ─── HEADER ─────────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center;
  gap: 8px;
  width: 100%;
  padding-inline: clamp(16px, 3vw, 40px);
  min-height: 64px; padding-block: 10px;
  background: rgba(244, 241, 236, 0.92);
  backdrop-filter: blur(20px) saturate(1.2);
  -webkit-backdrop-filter: blur(20px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex; align-items: center;
  font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em;
  color: var(--ink); min-height: 44px; flex-shrink: 0;
  margin-right: auto; /* pushes nav + lang-switch to the right */
}

/* ─── LANGUAGE SWITCHER – DROPDOWN ───────────────────────────────────────── */
.lang-switch {
  position: relative;
  flex-shrink: 0;
}
.lang-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 10px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  font-size: .78rem; font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: background .14s, border-color .14s, color .14s;
}
.lang-btn:hover, .lang-btn:focus-visible {
  background: rgba(0,0,0,.06); border-color: var(--line-hi); color: var(--ink); outline: none;
}
.lang-btn.is-open {
  background: rgba(0,0,0,.06); border-color: var(--line-hi); color: var(--ink);
}
.lang-chevron {
  transition: transform .15s ease;
}
.lang-btn.is-open .lang-chevron { transform: rotate(180deg); }

.lang-menu {
  display: none;
  position: absolute; top: calc(100% + 6px); right: 0;
  min-width: 130px;
  list-style: none;
  background: var(--panel);
  border: 1px solid var(--line-hi);
  border-radius: var(--r);
  box-shadow: 0 8px 28px rgba(0,0,0,.13);
  padding: 4px;
  z-index: 200;
}
.lang-menu.is-open { display: block; }
.lang-menu a {
  display: flex; align-items: center;
  height: 38px; padding: 0 12px;
  border-radius: calc(var(--r) - 4px);
  font-size: .875rem; font-weight: 500; color: var(--ink);
  transition: background .1s;
}
.lang-menu a:hover, .lang-menu a:focus-visible {
  background: var(--panel-soft); outline: none;
}
.lang-menu a.is-active { font-weight: 700; color: var(--red); }

/* ─── HAMBURGER ───────────────────────────────────────────────────────────── */
.nav-toggle {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 44px; height: 44px; border-radius: var(--r-sm);
}
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--ink); border-radius: 2px;
  transition: transform .2s, opacity .2s;
}

/* ─── NAVIGATION – mobile overlay ────────────────────────────────────────── */
.nav {
  position: fixed; inset: 64px 0 0;
  display: flex; flex-direction: column;
  padding: 16px; gap: 6px;
  background: rgba(244, 241, 236, 0.97);
  backdrop-filter: blur(24px);
  opacity: 0; pointer-events: none;
  transform: translateY(-8px);
  transition: opacity .2s, transform .2s;
  z-index: 99;
}
.nav.is-open { opacity: 1; pointer-events: auto; transform: none; }
.nav a {
  display: flex; align-items: center;
  height: 52px; padding: 0 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  font-size: 1rem; font-weight: 600; color: var(--ink);
  transition: background .14s, border-color .14s;
}
.nav a:hover, .nav a:focus-visible {
  background: var(--panel-soft); border-color: var(--line-hi); outline: none;
}

/* ─── PAGE SECTIONS ───────────────────────────────────────────────────────── */
.page-section {
  width: 100%;
  padding-block: clamp(64px, 8vw, 112px);
}
.section-inner {
  width: min(1280px, 100% - 48px);
  margin-inline: auto;
}

/* Colour variants */
.section-hero {
  background: var(--bg);
  padding-block: clamp(72px, 11vw, 128px) clamp(64px, 8vw, 104px);
  text-align: center;
}
.section-dark  { background: #0d1b2a; color: #f0f6ff; }
.section-light { background: var(--bg); color: var(--ink); }
.section-blue  { background: #dce8f5; color: var(--ink); }

/* ─── HERO TEXT ───────────────────────────────────────────────────────────── */
.page-hero-kicker {
  display: block; margin-bottom: 20px;
  font-size: .68rem; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--red);
}
.page-hero-title {
  font-size: clamp(2.8rem, 10vw, 7.5rem);
  font-weight: 900; line-height: .91; letter-spacing: -.04em;
  color: var(--ink); text-align: center; margin-inline: auto;
}
.page-hero-lead {
  margin-top: 24px;
  font-size: clamp(.95rem, 1.6vw, 1.15rem);
  line-height: 1.65; color: var(--muted);
  max-width: 48ch; text-align: center; margin-inline: auto;
}
.hero-tagline {
  margin-top: 18px;
  font-size: .78rem; font-weight: 600; letter-spacing: .08em;
  color: rgba(13,27,42,.38);
  text-align: center;
}

/* ─── SECTION HEADER ──────────────────────────────────────────────────────── */
.section-header { margin-bottom: clamp(36px, 5vw, 56px); }

.section-kicker {
  display: block; margin-bottom: 12px;
  font-size: .68rem; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase;
}
.section-dark  .section-kicker { color: rgba(255,255,255,.48); }
.section-blue  .section-kicker { color: var(--blue); }
.section-light .section-kicker { color: var(--red); }

.section-title {
  font-size: clamp(1.7rem, 3.5vw, 2.6rem);
  font-weight: 800; line-height: 1.06; letter-spacing: -.022em; max-width: 22ch;
}
.section-dark  .section-title { color: #f0f6ff; }
.section-blue  .section-title,
.section-light .section-title { color: var(--ink); }

.section-lead {
  margin-top: 14px;
  font-size: clamp(.88rem, 1.5vw, 1.02rem);
  line-height: 1.65; max-width: 52ch;
}
.section-dark  .section-lead { color: rgba(210,232,255,.68); }
.section-blue  .section-lead,
.section-light .section-lead { color: var(--muted); }

/* ─── GLASS TILES (dark sections: Problem, Method) ───────────────────────── */
.glass-tile {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.11);
  border-radius: var(--r-lg);
  padding: clamp(24px, 3.5vw, 36px);
}
.glass-tile h3 {
  font-size: clamp(.95rem, 1.8vw, 1.2rem);
  font-weight: 700; letter-spacing: -.018em; line-height: 1.15;
  color: rgba(240,246,255,.92);
  margin-bottom: 10px;
}
.glass-tile p {
  font-size: clamp(.85rem, 1.4vw, .98rem);
  line-height: 1.65;
  color: rgba(210,232,255,.62);
  max-width: 42ch; margin-top: 0;
}

/* ─── GRID 2×2 (Problem tiles, Method tiles) ─────────────────────────────── */
.grid-2x2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* ─── TILE BASE (used for Assessment main fjord tile) ─────────────────────── */
.tile {
  position: relative; overflow: hidden;
  border-radius: var(--r-lg);
  display: flex; flex-direction: column;
  isolation: isolate;
  box-shadow: 0 2px 16px rgba(0,0,0,.08);
}
.tile img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; z-index: -2;
}

/* ─── TILE CONTENT ────────────────────────────────────────────────────────── */
.tile-content {
  position: relative; z-index: 1;
  display: flex; flex-direction: column;
  justify-content: flex-end; flex: 1;
  padding: clamp(22px, 4.5vw, 42px);
}

/* ─── TILE HERO (fjord image) ─────────────────────────────────────────────── */
.tile-hero {
  min-height: 360px;
  background: #162130;
  color: #f0f6ff;
}
.tile-hero::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, rgba(7,12,20,.06) 0%, rgba(7,12,20,.60) 52%, rgba(7,12,20,.96) 100%),
    linear-gradient(90deg,  rgba(0,32,91,.20)  0%, transparent 65%);
}
.tile-hero .tile-kicker { color: rgba(255,255,255,.58); }
.tile-hero h2 {
  font-size: clamp(1.3rem, 3.5vw, 2.2rem);
  font-weight: 800; line-height: 1.06; letter-spacing: -.022em; max-width: 22ch;
}
.tile-hero p {
  margin-top: 10px;
  font-size: clamp(.88rem, 1.5vw, 1.02rem);
  line-height: 1.6; color: rgba(210,232,255,.75); max-width: 48ch;
}

/* ─── TILE KICKER ─────────────────────────────────────────────────────────── */
.tile-kicker {
  display: block; margin-bottom: 10px;
  font-size: .68rem; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase;
}

/* ─── CARD TILES (Assessment scope + outcome) ─────────────────────────────── */
.card-tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(22px, 3.5vw, 36px);
  box-shadow: 0 1px 8px rgba(0,0,0,.05);
}
.card-kicker {
  display: block; margin-bottom: 14px;
  font-size: .68rem; font-weight: 700;
  letter-spacing: .15em; text-transform: uppercase;
  color: var(--red);
}
.card-heading {
  font-size: clamp(.98rem, 1.8vw, 1.15rem);
  font-weight: 700; line-height: 1.2; letter-spacing: -.015em;
  color: var(--ink); margin-bottom: 8px;
}
.card-body {
  font-size: clamp(.85rem, 1.4vw, .98rem);
  line-height: 1.65; color: var(--muted); max-width: 44ch; margin-top: 0;
}
.privacy-note {
  margin-top: 16px;
  font-size: .8rem; line-height: 1.6;
  color: rgba(13,27,42,.38); max-width: 44ch;
}

/* ─── SCOPE LIST ──────────────────────────────────────────────────────────── */
.scope-list {
  list-style: none;
  display: flex; flex-direction: column; gap: 8px;
}
.scope-list li {
  display: flex; align-items: center; gap: 10px;
  font-size: clamp(.88rem, 1.5vw, 1rem);
  font-weight: 500; color: var(--ink); line-height: 1.4;
}
.scope-list li::before {
  content: '';
  display: block; flex-shrink: 0;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--red);
}

/* ─── BENTO: ASSESSMENT LAYOUT ────────────────────────────────────────────── */
.bento-assess {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

/* ─── HEADINGS ────────────────────────────────────────────────────────────── */
h2 {
  font-size: clamp(1.3rem, 5vw, 2.4rem);
  font-weight: 800; line-height: 1.06; letter-spacing: -.022em; max-width: 22ch;
}

/* ─── PARAGRAPHS ──────────────────────────────────────────────────────────── */
p {
  margin-top: 10px;
  font-size: clamp(.88rem, 2vw, 1.05rem);
  line-height: 1.6; color: var(--muted); max-width: 50ch;
}

/* ─── BUTTON ──────────────────────────────────────────────────────────────── */
.button {
  display: inline-flex; align-items: center; gap: 8px;
  width: fit-content; height: 48px; padding: 0 24px; margin-top: 22px;
  border: 1.5px solid rgba(255,255,255,.36); border-radius: 999px;
  background: rgba(255,255,255,.12); color: #ffffff;
  font-size: .9rem; font-weight: 700;
  backdrop-filter: blur(8px);
  transition: background .2s, border-color .2s, color .2s, transform .15s;
}
.button:hover, .button:focus-visible {
  background: #ffffff; border-color: #ffffff; color: var(--blue);
  transform: translateY(-1px); outline: none;
}
.button-dark {
  border-color: rgba(0,32,91,.28); background: rgba(0,32,91,.07); color: var(--blue);
}
.button-dark:hover, .button-dark:focus-visible {
  background: var(--blue); border-color: var(--blue); color: #ffffff;
}

/* ─── ABOUT GRID ──────────────────────────────────────────────────────────── */
.about-grid {
  display: grid; grid-template-columns: 1fr;
  gap: clamp(36px, 5vw, 64px); align-items: center;
}
.about-image {
  border-radius: var(--r-lg); overflow: hidden;
  aspect-ratio: 5 / 4;
  box-shadow: 0 8px 40px rgba(0,0,0,.12);
}
.about-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-body {
  margin-top: 16px;
  font-size: clamp(.9rem, 1.5vw, 1.02rem);
  line-height: 1.7; color: var(--muted); max-width: 52ch;
}

/* ─── FOOTER ──────────────────────────────────────────────────────────────── */
.site-footer {
  background: #060e17;
  color: rgba(240,246,255,.55);
  padding-block: clamp(48px, 7vw, 88px);
}
.footer-inner {
  width: min(1280px, 100% - 48px); margin-inline: auto;
  display: flex; flex-direction: column; gap: 40px;
}
.footer-contact-heading {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  font-weight: 700; letter-spacing: -.015em;
  color: rgba(240,246,255,.88);
  margin-bottom: 10px;
}
.footer-email {
  font-size: clamp(.95rem, 1.8vw, 1.15rem);
  font-weight: 600; color: rgba(240,246,255,.78);
  transition: color .15s;
}
.footer-email:hover { color: #ffffff; }
.footer-name {
  font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em;
  color: rgba(240,246,255,.85); margin-bottom: 5px;
}
.footer-tagline {
  font-size: .875rem; color: rgba(240,246,255,.35); max-width: 38ch;
}
.footer-meta { font-size: .875rem; line-height: 1.8; }
.footer-meta p { margin-top: 0; max-width: none; color: rgba(240,246,255,.35); font-size: inherit; }

/* ─── RESPONSIVE: TABLET (≥ 640px) ───────────────────────────────────────── */
@media (min-width: 640px) {
  .grid-2x2 {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  .bento-assess {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  /* Fjord tile spans both rows on the left */
  .bento-assess__main { grid-row: 1 / 3; }

  .footer-inner {
    flex-direction: row; justify-content: space-between;
    align-items: flex-start; gap: 40px;
  }
}

/* ─── RESPONSIVE: DESKTOP (≥ 1024px) ─────────────────────────────────────── */
@media (min-width: 1024px) {

  /* Inline nav */
  .nav-toggle { display: none; }
  .nav {
    position: static; display: flex; flex-direction: row; align-items: center;
    padding: 0; gap: 2px;
    background: none; backdrop-filter: none;
    opacity: 1; pointer-events: auto; transform: none; inset: auto;
    order: 1; /* nav comes before lang-switch */
  }
  .lang-switch { order: 2; } /* lang-switch after nav */
  .nav a {
    height: 36px; padding: 0 14px;
    border-radius: 999px; border-color: transparent; background: none;
    font-size: .875rem; color: var(--muted);
  }
  .nav a:hover, .nav a:focus-visible {
    background: rgba(0 0 0 / .06); border-color: var(--line-hi); color: var(--ink);
  }

  /* Assessment bento: fjord tile 7fr, right column 5fr */
  .bento-assess { grid-template-columns: 7fr 5fr; gap: 16px; }
  .bento-assess__main { min-height: 520px; }

  /* 2x2 grid */
  .grid-2x2 { gap: 16px; }

  /* About 2 columns */
  .about-grid { grid-template-columns: 1fr 1fr; }

  /* Hover lift on tiles */
  .tile {
    transition: transform .32s cubic-bezier(.2,1,.3,1),
                box-shadow  .32s cubic-bezier(.2,1,.3,1);
  }
  .tile:hover { transform: translateY(-3px); box-shadow: 0 20px 56px rgba(0,0,0,.16); }
  .tile-content { padding: clamp(26px, 2.8vw, 44px); }
}

/* ─── RESPONSIVE: LARGE DESKTOP (≥ 1280px) ───────────────────────────────── */
@media (min-width: 1280px) {
  .bento-assess, .grid-2x2 { gap: 18px; }
}
