/* ==========================================================================
   USMLE Adviser — Design System & Global Styles
   ========================================================================== */

:root {
  /* Brand blues, pulled from the logo */
  --navy-950: #071B33;
  --navy-900: #0D2A4D;
  --navy-800: #123863;
  --blue-700: #17539A;
  --blue-600: #1E6FC9;
  --blue-500: #3B8BE0;
  --sky-100: #E9F2FC;
  --sky-50:  #F6FAFE;

  --teal-500: #14B8A6;
  --teal-600: #0E9C8C;

  --amber-500: #F2B705;

  --slate-900: #1A2430;
  --slate-700: #3B4756;
  --slate-500: #667385;
  --slate-300: #C4CDD9;
  --slate-100: #EEF2F6;

  --white: #FFFFFF;

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(13, 42, 77, 0.06);
  --shadow-md: 0 8px 24px rgba(13, 42, 77, 0.10);
  --shadow-lg: 0 20px 48px rgba(13, 42, 77, 0.16);

  --container: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--slate-700);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Poppins", "Inter", sans-serif;
  color: var(--navy-900);
  line-height: 1.2;
  margin: 0 0 0.6em;
  font-weight: 700;
}

h1 { font-size: clamp(2rem, 4.2vw, 3.1rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--blue-700); }

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 88px 0;
}
.section--tight { padding: 64px 0; }
.section--alt { background: var(--sky-50); }
.section--navy {
  background: linear-gradient(160deg, var(--navy-900), var(--navy-950));
  color: #CBD9EA;
}
.section--navy h2, .section--navy h3 { color: var(--white); }

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--blue-600);
  background: var(--sky-100);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 18px;
}
.section--navy .eyebrow {
  background: rgba(59, 139, 224, 0.18);
  color: #8FC2F5;
}

.section-head {
  max-width: 680px;
  margin: 0 auto 48px;
  text-align: center;
}
.section-head p { color: var(--slate-500); font-size: 1.05rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--blue-600);
  color: var(--white);
  box-shadow: var(--shadow-md);
}
.btn--primary:hover { background: var(--blue-700); color: var(--white); }

.btn--secondary {
  background: transparent;
  border-color: var(--slate-300);
  color: var(--navy-900);
}
.btn--secondary:hover { border-color: var(--blue-600); color: var(--blue-600); }

.btn--light {
  background: var(--white);
  color: var(--blue-700);
}
.btn--light:hover { color: var(--blue-600); }

.btn--block { width: 100%; justify-content: center; }
.btn--sm { padding: 10px 20px; font-size: 0.88rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--slate-100);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  color: var(--navy-900);
  font-size: 1.08rem;
}
.brand img { height: 42px; width: 42px; border-radius: 50%; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--slate-700);
  font-weight: 500;
  font-size: 0.96rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--navy-900);
  border-bottom-color: var(--blue-600);
}
.nav-cta { display: flex; align-items: center; gap: 14px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy-900);
  margin: 5px 0;
  transition: 0.2s;
}

@media (max-width: 880px) {
  .nav-links {
    position: fixed;
    top: 76px; left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 18px 24px 24px;
    border-bottom: 1px solid var(--slate-100);
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: 0.18s ease;
  }
  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links a { padding: 10px 0; width: 100%; border-bottom: none; }
  .nav-cta .btn--secondary { display: none; }
  .nav-toggle { display: block; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 40px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.hero h1 { margin-bottom: 20px; }
.hero .lede { font-size: 1.15rem; color: var(--slate-700); max-width: 520px; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin: 30px 0 30px; }

.social-proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  align-items: center;
}
.social-proof-row .stat {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.social-proof-row .stat strong {
  font-size: 1.3rem;
  color: var(--navy-900);
  font-family: "Poppins", sans-serif;
}
.social-proof-row .stat span {
  font-size: 0.82rem;
  color: var(--slate-500);
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-visual .card-frame {
  transform: rotate(-2.5deg);
  max-width: 380px;
}
.hero-visual .float-tag {
  position: absolute;
  bottom: -18px;
  left: -18px;
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy-900);
}
.hero-visual .float-tag .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--teal-500);
  flex-shrink: 0;
}

.card-frame {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 14px;
  border: 1px solid var(--slate-100);
}
.card-frame img { border-radius: var(--radius-sm); }

@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { margin-top: 12px; order: -1; }
  .hero-visual .card-frame { max-width: 300px; transform: rotate(0); }
}

/* ---------- Feature grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--slate-100);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
}
.feature-card .icon-badge {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--sky-100);
  color: var(--blue-600);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  font-size: 1.3rem;
}
.feature-card h3 { margin-bottom: 10px; }
.feature-card p { color: var(--slate-500); margin: 0; font-size: 0.96rem; }

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

/* ---------- Stats strip ---------- */
.stats-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 56px;
  margin-bottom: 52px;
}
.stats-strip .stat-item { text-align: center; }
.stats-strip .stat-item strong {
  display: block;
  font-family: "Poppins", sans-serif;
  font-size: 2rem;
  color: var(--navy-900);
}
.stats-strip .stat-item span {
  font-size: 0.85rem;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- Testimonials ---------- */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testimonial-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--slate-100);
  box-shadow: var(--shadow-sm);
}
.testimonial-card .stars { color: var(--amber-500); letter-spacing: 2px; margin-bottom: 12px; font-size: 0.95rem; }
.testimonial-card blockquote {
  margin: 0 0 18px;
  font-size: 1.02rem;
  color: var(--navy-900);
  font-weight: 500;
}
.testimonial-card .who {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.86rem; color: var(--slate-500);
}
.testimonial-card .avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--sky-100);
  color: var(--blue-600);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.85rem;
}
@media (max-width: 820px) {
  .testimonial-grid { grid-template-columns: 1fr; }
}

/* ---------- E-book banner / page ---------- */
.ebook-panel {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 52px;
  align-items: center;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-100);
  box-shadow: var(--shadow-md);
  padding: 48px;
}
@media (max-width: 900px) {
  .ebook-panel { grid-template-columns: 1fr; padding: 32px 24px; }
}

.book-cover-frame {
  max-width: 300px;
  margin: 0 auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--slate-100);
}
.book-cover-frame img { display: block; width: 100%; }

.book-cover {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
  background:
    radial-gradient(120% 100% at 100% 0%, rgba(59,139,224,0.35), transparent 55%),
    linear-gradient(155deg, var(--navy-900), var(--navy-950));
  color: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 30px 26px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  max-width: 300px;
  margin: 0 auto;
}
.book-cover::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 10px;
  pointer-events: none;
}
.book-cover .book-kicker {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8FC2F5;
  font-weight: 700;
}
.book-cover .book-title {
  font-family: "Poppins", sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 14px 0;
}
.book-cover .book-count {
  font-size: 3rem;
  font-weight: 800;
  font-family: "Poppins", sans-serif;
  color: var(--teal-500);
  line-height: 1;
}
.book-cover .book-sub {
  font-size: 0.85rem;
  color: #B9CEE6;
}
.book-cover .book-footer {
  font-size: 0.78rem;
  color: #8FA6C2;
  border-top: 1px solid rgba(255,255,255,0.15);
  padding-top: 12px;
}

.ebook-bullets {
  list-style: none;
  margin: 22px 0 30px;
  padding: 0;
  display: grid;
  gap: 14px;
}
.ebook-bullets li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.98rem;
  color: var(--slate-700);
}
.ebook-bullets li .check {
  flex-shrink: 0;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--teal-500);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem;
  margin-top: 2px;
}

/* ---------- Gallery / lightbox ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.gallery-item {
  background: var(--white);
  border: 1px solid var(--slate-100);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: zoom-in;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.gallery-item .thumb-wrap {
  background: var(--sky-50);
  padding: 16px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  height: 240px;
  overflow: hidden;
}
.gallery-item .thumb-wrap img { object-fit: contain; object-position: top; height: 100%; }
.gallery-item .gallery-caption {
  padding: 16px 18px 20px;
}
.gallery-item .gallery-caption h3 { margin-bottom: 6px; font-size: 1.05rem; }
.gallery-item .gallery-caption p { margin: 0; font-size: 0.9rem; color: var(--slate-500); }
.gallery-item .tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--blue-600);
  background: var(--sky-100);
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
}

@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(7, 27, 51, 0.86);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 32px 20px;
}
.lightbox.is-open { display: flex; }
.lightbox img {
  max-height: 88vh;
  max-width: min(560px, 92vw);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  background: var(--white);
}
.lightbox-close {
  position: absolute;
  top: 22px; right: 26px;
  background: rgba(255,255,255,0.12);
  color: var(--white);
  border: none;
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
}
.lightbox-caption {
  position: absolute;
  bottom: 26px;
  color: #D7E4F2;
  font-size: 0.9rem;
  text-align: center;
  width: 100%;
  left: 0;
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--slate-100);
  padding: 22px 0;
}
.faq-item h3 { margin-bottom: 8px; font-size: 1.05rem; }
.faq-item p { margin: 0; color: var(--slate-500); }

/* ---------- About page ---------- */
.about-hero {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 880px) {
  .about-hero { grid-template-columns: 1fr; }
}
.about-photo {
  display: flex;
  justify-content: center;
}
.about-photo img {
  width: 220px; height: 220px;
  border-radius: 50%;
  box-shadow: var(--shadow-lg);
  border: 6px solid var(--white);
}

.timeline {
  border-left: 2px solid var(--slate-100);
  margin-left: 12px;
  padding-left: 32px;
  display: grid;
  gap: 34px;
}
.timeline-item { position: relative; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -40px;
  top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--blue-600);
  border: 3px solid var(--sky-100);
}
.timeline-item h3 { margin-bottom: 6px; }
.timeline-item p { color: var(--slate-500); margin: 0; }
.timeline-item .when {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--blue-600);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 44px;
}
.contact-card {
  background: var(--white);
  border: 1px solid var(--slate-100);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.contact-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.contact-card .icon-badge {
  width: 54px; height: 54px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.4rem;
  color: var(--white);
}
.contact-card h3 { margin-bottom: 4px; }
.contact-card .count { color: var(--slate-500); font-size: 0.9rem; margin-bottom: 16px; }

.email-banner {
  margin-top: 48px;
  background: var(--sky-100);
  border-radius: var(--radius-lg);
  padding: 36px;
  text-align: center;
}
.email-banner .email-link {
  font-family: "Poppins", sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy-900);
}

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

/* ---------- Final CTA banner ---------- */
.cta-banner {
  border-radius: var(--radius-lg);
  padding: 56px;
  text-align: center;
  background: linear-gradient(135deg, var(--blue-700), var(--navy-900));
  color: var(--white);
  box-shadow: var(--shadow-lg);
}
.cta-banner h2 { color: var(--white); }
.cta-banner p { color: #D7E4F2; max-width: 560px; margin: 0 auto 28px; }
.cta-banner .btn--primary { background: var(--white); color: var(--blue-700); }
.cta-banner .btn--primary:hover { background: var(--sky-100); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-950);
  color: #8FA6C2;
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand img { height: 40px; width: 40px; border-radius: 50%; }
.footer-brand span { color: var(--white); font-weight: 700; font-family: "Poppins", sans-serif; }
.footer-col h4 {
  color: var(--white);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-col a { color: #B7C9DE; font-size: 0.92rem; }
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 26px;
  font-size: 0.82rem;
}

@media (max-width: 820px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  padding: 60px 0 20px;
  text-align: center;
}
.page-hero .section-head { margin-bottom: 0; }

/* ---------- Utilities ---------- */
.mt-lg { margin-top: 56px; }
.text-center { text-align: center; }
