/* ==========================================================================
   MattStabile.com — design system
   Palette: ink navy / white / ticker green / steel
   Type: Space Grotesk (display) · Inter (body) · IBM Plex Mono (labels)
   ========================================================================== */

:root {
  --ink: #0b1d33;
  --ink-soft: #16304f;
  --paper: #ffffff;
  --steel: #eef3f8;
  --steel-line: #d8e2ec;
  --green: #0fa36b;
  --green-dark: #0b7d52;
  --text: #22344a;
  --text-muted: #5b6f86;
  --radius: 14px;
  --maxw: 1120px;
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--green-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Eyebrow / mono labels (signature) ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-dark);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--green);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--steel-line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.12em;
  color: var(--ink);
  text-transform: uppercase;
}
.brand:hover { text-decoration: none; color: var(--green-dark); }
.brand .tick { color: var(--green); }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; }
.nav-links a {
  font-family: var(--font-display);
  font-size: 15.5px; font-weight: 500;
  color: var(--ink);
}
.nav-links a:hover { color: var(--green-dark); text-decoration: none; }
.nav-links a[aria-current="page"] { color: var(--green-dark); }
.btn {
  display: inline-block;
  font-family: var(--font-display);
  font-weight: 600; font-size: 15.5px;
  padding: 12px 26px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  color: var(--ink);
  transition: background .18s ease, color .18s ease;
}
.btn:hover { background: var(--ink); color: #fff; text-decoration: none; }
.btn-solid { background: var(--green); border-color: var(--green); color: #fff; }
.btn-solid:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn-light { border-color: #fff; color: #fff; }
.btn-light:hover { background: #fff; color: var(--ink); }

.nav-toggle { display: none; background: none; border: 0; font-size: 26px; color: var(--ink); cursor: pointer; }

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute; left: 0; right: 0; top: 72px;
    background: #fff; border-bottom: 1px solid var(--steel-line);
    flex-direction: column; align-items: flex-start;
    padding: 20px 24px; gap: 18px;
  }
  .nav-links.open { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 96px 0 88px;
  background:
    linear-gradient(180deg, #fff 0%, var(--steel) 100%);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.2vw, 62px);
  line-height: 1.06;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.015em;
  margin-bottom: 24px;
}
.hero h1 strong { font-weight: 700; }
.hero h1 .hl {
  font-weight: 700;
  background: linear-gradient(transparent 62%, rgba(15, 163, 107, 0.28) 62%);
}
.hero p.lede {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 54ch;
  margin-bottom: 34px;
}
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(11, 29, 51, 0.18);
  border: 1px solid var(--steel-line);
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo-round {
  border-radius: 50%;
  border: none;
  box-shadow: 0 24px 60px rgba(11, 29, 51, 0.18);
  max-width: 380px;
  margin: 0 auto;
  aspect-ratio: 1;
}

/* faint chart line backdrop */
.hero-chart {
  position: absolute; inset: auto 0 0 0; height: 180px;
  opacity: 0.5; pointer-events: none;
}

@media (max-width: 900px) {
  .hero { padding: 64px 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-photo { max-width: 420px; }
}

/* ---------- Sections ---------- */
.section { padding: 88px 0; }
.section-steel { background: var(--steel); }
.section-ink { background: var(--ink); color: #dce6f1; }
.section-ink h2, .section-ink h3 { color: #fff; }

h2.section-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 16px;
  line-height: 1.15;
}
.section-intro { max-width: 62ch; color: var(--text-muted); font-size: 18px; margin-bottom: 48px; }

/* ---------- Capability cards (PersuMedia-style grid) ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: #fff;
  border: 1px solid var(--steel-line);
  border-radius: var(--radius);
  padding: 34px 30px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(11,29,51,.1); }
.card .icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(15, 163, 107, 0.1);
  color: var(--green-dark);
  margin-bottom: 22px;
}
.card h3 {
  font-family: var(--font-display);
  font-size: 21px; font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
}
.card p { color: var(--text-muted); font-size: 16px; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } }

/* ---------- Split feature ---------- */
.split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 64px; align-items: center;
}
.split.reverse .split-media { order: 2; }
.split-media img {
  border-radius: var(--radius);
  border: 1px solid var(--steel-line);
  box-shadow: 0 18px 44px rgba(11,29,51,.12);
}
.split h2 { margin-bottom: 18px; }
.split p { color: var(--text-muted); margin-bottom: 16px; }
.split .btn { margin-top: 12px; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split.reverse .split-media { order: 0; }
}

/* ---------- Quote ---------- */
.quote {
  max-width: 860px; margin: 0 auto; text-align: center;
}
.quote blockquote {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.8vw, 30px);
  font-weight: 500; line-height: 1.4;
  color: var(--ink);
}
.section-ink .quote blockquote { color: #fff; }
.quote cite {
  display: block; margin-top: 22px;
  font-family: var(--font-mono); font-style: normal;
  font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--green);
}

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.faq details {
  border-bottom: 1px solid var(--steel-line);
  padding: 22px 0;
}
.faq summary {
  font-family: var(--font-display);
  font-size: 19px; font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--font-mono);
  color: var(--green-dark);
  font-size: 22px; line-height: 1;
  flex-shrink: 0;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 14px; color: var(--text-muted); }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 { margin-bottom: 14px; }
.cta-band p { color: #9fb3c8; max-width: 56ch; margin: 0 auto 32px; }

/* ---------- Speaking list ---------- */
.talks { display: grid; gap: 24px; }
.talk {
  background: #fff; border: 1px solid var(--steel-line);
  border-radius: var(--radius); padding: 34px;
}
.talk h3 { font-family: var(--font-display); font-size: 22px; color: var(--ink); margin-bottom: 12px; }
.talk p { color: var(--text-muted); margin-bottom: 14px; }
.talk .venue {
  font-family: var(--font-mono); font-size: 13px;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--green-dark);
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; display: grid; gap: 18px; margin-top: 28px; }
.contact-list li { display: flex; gap: 14px; align-items: baseline; }
.contact-list .k {
  font-family: var(--font-mono); font-size: 12.5px;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-muted); width: 84px; flex-shrink: 0;
}
form .field { margin-bottom: 20px; }
form label {
  display: block; font-family: var(--font-display);
  font-weight: 600; font-size: 15px; color: var(--ink);
  margin-bottom: 8px;
}
form input, form textarea {
  width: 100%; font-family: var(--font-body); font-size: 16px;
  padding: 13px 16px;
  border: 1px solid var(--steel-line); border-radius: 10px;
  background: #fff; color: var(--text);
}
form input:focus, form textarea:focus {
  outline: 3px solid rgba(15,163,107,.35); border-color: var(--green);
}

/* ---------- Blog ---------- */
.posts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
@media (max-width: 820px) { .posts { grid-template-columns: 1fr; } }
.post-card {
  background: #fff; border: 1px solid var(--steel-line);
  border-radius: var(--radius); padding: 32px;
}
.post-card time {
  font-family: var(--font-mono); font-size: 12.5px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted);
}
.post-card h3 { font-family: var(--font-display); font-size: 21px; margin: 12px 0 10px; }
.post-card h3 a { color: var(--ink); }
.post-card p { color: var(--text-muted); font-size: 16px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #9fb3c8;
  padding: 64px 0 36px;
  font-size: 15px;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr;
  gap: 48px; margin-bottom: 48px;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; gap: 32px; } }
.site-footer h4 {
  font-family: var(--font-mono); font-size: 12.5px;
  letter-spacing: .14em; text-transform: uppercase;
  color: #fff; margin-bottom: 16px;
}
.site-footer ul { list-style: none; display: grid; gap: 10px; }
.site-footer a { color: #c8d6e5; }
.site-footer a:hover { color: var(--green); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12);
  padding-top: 28px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: .06em;
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  background: linear-gradient(180deg, #fff 0%, var(--steel) 100%);
  padding: 72px 0 56px;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 52px);
  font-weight: 600; color: var(--ink);
  letter-spacing: -0.015em; line-height: 1.1;
}
.page-hero p { margin-top: 16px; color: var(--text-muted); font-size: 18px; max-width: 62ch; }

.prose { max-width: 720px; }
.prose h2 { font-family: var(--font-display); font-size: 28px; color: var(--ink); margin: 40px 0 14px; }
.prose p { margin-bottom: 18px; }


/* ---------- Image proportion fixes ---------- */
/* Prevent images with explicit width/height attributes from stretching:
   always scale height proportionally to the constrained width. */
img {
     height: auto;
}

/* Framed feature images (split sections + about page) keep a pleasing
   portrait crop instead of stretching to fill the grid column. */
.split-media img,
.about-media img {
     width: 100%;
     height: 100%;
     max-height: 560px;
     object-fit: cover;
     aspect-ratio: 4 / 5;
}


/* ---------- Talk video embeds (Speaking page) ---------- */
.talk-video {
     position: relative;
     width: 100%;
     aspect-ratio: 16 / 9;
     margin: 18px 0 4px;
     border-radius: var(--radius);
     overflow: hidden;
     border: 1px solid var(--steel-line);
     box-shadow: rgba(11, 29, 51, 0.12) 0px 18px 44px;
     background: #000;
}
.talk-video iframe {
     position: absolute;
     inset: 0;
     width: 100%;
     height: 100%;
     border: 0;
}
