/* Tyler Martin — portfolio system (dark editorial)
   Matches the home page: near-black ground, bone text, one acid-green accent,
   Space Grotesk + Space Mono. Product mockups opt back into a LIGHT palette
   via .mock / .lightpanel so real UI reads as bright panels on the dark frame.
*/

:root {
  /* ground + chrome (dark) */
  --bg: #100F12;            /* soft charcoal — lifted off pure black to cut halation */
  --surface: #17171A;       /* raised panels / alt sections */
  --surface-2: #202024;     /* nested */

  --ink: #EDEAE2;           /* primary text (bone) */
  --ink-2: #C7C3BA;         /* secondary text */
  --muted: #A39F96;         /* muted — captions, sub-lines (lifted for legibility) */
  --quiet: #847F76;         /* quiet — small labels (lifted above contrast floor) */
  --border: #2D2C24;        /* hairline */
  --border-strong: #444234;

  --accent: #C6F24E;        /* acid — the only accent */
  --accent-ink: #C6F24E;
  --growth: #C6F24E;        /* outcomes / metrics carry the acid */
  --growth-soft: rgba(198,242,78,0.12);
  --available: #C6F24E;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;

  --container: 1200px;
  --container-wide: 1320px;

  --font: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-text: 'Geist', 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'Space Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-size: 17px;
  line-height: 1.58;
}

a { color: inherit; text-decoration: none; }

::selection { background: var(--accent); color: var(--bg); }

/* === Layout primitives ================================================== */
.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.container-wide { max-width: var(--container-wide); margin: 0 auto; padding: 0 32px; }

.section { padding: 96px 0; }
.section-tight { padding: 56px 0; }
.section-loose { padding: 128px 0; }

/* === Typography ========================================================= */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.eyebrow-accent { color: var(--accent); }

.display-1 {
  font-family: var(--font);
  font-size: clamp(52px, 5.6vw, 82px);
  line-height: 1.0;
  letter-spacing: -0.038em;
  font-weight: 500;
  text-wrap: balance;
  margin: 0;
}
.display-2 {
  font-family: var(--font);
  font-size: clamp(40px, 4vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 500;
  text-wrap: balance;
  margin: 0;
}
.h-section {
  font-family: var(--font);
  font-size: clamp(32px, 2.8vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.028em;
  font-weight: 500;
  text-wrap: balance;
  margin: 0;
}
.lead {
  font-size: 17px;
  line-height: 1.62;
  font-weight: 400;
  letter-spacing: 0.002em;
  color: var(--ink-2);
  text-wrap: pretty;
  margin: 0;
}
.muted { color: var(--muted); }

/* === Chips, buttons ===================================================== */
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
}
.chip-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--available); }
.chip-strong { background: var(--accent); color: var(--bg); border-color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.15s ease, opacity 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--bg); font-weight: 600; }
.btn-primary:hover { opacity: 0.9; }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface); }
.btn-ghost { background: transparent; color: var(--ink); padding: 12px 4px; }

/* === Card scaffolds ===================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card-quiet { background: #101012; }

/* === Panel — signature contained surface with depth =================== */
/* One reusable "pop": a lit top edge + soft drop shadow. Reused across the
   Before/After module, strategy cards, and the outcome metrics so the whole
   case study shares one depth language. */
.panel {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 30px 64px -42px rgba(0,0,0,0.92);
}
.lift {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 24px 56px -40px rgba(0,0,0,0.85);
}
.tile {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.tile-accent {
  border-color: var(--border-strong);
  box-shadow: 0 0 52px -22px rgba(198,242,78,0.34);
}

/* === Decorative ========================================================= */
.divider { height: 1px; background: var(--border); }

/* === LIGHT product context ============================================== */
/* Anything inside .mock or .lightpanel re-enters the original light palette,
   so real product UI renders correctly as a bright panel on the dark frame. */
.mock, .lightpanel {
  --ink: #19191C;
  --ink-2: #3E3E45;
  --muted: #73737B;
  --quiet: #9A9A98;
  --surface: #F7F7F5;
  --surface-2: #EFEEEA;
  --border: #E9E8E3;
  --border-strong: #C8C7C2;
  --accent: #2F6BE5;
  --accent-ink: #1E40AF;
  --growth: #15A05A;
  --growth-soft: #E4F5EB;
  color: var(--ink);
}

/* === Browser-mockup primitives ========================================== */
.mock {
  background: white;
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 1px 1px rgba(0,0,0,0.04),
    0 40px 80px -36px rgba(0,0,0,0.6);
}
.mock-bar {
  height: 36px;
  background: #F4F4F2;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 14px;
}
.mock-dot { width: 10px; height: 10px; border-radius: 999px; }
.mock-url {
  margin-left: 16px;
  font: 500 11px/1 var(--mono);
  color: var(--quiet);
  letter-spacing: 0.02em;
}

/* === Image placeholder (sits on light panels) ========================== */
.ph {
  position: relative;
  background-color: #ECEAE4;
  background-image: repeating-linear-gradient(
    135deg, rgba(0,0,0,0.04) 0 1px, transparent 1px 8px
  );
  overflow: hidden;
}
.ph-label {
  position: absolute; left: 12px; bottom: 10px;
  font: 500 10px/1 var(--mono);
  letter-spacing: 0.04em; text-transform: uppercase;
  color: rgba(0,0,0,0.55);
  background: rgba(255,255,255,0.7);
  padding: 4px 6px; border-radius: 2px;
}

/* === Motion ============================================================= */
@keyframes spin-slow { to { transform: rotate(360deg); } }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
.rise { opacity: 1; }
.js-anim .rise { opacity: 0; animation: rise 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.js-anim .rise-1 { animation-delay: 0.05s; }
.js-anim .rise-2 { animation-delay: 0.18s; }
.js-anim .rise-3 { animation-delay: 0.32s; }
.js-anim .rise-4 { animation-delay: 0.46s; }

@media (prefers-reduced-motion: reduce) {
  .js-anim .rise { opacity: 1; animation: none; }
  .spin-slow { animation: none !important; }
}

/* === Widows & orphans — site-wide line-break hygiene ==================== */
/* Zero-specificity (:where) so existing balanced headings & .lead win.
   text-wrap: pretty stops a paragraph/bullet from stranding one word on
   its own last line. */
:where(p, li, dd, dt, blockquote, figcaption, span, a, div,
       h1, h2, h3, h4, h5, h6) {
  text-wrap: pretty;
}

/* === Responsive ========================================================= */
@media (max-width: 920px) {
  .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 48px !important;
    padding-top: 48px !important;
    padding-bottom: 56px !important;
  }
  .audience-grid {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
  }
}
