/* ============================================================
   MY STUDY BUDDY — Shared Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Inter:wght@400;500;600&display=swap');

/* ─── CSS Custom Properties ─────────────────────────────── */
:root {
  --navy:          #0A2540;
  --navy-dark:     #071A2E;
  --navy-medium:   #0D3260;
  --gold:          #D4AF37;
  --gold-light:    #E8C84A;
  --gold-dark:     #B8960A;
  --cream:         #F8F4E9;
  --cream-dark:    #EFE9D5;
  --white:         #FFFFFF;
  --text-primary:  #0A2540;
  --text-secondary:#4A5568;
  --text-muted:    #718096;
  --emerald:       #10B981;
  --error:         #EF4444;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-card:     0 4px 12px rgba(10, 37, 64, 0.05);
  --shadow-elevated: 0 8px 20px rgba(10, 37, 64, 0.25);

  --sp-1: 8px;
  --sp-2: 16px;
  --sp-3: 24px;
  --sp-4: 32px;
  --sp-5: 48px;
  --sp-6: 64px;
  --sp-7: 96px;
}

/* ─── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: 'Inter', sans-serif;
  color: var(--text-primary);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

/* ─── Navigation ─────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 999;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--cream-dark);
  box-shadow: 0 2px 12px rgba(10,37,64,0.07);
}
.nav__inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 var(--sp-3);
  height: 68px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav__logo {
  font-family: 'Playfair Display', serif;
  font-weight: 700; font-size: 1.3rem;
  color: var(--navy); letter-spacing: -0.01em;
}
.nav__logo em { color: var(--gold); font-style: normal; }
.nav__links {
  display: flex; align-items: center; gap: 36px;
}
.nav__links a {
  font-size: 0.9rem; font-weight: 500;
  color: var(--text-secondary);
  position: relative; padding-bottom: 4px;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--navy); }
.nav__links a.active {
  color: var(--navy); font-weight: 600;
}
.nav__links a.active::after {
  content: ''; position: absolute;
  bottom: -1px; left: 0; right: 0;
  height: 2px; background: var(--gold); border-radius: 2px;
}
.btn-nav {
  background: var(--gold);
  color: var(--navy);
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600; font-size: 0.875rem;
  transition: background 0.2s, transform 0.15s;
  white-space: nowrap;
  display: inline-block;
}
.btn-nav:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  color: var(--navy);
}
/* suppress active underline on CTA button */
.btn-nav::after { display: none !important; }

.nav__hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; padding: 8px;
}
.nav__hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--navy); border-radius: 2px;
  transition: 0.3s;
}
.nav__hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav__hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile {
  display: none; flex-direction: column;
  padding: var(--sp-2) var(--sp-3) var(--sp-3);
  border-top: 1px solid var(--cream-dark);
  background: var(--white);
}
.nav__mobile.open { display: flex; }
.nav__mobile a {
  font-size: 0.95rem; font-weight: 500;
  color: var(--text-secondary);
  padding: 12px 0;
  border-bottom: 1px solid var(--cream-dark);
  transition: color 0.2s;
}
.nav__mobile a:last-of-type { border-bottom: none; }
.nav__mobile a:hover,
.nav__mobile a.active { color: var(--navy); font-weight: 600; }
.nav__mobile .btn-nav {
  margin-top: var(--sp-2); display: block;
  text-align: center; padding: 14px 20px;
}

@media (max-width: 768px) {
  .nav__links    { display: none; }
  .nav__hamburger { display: flex; }
}

/* ─── Footer ─────────────────────────────────────────────── */
.footer {
  background: var(--navy-dark);
  padding: var(--sp-6) var(--sp-3) var(--sp-4);
}
.footer__inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between;
  align-items: flex-start; gap: var(--sp-4);
  flex-wrap: wrap;
}
.footer__brand { max-width: 340px; }
.footer__brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.3rem; font-weight: 700;
  color: var(--white); margin-bottom: 6px;
}
.footer__tagline {
  font-size: 0.875rem;
  color: rgba(248,244,233,0.6);
  margin-bottom: var(--sp-2);
  line-height: 1.5;
}
.footer__copy { font-size: 0.78rem; color: rgba(248,244,233,0.4); }
.footer__links {
  display: flex; flex-direction: column;
  gap: 10px; text-align: right;
}
.footer__links a {
  font-size: 0.875rem;
  color: rgba(248,244,233,0.7);
  transition: color 0.2s;
}
.footer__links a:hover { color: var(--gold); }
@media (max-width: 640px) {
  .footer__links {
    text-align: left;
    flex-direction: row; flex-wrap: wrap;
    gap: 8px 20px;
  }
}

/* ─── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; font-family: 'Inter', sans-serif;
  font-weight: 600; font-size: 1rem;
  border-radius: var(--radius-md);
  min-height: 52px; padding: 0 var(--sp-4);
  border: none; cursor: pointer;
  transition: all 0.2s; text-decoration: none;
  white-space: nowrap; line-height: 1;
}
.btn-primary {
  background: var(--gold); color: var(--navy);
}
.btn-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(212,175,55,0.35);
}
.btn-outline-gold {
  background: transparent; color: var(--gold);
  border: 1.5px solid var(--gold);
}
.btn-outline-gold:hover {
  background: rgba(212,175,55,0.12);
  transform: translateY(-2px);
}
.btn-navy {
  background: var(--navy); color: var(--cream);
}
.btn-navy:hover {
  background: var(--navy-medium);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10,37,64,0.3);
}

/* ─── Section helpers ────────────────────────────────────── */
.section         { padding: var(--sp-7) var(--sp-3); }
.section--md     { padding: var(--sp-6) var(--sp-3); }
.container       { max-width: 1200px; margin: 0 auto; }
.container--text { max-width: 760px;  margin: 0 auto; }
.text-center     { text-align: center; }

.section-label {
  display: inline-block;
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gold); margin-bottom: var(--sp-2);
}
.section-heading {
  font-family: 'Playfair Display', serif; font-weight: 700;
  font-size: clamp(1.9rem, 3.2vw, 2.65rem);
  line-height: 1.2; margin-bottom: 14px;
}
.section-sub {
  font-size: 1.0625rem; color: var(--text-secondary);
  line-height: 1.7; margin-bottom: var(--sp-5);
}

/* ─── Animations ─────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0);    }
}
@keyframes shimmer {
  0%   { background-position: -600px 0; }
  100% { background-position:  600px 0; }
}
@keyframes floatPhone {
  0%, 100% { transform: translateY(0px);   }
  50%       { transform: translateY(-10px); }
}
@keyframes pulsePill {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(10,37,64,0.25); }
  50%       { transform: scale(1.04); box-shadow: 0 6px 18px rgba(10,37,64,0.35); }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.animate-on-scroll.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.10s; }
.delay-2 { transition-delay: 0.20s; }
.delay-3 { transition-delay: 0.30s; }
.delay-4 { transition-delay: 0.40s; }
.delay-5 { transition-delay: 0.50s; }
.delay-6 { transition-delay: 0.60s; }

/* ─── Legal / prose pages ────────────────────────────────── */
.legal-hero {
  background: var(--navy);
  padding: var(--sp-6) var(--sp-3) var(--sp-5);
  text-align: center;
}
.legal-hero__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700; color: var(--white);
  margin-bottom: var(--sp-2);
}
.legal-hero__meta {
  font-size: 0.9rem;
  color: rgba(248,244,233,0.55);
}
.legal-body {
  background: var(--cream);
  padding: var(--sp-7) var(--sp-3);
}
.legal-content { max-width: 760px; margin: 0 auto; }
.legal-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.45rem; font-weight: 600;
  color: var(--navy);
  margin: var(--sp-5) 0 var(--sp-2);
  padding-bottom: 8px;
  border-bottom: 2px solid var(--cream-dark);
}
.legal-content h2:first-child { margin-top: 0; }
.legal-content p {
  font-size: 1rem; color: var(--text-secondary);
  line-height: 1.75; margin-bottom: var(--sp-2);
}
.legal-content a {
  color: var(--navy); text-decoration: underline;
  text-underline-offset: 3px;
}
.legal-content a:hover { color: var(--gold-dark); }
.legal-content ul {
  list-style: disc; padding-left: var(--sp-4);
  margin-bottom: var(--sp-2);
}
.legal-content ul li {
  font-size: 1rem; color: var(--text-secondary);
  line-height: 1.75; margin-bottom: 6px;
}
