/* ==========================================================
   tokens.css
   Design system extracted from vladvaleros.com (style.css).
   Tokens + reusable components only. No section layouts,
   no hero blobs, particles, phone mockup or cursor.
   Fonts are loaded via <link> in index.html:
   Playfair Display 700/900, DM Sans 300/400/500, JetBrains Mono 400/500
   ========================================================== */

:root {
  /* Surfaces */
  --bg-primary:   #FFFFFF;
  --bg-surface:   #F5F9F2;
  --bg-card:      #FFFFFF;
  --bg-dark:      #1A1F2E;

  /* Accents */
  --accent-lime:  #a7e662;
  --accent-blue:  #7dafe0;
  --accent-mint:  #81e293;

  --lime-tint:    rgba(167, 230, 98, 0.12);
  --blue-tint:    rgba(125, 175, 224, 0.12);
  --mint-tint:    rgba(129, 226, 147, 0.12);
  --lime-border:  rgba(167, 230, 98, 0.35);
  --blue-border:  rgba(125, 175, 224, 0.35);

  /* Text */
  --text-primary: #1A1F2E;
  --text-muted:   #5A6478;
  --text-dim:     #B0BAC8;
  --blue-text:    #2f6aa3;  /* AA text shade of accent-blue */
  --lime-text:    #3d7a10;  /* AA text shade of accent-lime */
  --on-dark-blue: #7dafe0;

  /* Lines */
  --border:       #E8EDF2;
  --border-dark:  #D0D9E4;

  /* Type */
  --font-display: 'Playfair Display', serif;
  --font-body:    'DM Sans', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Spacing */
  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  4rem;
  --space-xl:  8rem;

  /* Radii (values used on the main site) */
  --radius-sm:   10px;   /* metric/step cards */
  --radius-md:   14px;   /* work/cert/dashboard cards */
  --radius-pill: 100px;  /* buttons, chips, tags */

  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.06);

  /* Breakpoints (reference only, CSS vars can't be used in @media) */
  --bp-sm: 480px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;

  --container: 1200px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--text-primary);
  background: var(--bg-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

:focus-visible { outline: 2px solid var(--accent-lime); outline-offset: 3px; }

/* ---------- Section pattern: "// label" + large serif headline ---------- */
.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--blue-text);
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.section-headline {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}
.section-headline em { font-style: italic; color: var(--lime-text); }

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(52px, 7vw, 86px);
  font-weight: 900;
  line-height: 1.05;
}
.hero-headline .period { color: var(--lime-text); }

.section-sub { font-size: 16px; color: var(--text-muted); line-height: 1.7; max-width: 520px; }

/* ---------- Buttons ---------- */
.btn-primary,
.btn-secondary {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-pill);
  padding: 14px 28px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.btn-primary {
  background: var(--accent-lime);
  color: var(--text-primary);
  border: none;
  transition: filter 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px var(--lime-border);
}
.btn-secondary {
  background: transparent;
  color: var(--blue-text);
  border: 2px solid var(--accent-blue);
  transition: color 200ms ease, border-color 200ms ease, transform 200ms ease;
}
.btn-secondary:hover {
  border-color: var(--accent-mint);
  color: var(--text-primary);
  transform: translateY(-2px);
}

/* ---------- Stat cards (with arrows) ---------- */
.metric-card {
  background: var(--bg-primary);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--accent-lime);
  border-radius: var(--radius-sm);
  padding: 2rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: border-color 250ms ease, transform 250ms ease, box-shadow 250ms ease;
}
.metric-card:hover {
  border-color: var(--accent-lime);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--lime-tint);
}
.metric-number {
  font-family: var(--font-mono);
  font-size: 56px;
  font-weight: 500;
  color: var(--lime-text);
  line-height: 1;
}
.metric-label   { font-size: 15px; font-weight: 500; margin-top: 0.5rem; }
.metric-context { font-size: 12px; color: var(--text-muted); font-style: italic; margin-top: 0.4rem; }

/* Arrows: down = blue (cost goes down is good), up = lime/mint */
.arrow-down { color: var(--blue-text); }
.arrow-up   { color: var(--lime-text); }

/* Stat pill (compact) */
.stat-pill {
  background: #fff;
  border: 1.5px solid var(--border-dark);
  border-radius: var(--radius-pill);
  padding: 7px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Result pills (inside work cards) */
.work-result {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
}
.work-result--up   { background: var(--lime-tint); color: var(--text-primary); border: 1px solid var(--lime-border); }
.work-result--down { background: var(--blue-tint); color: var(--blue-text);  border: 1px solid var(--blue-border); }

/* ---------- Cards ---------- */
.work-card {
  background: var(--bg-primary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 250ms ease, box-shadow 250ms ease, border-color 250ms ease;
}
.work-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-lime);
  box-shadow: 0 16px 40px var(--lime-tint);
}
.work-card-body { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; flex: 1; }
.work-card-title { font-family: var(--font-display); font-size: 20px; line-height: 1.2; }
.work-card-desc  { font-size: 14px; color: var(--text-muted); line-height: 1.7; }

.work-card-image {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--bg-surface);
}

/* Labeled placeholder for a missing screenshot */
.placeholder-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 1rem;
  background: linear-gradient(135deg, var(--lime-tint) 0%, var(--blue-tint) 100%);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  text-align: center;
}

/* Tags */
.work-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.04em;
}
.work-tag--category { background: var(--blue-tint); color: var(--blue-text); border: 1px solid var(--blue-border); }
.work-tag--client   { background: var(--lime-tint); color: var(--text-primary); border: 1px solid var(--lime-border); font-weight: 500; }

/* Step cards (process) */
.step-card {
  background: var(--bg-primary);
  border: 1.5px solid var(--border);
  border-top: 3px solid transparent;
  border-radius: var(--radius-sm);
  padding: 2rem;
  transition: border-top-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.step-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06); }
.step-card--lime:hover { border-top-color: var(--accent-lime); }
.step-card--blue:hover { border-top-color: var(--accent-blue); }
.step-card--mint:hover { border-top-color: var(--accent-mint); }
.step-num   { font-family: var(--font-mono); font-size: 13px; color: var(--blue-text); letter-spacing: 0.1em; margin-bottom: 1rem; }
.step-title { font-size: 17px; font-weight: 500; margin-bottom: 0.75rem; }
.step-body  { font-size: 15px; color: var(--text-muted); line-height: 1.7; }

/* Dashboard-style table card */
.results-dashboard {
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
}
.dashboard-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.d-delta        { font-family: var(--font-mono); font-size: 12px; font-weight: 500; }
.d-delta--up    { color: var(--lime-text); }
.d-delta--down  { color: var(--blue-text); }
.dashboard-footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
}

/* ---------- Tool chips ---------- */
.pill {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 5px 14px;
  font-size: 13px;
  font-family: var(--font-body);
  color: var(--text-muted);
  cursor: default;
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease;
}
.pill:hover { background: var(--lime-tint); border-color: var(--accent-lime); color: var(--text-primary); }

/* ---------- Timeline ---------- */
.exp-timeline { position: relative; padding-left: 2rem; }
.exp-timeline::before {
  content: '';
  position: absolute;
  left: 5px; top: 8px; bottom: 0;
  width: 2px;
  background: var(--border);
}
.exp-entry { position: relative; margin-bottom: 3rem; }
.exp-entry::before {
  content: '';
  position: absolute;
  left: -2rem; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent-blue);
  border: 3px solid var(--bg-surface);
  transform: translateX(1px);
}
.exp-year {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--blue-tint);
  color: var(--blue-text);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 0.5rem;
}
.exp-title    { font-size: 18px; font-weight: 500; margin-bottom: 0.15rem; }
.exp-location { font-size: 13px; color: var(--text-muted); margin-bottom: 0.75rem; }
.exp-quote {
  font-size: 15px;
  font-style: italic;
  color: var(--text-muted);
  padding-left: 1.25rem;
  border-left: 3px solid var(--accent-mint);
  line-height: 1.7;
}

/* ---------- Dark CTA / footer island ---------- */
.dark-island { background: var(--bg-dark); color: #fff; }
.cta-label { font-family: var(--font-mono); font-size: 12px; color: var(--accent-mint); letter-spacing: 0.08em; }
.btn-cta-primary {
  background: var(--accent-lime);
  color: var(--bg-dark);
  font-size: 15px;
  font-weight: 500;
  border: none;
  border-radius: var(--radius-pill);
  padding: 16px 36px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: filter 200ms ease, transform 200ms ease, box-shadow 200ms ease;
}
.btn-cta-primary:hover { filter: brightness(1.08); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35); }
.btn-cta-secondary {
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-pill);
  padding: 16px 36px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: border-color 200ms ease, color 200ms ease;
}
.btn-cta-secondary:hover { border-color: var(--accent-blue); color: var(--on-dark-blue); }

/* ---------- Reveal (progressive enhancement; content is visible without JS) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 600ms cubic-bezier(0.16, 1, 0.3, 1), transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
  }
  .js .reveal.is-visible { opacity: 1; transform: none; }
}
