/* ==========================================================================
   Roles That Scale — styles.css
   1. Design tokens (edit brand colors, fonts, spacing here)
   2. Font
   3. Base & reset
   4. Layout helpers
   5. Components (buttons, links, icons)
   6. Sections (in page order)
   7. Legal / text pages
   8. Responsive overrides
   ========================================================================== */

/* 1. Design tokens ------------------------------------------------------- */
:root {
  /* Brand palette */
  --color-navy: #14284b;        /* primary text, dark sections */
  --color-bone: #f2ede4;        /* page background */
  --color-bone-deep: #e8e1d5;   /* alternate light section */
  --color-denim: #2f4a63;       /* secondary dark, icons */
  --color-chalk: #c9d5df;       /* light blue bands, text on navy */
  --color-gold: #e0a526;        /* accent: buttons, highlights */
  --color-gold-hover: #cc951d;

  /* Text */
  --color-text: var(--color-navy);
  --color-text-muted: #3b4658;
  --color-text-on-dark: var(--color-bone);
  --color-text-on-dark-muted: var(--color-chalk);
  --color-text-on-denim: #e3e8ee;

  /* Lines */
  --color-line-light: #d6cec0;
  --color-line-chalk: #8fa2b5;
  --color-line-navy: var(--color-denim);
  --color-line-denim: #4a6680;

  /* Typography */
  --font-sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --fw-regular: 400;
  --fw-medium: 500;
  --fw-bold: 700;
  --fw-heavy: 800;

  /* Fluid type scale (min, preferred, max) */
  --fs-hero: clamp(2.5rem, 1.6rem + 3.6vw, 4.25rem);     /* 40 → 68px */
  --fs-display: clamp(2.25rem, 1.4rem + 3.4vw, 4.5rem);  /* closing title */
  --fs-h2: clamp(2rem, 1.3rem + 2.8vw, 4rem);            /* big section titles */
  --fs-h2-md: clamp(1.875rem, 1.3rem + 2.2vw, 3.375rem); /* 30 → 54px */
  --fs-h2-sm: clamp(1.75rem, 1.3rem + 1.6vw, 2.75rem);   /* 28 → 44px */
  --fs-h3: clamp(1.25rem, 1.1rem + 0.6vw, 1.625rem);     /* 20 → 26px */
  --fs-lead: clamp(1.25rem, 1.05rem + 0.8vw, 1.75rem);   /* 20 → 28px */
  --fs-body-lg: clamp(1.125rem, 1.05rem + 0.3vw, 1.3125rem);
  --fs-body: 1.125rem;   /* 18px */
  --fs-small: 0.9375rem; /* 15px */
  --fs-xs: 0.875rem;     /* 14px */

  /* Spacing */
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4rem;
  --section-pad: clamp(4rem, 2.5rem + 6vw, 7.5rem);      /* 64 → 120px */
  --gutter: clamp(1.25rem, 0.5rem + 3vw, 2.5rem);        /* 20 → 40px */
  --container: 80rem;                                     /* 1280px */

  /* Shape */
  --radius: 2px;
  --focus-ring: 3px solid var(--color-gold);
}

/* 2. Font (self-hosted, no third-party requests) ------------------------- */
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("../assets/fonts/schibsted-grotesk-latin-var.woff2") format("woff2");
}

/* 3. Base & reset -------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bone);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol { margin: 0; }
img, svg { display: block; max-width: 100%; }
ul, ol { padding: 0; list-style: none; }

a { color: var(--color-navy); text-underline-offset: 0.18em; }
a:hover { color: var(--color-denim); }

:focus-visible { outline: var(--focus-ring); outline-offset: 3px; }

[id] { scroll-margin-top: 1.5rem; }

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

.skip-link {
  position: absolute;
  left: var(--space-3);
  top: -100px;
  z-index: 100;
  padding: var(--space-2) var(--space-3);
  background: var(--color-navy);
  color: var(--color-bone);
  font-weight: var(--fw-bold);
}
.skip-link:focus { top: var(--space-3); color: var(--color-bone); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* 4. Layout helpers ------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-pad); }
.section--navy  { background: var(--color-navy); color: var(--color-text-on-dark); }
.section--chalk { background: var(--color-chalk); }
.section--bone-deep { background: var(--color-bone-deep); }

.section-title {
  font-size: var(--fs-h2-md);
  font-weight: var(--fw-heavy);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 820px;
  text-wrap: balance;
}

.stack-lg { display: flex; flex-direction: column; gap: clamp(2rem, 1rem + 3vw, 3.5rem); }

/* 5. Components ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 1.0625rem 1.75rem;
  border-radius: var(--radius);
  background: var(--color-gold);
  color: var(--color-navy);
  font-size: 1.0625rem;
  font-weight: var(--fw-bold);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.btn:hover { background: var(--color-gold-hover); color: var(--color-navy); }
.btn--sm { padding: 0.8125rem 1.375rem; font-size: 1rem; }
.section--navy .btn:focus-visible { outline-color: var(--color-bone); }

.icon { flex: none; width: 1.375rem; height: 1.375rem; margin-top: 0.25rem; }
.icon--lg { width: 1.625rem; height: 1.625rem; margin-top: 0; }

/* 6. Sections ------------------------------------------------------------ */

/* Header */
.site-header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  padding-block: 1.625rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--color-navy);
  text-decoration: none;
}
.brand__mark { width: 34px; height: 32px; }
.brand__name { font-size: 1.3125rem; font-weight: var(--fw-heavy); letter-spacing: -0.02em; }
.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav__link { font-size: 1rem; font-weight: var(--fw-medium); text-decoration: none; }
.site-nav__link:hover { text-decoration: underline; }

/* Hero */
.hero { padding-block: clamp(3.5rem, 2rem + 5vw, 6rem) clamp(2.5rem, 2rem + 2vw, 4.5rem); }
.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
  text-align: center;
}
.hero__title {
  max-width: 1000px;
  font-size: var(--fs-hero);
  font-weight: var(--fw-heavy);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.hero__lead {
  max-width: 760px;
  font-size: var(--fs-lead);
  line-height: 1.4;
  color: var(--color-text-muted);
  text-wrap: balance;
}
.hero .btn { margin-top: var(--space-2); }
.hero__micro { margin-top: calc(var(--space-2) * -1); font-size: var(--fs-small); color: var(--color-text-muted); }

/* Problem */
.problem { margin-top: clamp(1.5rem, 1rem + 2vw, 3.5rem); }
.problem__title {
  max-width: 1000px;
  font-size: var(--fs-h2);
  font-weight: var(--fw-heavy);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.problem__highlight { color: var(--color-chalk); }
.problem__list > li {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-5);
  padding-block: 1.75rem;
  border-top: 1px solid var(--color-line-navy);
}
.problem__list > li:last-child { border-bottom: 1px solid var(--color-line-navy); }
.problem__list h3 { font-size: var(--fs-h3); font-weight: var(--fw-bold); line-height: 1.25; }
.problem__list p { color: var(--color-text-on-dark-muted); }

/* Statement band */
.statement { margin-top: var(--section-pad); padding-block: clamp(3.5rem, 2rem + 5vw, 6.5rem); }
.statement__text {
  max-width: 980px;
  margin-inline: auto;
  font-size: var(--fs-h2);
  font-weight: var(--fw-heavy);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-align: center;
  text-wrap: balance;
}

/* Cards (Done + How we work together) */
.card-grid { display: grid; gap: var(--space-6) var(--space-7); }
.card-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.card-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6); }
.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-4);
  border-top: 2px solid var(--color-navy);
}
.card h3 { font-size: var(--fs-h3); font-weight: var(--fw-bold); line-height: 1.2; }
.card p { color: var(--color-text-muted); }
.card__num { font-size: var(--fs-small); font-weight: var(--fw-heavy); letter-spacing: 0.1em; color: var(--color-denim); }

/* Fit (not for / is for) */
.fit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3.5rem; align-items: stretch; }
.fit__col { display: flex; flex-direction: column; padding: var(--space-6) var(--space-1) var(--space-4) 0; }
.fit__col--yes {
  padding: var(--space-6) var(--space-6) var(--space-4);
  background: var(--color-denim);
  color: var(--color-text-on-dark);
}
.fit__title {
  margin-bottom: var(--space-4);
  font-size: var(--fs-h2-sm);
  font-weight: var(--fw-heavy);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.fit__not { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.fit__is { color: var(--color-gold); }
.fit__list > li { display: flex; gap: var(--space-3); padding-block: var(--space-4); border-top: 1px solid var(--color-line-chalk); }
.fit__col--yes .fit__list > li { border-top-color: var(--color-line-denim); }
.fit__list p { color: var(--color-text-muted); }
.fit__col--yes .fit__list p { color: var(--color-text-on-denim); }
.fit__list strong { font-weight: var(--fw-bold); }

/* About */
.about__inner { max-width: 760px; display: flex; flex-direction: column; gap: 1.375rem; }
.about__inner.has-photo {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 4.5rem;
  align-items: center;
}
.about__photo { width: 100%; max-width: 440px; height: auto; aspect-ratio: 3 / 4; object-fit: cover; }
.about__text { display: flex; flex-direction: column; gap: 1.375rem; }
.about__title { font-size: clamp(1.75rem, 1.4rem + 1vw, 2.125rem); font-weight: var(--fw-heavy); letter-spacing: -0.02em; line-height: 1.1; }
.about__text p { font-size: var(--fs-body-lg); }
.about__sig { padding-top: var(--space-1); font-weight: var(--fw-bold); }
.about__link { font-weight: var(--fw-bold); font-size: 1.0625rem; }

/* Closing CTA */
.cta__inner { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-5); }
.cta__title {
  max-width: 980px;
  font-size: var(--fs-display);
  font-weight: var(--fw-heavy);
  line-height: 1;
  letter-spacing: -0.035em;
  text-wrap: balance;
}
.cta__text { max-width: 640px; font-size: 1.25rem; line-height: 1.55; color: var(--color-text-on-dark-muted); }
.cta__email { font-size: 1rem; color: var(--color-text-on-dark-muted); }
.cta__email a { color: var(--color-bone); font-weight: var(--fw-bold); }
.cta__email a:hover { color: var(--color-chalk); }

/* Footer */
.site-footer { font-size: var(--fs-small); color: var(--color-text-muted); }
.site-footer__top,
.site-footer__bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); }
.site-footer__top { padding-block: var(--space-5); }
.site-footer__bottom { padding-block: 1.25rem var(--space-5); border-top: 1px solid var(--color-line-light); font-size: var(--fs-xs); }
.site-footer__brand { font-weight: var(--fw-heavy); color: var(--color-navy); }
.site-footer a { color: var(--color-text-muted); }
.site-footer a:hover { color: var(--color-navy); }
.site-footer__links { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-4); }

/* 7. Legal / text pages -------------------------------------------------- */
.prose { max-width: 720px; padding-block: clamp(2.5rem, 2rem + 3vw, 5rem) var(--section-pad); }
.prose h1 { font-size: clamp(2.25rem, 1.6rem + 2.4vw, 3.5rem); font-weight: var(--fw-heavy); line-height: 1.05; letter-spacing: -0.03em; margin-bottom: var(--space-3); }
.prose h2 { font-size: 1.5rem; font-weight: var(--fw-bold); line-height: 1.25; margin: var(--space-6) 0 var(--space-2); }
.prose p, .prose ul { margin-bottom: var(--space-3); color: var(--color-text-muted); }
.prose ul { list-style: disc; padding-left: 1.25rem; }
.prose li { margin-bottom: var(--space-1); }
.prose__meta { font-size: var(--fs-small); }

/* 8. Responsive overrides ------------------------------------------------ */

/* Tablet */
@media (max-width: 960px) {
  .card-grid--3 { grid-template-columns: 1fr; gap: var(--space-5); }
  .fit { grid-template-columns: 1fr; gap: var(--space-5); }
  .fit__col { padding: 0; }
  .fit__col--yes { padding: var(--space-5) var(--space-4) var(--space-2); }
  .about__inner.has-photo { grid-template-columns: 1fr; gap: var(--space-5); }
}

/* Phone */
@media (max-width: 640px) {
  .site-nav__link { display: none; }           /* keep the Book button visible */
  .brand__name { font-size: 1.125rem; }
  .brand__mark { width: 28px; height: 26px; }
  .site-header__inner { padding-block: 1.125rem; gap: var(--space-2); }
  .btn--sm { padding: 0.625rem 0.875rem; font-size: 0.9375rem; }
  .problem__list > li { grid-template-columns: 1fr; gap: var(--space-1); padding-block: var(--space-4); }
  .card-grid--2 { grid-template-columns: 1fr; gap: var(--space-5); }
  .btn { width: 100%; }
  .site-header .btn { width: auto; }
  .site-footer__top, .site-footer__bottom { flex-direction: column; }
}

@media (max-width: 380px) {
  .btn--sm .btn__long { display: none; }       /* "Book a call" on very small screens */
}
