/* VentureEase Academy — main stylesheet
   Brand system: #5599cc primary, #b8960c gold (WCAG-AA on white), #1e293b chrome.
   Desktop-first responsive at 900 / 768 / 480.
*/

:root {
  --c-blue: #5599cc;
  --c-blue-dark: #3a7ba8;
  --c-blue-soft: #eef6ff;
  --c-gold: #b8960c;
  --c-gold-dark: #9a7e0a;
  --c-chrome: #1e293b;
  --c-chrome-2: #0f172a;
  --c-chrome-text: #cbd5e1;
  --c-text: #333;
  --c-text-light: #666;
  --c-bg: #fff;
  --c-bg-alt: #f4f6f8;
  --c-border: #e2e8f0;
  --c-error-bg: #fdecea;
  --c-error-border: #f5c6c1;
  --c-error-text: #921a13;
  --r-btn: 6px;
  --r-card: 10px;
  --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* === Reset / base === */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-stack);
  color: var(--c-text);
  background: var(--c-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Sticky footer: keep <footer> at viewport bottom on short pages so body bg doesn't paint below it. */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
.site-footer { flex-shrink: 0; }
a { color: var(--c-blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { color: #111; line-height: 1.25; }
h1 { font-size: 36px; margin: 0 0 16px; }
h2 { font-size: 28px; margin: 32px 0 16px; }
h3 { font-size: 20px; margin: 24px 0 12px; }
p { margin: 0 0 12px; }
hr { border: 0; border-top: 1px solid var(--c-border); }

/* === Layout === */
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 720px; }

/* === Ecosystem nav === */
.ecosystem-nav {
  background: var(--c-chrome);
  color: var(--c-chrome-text);
  padding: 8px 0;
  font-size: 13px;
}
.eco-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 14px;
  justify-content: safe center;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.eco-inner::-webkit-scrollbar { display: none; }
.eco-arrow {
  flex-shrink: 0;
  color: var(--c-chrome-text);
  opacity: 0.55;
  font-weight: 600;
  font-size: 14px;
  user-select: none;
}
.ecosystem-nav a {
  color: var(--c-chrome-text);
  text-decoration: none;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.ecosystem-nav a:hover { background: rgba(255, 255, 255, 0.06); text-decoration: none; }
.ecosystem-nav a.active {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  pointer-events: none;
}
.ecosystem-nav .gold { color: var(--c-gold); }

/* === Brand wordmark rules (ecosystem standard) ===
   "Ease" is always bold; the prefix word(s) are never bold.
   Apply .brand-prefix to the non-Ease parts and .brand-ease to "Ease".
   Does NOT apply inside .ecosystem-nav (which has its own gold-sweep flow). */
.brand-prefix { font-weight: 400; }
.brand-ease   { font-weight: 700; }

/* === Site header === */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--c-border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 50;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  font-weight: 700;
  font-size: 22px;
  color: var(--c-chrome);
  text-decoration: none;
}
.brand .gold { color: var(--c-gold-dark); }
.site-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}
.site-nav a {
  color: var(--c-text);
  text-decoration: none;
  padding: 6px 0;
  font-weight: 500;
  font-size: 15px;
}
.site-nav a:hover, .site-nav a.active { color: var(--c-blue); text-decoration: none; }
/* btn-primary inside the nav must keep its white text — .site-nav a is more specific than .btn-primary */
.site-nav a.btn-primary { color: #fff; }
.site-nav a.btn-primary:hover { color: #fff; }

.nav-toggle {
  display: none;
  background: var(--c-blue);
  border: 0;
  padding: 10px;
  border-radius: var(--r-btn);
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
}
.nav-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* === Buttons === */
.btn-primary,
button.btn-primary,
[type="submit"],
button {
  background: var(--c-blue);
  color: #fff;
  padding: 10px 20px;
  border: 0;
  border-radius: var(--r-btn);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.15s;
}
.btn-primary:hover,
button:hover,
[type="submit"]:hover {
  background: var(--c-blue-dark);
  text-decoration: none;
  color: #fff;
}

/* === Hero === */
.hero {
  background: linear-gradient(135deg, var(--c-chrome-2) 0%, var(--c-chrome) 50%, var(--c-blue) 100%);
  color: #fff;
  padding: 96px 0;
  text-align: center;
}
.hero h1 {
  font-size: 52px;
  margin: 0 0 16px;
  color: #fff;
  line-height: 1.15;
}
.hero h1 .gold { color: var(--c-gold); }

/* Animated hero title: "Venture[typed]Ease." — typed middle is " toward Business Success with " */
.hero-title-animated {
  text-align: center;
  min-height: 2.4em;
}
.hero-typed.typing::after {
  content: '|';
  font-weight: normal;
  animation: hero-blink 0.7s step-end infinite;
  margin-left: 1px;
}
.hero-typed.done::after { content: none; }
@keyframes hero-blink { 50% { opacity: 0; } }

.hero-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.92);
  max-width: 720px;
  margin: 0 auto 1rem;
  line-height: 1.7;
}
.hero-subtitle .gold { color: var(--c-gold); font-weight: 700; font-style: italic; }

/* Hero tagline — ecosystem positioning line, italic + medium weight,
   appears between the subtitle and the CTA. Mirrors .biz pattern with
   gold on the Academy's LEFT word (Venture) per left-gold brand sweep. */
.hero-tagline {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.95);
  max-width: 720px;
  margin: 0 auto 2.5rem;
  font-style: italic;
  font-weight: 500;
}
.hero-tagline .gold { color: var(--c-gold); font-style: normal; font-weight: 700; }

.hero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-cta .btn-primary { background: var(--c-gold); color: var(--c-chrome); margin-top: 0; }
.hero-cta .btn-primary:hover { background: var(--c-gold-dark); }
.hero-cta .btn-outline {
  display: inline-block;
  padding: 12px 22px;
  border: 1px solid rgba(255,255,255,0.45);
  border-radius: var(--r-btn);
  color: #fff;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}
.hero-cta .btn-outline:hover { background: rgba(255,255,255,0.12); border-color: #fff; color: #fff; }

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 56px;
  margin-top: 44px;
  flex-wrap: wrap;
}
.hero-stat { text-align: center; }
.hero-stat-number {
  display: block;
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--c-gold);
  line-height: 1.1;
}
.hero-stat-label {
  font-size: 0.8rem;
  opacity: 0.88;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 6px;
  display: block;
}

/* Section titles — centered intro pattern used across home and key marketing sections */
.section-title { text-align: center; margin-bottom: 0.5rem; }
.section-subtitle {
  text-align: center;
  color: var(--c-text-muted, #64748b);
  margin: 0 auto 2rem;
  max-width: 760px;
  font-size: 1.05rem;
  line-height: 1.6;
}
.text-center { text-align: center; }
.text-center > .tiles { text-align: left; } /* tile cards keep their own internal alignment */

/* === Cards === */
.card {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-card);
  padding: 28px;
  margin: 24px 0;
}
.card h2:first-child { margin-top: 0; }

/* === Tiles (3-column product grid) === */
.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 32px 0;
}
.tile {
  background: #fff;
  border: 1px solid var(--c-border);
  border-radius: var(--r-card);
  padding: 32px;
  text-decoration: none;
  color: var(--c-text);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.tile:hover {
  border-color: var(--c-blue);
  box-shadow: 0 8px 24px rgba(85, 153, 204, 0.15);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--c-text);
}
.tile h3 { margin: 0; color: var(--c-chrome); }
.tile small { color: var(--c-text-light); font-size: 13px; }
.tile p { margin: 12px 0 0; }

/* === Forms === */
.auth-form, .contact-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 460px;
}
.auth-form label, .contact-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text);
}
.auth-form input,
.contact-form input,
.contact-form textarea,
.auth-form textarea,
.auth-form select {
  padding: 11px 12px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-btn);
  font: inherit;
  background: #fff;
}
.auth-form input:focus,
.contact-form input:focus,
.contact-form textarea:focus,
.auth-form textarea:focus,
.auth-form select:focus {
  outline: 2px solid var(--c-blue);
  outline-offset: 1px;
  border-color: var(--c-blue);
}

.flash {
  background: var(--c-blue-soft);
  border: 1px solid #b7d6f0;
  padding: 12px 16px;
  border-radius: var(--r-btn);
  margin: 16px 0;
}
.flash.error {
  background: var(--c-error-bg);
  border-color: var(--c-error-border);
  color: var(--c-error-text);
}

/* === Footer === */
.site-footer {
  background: var(--c-chrome);
  color: var(--c-chrome-text);
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.4fr;
  gap: 32px;
  padding: 56px 24px;
}
.footer-grid h4 {
  color: #fff;
  margin-top: 0;
  font-size: 15px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-grid a { color: var(--c-chrome-text); text-decoration: none; }
.footer-grid a:hover { color: var(--c-gold); text-decoration: none; }
.footer-brand {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.footer-brand .gold { color: var(--c-gold); }
.subscribe-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
  margin-top: 8px;
}
.subscribe-form input[type=email] {
  flex: 1 1 200px;
  min-width: 0;
  padding: 10px;
  border: 0;
  border-radius: var(--r-btn);
  font: inherit;
}
.subscribe-form button {
  padding: 10px 16px;
  flex: 0 0 auto;
}
/* Honeypot — moved off-inline because nonce-CSP blocks the inline style= attribute */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ============================================================
   Utility classes — replace inline style= attrs that nonce-CSP drops.
   Don't add new inline styles. Use these instead.
   ============================================================ */
/* Vertical-only padding so `.container`'s horizontal gutter (0 24px) survives.
   Shorthand `padding: 48px 0` zeroes the horizontal value and buts copy to
   the viewport edge — use padding-top/-bottom instead. */
.section-pad        { padding-top: 48px; padding-bottom: 48px; }
.section-pad-lg     { padding-top: 64px; padding-bottom: 64px; }
.section-pad-asym   { padding-top: 32px; padding-bottom: 64px; }
.section-bg-alt     { background: var(--c-bg-alt); }
.products-narrow    { max-width: 880px; }
.form-narrow        { max-width: 460px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mt-6 { margin-top: 48px; }
.mr-1 { margin-right: 8px; }
.section-divider { margin: 48px 0; }
.text-center  { text-align: center; }
.text-muted   { color: var(--c-text-light); }
.text-thin    { font-weight: 400; }
.text-italic  { font-style: italic; }
.text-sm      { font-size: 13px; }
button.btn-danger { background: #dc2626; }
button.btn-danger:hover { background: #b91c1c; }
@media (max-width: 480px) {
  .subscribe-form { flex-direction: column; }
  .subscribe-form input[type=email],
  .subscribe-form button { width: 100%; }
}
.footer-legal { font-size: 13px; margin-top: 12px; }
.footer-legal a { color: var(--c-chrome-text); }
.footer-copy {
  background: rgba(0, 0, 0, 0.25);
  padding: 14px 0;
  text-align: center;
  font-size: 13px;
}

/* === Auth page polish === */
.auth-page h1 { margin-bottom: 24px; }

/* === Blog === */
.post-card {
  padding: 28px 0;
  border-bottom: 1px solid var(--c-border);
}
.post-card h2 { margin: 0 0 8px; }
.post-card h3 { margin: 0 0 8px; }
.post-card .meta { color: var(--c-text-light); font-size: 14px; margin-bottom: 8px; }
article.post { padding: 32px 0; }
article.post h1 { font-size: 40px; margin-bottom: 8px; }
article.post .meta { color: var(--c-text-light); margin-bottom: 32px; }
.post-body p { margin-bottom: 16px; line-height: 1.7; }
.post-body h2, .post-body h3 { margin-top: 32px; }
.post-body code { background: var(--c-bg-alt); padding: 2px 6px; border-radius: 3px; font-size: 0.92em; }
.post-body pre { background: var(--c-bg-alt); padding: 16px; border-radius: var(--r-btn); overflow-x: auto; }
.post-body blockquote { border-left: 3px solid var(--c-blue); margin: 16px 0; padding: 4px 16px; color: var(--c-text-light); }

/* === Admin tables === */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: 14px;
}
.admin-table th, .admin-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--c-border);
  vertical-align: top;
}
.admin-table th {
  background: var(--c-bg-alt);
  font-weight: 600;
  color: var(--c-text);
}
.admin-table tr:hover td { background: var(--c-blue-soft); }
.admin-table code { background: var(--c-bg-alt); padding: 2px 6px; border-radius: 3px; font-size: 13px; }

/* === Comparison table (Products page) === */
.compare-table { margin-top: 16px; }

/* === Section helpers === */
section + section { margin-top: 0; }

/* === Responsive === */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; padding: 40px 24px; }
  .tiles { grid-template-columns: 1fr; gap: 16px; }
  .hero { padding: 64px 0; }
  .hero h1 { font-size: 40px; }
  h1 { font-size: 30px; }
}
@media (max-width: 768px) {
  .site-header .container { gap: 12px; position: relative; }
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--c-border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px;
    z-index: 60;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 16px; font-size: 16px; text-align: center; }
  .site-nav a.btn-primary { margin-top: 8px; }
  .eco-inner { gap: 14px; }
  /* Hero typography — matches ecosystem (LaunchEase/StartEase/HireEase) at <=768px */
  .hero { padding: 3.5rem 0; }
  .hero h1 { font-size: 2.25rem; }
  .hero-title-animated { font-size: 2.25rem; min-height: 2.4em; }
  /* .hero-subtitle stays at 1.2rem (inherited from base) — matches ecosystem */
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .container { padding: 0 16px; }
  .eco-inner { gap: 8px; padding: 0 12px; }
  .ecosystem-nav a { padding: 3px 8px; }
  .site-header { padding: 12px 0; }
  .brand { font-size: 18px; }
  h1 { font-size: 26px; }
  /* Hero typography — matches ecosystem at <=480px */
  .hero { padding: 2.5rem 0; }
  .hero h1 { font-size: 1.85rem; }
  .hero-title-animated { font-size: 1.5rem; min-height: 2.4em; }
  .hero-subtitle { font-size: 1rem; }
  .hero-stats { flex-direction: column; gap: 1.25rem; margin-top: 2rem; }
}
