/* Use Case Atlas — styles.css
   Last updated 2026-04-30 — logo + mobile + Beehiiv embed fixes
*/

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

html, body {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  background: #FEFDFD;
  color: #1A1A1A;
}

a { color: inherit; }

.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

/* ============ TOPBAR ============ */
.topbar, .footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.topbar { padding: 8px 0 28px; }

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

/* LOGO — hard caps on BOTH width and height. The SVG's intrinsic aspect ratio
   was causing 240px width to render at 100px+ tall. Capping height fixes it. */
.brand-logo {
  display: block;
  height: 44px;
  width: auto;
  max-width: 180px;
  max-height: 44px;
  object-fit: contain;
  flex-shrink: 0;
}

.eyebrow, .section-label, .card-label, .kicker {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #2A4B6C;
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
}

.text-link {
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

/* ============ HERO ============ */
.hero {
  display: grid;
  grid-template-columns: 1.3fr .9fr;
  gap: 32px;
  padding: 28px 0 24px;
}

.hero h1 {
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.02;
  margin: 10px 0 18px;
  max-width: 12ch;
}

.lede {
  font-size: 18px;
  line-height: 1.7;
  max-width: 62ch;
  color: #4A4A4A;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 28px 0;
}

.button {
  text-decoration: none;
  border: none;
  border-radius: 999px;
  padding: 14px 20px;
  font-weight: 700;
  cursor: pointer;
  display: inline-block;
}

.button-primary { background: #2A4B6C; color: #fff; }
.button-secondary { background: #D17354; color: #fff; }

.bullet-list {
  padding-left: 18px;
  color: #4A4A4A;
  line-height: 1.8;
}

/* ============ CARDS ============ */
.hero-card, .info-card, .feature-card, .signup-wrap {
  background: rgba(255, 255, 255, .72);
  border: 1px solid #E8E6E0;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(45, 74, 111, .08);
}

.hero-card { padding: 28px; }

.hero-card h2, .section h2 {
  margin: 8px 0 12px;
  font-size: 32px;
  line-height: 1.15;
}

.mini-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 22px;
}

.mini-grid div, .trust-pill {
  padding: 14px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid #E8E6E0;
}

.mini-grid span {
  display: block;
  font-size: 12px;
  color: #4A4A4A;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

/* ============ TRUST ROW ============ */
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 0 28px;
}

.trust-pill { font-weight: 600; }

/* ============ SECTIONS ============ */
.section { padding: 28px 0; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.info-card, .feature-card { padding: 24px; }

.info-card ul {
  margin: 0;
  padding-left: 18px;
  line-height: 1.8;
  color: #4A4A4A;
}

/* ============ SIGNUP / BEEHIIV ============ */
.signup-wrap {
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

/* Beehiiv embed wrapper — must contain the iframe within its grid cell.
   On desktop the cell is ~half the signup-wrap; on mobile it's full-width. */
.beehiiv-frame {
  width: 100%;
  max-width: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
}

.beehiiv-embed {
  width: 100%;
  min-width: 0;       /* override Beehiiv's inline 560px minimum */
  max-width: 100%;
  height: 320px;
  margin: 0;
  border: 0;
  border-radius: 12px;
  background-color: transparent;
  display: block;
}

.form-note, .form-status, .feature-card p, .section p {
  color: #4A4A4A;
  line-height: 1.7;
}

/* ============ FEATURES ============ */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* ============ FOOTER ============ */
.footer {
  padding: 32px 0 10px;
  color: #4A4A4A;
  font-size: 14px;
}

/* ============ TABLET (≤ 900px) ============ */
@media (max-width: 900px) {
  .hero,
  .two-col,
  .signup-wrap,
  .features {
    grid-template-columns: 1fr;
  }

  .topbar, .footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-shell { padding: 18px; }

  .hero h1 { max-width: none; }

  .signup-wrap { padding: 24px; }
}

/* ============ PHONE (≤ 720px) ============ */
@media (max-width: 720px) {
  .brand-logo {
    height: 36px;
    max-height: 36px;
    max-width: 140px;
  }

  .brand-name { font-size: 18px; }

  .topbar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
  }

  .hero h1 { font-size: 32px; }

  .hero-actions { flex-direction: column; align-items: stretch; }

  .hero-actions .button {
    width: 100%;
    text-align: center;
  }

  .signup-wrap { padding: 20px; }

  .beehiiv-embed { height: 360px; }

  .mini-grid { grid-template-columns: 1fr 1fr; }
}

/* ============ SMALL PHONE (≤ 400px) ============ */
@media (max-width: 400px) {
  .page-shell { padding: 14px; }
  .brand-logo {
    height: 30px;
    max-height: 30px;
    max-width: 120px;
  }
  .brand-name { font-size: 16px; }
  .hero h1 { font-size: 28px; }
  .signup-wrap { padding: 16px; }
}

/* === Beehiiv iframe width bump — final calibration 2026-04-30 ===
   Previous attempt at calc(100% + 32px) hit 80-90% of viewport.
   This pushes further by zeroing card padding and adding wider negative margins,
   while staying safely inside the page-shell padding so no horizontal scroll. */

@media (max-width: 720px) {
  .signup-wrap {
    padding: 8px;
    border-radius: 12px;
  }

  .beehiiv-frame {
    margin-left: -8px;
    margin-right: -8px;
    width: calc(100% + 16px);
    max-width: calc(100% + 16px);
    border-radius: 8px;
    overflow: hidden;
  }

  .beehiiv-embed {
    width: 100%;
    border-radius: 8px;
  }
}

@media (max-width: 400px) {
  .signup-wrap {
    padding: 6px;
  }

  .beehiiv-frame {
    margin-left: -6px;
    margin-right: -6px;
    width: calc(100% + 12px);
    max-width: calc(100% + 12px);
  }
}
