/* ==========================================================================
   Solvern Consulting — shared stylesheet
   Brand tokens live in :root below. Change colours/type here, site-wide.
   ========================================================================== */

@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/HankenGrotesk-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/HankenGrotesk-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand colours */
  --green: #1EA672;
  --pine: #0F3D2E;
  --ink: #101614;
  --mint: #7FD8B1;
  --seafoam: #EAF7F0;
  --slate: #5A6B63;
  --amber: #F5A623;

  --white: #FFFFFF;

  /* Typography */
  --font-heading: "Hanken Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4rem;
  --space-9: 6rem;
  --space-10: 8rem;

  /* Layout */
  --container-max: 80rem;
  --radius-sm: 0.5rem;
  --radius-md: 1rem;
  --radius-lg: 1.5rem;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(16, 22, 20, 0.06), 0 1px 1px rgba(16, 22, 20, 0.04);
  --shadow-md: 0 8px 24px rgba(16, 22, 20, 0.08);

  color-scheme: light;
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
svg { max-width: 100%; }

a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 var(--space-4);
  color: var(--ink);
}

h1 { font-size: clamp(2.25rem, 4vw + 1rem, 3.75rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.75rem, 2.5vw + 1rem, 2.5rem); }
h3 { font-size: clamp(1.25rem, 1.2vw + 1rem, 1.5rem); font-weight: 600; }

p { margin: 0 0 var(--space-4); }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: clamp(1.125rem, 0.5vw + 1rem, 1.375rem);
  color: var(--slate);
  max-width: 44rem;
}

/* Kicker labels */
.kicker {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--green);
  margin: 0 0 var(--space-3);
}
.kicker--on-dark { color: var(--mint); }
.kicker--slate { color: var(--slate); }

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -3rem;
  background: var(--ink);
  color: var(--white);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: var(--space-4);
}

/* ---- Focus states ---- */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ---- Layout helpers ---- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-5);
}
@media (min-width: 48rem) {
  .container { padding-inline: var(--space-7); }
}

.section {
  padding-block: var(--space-9);
}
.section--tight { padding-block: var(--space-7); }
.section--pine {
  background: var(--pine);
  color: var(--white);
}
.section--pine h1,
.section--pine h2,
.section--pine h3 { color: var(--white); }
.section--pine p { color: rgba(255,255,255,0.82); }
.section--seafoam { background: var(--seafoam); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ---- Header / nav ---- */
.site-header {
  border-bottom: 1px solid rgba(16,22,20,0.08);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
}
.wordmark-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.wordmark-link img { height: 2.5rem; width: auto; }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  background: transparent;
  border: 1px solid rgba(16,22,20,0.15);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle__icon,
.nav-toggle__icon::before,
.nav-toggle__icon::after {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle__icon::before,
.nav-toggle__icon::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle__icon::before { top: -6px; }
.nav-toggle__icon::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__icon::after { top: 0; transform: rotate(-45deg); }

.main-nav {
  display: none;
}
.main-nav.is-open {
  display: block;
  position: absolute;
  left: 0; right: 0; top: 100%;
  background: var(--white);
  border-bottom: 1px solid rgba(16,22,20,0.08);
  box-shadow: var(--shadow-md);
}
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: var(--space-3) var(--space-5) var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.main-nav a:not(.btn) {
  display: block;
  padding: var(--space-3) var(--space-2);
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius-sm);
}
.main-nav a:not(.btn):hover,
.main-nav a:not(.btn)[aria-current="page"] {
  color: var(--green);
}
.main-nav .btn { margin-top: var(--space-2); }

@media (min-width: 60rem) {
  .nav-toggle { display: none; }
  .main-nav {
    display: block;
    position: static;
    border: none;
    box-shadow: none;
  }
  .main-nav ul {
    flex-direction: row;
    align-items: center;
    padding: 0;
    gap: var(--space-6);
  }
  .main-nav a:not(.btn) { padding: var(--space-2) 0; }
  .main-nav .btn { margin-top: 0; }
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-full);
  border: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--green);
  color: var(--white);
}
.btn--primary:hover { background: #189060; }

.btn--secondary {
  background: transparent;
  color: var(--ink);
  border-color: rgba(16,22,20,0.2);
}
.btn--secondary:hover { border-color: var(--ink); }

.section--pine .btn--secondary,
.hero--pine .btn--secondary {
  color: var(--white);
  border-color: rgba(255,255,255,0.35);
}
.section--pine .btn--secondary:hover,
.hero--pine .btn--secondary:hover { border-color: var(--white); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  align-items: center;
}

/* ---- Hero ---- */
.hero {
  padding-block: var(--space-9) var(--space-8);
}
.hero__inner {
  max-width: var(--container-max);
}
.hero .cursor {
  color: var(--green);
  display: inline-block;
  animation: blink 1.4s step-end infinite;
}
@media (prefers-reduced-motion: reduce) {
  .hero .cursor { animation: none; }
}
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Pine hero (home) */
.hero--pine {
  position: relative;
  overflow: hidden;
  background-color: var(--pine);
  background-image:
    radial-gradient(115% 85% at 12% -10%, rgba(127, 216, 177, 0.10), transparent 55%),
    radial-gradient(90% 80% at 108% 115%, rgba(30, 166, 114, 0.16), transparent 60%);
  color: var(--white);
  display: grid;
  align-items: center;
  min-height: min(82vh, 760px);
  padding-block: var(--space-9);
}
.hero--pine .hero__inner { position: relative; z-index: 1; }
.hero--pine .direct-answer { color: rgba(255, 255, 255, 0.82); max-width: 50rem; font-size: clamp(1.2rem, 0.5vw + 1.05rem, 1.5rem); }

.hero__title {
  color: var(--white);
  font-size: clamp(1.75rem, 2vw + 1rem, 2.75rem);
  margin-top: var(--space-3);
  margin-bottom: var(--space-5);
  max-width: 24ch;
}

/* Animated wordmark */
.hero-wordmark {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(3.5rem, 13vw, 8rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--white);
  margin: 0 0 var(--space-4);
  white-space: nowrap;
}
.hero-wordmark__cursor {
  color: var(--mint);
  margin-left: 0.04em;
  animation: blink 1.15s steps(1) infinite;
}
/* Solid (non-blinking) cursor while actively typing */
.hero-wordmark.is-typing .hero-wordmark__cursor { animation: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .hero-wordmark__cursor { animation: none; }
}

/* JS-gated states: hide the wordmark text until JS drives it (prevents flash) */
.js .hero-wordmark__text { opacity: 0; }
.js .hero-wordmark.is-typing .hero-wordmark__text,
.js .hero-wordmark.is-done .hero-wordmark__text { opacity: 1; }

/* JS-gated reveal for the copy below the wordmark */
.js .hero__reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--reveal-delay, 0ms);
}
.js .hero.is-typed .hero__reveal {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js .hero__reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- Cards / value props ---- */
.grid {
  display: grid;
  gap: var(--space-6);
}
.grid--3 { grid-template-columns: 1fr; }
.grid--2 { grid-template-columns: 1fr; }
@media (min-width: 48rem) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
}

.card {
  background: var(--white);
  border: 1px solid rgba(16,22,20,0.08);
  border-radius: var(--radius-md);
  padding: var(--space-6);
}
.card--seafoam {
  background: var(--seafoam);
  border-color: transparent;
}
.card h3 { margin-bottom: var(--space-3); }
.card p { color: var(--slate); }

.card-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-sm);
  background: var(--pine);
  color: var(--mint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
  font-family: var(--font-heading);
  font-weight: 700;
}

/* ---- CTA band ---- */
.cta-band {
  background: var(--pine);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6);
  text-align: center;
}
.cta-band h2 { color: var(--white); }
.cta-band p { color: rgba(255,255,255,0.82); }
.cta-band .cta-row { justify-content: center; }

/* ---- Typical engagement line ---- */
.engagement {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(16,22,20,0.1);
  font-size: 0.9375rem;
  color: var(--slate);
}
.engagement strong { color: var(--ink); }

/* ---- Service block ---- */
.service-block {
  padding-block: var(--space-7);
  border-bottom: 1px solid rgba(16,22,20,0.08);
}
.service-block:last-of-type { border-bottom: none; }
.service-block__grid {
  display: grid;
  gap: var(--space-5);
}
@media (min-width: 56rem) {
  .service-block__grid {
    grid-template-columns: 1fr 2fr;
    gap: var(--space-8);
  }
}

/* ---- FAQ ---- */
.faq-item {
  border-bottom: 1px solid rgba(16,22,20,0.1);
}
.faq-item:first-child { border-top: 1px solid rgba(16,22,20,0.1); }
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.0625rem;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.5rem;
  color: var(--green);
  flex-shrink: 0;
  line-height: 1;
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p {
  padding-bottom: var(--space-5);
  color: var(--slate);
  max-width: 44rem;
}

/* ---- Method steps (Approach) ---- */
.steps {
  counter-reset: step;
  display: grid;
  gap: var(--space-6);
}
@media (min-width: 48rem) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}
.step {
  position: relative;
  padding-top: var(--space-7);
}
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--green);
  display: block;
  margin-bottom: var(--space-3);
}

/* ---- Story block (Approach elevator story) ---- */
.story {
  max-width: 46rem;
}
.story blockquote {
  margin: var(--space-6) 0;
  padding-left: var(--space-5);
  border-left: 3px solid var(--green);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--ink);
}

/* ---- What we don't do list ---- */
.dont-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-4);
}
.dont-list li {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  color: var(--slate);
}
.dont-list li::before {
  content: "\2715";
  color: var(--amber);
  font-weight: 700;
  flex-shrink: 0;
  line-height: 1.5;
}

/* ---- About page ---- */
.about-hero {
  display: grid;
  gap: var(--space-6);
  align-items: start;
}
@media (min-width: 56rem) {
  .about-hero { grid-template-columns: 16rem 1fr; }
}
.headshot {
  width: 12rem;
  height: 12rem;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--green);
}
@media (min-width: 56rem) {
  .headshot { width: 100%; height: auto; aspect-ratio: 1 / 1; }
}

.facts-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-3);
}
.facts-list dt {
  font-weight: 600;
  color: var(--slate);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.facts-list dd {
  margin: 0 0 var(--space-3);
}

/* ---- Contact page ---- */
.contact-card {
  background: var(--seafoam);
  border-radius: var(--radius-lg);
  padding: var(--space-8) var(--space-6);
  text-align: center;
}
.contact-email {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.375rem, 2vw + 1rem, 2rem);
  text-decoration: none;
  color: var(--ink);
  word-break: break-word;
}
.contact-email:hover { color: var(--green); }

/* ---- Who we work with cards ---- */
.audience-card {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--pine);
  color: rgba(255,255,255,0.85);
  padding-block: var(--space-7);
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--mint); }
.footer-grid {
  display: grid;
  gap: var(--space-6);
}
@media (min-width: 48rem) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
}
.footer-tagline {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--white);
  margin-bottom: var(--space-3);
}
.footer-tagline .cursor { color: var(--green); }
.footer-nav ul,
.footer-meta ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-1);
  line-height: 1.4;
}
.footer-heading {
  font-weight: 600;
  color: var(--white);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: var(--space-3);
}
.footer-bottom {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid rgba(255,255,255,0.15);
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
}

/* ---- Answer / direct-answer lede ---- */
.direct-answer {
  font-size: clamp(1.125rem, 0.5vw + 1rem, 1.25rem);
  color: var(--ink);
  max-width: 46rem;
  font-weight: 400;
}

/* ---- 404 page ---- */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  text-align: center;
}
.error-page__inner { margin-inline: auto; }
