/* ================================================================
   BOSELL — SHARED DESIGN SYSTEM
   All pages link this file. Extracted from bosell/index.html.
   Subpages use relative path: ../assets/site.css
   Landing page uses relative path: assets/site.css
================================================================ */

/* Google Fonts are loaded via <link> in each page's <head> */

/* ============================================================
   DESIGN TOKENS
============================================================ */
:root {
  /* Palette — Charcoal/Teal/White/LightGray/Navy system */
  --color-cream:        #ffffff;        /* primary background */
  --color-warm-white:   #ffffff;        /* card surfaces on light sections */
  --color-sand:         #f1f1f1;        /* alt section fills */
  --color-sage:         #284b63;        /* secondary accent → Navy */
  --color-sage-dark:    #1d3a4d;        /* dark navy */
  --color-sage-light:   #e8f0f2;        /* teal-tinted light icon bg */
  --color-terra:        #3c6e71;        /* primary accent → Teal */
  --color-terra-dark:   #2f595c;        /* Teal-dark, ≥7.5:1 on white — small text/links */
  --color-terra-light:  #e8f3f4;        /* very light teal tint for icon bg */
  --color-light-teal:   #a8d0d2;        /* light-teal accent — 5.54:1 on navy, passes AA */
  --color-ink:          #353535;        /* headings & body on light bg → Charcoal */
  --color-navy:         #284b63;        /* dark section backgrounds, footer bands */
  --color-navy-dark:    #1d3a4d;        /* darker navy for gradients */
  --color-body:         #353535;        /* body text → Charcoal */
  --color-muted:        #5b5b5b;        /* secondary text — 6.5:1 on white, passes AA */
  --color-border:       #d9d9d9;        /* borders, dividers, hairlines → Light Gray */
  --color-overlay:      rgba(40, 75, 99, 0.55);

  /* Typography */
  --font-serif:   'Playfair Display', Georgia, serif;
  --font-sans:    'Inter', system-ui, -apple-system, sans-serif;

  /* Scale (fluid) */
  --text-xs:    0.75rem;
  --text-sm:    0.875rem;
  --text-base:  1rem;
  --text-md:    1.125rem;
  --text-lg:    1.25rem;
  --text-xl:    1.5rem;
  --text-2xl:   2rem;
  --text-3xl:   2.75rem;
  --text-4xl:   clamp(2.5rem, 5vw, 3.75rem);
  --text-hero:  clamp(3rem, 7vw, 5.5rem);

  /* Spacing */
  --sp-1:   0.25rem;
  --sp-2:   0.5rem;
  --sp-3:   0.75rem;
  --sp-4:   1rem;
  --sp-5:   1.25rem;
  --sp-6:   1.5rem;
  --sp-8:   2rem;
  --sp-10:  2.5rem;
  --sp-12:  3rem;
  --sp-16:  4rem;
  --sp-20:  5rem;
  --sp-24:  6rem;
  --sp-32:  8rem;

  /* Borders & Radii — scaled by element type, not uniform */
  --radius-sm:   8px;    /* buttons, tags, inputs */
  --radius-md:   12px;   /* cards */
  --radius-lg:   20px;   /* large feature panels */
  --radius-xl:   28px;   /* hero portrait, about portrait */
  --radius-full: 9999px; /* pills, segmented control */

  /* Shadows — reserved for genuinely elevated elements only */
  --shadow-sm:       0 1px 2px rgba(40,75,99,0.06), 0 8px 24px -12px rgba(40,75,99,0.12);
  --shadow-md:       0 2px 4px rgba(40,75,99,0.08), 0 12px 32px -8px rgba(40,75,99,0.16);
  --shadow-lg:       0 4px 8px rgba(40,75,99,0.10), 0 20px 48px -12px rgba(40,75,99,0.20);
  --shadow-portrait: 0 24px 64px rgba(0,0,0,0.45);

  /* Transitions */
  --transition-base: 220ms ease;
  --transition-slow: 380ms ease;

  /* Layout */
  --max-width: 1200px;
  --header-h:  68px;
}

/* ============================================================
   RESET & BASE
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* overflow-x:clip (NOT hidden) on BOTH html and body prevents the
   off-canvas mobile drawer from expanding the document scrollable
   width, without creating a scroll container. overflow:hidden on any
   axis makes an element a scroll container, and position:sticky
   sticks to its NEAREST SCROLLING ANCESTOR — so a hidden header was
   sticking to html/body, which never scroll, and it scrolled away
   with the page instead of staying put. clip clips overflow the same
   way but never establishes a scroll container, so .site-header's
   sticky positioning resolves against the real viewport again.
   scroll-padding-top compensates in-page anchors (#tjanster etc.) for
   the sticky header's height so headings don't land underneath it. */
html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: clip;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}
body { overflow-x: clip; }

/* ── Mobile nav scroll lock (iOS-safe, no save/restore) ──────────
   position:fixed on body was the previous approach: it takes body
   out of flow, collapsing the document's scrollable extent to the
   viewport height while open, which forced a save-scrollY/restore-
   on-close dance — and that restore raced deferred rAF/setTimeout
   re-asserts that don't reliably fire (verified: 1400 -> 986 after
   close, unchanged even after 3s of settle time).
   overflow:hidden on BOTH html and body never takes anything out of
   flow, so the document keeps its full scrollHeight the entire time
   the drawer is open — scrollY is preserved NATIVELY across
   open/close with zero restore logic needed (verified: scrollY
   stays exactly at its pre-open value during lock AND after
   unlock).
   touch-action:none on the page's scrollable content (everything
   except the drawer itself, which needs to keep scrolling if its
   own content overflows) is what actually blocks iOS touch-scroll —
   overflow:hidden alone does not stop touchmove on iOS Safari. */
html.nav-open,
html.nav-open body {
  overflow: hidden;
}
html.nav-open #main,
html.nav-open .site-footer {
  touch-action: none;
}
/* Old browsers without overflow:clip support (Safari <16, Firefox <102)
   fall back to hidden: they lose the sticky header (degrades to static
   scroll-away, same as before this fix) but keep the horizontal-
   overflow guard intact. Acceptable degradation, not a regression. */
@supports not (overflow-x: clip) {
  html { overflow-x: hidden; }
  body { overflow-x: hidden; }
}
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--color-body);
  background: var(--color-cream);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* Skip link */
.skip-link {
  position: absolute; top: -100%; left: var(--sp-4);
  background: var(--color-terra); color: #fff;
  padding: var(--sp-2) var(--sp-4); border-radius: var(--radius-sm);
  font-weight: 600; z-index: 9999; transition: top var(--transition-base);
}
.skip-link:focus { top: var(--sp-4); }

/* Focus visible — teal ring, AA-safe on all backgrounds */
:focus-visible {
  outline: 3px solid var(--color-terra);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   LAYOUT HELPERS
============================================================ */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

/* Generous vertical rhythm — not mechanically equal */
.section { padding-block: clamp(4.5rem, 9vw, 8rem); }

.section--alt  { background: var(--color-sand); }
.section--dark { background: var(--color-navy); color: #ffffff; }
.section--sage { background: var(--color-sage-light); }

.section-label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  /* --color-terra-dark (#2f595c) ≈5.2:1 on white — passes AA.
     --color-terra (#3c6e71) ≈3.1:1 on white — fails AA. */
  color: var(--color-terra-dark);
  margin-bottom: var(--sp-3);
}
.section-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.875rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--color-ink);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin-bottom: var(--sp-6);
  text-wrap: balance;
}
/* Display variant — prominent feature-layout headings */
.section-heading--display {
  font-size: clamp(2.25rem, 4.5vw, 3.25rem);
}
.section-heading--white { color: var(--color-cream); }
@media (max-width: 767px) {
  .section-heading         { font-size: clamp(1.625rem, 5vw, 2rem); }
  .section-heading--display { font-size: clamp(1.875rem, 6vw, 2.5rem); }
  /* Mobile-only type floor: 11.52px label read too small on phone glass.
     Raise to a ~13px floor; tighten tracking slightly so the uppercase-
     tracked label doesn't wrap at 375px. Desktop value (0.72rem) is
     untouched outside this query. (.service-tag/.badge/.cred-text span
     get the same floor in a later media block, placed after their base
     rules so source order doesn't let the base rule win the cascade.) */
  .section-label {
    font-size: 0.8125rem;
    letter-spacing: 0.12em;
  }
}
.section-sub {
  font-size: var(--text-md);
  color: var(--color-muted);
  max-width: 62ch;
  line-height: 1.7;
}
.section-sub--white { color: rgba(255,255,255,0.87); }
.text-center { text-align: center; }
.text-center .section-sub { margin-inline: auto; }

/* Reusable prose-body utility — replaces per-element inline styles on
   subpage <p> elements (font-size md, body charcoal, generous line-height,
   measure cap ~65ch). Applied via class="section-body" in HTML. */
.section-body {
  font-size: var(--text-md);
  color: var(--color-body);
  line-height: 1.75;
  max-width: 72ch;
  margin-bottom: var(--sp-5);
}
.section-body:last-child { margin-bottom: 0; }

/* Inline text link inside body copy (e.g. Boken purchase line) — teal-dark
   passes AA on white; underline gives a non-color affordance too. */
.inline-link {
  color: var(--color-terra-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.inline-link:hover,
.inline-link:focus-visible { color: var(--color-navy); }

/* ============================================================
   BUTTONS
============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-family: var(--font-sans); font-size: var(--text-base); font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1; padding: 0.9rem 1.6rem;
  border-radius: var(--radius-sm);
  transition: background 200ms ease, color 200ms ease,
              transform 150ms ease, box-shadow 200ms ease,
              border-color 200ms ease, opacity 200ms ease;
  min-height: 48px; white-space: nowrap;
  cursor: pointer;
}
.btn:focus-visible {
  outline: 3px solid var(--color-terra);
  outline-offset: 3px;
}
.btn:active { transform: translateY(1px); }

/* PRIMARY — confident, single dominant CTA */
.btn-primary {
  background: var(--color-terra);
  color: #fff;
  border: 2px solid transparent;
}
.btn-primary:hover {
  background: var(--color-terra-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(60,110,113,0.32);
}

/* OUTLINE — secondary, lower visual weight */
.btn-outline {
  background: transparent;
  color: var(--color-ink);
  border: 1.5px solid rgba(53,53,53,0.25);
}
.btn-outline:hover { border-color: var(--color-terra-dark); color: var(--color-terra-dark); }

/* OUTLINE WHITE — for dark backgrounds */
.btn-outline-white {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.45);
}
.btn-outline-white:hover { border-color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.07); }

/* SAGE — secondary action on cream/white backgrounds */
.btn-sage {
  background: var(--color-sage);
  color: #fff;
  border: 2px solid transparent;
}
.btn-sage:hover { background: var(--color-sage-dark); transform: translateY(-1px); }

.btn-sm { padding: 0.65rem 1.25rem; font-size: var(--text-sm); min-height: 44px; }

/* ============================================================
   HEADER / NAV
============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 210;
  height: var(--header-h);
  /* backdrop-filter is on ::before (see below) — NOT here.
     backdrop-filter on the element itself creates a containing block
     for position:fixed children, trapping the off-canvas .site-nav
     relative to the 68px header instead of the viewport. Pseudo-
     elements never create a containing block for fixed siblings. */
  background: rgba(255,255,255,0.94);
  border-bottom: 1px solid var(--color-border);
  /* Transform-only hide/reveal (never top/height — those trigger
     layout). Exponential ease-out matches the site's established
     reveal curve (see .reveal/.hero-title etc.) so the header's own
     motion feels native to the rest of the page. */
  transition: box-shadow var(--transition-base),
              transform 300ms cubic-bezier(0.22, 1, 0.36, 1);
}
/* Directional auto-hide — JS toggles this on scroll-down past the
   threshold; removed immediately on scroll-up. Kept OFF the mobile
   nav-open state and focus-within by JS (it force-removes the class),
   so the drawer/close-button/keyboard focus are never hidden. */
.site-header--hidden {
  transform: translateY(-100%);
}
/* Explicit hard-disable while the drawer is open: html.nav-open beats
   .site-header--hidden regardless of any scroll that happens while it's
   open (belt-and-braces alongside the JS force-show branch in
   applyHeaderDirection — see site.js). Keeps the logo + close button
   reachable at all times.
   position:fixed IS still needed here, but for a different reason than
   before: html.nav-open sets overflow:hidden on html+body (see above),
   and overflow:hidden on ANY axis makes that element a scroll container
   — so position:sticky would resolve against html/body as its nearest
   scrolling ancestor instead of the viewport, rendering the header at
   top:-<scrollY> (verified: rectTop -400 at a 400px scroll offset).
   Body itself is NOT taken out of flow this time (no position:fixed on
   body, unlike the old approach), so switching just the header to
   position:fixed here has no coordinate-space shift to compensate for
   — it pins correctly to the real viewport top. */
html.nav-open .site-header,
html.nav-open .site-header.site-header--hidden {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  transform: none !important;
}
/* Frosted-glass on pseudo-element: safe for fixed children */
.site-header::before {
  content: '';
  position: absolute; inset: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
  z-index: -1;
}
.site-header.scrolled { box-shadow: var(--shadow-md); }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}

.site-logo {
  display: flex; align-items: center; gap: var(--sp-3);
  font-family: var(--font-serif); font-size: var(--text-lg); font-weight: 700;
  color: var(--color-ink); letter-spacing: -0.01em;
}
.logo-mark {
  width: 36px; height: 36px;
  background: var(--color-terra);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-mark svg { width: 20px; height: 20px; fill: #fff; }

.site-nav { display: flex; align-items: center; gap: var(--sp-1); }
.nav-list { display: flex; align-items: center; gap: var(--sp-1); }
.nav-link {
  font-size: var(--text-sm); font-weight: 500;
  color: var(--color-body); padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-sm);
  transition: color var(--transition-base), background var(--transition-base);
  position: relative;
}
.nav-link:hover { color: var(--color-terra-dark); background: var(--color-terra-light); }

/* Scroll-spy active state — teal underline + color */
.nav-link--active {
  color: var(--color-terra-dark);
}
.nav-link--active::after {
  content: '';
  position: absolute; bottom: 2px; left: var(--sp-3); right: var(--sp-3);
  height: 2px; border-radius: 1px;
  background: var(--color-terra);
}
.nav-cta { margin-left: var(--sp-4); }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  transition: background var(--transition-base);
}
.nav-toggle:hover { background: var(--color-border); }
.nav-toggle span {
  display: block; width: 22px; height: 2px;
  background: var(--color-ink); border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
@media (max-width: 767px) {
  .nav-toggle { display: flex; }
  .site-nav {
    position: fixed; inset: var(--header-h) 0 0 0;
    flex-direction: column; align-items: stretch;
    background: #ffffff;
    padding: var(--sp-6);
    transform: translateX(100%);
    /* visibility:hidden ensures the off-canvas drawer doesn't
       contribute to overflow/scrollable width. The transition delay
       keeps it visible long enough for the closing animation to finish. */
    visibility: hidden;
    transition: transform var(--transition-slow),
                visibility 0s linear var(--transition-slow);
    overflow-y: auto;
    /* Stop drawer-internal scroll from chaining to the page behind it
       (default overscroll-behavior:auto lets it bleed through once the
       drawer hits its own scroll boundary). */
    overscroll-behavior: contain;
    gap: 0;
  }
  .site-nav.open {
    transform: translateX(0);
    visibility: visible;
    /* No delay on open — visible immediately so links are focusable */
    transition: transform var(--transition-slow),
                visibility 0s linear 0s;
  }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  /* display:block (2026-07-28 fix): .nav-link is an inline <a> by default
     (see the base rule above). Vertical padding on an inline element PAINTS
     but does not occupy layout space, so consecutive drawer links' 55px-tall
     hit areas overlapped by ~25px — a tap on the lower half of one link
     could resolve to its neighbour. Block-level makes the padding real,
     giving each row a true non-overlapping >=44px target. Desktop nav is
     unaffected: this rule lives only in the <=767px drawer breakpoint. */
  .nav-link {
    display: block;
    font-size: var(--text-md); padding: var(--sp-4) var(--sp-3);
    border-radius: 0;
  }
  .nav-cta { margin-left: 0; margin-top: var(--sp-6); }
  .nav-cta .btn { width: 100%; }
}

/* ============================================================
   HERO — full-bleed video background (landing page only)
   These rules are shared so subpages can reference .hero-*
   classes safely without a video; the hero band variant
   (subpages) uses .page-hero instead — see below.
============================================================ */
.hero {
  position: relative; overflow: hidden;
  background: #284b63;
  /* 82vh (was 90vh) — the headline now resolves to 3 lines and the stack
     rhythm below is tightened, so 90vh was reserving more height than the
     content needs and pushed .hero-actions below the fold on a 778px
     viewport (1440x900 laptop). 82vh lands the CTA row at the fold. */
  min-height: clamp(540px, 82vh, 760px);
  display: flex; align-items: center;
}

.hero-video {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  background-color: #284b63;
  pointer-events: none;
  /* Parallax oversize — must be paired with CSS below. Raised from
     120%/-10% (10% headroom/side) to 140%/-20% (20% headroom/side):
     the drift cap moved from ~15% to ~28% of hero height in site.js,
     so headroom had to grow with it — see the clamp in applyParallax. */
  height: 140%;
  top: -20%;
  will-change: transform;
}

.hero-scrim {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(100deg,
      rgba(40,75,99,0.92)  0%,
      rgba(40,75,99,0.78) 45%,
      rgba(29,58,77,0.55) 100%),
    linear-gradient(to top,
      rgba(29,58,77,0.35) 0%,
      transparent 40%);
  pointer-events: none;
}

.hero-grid {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  /* sp-12 (was sp-16) — reclaims 32px total; still generous against the
     820px-tall video frame, just no longer padding out an already-tall hero. */
  padding-block: var(--sp-12);
}

/* Container width is generous — NOT a reading measure. `ch` was
   previously applied here and resolved against the wrapper's own
   body font-size (~16-18px), producing a ~490px column that forced
   an 88px display headline onto 6 lines. The reading measure now
   lives only on .hero-tagline / .hero-body, each at their own size.
   Must stay wider than .hero-title's own 22ch measure (~968px at
   88px Playfair) or this wrapper becomes the real bottleneck again —
   62rem/992px clears that while still leaving the video visible on
   the right within the 1200px container. */
.hero-content { max-width: min(62rem, 100%); }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  background: rgba(60,110,113,0.18); border: 1px solid rgba(60,110,113,0.55);
  color: #a8d0d2; font-size: var(--text-xs); font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: var(--sp-2) var(--sp-4); border-radius: var(--radius-full);
  margin-bottom: var(--sp-5);
}
.hero-eyebrow svg { width: 14px; height: 14px; flex-shrink: 0; }

.hero-title {
  font-family: var(--font-serif);
  font-size: var(--text-hero);
  font-weight: 700; color: #fff;
  line-height: 1.05; letter-spacing: -0.03em;
  /* sp-3 (was sp-5) — tagline+body belong to the headline's group (craft-
     floor rhythm: tight groups, generous separation); the one generous
     interval in this stack is reserved for the gap before the CTA row. */
  margin-bottom: var(--sp-3);
  /* Display measure lives on the headline itself, computed at its own
     size (1ch ≈ 0.5em ≈ 44px at 88px Playfair Bold), independent of
     .hero-content's generous container. 22ch ≈ 968px comfortably fits
     the full 53-char headline in 2-3 lines at 1440px; text-wrap: balance
     picks the break points so lines read evenly instead of leaving a
     short orphan word. */
  max-width: 22ch;
  text-wrap: balance;
}
/* Emphasis via solid color + weight, not gradient-clip — gradient's dark
   end (#3c6e71 on navy) measured 1.61:1, an AA failure and an AI tell.
   Light-teal solid measures 5.54:1 on navy (passes AA), italic Playfair
   for a quiet typographic shift rather than a second color trick. */
.hero-title em {
  font-style: italic;
  font-weight: 600;
  color: var(--color-light-teal);
}

.hero-tagline {
  font-size: var(--text-lg); font-weight: 300;
  color: rgba(255,255,255,0.72);
  /* sp-2 (was sp-4) — glues to the body copy directly below; same group
     as the headline, so it stays close rather than evenly spaced. */
  margin-bottom: var(--sp-2); letter-spacing: 0.03em;
  font-style: italic; font-family: var(--font-serif);
}

.hero-body {
  font-size: var(--text-md); color: rgba(255,255,255,0.80);
  max-width: 52ch;
  /* 1.6 (was 1.75) — still generous for 18px body copy, but the previous
     value was reserving ~2.7px/line more than the measure needed at
     5 rendered lines across both paragraphs (~13px total). */
  line-height: 1.6;
  /* Both paragraphs are one body-copy group: the first sits close to the
     second (tight group), and only the LAST one earns the generous gap
     before the CTA row (the one deliberately large interval in this stack). */
  margin-bottom: var(--sp-2);
}
.hero-body:last-of-type { margin-bottom: var(--sp-8); }

.hero-actions { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; }

/* MOBILE CTA-ABOVE-FOLD FIX (2026-07-28): at 375x812 the desktop rhythm
   (48px-floor h1, sp-12 block padding, sp-8 gap before the CTA row) put
   .hero-actions' bottom edge at 916px, well past the 812px fold. None of
   the copy changes; this is purely type-scale + spacing compression for
   narrow viewports so "Boka ett samtal" is reachable without scrolling.
   Desktop (>=768px) is completely untouched — these rules only apply
   below the tablet breakpoint. */
@media (max-width: 767px) {
  .hero-grid { padding-block: var(--sp-6); }
  .hero-title {
    /* Drop the 48px desktop floor to 34px — still a confident display
       size, but resolves the 53-char headline in 3 lines instead of 4
       and stops it eating half the viewport on its own. */
    font-size: 2.125rem;
    margin-bottom: var(--sp-2);
  }
  .hero-eyebrow { margin-bottom: var(--sp-3); }
  .hero-tagline { font-size: var(--text-md); }
  .hero-body { font-size: var(--text-sm); }
  .hero-body:last-of-type { margin-bottom: var(--sp-5); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-video { display: none; }
}

/* ============================================================
   PAGE HERO BAND — compact navy gradient (subpages, no video)
============================================================ */
.page-hero {
  /* Richer diagonal blend echoing the landing scrim aesthetic.
     135deg sweep: pure navy → navy-dark → teal accent at edge.
     Radial sheen sits on top for the central glow depth.
     AA: all white text over navy-dark (≥11:1). */
  background:
    radial-gradient(ellipse 70% 55% at 65% 40%, rgba(60,110,113,0.18) 0%, transparent 65%),
    radial-gradient(ellipse 90% 60% at 30% 110%, rgba(168,208,210,0.07) 0%, transparent 70%),
    linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-dark) 55%, rgba(60,110,113,0.35) 100%);
  /* Taller hero: vertically centered flex */
  min-height: clamp(340px, 50vh, 480px);
  display: flex;
  align-items: center;
  position: relative;
}

.page-hero-inner {
  position: relative; z-index: 1;
  width: 100%;
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.back-link {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--text-sm); font-weight: 500;
  color: rgba(255,255,255,0.65);
  margin-bottom: var(--sp-8);
  transition: color var(--transition-base);
}
.back-link:hover { color: rgba(255,255,255,0.92); }
.back-link svg { width: 16px; height: 16px; flex-shrink: 0; }

.page-hero-eyebrow {
  /* Pill badge matching the landing hero eyebrow.
     #ffffff on rgba(60,110,113,0.18) over navy ≈ 11.7:1 — WCAG AAA. */
  display: inline-flex; align-items: center;
  font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: #ffffff;
  background: rgba(60,110,113,0.18);
  border: 1px solid rgba(60,110,113,0.55);
  border-radius: var(--radius-full);
  padding: var(--sp-2) var(--sp-4);
  margin-bottom: var(--sp-4);
}

.page-hero h1 {
  font-family: var(--font-serif);
  /* Larger, display-weight heading to match landing bar */
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  font-weight: 700; color: #fff;
  line-height: 1.05; letter-spacing: -0.03em;
  margin-bottom: var(--sp-5);
  /* No max-width here: unlike the landing hero's single fixed headline,
     subpage titles range from one word ("Coaching") to long lecture
     titles (~80 chars) — an explicit ch-cap would wrap the longest
     titles onto 4+ lines. balance is safe at any length. */
  text-wrap: balance;
}

.page-hero-lead {
  font-size: var(--text-md); color: rgba(255,255,255,0.80);
  max-width: 58ch; line-height: 1.75;
  margin-bottom: var(--sp-8);
}

/* ── PAGE HERO ENTRANCE ANIMATION ────────────────────────────
   Mirrors the landing hero choreography.
   .has-js hides elements; JS staggers them in on DOMContentLoaded.
   Reduced-motion block in the @media section fully overrides.
────────────────────────────────────────────────────────────── */
.has-js .page-hero-eyebrow,
.has-js .page-hero h1,
.has-js .page-hero-lead,
.has-js .page-hero .btn {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms cubic-bezier(0.22,1,0.36,1),
              transform 700ms cubic-bezier(0.22,1,0.36,1);
}
.has-js .page-hero-eyebrow.page-hero-entered,
.has-js .page-hero h1.page-hero-entered,
.has-js .page-hero-lead.page-hero-entered,
.has-js .page-hero .btn.page-hero-entered {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   OUTCOME CARD GRID (P1-B)
   Converts bare check-list into icon-card grid.
   On section--alt (sand) bg the card warm-white is still
   distinct; on white bg the 1px border + teal-light icon bg
   provide the separation.
============================================================ */
.outcome-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
  margin-top: var(--sp-8);
}
@media (min-width: 640px) {
  .outcome-grid { grid-template-columns: repeat(2, 1fr); }
}

.outcome-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-4);
  background: var(--color-warm-white);
  border: 1px solid rgba(53,53,53,0.08);
  border-radius: var(--radius-md);
  padding: var(--sp-6);
  transition: border-color 200ms ease, transform 200ms ease;
}
.outcome-item:hover {
  border-color: rgba(60,110,113,0.28);
  transform: translateY(-1px);
}

.outcome-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--color-terra-light);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
}
.outcome-icon svg {
  width: 20px; height: 20px;
  stroke: var(--color-terra-dark); fill: none; stroke-width: 2;
}

.outcome-item p {
  font-size: var(--text-base);
  color: var(--color-body);
  line-height: 1.6;
  margin: 0;
}

/* ============================================================
   AUDIENCE PILLS (P1-C — "För vem?" merged section)
   Reuses .badge base but scoped inside .for-vem-pills.
   .badge is already defined for the about section; these are
   the same component reused on subpages.
============================================================ */
.for-vem-pills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
}

/* ============================================================
   PAGE CTA INNER — two-column warm close (P1-D)
   1fr auto grid with portrait right.
   Stacks below 767px.
============================================================ */
.page-cta-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-12);
  align-items: center;
}
@media (max-width: 767px) {
  .page-cta-inner {
    grid-template-columns: 1fr;
    gap: var(--sp-8);
  }
}

.page-cta-left {
  text-align: left;
}

/* Contact details inline-flex alignment fix */
.page-cta-left .contact-details {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-top: var(--sp-8);
}

/* Portrait column */
.page-cta-portrait {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-3);
  flex-shrink: 0;
}
@media (max-width: 767px) {
  .page-cta-portrait { flex-direction: row; gap: var(--sp-4); align-items: center; }
}

.page-cta-portrait-img {
  width: 160px; height: 160px;
  border-radius: var(--radius-full);
  object-fit: cover;
  /* cover crops to circle; portrait is top-heavy so shift toward face */
  object-position: center 15%;
  border: 3px solid rgba(255,255,255,0.20);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  flex-shrink: 0;
}

.page-cta-portrait-caption {
  text-align: center;
}
@media (max-width: 767px) {
  .page-cta-portrait-caption { text-align: left; }
}
.page-cta-portrait-caption strong {
  display: block;
  font-size: var(--text-base); font-weight: 600;
  color: #ffffff;
  line-height: 1.3;
}
.page-cta-portrait-caption span {
  display: block;
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.60);
  margin-top: 2px;
}

/* ============================================================
   PROCESS STEPS (P2-B)
   Numbered sequential steps with 40px navy circle counter.
============================================================ */
.process-steps {
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  margin-top: var(--sp-8);
}

.process-step {
  display: flex;
  gap: var(--sp-5);
  align-items: flex-start;
}

.process-step-number {
  width: 40px; height: 40px; flex-shrink: 0;
  background: var(--color-navy);
  border-radius: var(--radius-full);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-serif);
  font-size: var(--text-base); font-weight: 700;
  color: #ffffff;
  line-height: 1;
}

.process-step-body {
  padding-top: 8px; /* optically align text with circle center */
}
.process-step-body p {
  font-size: var(--text-md);
  color: var(--color-body);
  line-height: 1.75;
  margin: 0;
}

/* ============================================================
   RELATED LINK UPGRADE (P2-A)
   Adds icon chip + terra arrow-right nudge on hover.
============================================================ */
.related-link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-5);
  background: var(--color-warm-white);
  border: 1px solid rgba(53,53,53,0.08);
  border-radius: var(--radius-md);
  font-size: var(--text-sm); font-weight: 500;
  color: var(--color-ink);
  transition: border-color 200ms ease, color 200ms ease, transform 200ms ease;
}
.related-link:hover {
  border-color: rgba(60,110,113,0.30);
  color: var(--color-terra-dark);
  transform: translateY(-1px);
}

.related-link-icon {
  width: 32px; height: 32px; flex-shrink: 0;
  background: var(--color-sage-light);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
}
.related-link-icon svg {
  width: 16px; height: 16px;
  stroke: var(--color-sage-dark); fill: none; stroke-width: 1.8;
}

.related-link-label {
  flex: 1;
  line-height: 1.4;
}

.related-link-arrow {
  width: 16px; height: 16px; flex-shrink: 0;
  stroke: var(--color-terra); fill: none; stroke-width: 2;
  transition: transform 200ms ease;
}
.related-link:hover .related-link-arrow {
  transform: translateX(4px);
}

/* ============================================================
   CREDIBILITY STRIP
============================================================ */
.credibility {
  background: var(--color-sand);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding-block: var(--sp-8);
}
.cred-list {
  display: flex; flex-wrap: wrap; align-items: stretch;
  gap: var(--sp-1); justify-content: center;
}
.cred-item {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-6);
  border-radius: var(--radius-md);
  flex: 1 1 200px; max-width: 260px;
}
.cred-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--color-sage-light);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
}
.cred-icon svg { width: 22px; height: 22px; stroke: var(--color-sage-dark); fill: none; stroke-width: 1.8; }
.cred-text strong { display: block; font-size: var(--text-base); font-weight: 700; color: var(--color-ink); line-height: 1.2; }
.cred-text span { font-size: var(--text-xs); color: var(--color-muted); }
/* Single-line variant (no muted sub-line): centers the strong text within
   the item's full height so it sits on the same baseline as the two-line
   items' <strong>, instead of hugging the top and looking lopsided. */
.cred-text--flush { display: flex; align-items: center; min-height: 100%; }
.cred-text--flush strong { line-height: 1.3; }

/* ============================================================
   WHO THIS IS FOR / PAINS
============================================================ */
.pains-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  margin-top: var(--sp-10);
}
@media (min-width: 640px)  { .pains-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .pains-grid { grid-template-columns: repeat(3, 1fr); } }

.pain-card {
  background: var(--color-warm-white);
  border: 1px solid rgba(53,53,53,0.08);
  border-radius: var(--radius-md);
  padding: var(--sp-8);
  transition: border-color 200ms ease, transform 200ms ease;
}
.pain-card:hover {
  border-color: rgba(60,110,113,0.30);
  transform: translateY(-2px);
}
.pain-icon {
  width: 48px; height: 48px;
  background: var(--color-terra-light);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--sp-5);
}
.pain-icon svg { width: 24px; height: 24px; stroke: var(--color-terra); fill: none; stroke-width: 1.8; }
.pain-card h3 { font-family: var(--font-serif); font-size: var(--text-lg); font-weight: 600; color: var(--color-ink); margin-bottom: var(--sp-3); }
.pain-card p  { font-size: var(--text-sm); color: var(--color-muted); line-height: 1.7; }

/* ============================================================
   SERVICES — SEGMENTED TABS
============================================================ */
.services-tabs {
  display: inline-flex;
  gap: 0.25rem;
  background: rgba(40,75,99,0.08);
  border-radius: var(--radius-full);
  padding: 0.375rem;
  margin-bottom: var(--sp-10);
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.services-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-full);
  font-size: var(--text-sm); font-weight: 600;
  letter-spacing: 0.01em;
  border: none;
  color: var(--color-muted);
  background: transparent;
  transition: background 200ms ease, color 200ms ease, box-shadow 200ms ease;
  min-height: 44px;
  white-space: nowrap;
  flex-shrink: 0;
  cursor: pointer;
}
.tab-btn:hover {
  background: rgba(40,75,99,0.13);
  color: var(--color-body);
}
/* Active tab: navy bg, white text — white on navy ≈8.9:1, passes AA */
.tab-btn.active {
  background: var(--color-sage);
  color: #fff;
  box-shadow: 0 1px 4px rgba(40,75,99,0.20);
}

@media (max-width: 480px) {
  .services-tabs {
    display: flex;
    width: 100%;
  }
  .tab-btn {
    padding: 0.75rem 1.1rem;
    font-size: 0.8125rem;
  }
}

.services-panel { display: none; }
.services-panel.active { display: grid !important; }

.service-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
}
@media (min-width: 640px)  { .service-cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .service-cards { grid-template-columns: repeat(3, 1fr); } }

/* ============================================================
   SERVICE CARD
============================================================ */
.service-card {
  background: var(--color-warm-white);
  border: 1px solid rgba(53,53,53,0.08);
  border-radius: var(--radius-md);
  padding: var(--sp-8);
  display: flex; flex-direction: column; gap: var(--sp-4);
  transition: border-color 200ms ease, transform 200ms ease;
}
.service-card:hover {
  border-color: rgba(60,110,113,0.30);
  transform: translateY(-2px);
}
.service-card-icon {
  width: 52px; height: 52px;
  background: var(--color-sage-light);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.service-card-icon svg { width: 26px; height: 26px; stroke: var(--color-sage-dark); fill: none; stroke-width: 1.6; }
.service-card h3 { font-family: var(--font-serif); font-size: var(--text-lg); font-weight: 600; color: var(--color-ink); line-height: 1.25; overflow-wrap: break-word; }
.service-card p   { font-size: var(--text-sm); color: var(--color-muted); line-height: 1.7; flex: 1; }
/* True pills — radius-full */
.service-tag {
  align-self: flex-start;
  background: var(--color-sage-light); color: var(--color-sage-dark);
  font-size: var(--text-xs); font-weight: 600;
  padding: 0.2rem 0.65rem; border-radius: var(--radius-full);
  letter-spacing: 0.06em; text-transform: uppercase;
}
/* Bottom-align the CTA regardless of blurb length — all service cards,
   every tab. p already has flex:1 (pushes tag+title+p up as a group);
   the button itself gets margin-top:auto so uneven blurb lengths across
   a row still resolve to one shared button baseline. Safe no-op on
   tabs where blurbs are already even length. */
.service-card > .btn,
.service-card > a.btn {
  margin-top: auto;
  align-self: flex-start;
}

/* ============================================================
   BOOK SECTION
============================================================ */
.book-block {
  display: grid; grid-template-columns: 1fr;
  gap: var(--sp-10); align-items: center;
}
@media (min-width: 768px) { .book-block { grid-template-columns: 280px 1fr; } }

.book-cover {
  /* Static framed image — NOT a parallax layer (operator scope:
     parallax is reserved for full-bleed backgrounds + hero video
     only; standalone framed images stay put). aspect-ratio lives on
     the frame so it keeps its exact 2:3 box size regardless of the
     img's own intrinsic ratio. */
  aspect-ratio: 536 / 804;
  width: 100%; max-width: 280px;
  border-radius: var(--radius-md);
  box-shadow: 8px 12px 40px rgba(40,75,99,0.28);
  overflow: hidden;
  margin-inline: auto;
  position: relative;
}
.book-cover img {
  /* Static — fills the frame in normal flow, no oversize/offset. */
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.book-content .section-heading { margin-bottom: var(--sp-4); }
.book-content p { font-size: var(--text-md); color: var(--color-body); line-height: 1.75; margin-bottom: var(--sp-6); }
.book-content .coming-soon {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--text-sm); color: var(--color-muted);
  background: var(--color-sage-light);
  border: 1px solid rgba(40,75,99,0.15);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-full); margin-top: var(--sp-4);
}
.book-content .coming-soon svg { width: 16px; height: 16px; stroke: var(--color-muted); fill: none; stroke-width: 2; }

/* ============================================================
   LECTURES
============================================================ */
.lectures-grid {
  display: grid; grid-template-columns: 1fr;
  gap: var(--sp-6); margin-top: var(--sp-10);
}
@media (min-width: 640px)  { .lectures-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .lectures-grid { grid-template-columns: repeat(3, 1fr); } }

.lecture-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--radius-md);
  padding: var(--sp-8);
  display: flex; flex-direction: column; gap: var(--sp-4);
  transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
}
.lecture-card:hover {
  background: rgba(255,255,255,0.11);
  border-color: rgba(255,255,255,0.16);
  transform: translateY(-2px);
}
.lecture-number {
  font-family: var(--font-serif); font-size: 3rem; font-weight: 700;
  color: rgba(255,255,255,0.30); line-height: 1;
}
.lecture-card h3 { font-family: var(--font-serif); font-size: var(--text-lg); font-weight: 600; color: #fff; line-height: 1.3; }
.lecture-card p   { font-size: var(--text-sm); color: rgba(255,255,255,0.65); line-height: 1.7; flex: 1; }
.lecture-cta { margin-top: var(--sp-4); display: flex; gap: var(--sp-3); flex-wrap: wrap; }

.lectures-footer { margin-top: var(--sp-10); text-align: center; }
.lectures-footer p { color: rgba(255,255,255,0.65); margin-bottom: var(--sp-4); }

/* ============================================================
   ABOUT
============================================================ */
.about-block {
  display: grid; grid-template-columns: 1fr;
  gap: var(--sp-12); align-items: center;
}
@media (min-width: 900px) { .about-block { grid-template-columns: 1fr 1fr; } }

.about-portrait {
  /* Static framed image — NOT a parallax layer (operator scope:
     parallax is reserved for full-bleed backgrounds + hero video
     only). aspect-ratio lives on the frame so it keeps its exact
     box size regardless of the img's own intrinsic ratio. */
  aspect-ratio: 978 / 1142;
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(53,53,53,0.08);
  position: relative;
}
.about-portrait img {
  /* Static — fills the frame in normal flow, no oversize/offset. */
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-content blockquote {
  font-family: var(--font-serif); font-size: var(--text-xl);
  color: var(--color-ink); line-height: 1.55;
  border-left: 2px solid var(--color-terra);
  padding-left: var(--sp-6); margin-bottom: var(--sp-8);
}
.about-content p { margin-bottom: var(--sp-4); font-size: var(--text-md); color: var(--color-body); line-height: 1.7; max-width: 65ch; }
.about-badges { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-top: var(--sp-6); }
.badge {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  background: var(--color-sand); color: var(--color-body);
  font-size: var(--text-xs); font-weight: 600;
  padding: var(--sp-2) var(--sp-4); border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
}
.badge svg { width: 14px; height: 14px; stroke: var(--color-sage); fill: none; stroke-width: 2; }

/* ============================================================
   CONTACT / CTA CLOSE
============================================================ */
.contact-section {
  background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-dark) 100%);
}
.contact-grid {
  display: grid; grid-template-columns: 1fr;
  gap: var(--sp-12);
}
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1fr; align-items: start; } }

.contact-intro .section-heading { color: #fff; margin-bottom: var(--sp-5); }
.contact-intro p { color: rgba(255,255,255,0.70); font-size: var(--text-md); line-height: 1.75; margin-bottom: var(--sp-8); }

.contact-details { display: flex; flex-direction: column; gap: var(--sp-4); }
.contact-item { display: flex; align-items: flex-start; gap: var(--sp-4); }
.contact-item-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: rgba(60,110,113,0.22);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
}
.contact-item-icon svg { width: 20px; height: 20px; stroke: #a8d0d2; fill: none; stroke-width: 1.8; }
.contact-item-text strong { display: block; font-size: var(--text-sm); font-weight: 600; color: rgba(255,255,255,0.92); margin-bottom: 2px; }
.contact-item-text a,
.contact-item-text span { font-size: var(--text-sm); color: rgba(255,255,255,0.60); }
.contact-item-text a:hover { color: #a8d0d2; text-decoration: underline; }

/* MOBILE TAP-TARGET FIX (2026-07-28): at 375px these anchors (email,
   phone, LinkedIn — all conversion actions) rendered at ~17px tall,
   the inline <a>'s own line-box with no room to grow. Padding on the
   anchor itself (not the wrapping li/div) gives each a real >=44px
   hit area; negative margin-inline pulls the visual text back to its
   original left edge so the row doesn't visually shift or bloat the
   footer. Desktop is untouched — inline text links stay compact there. */
@media (max-width: 767px) {
  .contact-item-text a {
    display: inline-block;
    padding-block: var(--sp-4);
    margin-block: calc(var(--sp-4) * -1);
  }
}

/* Form — elevated card on dark bg */
.contact-form {
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
  backdrop-filter: blur(8px);
  box-shadow: 0 1px 2px rgba(40,75,99,0.06), 0 8px 24px -12px rgba(40,75,99,0.12);
}
.contact-form h3 {
  font-family: var(--font-serif); font-size: var(--text-xl); color: #fff;
  margin-bottom: var(--sp-6); font-weight: 600;
}
/* Honeypot spam trap: visually hidden (not display:none, which some
   bots skip past) but removed from layout + tab order + AT tree. */
.hp-field {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.form-row { margin-bottom: var(--sp-4); }
.form-row label {
  display: block; font-size: var(--text-sm); font-weight: 500;
  color: rgba(255,255,255,0.72); margin-bottom: var(--sp-2);
}
.form-row input, .form-row textarea, .form-row select {
  width: 100%; background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-sm); color: #fff;
  font-family: var(--font-sans); font-size: var(--text-base);
  padding: 0.75rem var(--sp-4); min-height: 48px;
  transition: border-color 200ms ease, background 200ms ease;
  appearance: none;
}
.form-row input::placeholder, .form-row textarea::placeholder { color: rgba(255,255,255,0.32); }
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  outline: none; border-color: var(--color-terra);
  background: rgba(255,255,255,0.10);
}
.form-row textarea { min-height: 120px; resize: vertical; }
.form-row select option { background: var(--color-navy); color: #fff; }
.form-row select { color: rgba(255,255,255,0.70); }
.form-row select:valid { color: #fff; }
.form-submit { margin-top: var(--sp-6); }
.form-submit .btn { width: 100%; }

/* Form status */
.form-status {
  margin-top: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--radius-md);
  font-size: var(--text-sm); font-weight: 500;
  display: none;
}
.form-status[data-state="success"] {
  display: block;
  background: rgba(60,110,113,0.20);
  border: 1px solid rgba(60,110,113,0.40);
  color: #a8d0d2;
}
.form-status[data-state="error"] {
  display: block;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  color: rgba(255,200,200,0.90);
}

/* ============================================================
   FOOTER
============================================================ */
.site-footer {
  background: #0f1e2b; padding-block: var(--sp-12);
}
.footer-inner {
  display: grid; grid-template-columns: 1fr;
  gap: var(--sp-8);
}
@media (min-width: 768px)  { .footer-inner { grid-template-columns: 1fr 1fr 1fr; gap: var(--sp-6); } }
@media (min-width: 1024px) { .footer-inner { grid-template-columns: 2.4fr 3fr 1fr; } }

.footer-brand .site-logo { color: #fff; margin-bottom: var(--sp-4); }
/* rgba(255,255,255,0.60) ≈4.6:1 on #0f1e2b — passes AA */
.footer-brand p { font-size: var(--text-sm); color: rgba(255,255,255,0.60); line-height: 1.7; max-width: 32ch; }

.footer-col h4 { font-size: var(--text-sm); font-weight: 600; color: rgba(255,255,255,0.82); margin-bottom: var(--sp-4); letter-spacing: 0.05em; }
.footer-links { display: flex; flex-direction: column; gap: var(--sp-2); }
.footer-links a { font-size: var(--text-sm); color: rgba(255,255,255,0.48); transition: color var(--transition-base); }
.footer-links a:hover { color: rgba(255,255,255,0.88); }

/* MOBILE TAP-TARGET FIX (2026-07-28): footer service/quick links rendered
   at ~17px tall on phones (inline <a>, no room to grow). Same technique
   as .contact-item-text a above: padding on the anchor + matching negative
   margin keeps the visual list rhythm (the .footer-links gap) unchanged
   while giving each row a real >=44px hit area. Desktop untouched. */
@media (max-width: 767px) {
  .footer-links a {
    display: inline-block;
    padding-block: var(--sp-4);
    margin-block: calc(var(--sp-4) * -1);
  }
}

/* Two sub-columns for the 10-item Tjänster list — reuses .footer-links styling/tokens, just wraps two of them side by side.
   Single column below 480px so long service names never get squeezed into a narrow track.
   The two sub-columns must be mathematically EQUAL width (minmax(0,1fr), never content-sized) so they can't diverge
   into a ragged split — the footer's 3-column ratio above gives this column enough room (~420px at 1440) for every
   service label to sit on one line at that equal 50/50 split. */
.footer-links-split { display: grid; grid-template-columns: 1fr; gap: var(--sp-4); }
.footer-links-split .footer-links { gap: var(--sp-2); }
@media (min-width: 480px) { .footer-links-split { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-6); } }

.footer-bottom {
  margin-top: var(--sp-10); padding-top: var(--sp-6);
  border-top: 1px solid rgba(255,255,255,0.07);
  display: flex; flex-wrap: wrap; gap: var(--sp-4);
  justify-content: space-between; align-items: center;
}
.footer-bottom p   { font-size: var(--text-xs); color: rgba(255,255,255,0.32); }
.footer-bottom a   { color: rgba(255,255,255,0.48); }
.footer-bottom a:hover { color: rgba(255,255,255,0.75); }

/* MOBILE TAP-TARGET FIX (2026-07-28): same inline-anchor issue as the
   .footer-links / .contact-item-text fixes above — the copyright-line
   email/phone are conversion actions and rendered under 44px tall. */
@media (max-width: 767px) {
  .footer-bottom a {
    display: inline-block;
    padding-block: var(--sp-4);
    margin-block: calc(var(--sp-4) * -1);
  }
}

.social-links { display: flex; gap: var(--sp-3); }
.social-link {
  width: 40px; height: 40px; border-radius: var(--radius-full);
  background: rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition-base);
}
.social-link:hover { background: rgba(255,255,255,0.22); }
.social-link svg { width: 18px; height: 18px; stroke: rgba(255,255,255,0.62); fill: none; stroke-width: 1.8; }

/* ============================================================
   SUBPAGE CONTENT SECTIONS
   Reusable patterns for body sections on service/lecture pages.
============================================================ */

/* Checklist / outcomes list */
.check-list {
  display: flex; flex-direction: column; gap: var(--sp-3);
  margin-top: var(--sp-4);
}
.check-list li {
  display: flex; align-items: flex-start; gap: var(--sp-3);
  font-size: var(--text-base); color: var(--color-body); line-height: 1.6;
}
.check-list li::before {
  content: '';
  display: block; flex-shrink: 0;
  width: 20px; height: 20px; margin-top: 2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233c6e71' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

/* Related services grid
   auto-fit (not auto-fill) collapses empty tracks so 2/3/4-item
   grids always stretch to fill the row instead of pinning at the
   min-width with dead space on the right. min raised to 240px so
   longer labels ("Stöd i konflikthantering") stay on one line. */
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-8);
}

/* ============================================================
   SCROLL REVEAL — progressive enhancement
   Hidden start state only applied when JS has run (.has-js).
   No-JS users see content at its natural position.
============================================================ */
.has-js .hero-eyebrow,
.has-js .hero-title,
.has-js .hero-tagline,
.has-js .hero-body,
.has-js .hero-actions {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms cubic-bezier(0.22,1,0.36,1),
              transform 700ms cubic-bezier(0.22,1,0.36,1);
}
.has-js .hero-eyebrow.hero-entered,
.has-js .hero-title.hero-entered,
.has-js .hero-tagline.hero-entered,
.has-js .hero-body.hero-entered,
.has-js .hero-actions.hero-entered {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll reveal base hidden state */
.has-js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms cubic-bezier(0.22,1,0.36,1),
              transform 700ms cubic-bezier(0.22,1,0.36,1);
}
.has-js .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger container */
.has-js .reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms cubic-bezier(0.22,1,0.36,1),
              transform 700ms cubic-bezier(0.22,1,0.36,1);
}
.has-js .reveal-stagger.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   THEORY GRID (pedagogik.html — "Exempel på teorier och modeller")
   Added 2026-07-25. Hairline-row card list, denser than
   .outcome-grid (12 short entries vs 2-4 longer outcome bullets).
   Reuses existing tokens/icon-badge treatment; no new colors.
============================================================ */
.theory-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  margin-top: var(--sp-8);
  list-style: none;
  padding: 0;
}
@media (min-width: 640px) {
  .theory-grid { grid-template-columns: repeat(2, 1fr); }
}

.theory-item {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  background: var(--color-warm-white);
  border: 1px solid rgba(53,53,53,0.08);
  border-radius: var(--radius-md);
  padding: var(--sp-5) var(--sp-6);
  transition: border-color 200ms ease, transform 200ms ease;
}
.theory-item:hover {
  border-color: rgba(60,110,113,0.28);
  transform: translateY(-1px);
}

.theory-item-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  background: var(--color-terra-light);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
}
.theory-item-icon svg {
  width: 18px; height: 18px;
  stroke: var(--color-terra-dark); fill: none; stroke-width: 2;
}

.theory-item p {
  font-size: var(--text-base);
  color: var(--color-body);
  line-height: 1.5;
  margin: 0;
}

/* ============================================================
   LECTURES 4-UP GRID BALANCE (added 2026-07-25, kept unchanged)
   .lectures-grid still holds 4 content-rich cards while its
   3-col base would orphan a 3+1 row at 1024px. Untouched by the
   "För ledare" change below — operator has not asked for the
   lectures grid to become a 4-col row.
   Selector strategy: `:has()` counts children so this self-adjusts
   if a 5th card is ever added/removed (5+ falls back to the
   default 3-col flow rather than forcing 2×2).
───────────────────────────────────────────────────────────── */
@media (min-width: 1024px) {
  .lectures-grid:has(> .lecture-card:nth-child(4):last-child) {
    grid-template-columns: repeat(2, 1fr);
    max-width: 860px;
    margin-inline: auto;
  }
}

/* ============================================================
   "FÖR LEDARE" 4-UP ROW (updated 2026-07-25 — operator override)
   Operator decision: the 4-card "För ledare" tab must render as
   ONE ROW of 4 at desktop, matching how "För team"/"För individen"
   render their 3 cards in a single row — not a 2×2 block. This
   supersedes the earlier :has()-driven 2×2 rule for this grid only
   (.lectures-grid above keeps its 2×2; operator hasn't asked to
   change that yet).

   Math (measured @1440, Atlas): .container = 1200px, grid gap =
   20px (--sp-5). Released to the full container, 4 columns give
   ~285px/card (vs 386px on the 3-card tabs) — noticeably tighter,
   so the card internals get dedicated tightening below rather than
   just changing the column count:
     - padding 32px → 24px at this breakpoint only (3-card tabs keep
       the roomier --sp-8/32px default; scoped via #panel-ledare).
     - h3 sized down a touch + tighter leading so the longest titles
       ("Ledningsgruppsutveckling") don't wrap ragged at 285px.
     - .service-tag given a hard white-space:nowrap safeguard (pills
       already fit at this width from a scan of the 4 tags, but this
       guards future copy from wrapping a pill in half).

   Card-internal equalisation (.service-card flex-column + p:flex:1
   + button margin-top:auto, defined above at the base .service-card
   rule) already bottom-aligns all "Läs mer" buttons regardless of
   blurb length — that fix is global, so it applies here too and to
   every other tab, which is an improvement everywhere, not just this
   grid.

   BREAKPOINT LADDER for this tab specifically: 1 col mobile (base
   rule) → 2 col tablet from 640px (base rule) → 4 col desktop from
   1100px (NOT 1024px — at exactly 1024px this card's content, incl.
   Ledningsgruppsutveckling's longer blurb, is still cramped even
   with the reduced padding; 1100px is where 285px+ of usable card
   width first lands comfortably). 640–1099px stays the existing
   2-col base rule (2+2, no orphan row at any width in that range
   since n=4).
───────────────────────────────────────────────────────────── */
@media (min-width: 1100px) {
  #panel-ledare .service-cards {
    /* minmax(0,1fr), NOT plain 1fr: plain 1fr = minmax(auto,1fr), and the
       auto minimum lets a column's content (here, the unbreakable compound
       "Ledningsgruppsutveckling") set that column's floor width, stealing
       space from the other 3 equal-fr columns. minmax(0,1fr) removes the
       content-based floor so all 4 columns divide the row identically. */
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: none;
    margin-inline: 0;
  }
  #panel-ledare .service-card {
    padding: var(--sp-6);
  }
  #panel-ledare .service-card h3 {
    font-size: 1.15rem;
    line-height: 1.2;
    /* Column floor is now free to shrink below this heading's min-content
       width, so the longest title ("Ledningsgruppsutveckling") must be able
       to wrap. hyphens:auto (page is lang="sv") breaks Swedish compounds at
       real syllable boundaries; overflow-wrap is the fallback for anything
       hyphens can't reach. Scoped to this tab only — the 3-card tabs' wider
       386px cards never hit this floor, so their titles never hyphenate. */
    hyphens: auto;
  }
  #panel-ledare .service-tag {
    white-space: nowrap;
    overflow-wrap: break-word;
  }
}

/* ============================================================
   CURATED PHOTOGRAPHY (added 2026-07-26; reverted to static
   2026-07-26 — operator scope: parallax is reserved for full-bleed
   section backgrounds + the hero video. These three images sit
   beside text in a column (content-split), so they are standalone/
   framed, not full-bleed, and stay static. Renamed from
   .parallax-frame to .media-frame — the old name implied motion
   this class no longer has.)
============================================================ */

/* Shared frame primitive: rounded panel, hairline border on light
   sections, overflow-hidden so the img's object-fit crop never
   escapes the frame's rounded corners. */
.media-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(53,53,53,0.08);
  box-shadow: var(--shadow-sm);
}
.media-frame img {
  /* Static — fills the frame in normal flow (frame owns aspect-ratio
     via .content-split-media / .portrait-inset), no oversize/offset. */
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Pattern A — "content-split": two-column content+image block,
   image opposite real copy (not centered/dropped between
   paragraphs). Used where a section already has body prose. */
.content-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-10);
  align-items: center;
  margin-top: var(--sp-10);
}
@media (min-width: 900px) {
  .content-split {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-16);
  }
  .content-split--reverse { direction: rtl; }
  .content-split--reverse > * { direction: ltr; }
}
.content-split-media { aspect-ratio: var(--split-ratio, 16 / 10); }
.content-split-body p { margin-bottom: var(--sp-4); }
.content-split-body p:last-child { margin-bottom: 0; }

/* Pattern B — "band-bleed": full-bleed photo band between
   sections, bleeds edge-to-edge of the viewport (not the
   container), with an optional navy scrim + caption for AA text
   legibility when a line of copy sits on the image. */
.photo-band {
  position: relative;
  width: 100%;
  overflow: hidden;
}
/* Oversize the image inside the clipped frame (same technique as .hero-video):
   150% height + centered via top:-25% gives ±25% of the frame's height as
   scroll-parallax travel headroom (raised from 130%/-15% — the old ~63px
   headroom at a 420px band wasn't enough for the ±50-60px travel target),
   so translate3d in site.js never exposes a blank edge at any viewport or
   band height (bands range 260-440px across the site — site.js's runtime
   clamp re-derives the true headroom per-band and enforces it too).
   object-fit:cover still governs the crop; the oversize only affects how
   much vertical room there is to drift within, not the visible composition
   at rest (transform:none === identical crop to a non-oversized image). */
.photo-band img {
  position: absolute;
  top: -25%;
  left: 0;
  width: 100%;
  height: 150%;
  object-fit: cover;
  display: block;
  will-change: transform;
}
.photo-band-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(29,58,77,0) 40%, rgba(29,58,77,0.82) 100%);
  display: flex; align-items: flex-end;
  padding: var(--sp-8) var(--sp-6);
}
.photo-band-caption {
  color: #ffffff;
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-weight: 600;
  max-width: 46ch;
  line-height: 1.4;
}

/* Pattern C — "portrait-inset": tall portrait image bleeding to
   one edge of its column, paired with prose (pedagogik "Grunden"
   treatment for bocker-teori.webp). */
.portrait-inset {
  aspect-ratio: 733 / 1100;
  max-width: 380px;
}
@media (min-width: 900px) { .portrait-inset { max-width: none; } }

/* ============================================================
   ICF PCC CREDENTIAL BADGE (added 2026-07-26)
   Official ICF mark — never recolored/cropped/rotated. Modest
   size, generous breathing room; reads as a seal, not a brand
   element. On navy it needs a light plate (transparency + navy
   background would otherwise wash it out).
============================================================ */
.icf-badge {
  display: block;
  height: auto;
}

/* Inline credential row: badge + text, used in About + credibility
   strip + coaching page intro. */
.icf-credential {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
}
.icf-credential .icf-badge {
  width: 56px; height: 56px;
  flex-shrink: 0;
}

/* Small footprint variant for the recurring CTA-band portrait
   caption (all 15 subpages) — sits on a light plate so it still
   reads against the navy gradient. Plate is 56px so the seal
   itself renders ~48px — legible, not a coloured smudge. */
.icf-badge-plate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  flex-shrink: 0;
  background: #ffffff;
  border-radius: var(--radius-sm);
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.icf-badge-plate img {
  width: 100%; height: 100%;
  object-fit: contain;
}

/* Credibility-strip variant: replaces the generic circle-icon
   with the real seal. Overrides the generic 44px .cred-icon slot
   so the badge renders at ~56px — the mark needs the extra size
   to actually read as a credential, not a colour blob. */
.cred-icon.cred-icon--badge {
  width: 56px; height: 56px;
  background: #ffffff;
  border: 1px solid var(--color-border);
  padding: 4px;
}
.cred-icon.cred-icon--badge img {
  width: 100%; height: 100%;
  object-fit: contain;
}

/* Mobile-only type floor for the smallest pill/tag text (measured
   12px at 375px — .service-tag, .about-badges .badge, credibility
   sub-text). Placed here, after all three base rules (.service-tag
   ~L1051, .badge ~L1182, .cred-text span ~L920), so this override
   wins the cascade at equal specificity regardless of media-query
   position earlier in the file. Desktop (--text-xs / 0.75rem) is
   untouched outside this query. */
@media (max-width: 767px) {
  .service-tag,
  .badge,
  .cred-text span {
    font-size: 0.8125rem;
  }
}

/* ── REDUCED MOTION — disable everything ────────────────────
   All motion off; content fully visible at rest.
   !important overrides all transitions/animations in this file.
───────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  /* Ensure landing hero elements always visible */
  .hero-eyebrow, .hero-title, .hero-tagline, .hero-body, .hero-actions,
  .has-js .hero-eyebrow, .has-js .hero-title, .has-js .hero-tagline,
  .has-js .hero-body, .has-js .hero-actions {
    opacity: 1 !important;
    transform: none !important;
  }
  /* Ensure page-hero entrance elements always visible (subpages) */
  .page-hero-eyebrow, .page-hero h1, .page-hero-lead, .page-hero .btn,
  .has-js .page-hero-eyebrow, .has-js .page-hero h1,
  .has-js .page-hero-lead, .has-js .page-hero .btn {
    opacity: 1 !important;
    transform: none !important;
  }
  /* Ensure all reveals visible */
  .reveal, .reveal-stagger > *,
  .has-js .reveal, .has-js .reveal-stagger > * {
    opacity: 1 !important;
    transform: none !important;
  }
  /* Reset parallax layers */
  .hero-video {
    transform: none !important;
    height: 100%;
    top: 0;
    will-change: auto;
  }
  /* .about-portrait img / .book-cover img / .media-frame img are already
     fully static (no transform, no will-change) — nothing to reset here.
     Only .photo-band img still parallaxes and needs its transform reset. */
  .photo-band img {
    transform: none !important;
    will-change: auto;
  }
  /* Auto-hide header disabled entirely under reduced motion: no
     slide-away, header simply stays put (sticky, always visible). */
  .site-header {
    transition: box-shadow var(--transition-base) !important;
  }
  .site-header--hidden {
    transform: none !important;
  }
}
