/* Waypoint — Session Blueprint (Engine Groups–inspired aesthetic) */

:root {
  /* Core palette aligned with engine.com/groups marketing UI */
  --ink: #111111;
  --ink-soft: #1a1d26;
  --brand: #1e1ef6;
  --brand-hover: #1618c9;
  --brand-muted: #e8eafe;
  --coral: #fd4b23;
  --coral-soft: #fff4f0;
  --bg-page: #f5f7fb;
  --bg-white: #ffffff;
  --bg-panel: #eef3f9;
  --gray-border: #e2e8f4;
  --gray-muted: #64748b;
  --gray-text: #475569;
  --icon-slate: #1e293b;
  --icon-tile-muted: #e0e7ff;
  --shadow-soft: 0 16px 48px rgba(15, 23, 42, 0.08);
  --shadow-card: 0 1px 0 rgba(15, 23, 42, 0.04), 0 12px 32px rgba(15, 23, 42, 0.06);
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --shell-max: 1180px;
  --font: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

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

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-text);
  background: var(--bg-page);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.shell {
  width: min(100% - 40px, var(--shell-max));
  margin-inline: auto;
}

@media (max-width: 480px) {
  .shell {
    width: min(100% - 28px, var(--shell-max));
  }
}

.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;
}

/* —— Header —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-border);
}

.header-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  min-height: 72px;
  position: relative;
}

.logo {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.03em;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 22px;
  background: var(--ink);
  border-radius: 1px;
  margin-inline: auto;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  gap: 2rem;
  position: relative;
  min-width: 0;
}

.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--gray-text);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link.is-active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  z-index: 1;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.15s;
}

.icon-btn:hover {
  background: var(--bg-panel);
}

.icon {
  width: 22px;
  height: 22px;
}

.user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--brand-muted);
  color: var(--brand);
  cursor: pointer;
}

.icon-user {
  width: 20px;
  height: 20px;
}

.btn {
  font-family: inherit;
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
}

.btn-portal {
  background: var(--brand);
  color: #fff;
  padding: 0.65rem 1.25rem;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(30, 30, 246, 0.2);
}

.btn-portal:hover {
  background: var(--brand-hover);
  box-shadow: 0 4px 14px rgba(30, 30, 246, 0.35);
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
    margin-left: auto;
  }

  .nav {
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    padding: 0 0 1rem;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: max-height 0.35s ease, opacity 0.2s ease, padding 0.2s ease;
    justify-content: flex-start;
  }

  .nav.is-open {
    max-height: 420px;
    opacity: 1;
    pointer-events: auto;
    padding-top: 0.25rem;
  }

  .nav-links {
    position: static;
    transform: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--gray-border);
  }

  .nav-link {
    display: block;
    padding: 0.65rem 0;
    border-bottom-width: 0;
    border-left: 3px solid transparent;
    padding-left: 0.5rem;
  }

  .nav-link.is-active {
    border-left-color: var(--brand);
  }

  .nav-actions {
    padding-top: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .btn-portal {
    width: 100%;
    margin-top: 0.5rem;
  }
}

/* —— Hero —— */
.hero {
  padding-top: 3.5rem;
  padding-bottom: 2.75rem;
}

.eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-muted);
}

.hero-title {
  margin: 0 0 1.1rem;
  font-size: clamp(2.125rem, 5.5vw, 3.25rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.08;
  color: var(--ink);
  max-width: 18ch;
}

.hero-lede {
  margin: 0;
  max-width: 48ch;
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--gray-muted);
  font-weight: 400;
}

/* —— Form steps —— */
.blueprint-form {
  padding-bottom: 3.5rem;
}

.step {
  margin: 0 0 2.75rem;
  padding: 0;
  border: none;
}

.step-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.step-title {
  margin: 0;
  padding: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.step-hint {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-muted);
}

/* Topic cards */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

@media (max-width: 768px) {
  .topic-grid {
    grid-template-columns: 1fr;
  }
}

.topic-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1.5rem 1.35rem;
  background: var(--bg-white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
  text-align: left;
  box-shadow: var(--shadow-card);
}

.topic-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.topic-card.is-selected {
  background: var(--brand-muted);
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand), 0 16px 40px rgba(30, 30, 246, 0.12);
}

.topic-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
}

.topic-icon svg {
  width: 32px;
  height: 32px;
}

.topic-icon--cbt svg {
  width: 30px;
  height: 30px;
}

.topic-name {
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.topic-desc {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--gray-muted);
}

/* Pills */
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 1.65rem;
  background: var(--bg-white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-pill);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gray-text);
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  transition: background 0.15s, color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.pill:hover {
  border-color: #c7d2fe;
  color: var(--ink);
}

.pill.is-selected {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
  box-shadow: 0 4px 16px rgba(30, 30, 246, 0.35);
}

/* Format cards */
.format-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 768px) {
  .format-grid {
    grid-template-columns: 1fr;
  }
}

.format-card {
  display: flex;
  gap: 1.2rem;
  padding: 1.5rem 1.35rem;
  background: var(--bg-white);
  border: 1px solid var(--gray-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: left;
  align-items: flex-start;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-card);
}

.format-card:hover {
  border-color: #c7d2fe;
}

.format-card.is-selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand), 0 16px 40px rgba(30, 30, 246, 0.1);
}

.format-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.format-icon svg {
  width: 26px;
  height: 26px;
}

.format-icon--group {
  background: var(--icon-slate);
  color: #f8fafc;
}

.format-icon--individual {
  background: var(--icon-tile-muted);
  color: var(--brand);
}

.format-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: 0;
}

.format-name {
  font-weight: 700;
  font-size: 1.0625rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.format-desc {
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--gray-muted);
}

.radio-line {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-text);
}

.radio-ui {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.15s;
}

.format-card.is-selected .radio-ui {
  border-color: var(--brand);
}

.format-card.is-selected .radio-ui::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: var(--brand);
}

/* CTA */
.cta-wrap {
  display: flex;
  justify-content: center;
  padding-top: 0.75rem;
}

.btn-generate {
  background: var(--brand);
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 600;
  padding: 1.05rem 2rem 1.05rem 2.1rem;
  border-radius: var(--radius-pill);
  gap: 0.65rem;
  box-shadow: 0 4px 20px rgba(30, 30, 246, 0.35);
  letter-spacing: -0.02em;
}

.btn-generate:hover {
  background: var(--brand-hover);
  box-shadow: 0 8px 28px rgba(30, 30, 246, 0.45);
}

.btn-generate:active {
  transform: translateY(1px);
}

.icon-sparkle {
  width: 22px;
  height: 22px;
  opacity: 0.95;
}

/* —— Ledger —— */
.ledger {
  padding-bottom: 4rem;
}

.ledger-inner {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  gap: 2.75rem;
  align-items: center;
  padding: 2.5rem 2.75rem;
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-border);
  box-shadow: var(--shadow-card);
}

@media (max-width: 900px) {
  .ledger-inner {
    grid-template-columns: 1fr;
    padding: 1.85rem 1.5rem;
  }
}

.ledger-title {
  margin: 0 0 0.9rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.ledger-text {
  margin: 0 0 1.85rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--gray-muted);
  max-width: 42ch;
}

.ledger-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2.75rem;
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.stat-label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray-muted);
}

.ledger-visual {
  border-radius: var(--radius-md);
  overflow: hidden;
  min-height: 220px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

.ledger-photo {
  width: 100%;
  height: 100%;
  min-height: 240px;
  background-color: var(--ink-soft);
  background-image: linear-gradient(145deg, rgba(30, 30, 246, 0.35) 0%, rgba(253, 75, 35, 0.12) 55%, transparent 85%),
    url("https://images.unsplash.com/photo-1497215842964-222cb430e823?auto=format&fit=crop&w=960&q=82");
  background-size: cover;
  background-position: 55% 50%;
}

@media (max-width: 900px) {
  .ledger-photo {
    min-height: 200px;
  }
}

/* —— Footer —— */
.site-footer {
  border-top: 1px solid var(--gray-border);
  background: var(--bg-white);
  padding: 1.5rem 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
}

.footer-brand {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
}

.logo--footer {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--gray-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-muted);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover {
  color: var(--brand);
}
