:root {
  --navy: #0C1829;
  --navy2: #111F33;
  --navy3: #192C46;
  --gold: #C9A030;
  --gold2: #E8C87A;
  --cream: #EDE4D4;
  --muted: #7A8FA8;
  --border: rgba(201, 160, 48, 0.18);
  --success: #4ade80;
  --danger: #f87171;
  --radius: 14px;
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "DM Sans", system-ui, sans-serif;
  background: var(--navy);
  color: var(--cream);
  line-height: 1.6;
  min-height: 100vh;
}
h1, h2, h3, h4 {
  font-family: "Playfair Display", Georgia, serif;
  line-height: 1.2;
  font-weight: 600;
}
a { color: var(--gold2); text-decoration: none; }
a:hover { color: var(--gold); }
img { max-width: 100%; display: block; }

.container { width: min(100% - 2.5rem, var(--max)); margin-inline: auto; }
.muted { color: var(--muted); }
.gold { color: var(--gold2); }
.center { text-align: center; }

/* NAV */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(12, 24, 41, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.9rem 0; gap: 1rem;
}
.logo {
  display: flex; align-items: center; gap: 0.55rem;
  color: var(--gold2); font-family: "Playfair Display", serif;
  font-size: 1.35rem; font-weight: 600;
}
.logo svg { width: 28px; height: 28px; }
.logo-img {
  width: 36px; height: 36px;
  border-radius: 9px;
  object-fit: cover;
  /* no white ring / border */
  border: 0;
  box-shadow: none;
  flex-shrink: 0;
  background: transparent;
}
.logo-img-lg {
  width: 56px; height: 56px;
  border-radius: 14px;
}
.brand-mark {
  display: block;
  width: min(120px, 28vw);
  height: auto;
  border-radius: 22%;
  margin: 0 auto 1rem;
  border: 0;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  background: transparent;
}
.nav-links { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.nav-links a { color: var(--muted); font-size: 0.92rem; }
.nav-links a:hover, .nav-links a.active { color: var(--cream); }
.nav-toggle {
  display: none; background: none; border: 0; color: var(--cream); font-size: 1.4rem; cursor: pointer;
}

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  border: 0; border-radius: 10px; padding: 0.75rem 1.2rem;
  font-weight: 600; font-size: 0.95rem; cursor: pointer;
  font-family: inherit; transition: 0.15s ease;
}
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold2); transform: translateY(-1px); }
.btn-outline {
  background: transparent; color: var(--cream);
  border: 1px solid rgba(255,255,255,0.14);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold2); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* HERO */
.hero {
  padding: 5.5rem 0 4rem;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: center;
}
.badge {
  display: inline-flex; align-items: center; gap: 0.45rem;
  background: rgba(201,160,48,0.1); border: 1px solid var(--border);
  border-radius: 999px; padding: 0.35rem 0.9rem; font-size: 0.82rem; color: var(--gold2);
  margin-bottom: 1.2rem;
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
  animation: pulse 2s infinite;
}
@keyframes pulse { 50% { opacity: 0.35; } }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin-bottom: 0.4rem; }
.hero h1 em { color: var(--gold2); font-style: italic; display: block; }
.hero-lead { color: var(--muted); font-size: 1.08rem; max-width: 34rem; margin: 1rem 0 1.6rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-note { margin-top: 1rem; font-size: 0.85rem; color: var(--muted); }

/* CARDS */
.card {
  background: var(--navy2);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius);
  padding: 1.35rem;
}
.card-soft { box-shadow: 0 20px 50px rgba(0,0,0,0.28); }

/* SECTIONS */
section { padding: 4.5rem 0; }
.section-label {
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin-bottom: 0.5rem;
}
.section-title { font-size: clamp(1.8rem, 3.5vw, 2.5rem); margin-bottom: 0.75rem; }
.section-title .gold-line { color: var(--gold2); font-style: italic; }
.section-lead { color: var(--muted); max-width: 36rem; margin-bottom: 2rem; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; }
.grid-2.center-block {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}
.section-center .section-label,
.section-center .section-title,
.section-center .section-lead {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.section-center .section-lead { max-width: 36rem; }
.grid-chars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }

.feature-icon { font-size: 1.5rem; margin-bottom: 0.6rem; }
.feature h3 { font-size: 1.15rem; margin-bottom: 0.35rem; }
.feature p { color: var(--muted); font-size: 0.94rem; }

.char-card { text-align: center; transition: 0.15s; }
.char-card:hover { border-color: var(--border); transform: translateY(-2px); }
.char-card img {
  width: 88px; height: 88px; border-radius: 50%; object-fit: cover; object-position: top;
  margin: 0 auto 0.75rem; border: 2px solid rgba(255,255,255,0.08);
}
.char-card h3 { font-size: 1.15rem; }
.char-card .role { color: var(--gold2); font-size: 0.85rem; margin: 0.2rem 0 0.4rem; }
.char-card p { color: var(--muted); font-size: 0.88rem; }

/* PRICING */
.price-card { position: relative; }
.price-card.featured { border-color: var(--gold); box-shadow: 0 0 0 1px rgba(201,160,48,0.25); }
.price-tag {
  position: absolute; top: -10px; right: 1rem;
  background: var(--gold); color: var(--navy); font-size: 0.72rem;
  font-weight: 700; padding: 0.25rem 0.6rem; border-radius: 999px;
}
.price { font-size: 2.2rem; font-family: "Playfair Display", serif; margin: 0.6rem 0; }
.price span { font-size: 0.95rem; color: var(--muted); font-family: "DM Sans", sans-serif; }
.price-list { list-style: none; margin: 1rem 0 1.4rem; }
.price-list li {
  padding: 0.4rem 0; color: var(--muted); font-size: 0.92rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.price-list li::before { content: "✓ "; color: var(--gold2); }

/* FORMS */
.auth-wrap {
  min-height: calc(100vh - 80px);
  display: grid; place-items: center; padding: 2.5rem 0 4rem;
}
.auth-card { width: min(100%, 440px); }
.auth-card h1 { font-size: 1.9rem; margin-bottom: 0.35rem; }
.auth-card .sub { color: var(--muted); margin-bottom: 1.4rem; font-size: 0.95rem; }
.form-group { margin-bottom: 0.95rem; }
.form-group label {
  display: block; font-size: 0.82rem; color: var(--muted); margin-bottom: 0.35rem; font-weight: 500;
}
.form-group input, .form-group select, .form-group textarea {
  width: 100%; background: var(--navy3); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px; padding: 0.75rem 0.9rem; color: var(--cream);
  font: inherit; outline: none; transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  border-color: var(--gold);
}
.form-group textarea { min-height: 110px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.form-error {
  background: rgba(248,113,113,0.12); border: 1px solid rgba(248,113,113,0.3);
  color: #fecaca; padding: 0.7rem 0.9rem; border-radius: 10px; font-size: 0.9rem;
  margin-bottom: 1rem; display: none;
}
.form-error.show { display: block; }
.form-success {
  background: rgba(74,222,128,0.1); border: 1px solid rgba(74,222,128,0.3);
  color: #bbf7d0; padding: 0.7rem 0.9rem; border-radius: 10px; font-size: 0.9rem;
  margin-bottom: 1rem; display: none;
}
.form-success.show { display: block; }
.form-footer { margin-top: 1.1rem; text-align: center; color: var(--muted); font-size: 0.9rem; }
.tabs {
  display: flex; gap: 0.4rem; background: var(--navy3); padding: 0.3rem;
  border-radius: 12px; margin-bottom: 1.25rem;
}
.tab {
  flex: 1; text-align: center; padding: 0.55rem; border-radius: 9px;
  color: var(--muted); cursor: pointer; font-size: 0.9rem; font-weight: 500;
  border: 0; background: transparent; font-family: inherit;
}
.tab.active { background: var(--gold); color: var(--navy); font-weight: 700; }

/* APP SHELL */
.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 65px); }
.sidebar {
  background: var(--navy2); border-right: 1px solid rgba(255,255,255,0.06);
  padding: 1.25rem;
}
.sidebar h2 { font-size: 1rem; margin-bottom: 1rem; color: var(--gold2); }
.side-user { font-size: 0.9rem; color: var(--muted); margin-bottom: 1.25rem; }
.side-nav a {
  display: block; padding: 0.6rem 0.75rem; border-radius: 9px;
  color: var(--cream); margin-bottom: 0.25rem; font-size: 0.92rem;
}
.side-nav a:hover, .side-nav a.active { background: var(--navy3); color: var(--gold2); }
.main-pane { padding: 1.5rem; display: flex; flex-direction: column; min-height: 0; }
.chat-box {
  flex: 1; overflow-y: auto; background: var(--navy2);
  border: 1px solid rgba(255,255,255,0.06); border-radius: var(--radius);
  padding: 1rem; margin-bottom: 0.9rem; min-height: 360px; max-height: 55vh;
}
.msg { max-width: 85%; margin-bottom: 0.75rem; padding: 0.7rem 0.9rem; border-radius: 12px; font-size: 0.94rem; }
.msg-user { margin-left: auto; background: var(--gold); color: var(--navy); border-bottom-right-radius: 4px; }
.msg-bot { background: var(--navy3); border-bottom-left-radius: 4px; }
.chat-input-row { display: flex; gap: 0.5rem; }
.chat-input-row input {
  flex: 1; background: var(--navy2); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px; padding: 0.8rem 1rem; color: var(--cream); font: inherit;
}

/* FOOTER */
footer {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 3rem 0 2rem; margin-top: 2rem;
}
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 1.5rem; margin-bottom: 2rem;
}
.footer-brand p { color: var(--muted); font-size: 0.9rem; margin-top: 0.6rem; max-width: 16rem; }
.fc-title { font-size: 0.8rem; color: var(--gold2); letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 0.7rem; }
.fc-links { list-style: none; }
.fc-links a { color: var(--muted); font-size: 0.9rem; display: block; padding: 0.25rem 0; }
.fc-links a:hover { color: var(--cream); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
  border-top: 1px solid rgba(255,255,255,0.05); padding-top: 1rem;
  color: var(--muted); font-size: 0.82rem;
}

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, rgba(201,160,48,0.12), rgba(25,44,70,0.5));
  border: 1px solid var(--border); border-radius: 20px; padding: 2.5rem; text-align: center;
}
.cta-band h2 { margin-bottom: 0.5rem; }
.cta-band p { color: var(--muted); margin-bottom: 1.25rem; }

.school-hero { padding-top: 4rem; padding-bottom: 2rem; }
.stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; margin-top: 1.5rem;
}
.stat {
  background: var(--navy2); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 1rem; text-align: center;
}
.stat strong { display: block; font-size: 1.4rem; color: var(--gold2); font-family: "Playfair Display", serif; }
.stat span { font-size: 0.8rem; color: var(--muted); }

@media (max-width: 900px) {
  .hero, .grid-3, .grid-chars, .footer-grid, .grid-2, .app-shell, .stats { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--navy2); flex-direction: column; padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .nav-links.open { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .grid-chars { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .grid-chars { grid-template-columns: 1fr; }
}

/* Companion picker (signup) */
.auth-card-wide { width: min(100%, 560px); }
.companion-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-bottom: 0.25rem;
}
.companion-option {
  position: relative;
  cursor: pointer;
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: var(--navy3);
  padding: 0.75rem 0.4rem 0.65rem;
  text-align: center;
  transition: border-color 0.15s, transform 0.15s, background 0.15s;
}
.companion-option:hover {
  border-color: rgba(201,160,48,0.35);
  transform: translateY(-2px);
}
.companion-option.selected {
  border-color: var(--gold);
  background: rgba(201,160,48,0.1);
  box-shadow: 0 0 0 1px rgba(201,160,48,0.25);
}
.companion-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.companion-option img {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
  margin: 0 auto 0.45rem;
  border: 2px solid rgba(255,255,255,0.1);
}
.companion-option.selected img {
  border-color: var(--gold2);
}
.companion-option .c-name {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cream);
}
.companion-option .c-role {
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.3;
  margin-top: 0.15rem;
  min-height: 2.2em;
}
.companion-option .c-check {
  display: none;
  position: absolute;
  top: 6px;
  right: 8px;
  color: var(--gold2);
  font-size: 0.85rem;
  font-weight: 700;
}
.companion-option.selected .c-check { display: block; }

/* Content extras */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}
.quote-card {
  border-left: 3px solid var(--gold);
  padding-left: 1.1rem;
  margin: 1rem 0;
  color: var(--muted);
  font-style: italic;
}
.faq details {
  background: var(--navy2);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.55rem;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--cream);
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  float: right;
  color: var(--gold2);
}
.faq details[open] summary::after { content: "−"; }
.faq details p {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.65rem;
  line-height: 1.55;
}
.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.25rem;
}
.trust-pill {
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  background: rgba(255,255,255,0.02);
}
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  border: 0;
}

@media (max-width: 900px) {
  .split-section { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .companion-picker { grid-template-columns: repeat(2, 1fr); }
  .auth-card-wide { width: min(100%, 440px); }
}
