/* ============================================================
   ryanmeinzer.ai — shared stylesheet
   ============================================================ */

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

:root {
  --ink: #16242e;
  --ink-mid: #38505f;
  --ink-muted: #5e7280;
  --ink-ghost: #8a9aa6;
  --paper: #f5f7f8;
  --paper-alt: #e9edf0;
  --paper-card: #ffffff;
  --rule: #d4dbe1;
  --slate: #3f5667;
  --slate-deep: #243441;
  --slate-light: #6f93ad;
  --accent: #1f7fa6;
  --accent-bright: #6cc4e4;
  --accent-soft: #e3eff5;
  --mono: 'DM Mono', monospace;
  --display: 'Cabin', sans-serif;
  --sans: 'Manrope', system-ui, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---- HEADER ---- */
.site-header {
  background: var(--slate-deep);
  padding: 2.5rem 2.5rem 3rem;
  position: relative;
  overflow: hidden;
}
.site-header::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.7), transparent 85%);
}
.header-inner { max-width: 900px; margin: 0 auto; position: relative; z-index: 1; }
.header-nav {
  display: flex; gap: 2rem;
  margin-bottom: 3rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.nav-link {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s;
}
.nav-link:hover, .nav-link.active { color: var(--accent-bright); }
.header-meta {
  display: flex; align-items: center; gap: 0.7rem;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--accent-bright);
  margin-bottom: 1.4rem;
}
.header-meta .tick {
  display: inline-block; width: 28px; height: 2px;
  background: var(--accent-bright); opacity: 0.7;
}
/* Header identity row: circular photo + name/sub/links */
.header-identity {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  flex-wrap: wrap;
}
.header-photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--accent-bright);
  box-shadow: 0 0 0 4px rgba(108,196,228,0.18), 0 8px 24px rgba(0,0,0,0.35);
}
.header-identity-text { flex: 1; min-width: 280px; }

.header-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5.2vw, 3.6rem);
  color: #ffffff;
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin-bottom: 0.85rem;
}
.header-sub {
  font-family: var(--mono);
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.04em;
}
.header-links { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.75rem; }
.header-link {
  font-family: var(--mono);
  font-size: 12px;
  color: #ffffff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.35);
  padding-bottom: 1px;
  transition: color 0.2s, border-color 0.2s;
}
.header-link:hover { color: var(--accent-bright); border-color: var(--accent-bright); }

/* ---- COPY BAR ---- */
.copy-bar {
  background: var(--paper-alt);
  border-bottom: 1px solid var(--rule);
  padding: 1rem 2.5rem;
}
.copy-bar-inner {
  max-width: 900px; margin: 0 auto;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.copy-label { font-size: 14px; color: var(--ink-mid); flex: 1; min-width: 200px; }
.copy-label strong { color: var(--ink); font-weight: 600; }
.copy-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 12px; font-weight: 500;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid rgba(31,127,166,0.25);
  padding: 7px 16px; border-radius: 6px;
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.copy-btn:hover { background: #cfe2eb; border-color: rgba(31,127,166,0.5); }

/* ---- MAIN ---- */
.main { max-width: 900px; margin: 0 auto; padding: 4rem 2.5rem 2rem; }

/* ---- OPENING ---- */
.opening { max-width: 900px; margin: 0 auto; padding: 4rem 2.5rem 0; }
.opening-statement {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.28;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.opening-statement .turn { color: var(--accent); font-style: italic; }

/* ---- MANIFESTO HERO (sits where home's stats-row sits) ---- */
.manifesto-hero {
  margin-bottom: 4.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 2px solid var(--ink);
}
.manifesto-hero-kicker {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.manifesto-hero-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.6rem, 5.5vw, 3.8rem);
  color: var(--ink);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 1.75rem;
}
.manifesto-hero .opening-statement {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.1rem, 1.9vw, 1.35rem);
  line-height: 1.7;
  color: var(--ink-mid);
  letter-spacing: 0;
  max-width: 64ch;
}
.manifesto-hero .opening-statement .turn {
  color: var(--accent);
  font-style: italic;
  font-weight: 600;
}

/* ---- PART HEADER ---- */
.part-section { margin-bottom: 4.5rem; }
.part-section:last-child { margin-bottom: 0; }
.part {
  margin-bottom: 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--ink);
}
.part-kicker {
  font-family: var(--mono);
  font-size: 13px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.6rem;
}
.part-title {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 2.85rem);
  color: var(--ink);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

/* ---- BODY TEXT ---- */
.body-text { font-size: 17px; color: var(--ink-mid); line-height: 1.7; }
.body-text p + p { margin-top: 0.9rem; }
.body-text strong { color: var(--ink); font-weight: 700; }
.body-text a {
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid rgba(31,127,166,0.35);
}
.body-text a:hover { border-color: var(--accent); }

/* ---- PRINCIPLES ---- */
.principles { display: grid; gap: 0; margin-top: 1.75rem; }
.principle { position: relative; padding-left: 4rem; margin-bottom: 2.5rem; }
.principle:last-child { margin-bottom: 0; }
.principle-index {
  position: absolute; left: 0; top: 0.3rem;
  font-family: var(--mono);
  font-size: 15px; font-weight: 500;
  color: var(--accent);
  padding-top: 6px;
  border-top: 3px solid var(--accent);
  min-width: 2.75rem;
}
.principle-header {
  font-family: var(--sans);
  font-weight: 700;
  font-size: clamp(1.35rem, 2.4vw, 1.6rem);
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.012em;
  margin-bottom: 0.7rem;
}
.principle-body { font-size: 17px; color: var(--ink-mid); line-height: 1.7; }
.principle-body p + p { margin-top: 0.8rem; }
.principle-body .frag { color: var(--slate); font-weight: 600; }

/* ---- PULL CALLOUT (dark slate hero block) ---- */
.pull {
  margin: 3.5rem 0;
  padding: 2.75rem;
  background: var(--slate-deep);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}
.pull::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}
.pull-mark {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent-bright);
  margin-bottom: 1rem;
  position: relative; z-index: 1;
}
.pull-text {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.3;
  color: #fff;
  position: relative; z-index: 1;
}
.pull-text .em { color: var(--accent-bright); font-style: italic; }

/* ---- CLOSER ---- */
.closer { margin-top: 4.5rem; padding-top: 2.75rem; border-top: 3px solid var(--ink); }
.closer-mark {
  font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
}
.closer-text {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.6vw, 2.5rem);
  line-height: 1.28;
  color: var(--ink);
  letter-spacing: -0.015em;
}
.closer-text .sharp { color: var(--accent); font-style: italic; }
.signature {
  margin-top: 2.75rem;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-muted);
  letter-spacing: 0.02em;
}
.signature a { color: var(--slate); text-decoration: none; border-bottom: 1px solid var(--rule); }
.signature a:hover { border-color: var(--slate); }

/* ---- STATS ---- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 2.5rem;
}
.stat-card {
  background: var(--paper-card);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--accent);
  border-radius: 4px;
  padding: 1.1rem 1.3rem;
}
.stat-number {
  font-family: var(--display);
  font-weight: 700;
  font-size: 2.4rem;
  color: var(--slate-deep);
  line-height: 1;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}
.stat-label { font-size: 12px; color: var(--ink-muted); font-weight: 500; line-height: 1.35; }

/* ---- WINS / METRICS LIST ---- */
.wins { display: grid; gap: 0; margin-top: 1.75rem; }
.win {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  column-gap: 2rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
}
.win:last-child { border-bottom: none; }
.win-desc {
  color: var(--ink);
  line-height: 1.5;
}
.win-number {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  background: transparent;
  border: none;
  padding: 0;
  white-space: nowrap;
  letter-spacing: -0.01em;
  text-align: right;
}

/* ---- TIMELINE ---- */
.timeline { margin-top: 1.75rem; position: relative; }
.timeline::before {
  content: ''; position: absolute;
  left: 82px; top: 0; bottom: 0; width: 1px;
  background: var(--rule);
}
.tl-item { display: flex; gap: 1.5rem; padding: 0.85rem 0; position: relative; }
.tl-period {
  font-family: var(--mono); font-size: 11px; color: var(--ink-muted);
  width: 75px; flex-shrink: 0; padding-top: 4px;
  text-align: right; line-height: 1.4;
}
.tl-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--rule); border: 2px solid var(--paper);
  flex-shrink: 0; margin-top: 6px; position: relative; z-index: 1;
}
.tl-item.current .tl-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(31,127,166,0.25);
}
.tl-content { flex: 1; padding-left: 10px; }
.tl-role { font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.tl-company { font-size: 15px; color: var(--slate); margin-top: 3px; font-weight: 500; }
.tl-theme { font-size: 15px; color: var(--ink-mid); margin-top: 6px; line-height: 1.6; }

/* ---- SUB-KICKER (label above a tech-grid inside a part) ---- */
.sub-kicker {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

/* ---- TECH TAGS ---- */
.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 1.75rem;
}
.tech-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-mid);
  background: var(--paper-card);
  border: 1px solid var(--rule);
  padding: 6px 12px;
  border-radius: 4px;
  margin: 0;
  line-height: 1.3;
}
.tech-tag.primary {
  background: var(--accent-soft);
  border-color: rgba(31,127,166,0.35);
  color: var(--ink);
}

/* ---- QUESTION CARDS ---- */
.questions { margin-top: 1.75rem; display: grid; gap: 8px; }
.question {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 0.85rem 1.1rem;
  background: var(--paper-card); border: 1px solid var(--rule);
  border-radius: 6px; cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  font-size: 15px; color: var(--ink-mid); line-height: 1.5;
}
.question:hover {
  border-color: rgba(31,127,166,0.4);
  background: var(--accent-soft);
  color: var(--slate-deep);
}
.question::before {
  content: '?';
  font-family: var(--display); font-weight: 700;
  font-size: 1.15rem; color: var(--accent);
  flex-shrink: 0; line-height: 1; margin-top: 2px;
}

/* ---- INFO BOX (WCAG AA: dark ink text on soft cyan bg) ---- */
.info-box {
  background: var(--accent-soft);
  border: 1px solid rgba(31,127,166,0.35);
  border-left: 4px solid var(--accent);
  border-radius: 0 6px 6px 0;
  padding: 1.5rem 1.75rem;
  margin: 1.5rem 0;
}
.info-box-title {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 0.6rem;
}
.info-box-body {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.7;
}
.info-box-body strong { color: var(--ink); font-weight: 700; }
.info-box-body p + p { margin-top: 0.6rem; }

/* ---- FAQ ---- */
.faq { margin-top: 1.75rem; }
.faq details { border-bottom: 1px solid var(--rule); padding: 1rem 0; }
.faq details:first-of-type { border-top: 1px solid var(--rule); }
.faq summary {
  font-family: var(--sans); font-weight: 700;
  font-size: 1.05rem; color: var(--ink);
  cursor: pointer; list-style: none;
  display: flex; align-items: flex-start; gap: 14px;
  padding: 0.25rem 0;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: '+';
  font-family: var(--mono); color: var(--accent);
  font-weight: 500; font-size: 1.4rem; line-height: 1;
  flex-shrink: 0; min-width: 16px;
}
.faq details[open] summary::before { content: '−'; }
.faq-answer {
  color: var(--ink-mid);
  font-size: 16px;
  margin-top: 0.6rem;
  padding-left: 30px;
  line-height: 1.7;
}
.faq-answer p + p { margin-top: 0.6rem; }

/* ---- STYLE GUIDE HELPERS (template.html only) ---- */
.sg-label {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--paper-alt);
  border: 1px solid var(--rule);
  padding: 3px 10px;
  border-radius: 3px;
  margin-bottom: 0.6rem;
}
.sg-desc {
  font-size: 13px;
  color: var(--ink-muted);
  margin-bottom: 1rem;
  font-family: var(--mono);
}
.sg-block { margin-bottom: 4rem; }

/* ---- COPY BAR INSTRUCTIONS (accordion inside copy-bar) ---- */
.copy-bar-instructions {
  max-width: 900px;
  margin: 0 auto;
  padding-top: 0.75rem;
  border-top: 1px solid var(--rule);
  margin-top: 1rem;
}
.copy-bar-instructions details summary {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.4rem 0;
}
.copy-bar-instructions details summary::-webkit-details-marker { display: none; }
.copy-bar-instructions details summary::before {
  content: '+';
  font-family: var(--mono);
  color: var(--accent);
  font-weight: 500;
  font-size: 1.1rem;
  line-height: 1;
}
.copy-bar-instructions details[open] summary::before { content: '−'; }
.instructions-body {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.65;
  padding: 0.75rem 0 0.25rem 0;
}
.instructions-body ol {
  margin-left: 1.25rem;
  padding-left: 0.5rem;
}
.instructions-body ol li { margin-bottom: 0.5rem; }
.instructions-body code {
  font-family: var(--mono);
  font-size: 13px;
  background: var(--paper-card);
  border: 1px solid var(--rule);
  padding: 1px 6px;
  border-radius: 3px;
}
.instructions-body a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(31,127,166,0.35);
}
.instructions-body a:hover { border-color: var(--accent); }

/* ---- SITE FOOTER (full-width slate, mirrors header) ---- */
.site-footer {
  background: var(--slate-deep);
  padding: 2rem 2.5rem;
  position: relative;
  overflow: hidden;
  margin-top: 0;
}
.site-footer::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, transparent, rgba(0,0,0,0.5));
}
.site-footer-inner {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.footer-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  color: #ffffff;
  letter-spacing: -0.01em;
}
.footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.footer-links a {
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--accent-bright); }

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
  .site-header { padding: 2rem 1.4rem 2.5rem; }
  .header-identity { gap: 1.25rem; }
  .header-photo { width: 110px; height: 110px; border-width: 2px; }
  .opening { padding: 2.75rem 1.4rem 0; }
  .main { padding: 2.75rem 1.4rem 4rem; }
  .copy-bar { padding: 1rem 1.4rem; }
  .principle { padding-left: 3rem; }
  .pull { padding: 1.85rem 1.5rem; }
  .timeline::before { left: 62px; }
  .tl-period { width: 55px; font-size: 10px; }
}
