/* ============================================================
   @font-face — self-hosted (place .woff2 files in assets/fonts/)
   ============================================================ */
@font-face {
  font-family: 'Space Grotesk';
  src: url('assets/fonts/SpaceGrotesk-Variable.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('assets/fonts/Inter-Variable.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('assets/fonts/JetBrainsMono-Variable.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   Design tokens — Fiscal Mint palette
   ============================================================ */
:root {
  /* Core brand colours */
  --ink:        #0E2A24;   /* dark pine — hero bg, footer, serious/legal tone  */
  --accent:     #0F9D6E;   /* lead green — large accents, markers, badges        */
  --accent-600: #0B7E58;   /* darker green — text on light, button fills, hover  */
  --support:    #2563C9;   /* secondary blue — technical details, dosed           */
  /* Backgrounds */
  --paper:      #F4F8F6;   /* main page bg — faintly green-tinted white           */
  --mint-wash:  #E5F5EF;   /* light mint fill — term badges, highlighted blocks   */
  --surface:    #FFFFFF;   /* card surfaces on paper                              */
  /* Text on light */
  --ink-soft:   #3A5A50;   /* secondary text on light — 7.1:1 on paper           */
  --muted:      #6B8078;   /* captions, labels, inactive                          */
  /* Text on dark */
  --on-dark:    #FFFFFF;   /* primary text on --ink backgrounds                  */
  --on-dark-sub: rgba(255, 255, 255, 0.72); /* secondary text on --ink           */
  --on-dark-mono: #5FD3A8; /* mint monospace accent on dark — 8.3:1 on --ink    */
  /* Structure */
  --line:       #D5E4DD;   /* dividers, card borders — greenish, NOT grey        */

  /* Typography */
  --font-display: 'Space Grotesk', 'Outfit', ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;

  /* Layout */
  --container:   1080px;
  --gap-section: clamp(4.5rem, 9vw, 7.5rem);
  --radius:      12px;
}

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

/* ============================================================
   Base
   ============================================================ */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   Focus & skip link
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 300;
  background: var(--accent-600);
  color: var(--on-dark);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 0 0 6px 6px;
  text-decoration: none;
  transition: top 0.15s;
}

.skip-link:focus {
  top: 0;
}

/* ============================================================
   Container
   ============================================================ */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

/* ============================================================
   Typography scale
   ============================================================ */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.022em;
  line-height: 1.12;
  color: var(--ink);
}

h2 {
  font-size: clamp(1.375rem, 2.8vw, 2rem);
  font-weight: 600;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* ============================================================
   Inline term highlight
   Green monospace pill for technical terms and key figures
   ============================================================ */
.term {
  font-family: var(--font-mono);
  font-size: 0.875em;
  font-weight: 500;
  color: var(--accent-600);
  background: var(--mint-wash);
  padding: 0.1em 0.4em;
  border-radius: 4px;
  white-space: nowrap;
}

.term-num {
  font-family: var(--font-mono);
  font-size: 0.9em;
  font-weight: 600;
  color: var(--accent-600);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
  padding-block: 0.875rem;
  background: rgba(244, 248, 246, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

/* VeriListo wordmark — brand green */
.wordmark {
  display: flex;
  align-items: center;
  gap: 0.4375rem;
  font-family: var(--font-display);
  font-size: 1.1875rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--accent-600);
  text-decoration: none;
  transition: color 0.15s ease;
}

.wordmark-mark {
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}

.wordmark:hover {
  color: var(--ink);
}

.wordmark:hover .wordmark-mark {
  opacity: 0.8;
}

/* Site nav — Apple-style: fills available space, items evenly distributed */
.site-nav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-evenly;
  padding-inline: clamp(1rem, 3vw, 2.5rem);
}

.site-nav a {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.25rem 0.375rem;
  white-space: nowrap;
  transition: color 0.15s ease;
}

.site-nav a:hover {
  color: var(--ink);
}

.site-nav a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

@media (max-width: 639px) {
  .site-nav { display: none; }
}

/* Language toggle — filled accent pill */
.lang-toggle {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--on-dark);
  background: var(--accent);         /* filled by default */
  border: none;
  border-radius: 5px;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  line-height: 1;
}

.lang-toggle:hover {
  background: var(--accent-600);     /* darkens on hover */
}

.lang-toggle:active {
  transform: scale(0.96);
}

/* ============================================================
   Shared section styles
   ============================================================ */
.section {
  padding-block: var(--gap-section);
}

/* ============================================================
   Hero — dark, premium fintech feel
   ============================================================ */
.section--hero {
  background-color: var(--ink);
  padding-block-start: clamp(4.5rem, 11vw, 9rem);
  padding-block-end: clamp(3.5rem, 7vw, 6rem);
  border-bottom: 1px solid rgba(95, 211, 168, 0.12);
  text-align: center;
}

.hero-heading {
  font-size: clamp(2.25rem, 6.5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: var(--on-dark);
  max-width: 17ch;
  margin-inline: auto;
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.1875rem);
  color: var(--on-dark-sub);
  max-width: 52ch;
  margin-inline: auto;
  margin-bottom: 2.75rem;
  line-height: 1.65;
}

/* Hash thread — fiscal fingerprint in mint on dark */
.hash-thread {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
}

.hash-string {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  color: rgba(95, 211, 168, 0.35);   /* subtle at rest */
  user-select: none;
  transition: color 0.4s ease;
}

.section--hero:hover .hash-string {
  color: var(--on-dark-mono);        /* reveals on hero hover */
}

.hash-seal {
  font-size: 0.8rem;
  color: var(--on-dark-mono);
  font-family: var(--font-body);
  line-height: 1;
}

/* ============================================================
   Problem / Solution — on paper, split at midpoint on desktop
   ============================================================ */
.section--ps {
  background: var(--paper);
  border-block: 1px solid var(--line);
}

.ps-grid {
  display: flex;
  flex-direction: column;
}

.ps-block {
  padding-block: clamp(2rem, 4vw, 3rem);
}

.ps-block h2 {
  color: var(--ink);
}

.ps-block p {
  font-size: 1.0625rem;
  color: var(--ink-soft);
  line-height: 1.72;
  max-width: 72ch;
  margin-top: 0.875rem;
}

.ps-divider {
  height: 1px;
  background: var(--line);
  flex-shrink: 0;
}

/* ============================================================
   How it works — cards on paper
   ============================================================ */
.how-heading {
  margin-bottom: clamp(2rem, 4vw, 3rem);
  color: var(--ink);
}

.steps {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.step {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Step number — green monospace */
.step-num {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  display: block;
  margin-bottom: 0.875rem;
}

.step-title {
  color: var(--ink);
  margin-bottom: 0.625rem;
}

.step-body {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  line-height: 1.65;
  flex: 1;
}

/* Verified badge on step 3 */
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.25rem;
  width: 1.625rem;
  height: 1.625rem;
  border-radius: 50%;
  background: rgba(15, 157, 110, 0.13);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

/* Connector thread — hint at the hash chain */
.step-connector {
  flex-shrink: 0;
  width: 2.25rem;
  position: relative;
}

.step-connector::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--line);
}

/* ============================================================
   Footer — dark ink, mint accents
   ============================================================ */
.site-footer {
  background: var(--ink);
  padding-block: clamp(2.5rem, 5vw, 4.5rem);
  margin-top: var(--gap-section);
  border-top: 1px solid rgba(95, 211, 168, 0.1);
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-about {
  font-size: 0.9375rem;
  color: #7CB89F;    /* muted mint — 6.7:1 on --ink */
  max-width: 60ch;
  line-height: 1.65;
}

.footer-contact {
  font-size: 0.9375rem;
  color: var(--on-dark-sub);
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.footer-contact a {
  color: var(--on-dark-mono);   /* mint link — 8.3:1 on --ink */
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.15s ease;
}

.footer-contact a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  color: #5D9A80;    /* 4.7:1 on --ink */
  margin-top: 0.5rem;
}

/* ============================================================
   Who it's for — qualification section
   ============================================================ */
.section--who {
  border-bottom: 1px solid var(--line);
}

.who-intro {
  font-size: 1.0625rem;
  color: var(--ink-soft);
  max-width: 64ch;
  margin-bottom: 1.75rem;
  line-height: 1.65;
}

/* 2×2 grid on desktop, single column on mobile */
.who-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.875rem;
  list-style: none;
  margin-bottom: 1.5rem;
}

.who-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.125rem 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
}

/* Decorative NO marker — aria-hidden, colour is accent (decorative, no contrast req.) */
.who-no {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  flex-shrink: 0;
  padding-top: 0.25em;   /* optical alignment with cap-height of adjacent text */
  line-height: 1.65;
  user-select: none;
}

.who-card-text {
  font-size: 0.9375rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* Outcome summary — mint-wash highlight block */
.who-outcome {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: var(--mint-wash);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.who-outcome-check {
  font-size: 1.125rem;
  color: var(--accent);
  flex-shrink: 0;
  font-weight: 700;
  margin-top: 0.1em;
  line-height: 1.6;
}

.who-outcome-text {
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.65;
  margin: 0;
}

/* Brand word inside outcome — "listo" / "ready" */
.brand-word {
  color: var(--accent-600);
  font-weight: 700;
}

/* ============================================================
   Scroll reveal
   JS adds .motion to <html> when prefers-reduced-motion is off.
   Without JS or with reduced motion, content is visible by default.
   ============================================================ */
.motion .reveal {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.48s ease, transform 0.48s ease;
}

.motion .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.motion .reveal-d1 { transition-delay: 0.12s; }
.motion .reveal-d2 { transition-delay: 0.24s; }

/* ============================================================
   Responsive
   ============================================================ */

/* Steps + who-grid: vertical on narrow screens */
@media (max-width: 699px) {
  .who-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    flex-direction: column;
    gap: 0;
  }

  .step-connector {
    width: auto;
    height: 2rem;
    align-self: stretch;
  }

  .step-connector::before {
    left: 2rem;
    right: auto;
    top: 0;
    bottom: 0;
    width: 1px;
    height: 100%;
  }
}

/* Problem / Solution: side-by-side on wide screens */
@media (min-width: 700px) {
  .ps-grid {
    flex-direction: row;
    align-items: stretch;
  }

  .ps-block {
    flex: 1;
    padding-inline: clamp(1.5rem, 3vw, 2.75rem);
  }

  .ps-block:first-child { padding-inline-start: 0; }
  .ps-block:last-child  { padding-inline-end: 0; }

  .ps-divider {
    width: 1px;
    height: auto;
    flex-shrink: 0;
  }
}

/* Tighter step padding on mid-range widths */
@media (min-width: 700px) and (max-width: 900px) {
  .step        { padding: 1.25rem 1rem; }
  .step-connector { width: 1.5rem; }
}

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .motion .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
