/* ============================================================
   BuiltWithClaudeTech — Philip Pierce
   1. Design tokens  2. Reset  3. Typography  4. Layout
   5. Components  6. Sections  7. View toggle  8. Responsive
   ============================================================ */

/* 1. DESIGN TOKENS */
:root {
  --primary:        #9fe870;
  --on-primary:     #0e0f0c;
  --primary-active: #cdffad;
  --primary-pale:   #e2f6d5;
  --ink:            #0e0f0c;
  --ink-deep:       #163300;
  --body:           #454745;
  --mute:           #868685;
  --canvas:         #ffffff;
  --canvas-soft:    #e8ebe6;
  --positive:       #2ead4b;

  --radius-xl:  24px;
  --radius-pill: 9999px;

  --maxw: 1200px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

/* 2. RESET */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--canvas-soft);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "calt";
}
img { max-width: 100%; }
::selection { background: var(--primary); color: var(--on-primary); }

/* 3. TYPOGRAPHY */
.display-xl { font-weight: 900; font-size: clamp(2.5rem, 5vw, 4rem); line-height: 1.04; letter-spacing: -1.5px; margin: 0 0 20px; }
.display-md { font-weight: 900; font-size: clamp(1.75rem, 3.5vw, 2.5rem); line-height: 1.1; letter-spacing: -0.8px; margin: 0 0 8px; }
.display-sm { font-weight: 900; font-size: clamp(1.6rem, 3vw, 2.25rem); letter-spacing: -0.6px; margin: 0 0 14px; color: var(--ink); }
.lead { font-size: 1.25rem; line-height: 1.5; color: var(--body); margin: 0 0 28px; }
.eyebrow { text-transform: uppercase; letter-spacing: 2.5px; font-size: 0.8rem; font-weight: 600; color: var(--mute); margin-bottom: 20px; }

/* 4. LAYOUT */
.container { max-width: var(--maxw); margin: 0 auto; }
.container.center { text-align: center; }
.band { padding: 56px 24px; }
.band-sage  { background: var(--canvas-soft); }
.band-white { background: var(--canvas); }
.band-dark  { background: var(--ink); padding: 72px 24px; }

/* 5. COMPONENTS */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 1rem; line-height: 1;
  padding: 14px 26px; min-height: 48px; border-radius: var(--radius-xl);
  text-decoration: none; cursor: pointer; border: none; font-family: inherit;
  transition: background-color 160ms ease-out;
}
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-active); }
.btn-outline { background: var(--canvas); color: var(--ink); border: 1px solid var(--ink); }
.btn-outline:hover { background: var(--canvas-soft); }
.btn-outline-light { background: transparent; color: var(--canvas-soft); border: 1px solid var(--canvas-soft); }
.btn-outline-light:hover { background: #1a1d18; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-row.center { justify-content: center; }

.infograph { width: 100%; height: auto; display: block; border-radius: var(--radius-xl); }

.tag {
  background: var(--canvas); color: var(--body); font-weight: 600;
  padding: 9px 16px; border-radius: var(--radius-pill); font-size: 0.875rem;
}
.band-sage .tag { background: var(--canvas); }
.tag.white { background: var(--canvas); }
.tags { display: flex; flex-wrap: wrap; gap: 10px; }

/* 6. SECTIONS */
/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--canvas); border-bottom: 1px solid var(--canvas-soft);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; gap: 18px;
}
.toggle {
  display: inline-flex; align-items: center; gap: 2px; padding: 4px;
  border: 1px solid var(--canvas-soft); border-radius: var(--radius-pill);
  background: var(--canvas); flex-shrink: 0;
}
.toggle-btn {
  border: none; cursor: pointer; font-size: 0.875rem; font-weight: 600;
  padding: 0 18px; height: 40px; border-radius: var(--radius-pill);
  font-family: inherit; white-space: nowrap; background: transparent; color: var(--body);
  transition: background-color 200ms ease-out, color 200ms ease-out;
}
.toggle-btn.active { background: var(--primary); color: var(--on-primary); }

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 1; min-width: 0; }
.brand-logo { height: 36px; width: auto; display: block; flex-shrink: 0; }
.brand-name {
  font-weight: 700; font-size: 0.95rem; letter-spacing: -0.2px; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.header-spacer { flex: 1 1 auto; }
.header-cta { min-height: 48px; padding: 12px 22px; border-radius: var(--radius-pill); white-space: nowrap; flex-shrink: 0; font-size: 0.95rem; }

/* Hero */
.hero-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; align-items: center; }
.lead { max-width: 40ch; }
.stat-card { background: var(--canvas); border-radius: var(--radius-xl); padding: 32px; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 24px; }
.stat-num { font-weight: 900; font-size: 2.75rem; line-height: 1; color: var(--primary); }
.stat-label { font-size: 0.95rem; color: var(--body); margin-top: 6px; }

/* Clients */
.client-list { font-size: clamp(1.25rem, 2.6vw, 1.9rem); line-height: 1.5; font-weight: 500; color: var(--body); margin: 0; max-width: 60ch; }

/* Skills */
.skills-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 40px; margin-top: 36px; }
.skills-head { font-weight: 600; font-size: 1.35rem; letter-spacing: -0.4px; margin: 0 0 18px; color: var(--ink-deep); }

/* Work */
.work-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: stretch; margin-top: 32px; }
.work-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-top: 20px; }
.card { border-radius: var(--radius-xl); padding: 28px; }
.card-dark { background: var(--ink); color: var(--canvas); padding: 32px; display: flex; flex-direction: column; }
.card-sage { background: var(--canvas-soft); }
.card-outline { background: var(--canvas); border: 1px solid var(--canvas-soft); }
.card-pale { background: var(--primary-pale); }
.card-stat { font-weight: 900; font-size: 2.5rem; line-height: 1; color: var(--primary); }
.card-title { font-weight: 700; font-size: 1.2rem; margin: 0 0 12px; letter-spacing: -0.3px; }
.card-title.light { color: var(--canvas); margin: 18px 0 12px; font-size: 1.35rem; }
.card-title.sm { font-size: 1.1rem; margin: 0 0 8px; }
.card-title.green { color: var(--ink-deep); }
.card-body { font-size: 0.98rem; line-height: 1.55; color: var(--body); margin: 0; }
.card-body.big { font-size: 1.15rem; margin: 0 0 24px; max-width: 60ch; }
.muted-light { color: #c5c7c4; }
.card-foot { margin-top: auto; padding-top: 20px; border-top: 1px solid #2a2c28; }
.foot-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--mute); margin: 24px 0 10px; }
.kicker { font-weight: 900; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--mute); margin-bottom: 10px; }
.kicker.positive { color: var(--positive); }

/* Code Ninja */
.ninja-card { background: var(--primary-pale); border-radius: var(--radius-xl); padding: 40px; }
.ninja-kicker { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; color: var(--ink-deep); margin-bottom: 16px; }

/* Testimonials */
.quote-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-top: 32px; }
.quote { background: var(--canvas); border: 1px solid var(--canvas-soft); border-left: 3px solid var(--primary); border-radius: var(--radius-xl); padding: 28px; margin: 0; }
.quote blockquote { font-style: italic; font-size: 1.05rem; line-height: 1.55; color: var(--body); margin: 0 0 18px; }
.q-name { display: block; font-weight: 700; color: var(--ink); }
.q-org { display: block; font-size: 0.9rem; color: var(--mute); }

/* CTA */
.cta-head { font-weight: 900; font-size: clamp(2rem, 4.5vw, 3.25rem); letter-spacing: -1px; margin: 0 0 18px; color: var(--primary); }
.cta-sub { font-size: 1.2rem; line-height: 1.55; color: #c5c7c4; margin: 0 auto 32px; max-width: 52ch; }

/* Footer */
.site-footer { background: var(--ink); border-top: 1px solid #1a1d18; padding: 40px 24px; }
.footer-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-brand { opacity: 0.9; }
.footer-name { font-weight: 700; font-size: 0.95rem; color: var(--canvas-soft); }
.footer-nav { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-nav a { color: #c5c7c4; text-decoration: none; font-size: 0.95rem; }
.footer-nav a:hover { color: var(--primary); }
.footer-copy { margin-top: 28px; padding-top: 20px; border-top: 1px solid #1a1d18; font-size: 0.75rem; color: var(--mute); opacity: 0.7; }

/* 7. VIEW TOGGLE — show/hide by data-view */
[data-view="infograph"] .text-view { display: none; }
[data-view="text"] .infograph-view { display: none; }
/* Selected Work is contained in the graphics, so hide it in infograph view */
[data-view="infograph"] .work-section { display: none; }

/* 8. RESPONSIVE */
/* Header → two rows on narrow screens: brand + CTA on row 1, full-width toggle on row 2 */
@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; column-gap: 10px; row-gap: 12px; }
  .header-spacer { display: none; }
  .brand { order: 1; flex: 1 1 auto; justify-content: flex-start; min-width: 0; }
  .header-cta { order: 2; margin-left: auto; flex-shrink: 0; padding: 11px 18px; font-size: 0.9rem; }
  .toggle { order: 3; flex-basis: 100%; width: 100%; display: flex; }
  .toggle-btn { flex: 1; padding: 0; }
}
@media (max-width: 767px) {
  .band, .band-dark { padding: 40px 20px; }
  .brand-name { font-size: 0.85rem; }
}

/* 9. MOTION */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}