/* =========================================================
   The Ready Set — Brand tokens
   Dark green #0D4D2E · Cream #F4F1EC · Gold #B8893A
   Fraunces (display) · Inter (body)
   ========================================================= */

:root {
  --green: #0D4D2E;
  --green-dark: #08361F;
  --green-light: #1A6940;
  --green-tint: #E8F0EA;
  --cream: #F4F1EC;
  --cream-dark: #E8E3D9;
  --gold: #B8893A;
  --gold-dark: #8E6826;
  --gold-tint: #F7EFDC;
  --ink: #1A2620;
  --ink-soft: #4A5A50;
  --ink-muted: #7A8A80;
  --line: rgba(13, 77, 46, 0.12);
  --line-strong: rgba(13, 77, 46, 0.22);

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius: 6px;
  --radius-lg: 10px;
  --shadow-sm: 0 1px 2px rgba(13, 77, 46, 0.06);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   Header
   ========================================================= */

.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.brand:hover { opacity: 0.85; }

.brand-logo {
  display: block;
  height: 36px;
  width: auto;
}

.header-cta {
  display: inline-block;
  padding: 8px 16px;
  background: var(--gold);
  color: var(--green-dark);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  transition: background 0.15s ease;
}

.header-cta:hover { background: #d4a04a; }

/* =========================================================
   Hero
   ========================================================= */

.hero {
  background: var(--green);
  color: var(--cream);
  padding: 64px 0 72px;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--green-dark);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(36px, 5.5vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  color: var(--cream);
}

.lede {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.55;
  color: rgba(244, 241, 236, 0.85);
  max-width: 640px;
  margin: 0;
}

/* =========================================================
   Explorer
   ========================================================= */

.explorer {
  padding: 56px 0 48px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 32px;
}

.filter {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter:hover {
  border-color: var(--green);
  color: var(--green);
}

.filter.active {
  background: var(--green);
  color: var(--cream);
  border-color: var(--green);
}

.filter:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* Grid of behavior cards */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 40px;
}

.bcard {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-body);
  transition: all 0.15s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 110px;
}

.bcard:hover {
  border-color: var(--green-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.bcard.selected {
  border-color: var(--green);
  background: var(--green-tint);
  box-shadow: 0 0 0 2px var(--green);
}

.bcard:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.bnum {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  color: var(--gold-dark);
  letter-spacing: 0.04em;
}

.bname {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.2;
  color: var(--green);
  letter-spacing: -0.01em;
}

.bcard.selected .bname { color: var(--green-dark); }

.btag {
  font-size: 12px;
  color: var(--ink-soft);
  line-height: 1.4;
  margin-top: auto;
}

/* Detail panel */

.detail {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
  min-height: 260px;
}

.detail-meta {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dark);
}

.detail-meta .sep { color: var(--ink-muted); }

.detail h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 3.5vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--green);
  margin: 0 0 18px;
}

.detail-def {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 24px;
}

.detail-core {
  background: var(--cream-dark);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
  margin: 0 0 24px;
}

.detail-core .label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 6px;
}

.detail-core p {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
}

.detail-section { margin: 0 0 22px; }

.detail-section .label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 6px;
}

.detail-section p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.detail-practice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 24px 0;
}

@media (max-width: 600px) {
  .detail-practice { grid-template-columns: 1fr; }
}

.practice-card {
  background: var(--green-tint);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.practice-card .label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 6px;
}

.practice-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
}

.develop-list {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.develop-list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
}

.develop-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold);
  font-weight: 500;
}

.detail-footer {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--green);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 16px;
  border: 1px solid var(--green);
  border-radius: var(--radius);
  transition: all 0.15s ease;
}

.read-more:hover {
  background: var(--green);
  color: var(--cream);
}

.detail-nav {
  display: flex;
  gap: 8px;
}

.nav-btn {
  font-family: var(--font-body);
  font-size: 13px;
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 6px 12px;
  cursor: pointer;
  color: var(--ink-soft);
  transition: all 0.15s ease;
}

.nav-btn:hover:not(:disabled) {
  border-color: var(--green);
  color: var(--green);
}

.nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* =========================================================
   CTA section
   ========================================================= */

.cta-section {
  background: var(--green);
  color: var(--cream);
  padding: 56px 0;
}

.cta-inner { text-align: center; }

.cta-section h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(26px, 3.5vw, 36px);
  line-height: 1.15;
  margin: 0 0 12px;
  color: var(--cream);
}

.cta-section p {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.55;
  color: rgba(244, 241, 236, 0.85);
  max-width: 520px;
  margin: 0 auto 28px;
}

.cta-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: all 0.15s ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--gold);
  color: var(--green-dark);
}

.btn-primary:hover { background: #d4a04a; }

.btn-secondary {
  background: transparent;
  border-color: var(--cream);
  color: var(--cream);
}

.btn-secondary:hover {
  background: var(--cream);
  color: var(--green-dark);
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  background: var(--cream-dark);
  color: var(--ink-soft);
  padding: 32px 0;
  font-size: 13px;
}

.footer-links a {
  color: var(--green);
  text-decoration: none;
}


.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
}

.footer-logo {
  display: block;
  height: 36px;
  width: auto;
}

.footer-note { margin: 4px 0 0; }

.footer-links {
  margin: 4px 0 0;
  display: flex;
  gap: 10px;
  align-items: center;
}

.footer-links a:hover { text-decoration: underline; }

/* =========================================================
   Embed mode (when loaded inside Substack iframe)
   Add ?embed=1 to the URL to strip header/footer/CTA
   ========================================================= */

body.embed .site-header,
body.embed .site-footer,
body.embed .cta-section,
body.embed .hero { display: none; }

body.embed .explorer { padding-top: 24px; }

body.embed { background: transparent; }

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 640px) {
  .hero { padding: 48px 0 56px; }
  .explorer { padding: 40px 0 32px; }
  .detail { padding: 24px 22px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .header-inner { padding-top: 10px; padding-bottom: 10px; }
  .brand-logo { height: 28px; }
  .footer-logo { height: 28px; }
}

@media (max-width: 420px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .bcard { min-height: 100px; padding: 14px; }
  .bname { font-size: 15px; }
  .btag { font-size: 11px; }
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
