/* ============================================================
   NiveshAstra Academy — Design Tokens & Shared Styles
   academy.niveshastra.com
   
   Tonal shift from the dashboard site:
   Dashboard = dark, dense, institutional, data-heavy
   Academy  = warm, spacious, human, motivating
   "Same building, different room."
   ============================================================ */

/* --- DESIGN TOKENS --- */
:root {
  /* Canvas */
  --canvas:           #FBF8F3;
  --canvas-alt:       #F5F0E8;
  --canvas-card:      #FFFFFF;

  /* Text */
  --text-primary:     #1F3A5F;
  --text-body:        #4A5568;
  --text-muted:       #7A8599;
  --text-light:       #A0AEC0;

  /* Brand accent */
  --accent:           #3A5FBF;
  --accent-hover:     #2E4FA3;
  --accent-light:     #EBF0FA;

  /* Logo gradient (brand family) */
  --logo-grad-start:  #5A7ACC;
  --logo-grad-end:    #3A5FBF;

  /* Warm secondary */
  --amber:            #D4A24A;
  --amber-light:      #FDF6E3;
  --amber-hover:      #C48E38;

  /* Borders & dividers */
  --border:           #E8E2D9;
  --border-light:     #F0EBE3;

  /* Shadows */
  --shadow-sm:        0 1px 3px rgba(31,58,95,0.06);
  --shadow-md:        0 4px 16px rgba(31,58,95,0.08);
  --shadow-lg:        0 8px 32px rgba(31,58,95,0.10);

  /* Typography */
  --font-headline:    'Fraunces', 'Georgia', serif;
  --font-body:        'Inter', 'system-ui', -apple-system, sans-serif;
  --font-prose:       'Source Serif 4', 'Georgia', serif;

  /* Sizing */
  --container-max:    1140px;
  --container-narrow: 780px;
  --nav-height:       72px;
  --section-gap:      120px;

  /* Radius */
  --radius-sm:        8px;
  --radius-md:        12px;
  --radius-lg:        20px;
}


/* --- RESET & BASE --- */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.78;
  color: var(--text-body);
  background: var(--canvas);
}

img { max-width:100%; display:block; }
a { color: var(--accent); text-decoration: none; transition: color .2s; }
a:hover { color: var(--accent-hover); }


/* --- LAYOUT --- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-gap) 0;
}
.section--alt {
  background: var(--canvas-alt);
}


/* --- TYPOGRAPHY --- */
h1, h2, h3, h4 {
  font-family: var(--font-headline);
  color: var(--text-primary);
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(36px, 5vw, 56px); margin-bottom: 24px; }
h2 { font-size: clamp(28px, 4vw, 42px); margin-bottom: 20px; }
h3 { font-size: clamp(22px, 3vw, 28px); margin-bottom: 16px; }
h4 { font-size: 20px; margin-bottom: 12px; }

.eyebrow {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.prose {
  font-family: var(--font-prose);
  font-size: 19px;
  line-height: 1.85;
  color: var(--text-body);
  max-width: var(--container-narrow);
}
.prose p + p { margin-top: 24px; }

.subtitle {
  font-size: 20px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 620px;
}


/* --- NAVIGATION --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-height);
  background: rgba(251,248,243,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow .3s;
}
.nav.scrolled {
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo { display:flex; align-items:center; gap:0; }
.nav-logo-img { height: 36px; width: auto; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links > a,
.nav-dd > a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  transition: color .2s;
}
.nav-links > a:hover,
.nav-dd > a:hover { color: var(--accent); }

/* Nav dropdown */
.nav-dd { position: relative; }
.nav-dd > a {
  display: flex; align-items: center; gap: 4px;
  cursor: pointer;
}
.nav-dd .caret {
  width: 10px; height: 10px;
  transition: transform .2s;
}
.nav-dd-menu {
  position: absolute;
  top: calc(100% + 12px); left: -16px;
  background: var(--canvas-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  min-width: 280px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all .2s;
}
.nav-dd:hover .nav-dd-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav-dd:hover .caret { transform: rotate(180deg); }

.nav-dd-item {
  display: block;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  transition: background .15s;
}
.nav-dd-item:hover { background: var(--canvas-alt); }
.nav-dd-item .dd-t {
  display: block;
  font-size: 14px; font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}
.nav-dd-item .dd-d {
  display: block;
  font-size: 13px; color: var(--text-muted);
  line-height: 1.4;
}

/* Nav CTA */
.nav-sign-in {
  font-size: 15px; font-weight: 500;
  color: var(--text-primary);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 9px 22px;
  font-size: 14px; font-weight: 600;
  color: #fff !important;
  background: linear-gradient(135deg, var(--logo-grad-start), var(--logo-grad-end));
  border-radius: 999px;
  transition: opacity .2s, transform .15s;
}
.nav-cta:hover { opacity: .9; transform: translateY(-1px); }

/* Mobile nav */
.nav-toggle {
  display: none;
  background: none; border: none;
  cursor: pointer; padding: 8px;
}
.nav-toggle svg { width: 24px; height: 24px; color: var(--text-primary); }

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height); left: 0; right: 0;
    background: var(--canvas-card);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    flex-direction: column;
    padding: 24px;
    gap: 20px;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .nav-dd-menu {
    position: static;
    opacity: 1; visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    padding: 0 0 0 12px;
    min-width: auto;
  }
}


/* --- BUTTONS --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  font-size: 16px; font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--logo-grad-start), var(--logo-grad-end));
  border: none;
  border-radius: 999px;
  cursor: pointer;
  transition: opacity .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 2px 12px rgba(58,95,191,0.25);
}
.btn-primary:hover {
  opacity: .92;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(58,95,191,0.35);
  color: #fff;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  font-size: 16px; font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: 2px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s;
}
.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}


/* --- CARDS --- */
.card {
  background: var(--canvas-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .25s, transform .25s;
}
.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}


/* --- HERO --- */
.hero {
  padding-top: calc(var(--nav-height) + 80px);
  padding-bottom: 80px;
  text-align: center;
}
.hero .container { max-width: 860px; }
.hero h1 { font-size: clamp(38px, 6vw, 64px); }
.hero .subtitle {
  margin: 0 auto 40px;
  max-width: 620px;
}


/* --- COURSE CARD (featured) --- */
.course-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--canvas-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: box-shadow .3s, transform .3s;
}
.course-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}
.course-card-img {
  background: var(--canvas-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  padding: 40px;
}
.course-card-img .placeholder-icon {
  width: 120px; height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--logo-grad-start), var(--logo-grad-end));
  opacity: .15;
}
.course-card-body {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.course-card-body h3 {
  font-size: 28px;
  margin-bottom: 12px;
}
.course-card-body p {
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 28px;
}

@media (max-width: 768px) {
  .course-card { grid-template-columns: 1fr; }
  .course-card-img { min-height: 200px; }
  .course-card-body { padding: 32px 24px; }
}


/* --- INSTRUCTOR --- */
.instructor {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}
.instructor-photo {
  width: 240px; height: 240px;
  border-radius: var(--radius-lg);
  background: var(--canvas-alt);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.instructor-photo .placeholder {
  font-family: var(--font-headline);
  font-size: 72px;
  color: var(--text-light);
  opacity: .4;
}
.instructor-name {
  font-size: 24px;
  margin-bottom: 4px;
}
.instructor-title {
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 16px;
}
.instructor-bio {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-body);
}

@media (max-width: 768px) {
  .instructor { grid-template-columns: 1fr; gap: 24px; text-align:center; }
  .instructor-photo { margin: 0 auto; width: 180px; height: 180px; }
}


/* --- TESTIMONIALS --- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.testimonial-card {
  background: var(--canvas-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
}
.testimonial-card blockquote {
  font-family: var(--font-prose);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-body);
  font-style: italic;
  margin-bottom: 20px;
}
.testimonial-card .author {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}
.testimonial-card .author span {
  font-weight: 400;
  color: var(--text-muted);
}


/* --- FAQ ACCORDION --- */
.faq-list { max-width: 720px; }
.faq-item {
  border-bottom: 1px solid var(--border);
}
.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 24px 0;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
}
.faq-q svg {
  width: 20px; height: 20px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform .25s;
}
.faq-item.open .faq-q svg { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.faq-a-inner {
  padding: 0 0 24px;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-body);
}


/* --- FOOTER --- */
.footer {
  background: var(--text-primary);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 32px;
}
.footer a { color: rgba(255,255,255,0.7); }
.footer a:hover { color: #fff; }

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand { max-width: 380px; }
.footer-logo { display: inline-block; margin-bottom: 16px; }
.footer-logo img { height: 32px; width: auto; filter: brightness(10); }
.footer-desc {
  font-size: 14px;
  line-height: 1.65;
  margin-bottom: 20px;
}
.footer-email {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}
.footer-email svg { width: 18px; height: 18px; }

.footer-links {
  display: flex;
  gap: 56px;
}
.footer-col h4 {
  color: #fff;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  font-size: 14px;
  margin-bottom: 10px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
}
.footer-legal-links {
  display: flex;
  gap: 24px;
}
.footer-legal-links a { font-size: 13px; }

@media (max-width: 768px) {
  .footer-inner { flex-direction: column; gap: 32px; }
  .footer-links { gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}


/* --- UTILITY --- */
.text-center { text-align: center; }
.mb-0  { margin-bottom: 0; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }
.mb-64 { margin-bottom: 64px; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Gentle rise animation */
.rise {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .7s ease, transform .7s ease;
}
.rise.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Amber highlight for key phrases */
.highlight {
  color: var(--amber);
  font-weight: 600;
}

/* Accent word color */
.accent-word {
  color: var(--accent);
}
