/* ==============================================================
   FreDil — 2026 Master Redesign (Exact 7-Section Architecture)
   Typography: Fraunces (Headings) + Manrope (UI/Body) + Space Mono
   Palette: Navy (#101C34) + Teal (#127A63) + Amber (#F2A63D)
   ============================================================== */

:root {
  /* Brand Palette */
  --ink: #101C34;
  --ink-deep: #0B162B;
  --ink-soft: #627089;
  --ink-muted: #8FA1C2;
  --paper: #FFFFFF;
  --paper-alt: #F5F7F8;
  --paper-soft: #EEF2F5;
  --line: #DEE5EA;
  --line-subtle: #EBF0F3;

  /* Accent Colors */
  --teal: #127A63;
  --teal-modern: #169578;
  --teal-soft: #E3F1EC;
  --teal-glow: rgba(18, 122, 99, 0.16);
  --amber: #F2A63D;
  --amber-soft: #FFF4E3;
  --amber-deep: #C97F1C;

  /* Typography */
  --font-serif: 'Fraunces', Georgia, serif;
  --font-sans: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Mono', monospace;

  /* Layout & Elevations */
  --maxw: 1220px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --shadow-sm: 0 4px 12px rgba(16, 28, 52, 0.05);
  --shadow-md: 0 12px 32px -16px rgba(16, 28, 52, 0.18);
  --shadow-lg: 0 24px 50px -20px rgba(16, 28, 52, 0.28);
}

/* ==============================================================
   BASE & RESETS
   ============================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.fredil-home {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.12;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.015em;
}

p {
  margin: 0;
  color: var(--ink-soft);
}

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 36px;
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

/* ==============================================================
   HEADER (72px Sticky, Refined Surfaces)
   ============================================================== */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 72px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  transition: all 0.2s ease;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 36px;
}

/* Refined Brand Logo Mark */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--teal) 0%, #158F74 65%, var(--amber) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(18, 122, 99, 0.22);
  flex-shrink: 0;
}

/* Nav Links */
nav.nav-center ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 32px;
  margin: 0;
  padding: 0;
}

nav.nav-center ul li a {
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--ink-soft);
  padding: 8px 0;
  position: relative;
  transition: color 0.18s ease;
}

nav.nav-center ul li a:hover,
nav.nav-center ul li a:focus-visible {
  color: var(--teal);
}

nav.nav-center ul li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background-color: var(--teal);
  border-radius: 2px;
  transition: width 0.2s ease;
}

nav.nav-center ul li a:hover::after {
  width: 100%;
}

/* Nav Right */
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Compact Language Switcher */
.lang-switch {
  display: inline-flex;
  gap: 2px;
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}

.lang-switch button {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  border: none;
  background: transparent;
  padding: 5px 11px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-soft);
  transition: all 0.15s ease;
}

.lang-switch button:hover {
  color: var(--ink);
}

.lang-switch button.active {
  background: var(--ink);
  color: #FFFFFF;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.94rem;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}

.btn-primary {
  background: var(--ink);
  color: #FFFFFF;
  border: 1.5px solid var(--ink);
  box-shadow: 0 6px 18px -4px rgba(16, 28, 52, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: var(--teal);
  border-color: var(--teal);
  color: #FFFFFF;
  box-shadow: 0 10px 24px -4px rgba(18, 122, 99, 0.3);
}

.btn-secondary {
  background: var(--teal-soft);
  color: var(--teal);
  border: 1.5px solid var(--teal);
  box-shadow: 0 2px 8px rgba(18, 122, 99, 0.08);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  background: var(--teal);
  color: #FFFFFF !important;
  border-color: var(--teal);
  box-shadow: 0 6px 18px rgba(18, 122, 99, 0.25);
}

.btn-ghost {
  background: var(--teal-soft);
  color: var(--teal);
  border: 1.5px solid var(--teal);
}

.btn-ghost:hover {
  transform: translateY(-2px);
  background: var(--teal);
  color: #FFFFFF;
  border-color: var(--teal);
}

.btn-nav-login {
  height: 42px;
  padding: 0 20px;
  border-radius: 11px;
  font-size: 0.88rem;
  background: var(--ink);
  color: #FFFFFF;
  border: 1.5px solid var(--ink);
}

.btn-nav-login:hover {
  background: var(--teal);
  border-color: var(--teal);
  transform: translateY(-1.5px);
}

/* Language Switcher Pill */
.lang-switch {
  display: flex;
  align-items: center;
  background: var(--paper-soft, #EEF2F5);
  border: 1px solid var(--line, #DEE5EA);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.lang-switch a {
  font-family: var(--font-mono, 'Space Mono', monospace);
  font-size: 0.74rem;
  font-weight: 700;
  border: none;
  background: transparent;
  padding: 6px 11px;
  border-radius: 999px;
  cursor: pointer;
  color: var(--ink-soft, #627089);
  transition: all 0.2s ease;
  line-height: 1;
  text-decoration: none;
  display: inline-block;
}

.lang-switch a:hover {
  color: var(--ink, #101C34);
}

.lang-switch a.active {
  background: var(--ink, #101C34) !important;
  color: #FFFFFF !important;
  box-shadow: 0 2px 6px rgba(16, 28, 52, 0.22);
}

.burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
}

.burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
  transition: all 0.2s ease;
}

/* ==============================================================
   HERO SECTION (Left: Content, Right: Signature CEFR Card)
   ============================================================== */
.hero {
  padding: 96px 0 60px;
  background: radial-gradient(1000px 520px at 85% -12%, var(--teal-soft) 0%, transparent 60%), #FFFFFF;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--teal);
  background: var(--teal-soft);
  border: 1px solid rgba(18, 122, 99, 0.18);
  padding: 6px 14px;
  border-radius: 8px;
  margin-bottom: 24px;
  letter-spacing: 0.04em;
}

.eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

h1.headline {
  font-family: var(--font-serif);
  font-size: clamp(2.6rem, 4.4vw, 3.8rem);
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}

h1.headline em {
  font-style: normal;
  color: var(--teal);
}

.hero p.lead {
  margin: 0;
  font-size: 1.14rem;
  color: var(--ink-soft);
  line-height: 1.68;
  max-width: 48ch;
}

.hero-cta {
  margin-top: 36px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Refined Horizontal Stats */
.hero-stats {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 48px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.hero-stats div {
  padding-left: 0;
}

.hero-stats div + div {
  border-left: 1px solid var(--line);
  padding-left: 28px;
}

.hero-stats .num {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}

.hero-stats .lbl {
  font-size: 0.8rem;
  color: var(--ink-soft);
  font-weight: 500;
  margin-top: 4px;
}

/* ==============================================================
   SIGNATURE CEFR TRACK CARD (Deep Navy, Academic Dashboard)
   ============================================================== */
.track-card {
  background: var(--ink-deep);
  border-radius: var(--radius-xl);
  padding: 36px 32px 30px;
  box-shadow: 0 28px 56px -16px rgba(11, 22, 43, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
}

.track-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(18, 122, 99, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

.track-card h3 {
  color: #FFFFFF;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.track-card .sub {
  color: #9FB0C9;
  font-size: 0.86rem;
  line-height: 1.5;
  display: block;
}

.track-svg {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 18px;
}

.track-path {
  fill: none;
  stroke: #223455;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 4 10;
}

.track-path-fill {
  fill: none;
  stroke: url(#trackGrad);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: draw 1.8s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.2s;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

.stop-label {
  font-family: var(--font-mono);
  font-size: 13px;
  fill: #8FA1C2;
  font-weight: 700;
}

.stop-label.reached {
  fill: var(--amber);
}

.stop-dot {
  fill: #223455;
  transition: all 0.2s ease;
}

.stop-dot.reached {
  fill: var(--teal);
}

.you-badge {
  fill: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ==============================================================
   QUIZ & PLACEMENT SECTION
   ============================================================== */
.quiz-section-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 52px;
  align-items: start;
}

/* ==============================================================
   SECTION SHARED STYLES
   ============================================================== */
section {
  padding: 100px 0;
}

section.alt {
  background: var(--paper-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 640px;
  margin-bottom: 50px;
}

.section-head .eyebrow {
  margin-bottom: 16px;
}

.section-head h2 {
  font-size: clamp(2rem, 3.4vw, 2.6rem);
  letter-spacing: -0.02em;
}

.section-head p {
  margin-top: 14px;
  font-size: 1.05rem;
  line-height: 1.65;
}

/* ==============================================================
   QUIZ + DEMO CTA STRIPS (Preserved Structure & IDs)
   ============================================================== */
.cta-strip {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 36px;
  align-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cta-strip:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.cta-strip + .cta-strip {
  margin-top: 24px;
}

.cta-strip .tag {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  display: inline-block;
}

.cta-strip h3 {
  font-size: 1.65rem;
  margin-bottom: 10px;
  letter-spacing: -0.015em;
}

.cta-strip p {
  font-size: 1.02rem;
  max-width: 58ch;
  line-height: 1.6;
}

/* Dark Variant: Free Demo Lesson */
.cta-strip.dark {
  background: var(--ink-deep);
  border-color: var(--ink-deep);
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 48px -12px rgba(11, 22, 43, 0.4);
}

.cta-strip.dark::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(18, 122, 99, 0.22) 0%, transparent 70%);
  pointer-events: none;
}

.cta-strip.dark h3,
.cta-strip.dark p {
  color: #FFFFFF;
}

.cta-strip.dark .tag {
  color: var(--amber);
}

.cta-strip.dark p {
  color: #C4CFE0;
}

.cta-strip.dark .btn-primary {
  background: #FFFFFF;
  color: var(--ink);
  border-color: #FFFFFF;
}

.cta-strip.dark .btn-primary:hover {
  background: var(--teal);
  color: #FFFFFF;
  border-color: var(--teal);
}

/* ==============================================================
   TUTORS SECTION (3 Columns, High-Res Commercial Photography)
   ============================================================== */
.tutor-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.tutor-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.tutor-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.tutor-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background-color: var(--paper-alt);
}

.tutor-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.tutor-card:hover .tutor-photo {
  transform: scale(1.02);
}

.tutor-media .play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(16, 28, 52, 0.25);
  transition: transform 0.2s ease, background 0.2s ease;
  cursor: pointer;
  z-index: 2;
}

.tutor-card:hover .play {
  transform: translate(-50%, -50%) scale(1.08);
  background: #FFFFFF;
}

.play::before {
  content: "";
  border-style: solid;
  border-width: 7px 0 7px 11px;
  border-color: transparent transparent transparent var(--ink);
  margin-left: 2px;
}

.tutor-body {
  padding: 22px 24px 26px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.tutor-body h4 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--ink);
}

.tutor-body p {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.55;
  margin-bottom: 14px;
}

.tutor-body .specialty {
  display: inline-block;
  align-self: flex-start;
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--teal);
  background: var(--teal-soft);
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

/* ==============================================================
   EVENTS SECTION (3 Cards, 3:4 Aspect Ratio, Editorial Imagery)
   ============================================================== */
.event-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.event-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: flex-end;
  padding: 28px;
  color: #FFFFFF;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background-color: var(--ink);
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.event-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
  z-index: 0;
}

.event-card:hover .event-bg-image {
  transform: scale(1.03);
}

.event-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 28, 52, 0.05) 30%, rgba(11, 22, 43, 0.88) 100%);
  z-index: 1;
}

.event-card .content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.event-card .tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  padding: 4px 12px;
  border-radius: 999px;
  display: inline-block;
  margin-bottom: 12px;
  letter-spacing: 0.04em;
}

.event-card h4 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: #FFFFFF;
  line-height: 1.25;
}

/* ==============================================================
   FOOTER (Preserved Structure, Deep Navy #101C34)
   ============================================================== */
footer.site-footer {
  background: var(--ink);
  color: #C4CFE0;
  padding: 80px 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}

footer.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20%;
  right: 20%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(18, 122, 99, 0.5), transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 56px;
}

footer h5 {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: #8FA1C2;
  margin: 0 0 18px;
  text-transform: uppercase;
}

footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

footer ul li a {
  font-size: 0.93rem;
  color: #C4CFE0;
  transition: color 0.15s ease;
}

footer ul li a:hover {
  color: var(--amber);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 26px;
  font-size: 0.86rem;
  color: #8FA1C2;
  flex-wrap: wrap;
  gap: 14px;
}

.socials {
  display: flex;
  gap: 12px;
}

.socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: #FFFFFF;
  transition: all 0.2s ease;
}

.socials a:hover {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--ink);
  transform: translateY(-2px);
}

/* ==============================================================
   REVEAL INTERACTION
   ============================================================== */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ==============================================================
   RESPONSIVE DESIGN SYSTEM (Desktop, Tablet, Mobile)
   ============================================================== */

/* Base Container Helper */
.public-container,
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 36px;
  box-sizing: border-box;
}

/* Tablet Landscape & iPads (<= 1024px) */
@media (max-width: 1024px) {
  .public-container,
  .wrap {
    padding: 0 28px !important;
  }

  .nav {
    padding: 0 28px !important;
  }

  nav.nav-center,
  nav.nav-center ul {
    display: none !important;
  }

  .burger {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  .hero {
    padding: 68px 0 44px !important;
  }

  .hero-grid,
  div.hero-grid {
    grid-template-columns: 1fr !important;
    gap: 40px !important;
  }

  .quiz-section-grid,
  div.quiz-section-grid {
    grid-template-columns: 1fr !important;
    gap: 38px !important;
  }

  .tutor-grid,
  div.tutor-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 22px !important;
  }

  .event-grid,
  div.event-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 22px !important;
  }

  .footer-grid,
  div.footer-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 36px !important;
  }
}

/* Tablet Portrait & Large Phones (<= 768px) */
@media (max-width: 768px) {
  .public-container,
  .wrap {
    padding: 0 20px !important;
  }

  .nav {
    padding: 0 20px !important;
  }

  .site-header {
    height: 68px !important;
  }

  .brand {
    font-size: 1.25rem !important;
    gap: 10px !important;
  }

  .brand-mark {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.72rem !important;
  }

  .hero {
    padding: 48px 0 32px !important;
  }

  .hero h1 {
    font-size: clamp(2.1rem, 6.8vw, 3.2rem) !important;
    margin-bottom: 16px !important;
  }

  .hero p {
    font-size: 1rem !important;
    margin-bottom: 26px !important;
  }

  .hero-cta-group {
    gap: 12px !important;
    margin-bottom: 32px !important;
  }

  .hero-stats-row,
  .hero-stats {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 14px !important;
    padding-top: 22px !important;
  }

  .hero-stats-row .hero-stat-item,
  .hero-stats > div {
    border-left: none !important;
    padding-left: 0 !important;
  }

  .hero-stats-row .hero-stat-item .mono,
  .hero-stats .mono {
    font-size: 1.55rem !important;
  }

  /* Quiz Section */
  #quiz {
    padding: 56px 0 !important;
  }

  .quiz-section-grid,
  div.quiz-section-grid {
    gap: 32px !important;
  }

  .quiz-card,
  #quiz .card {
    padding: 28px 22px !important;
    border-radius: 20px !important;
  }

  .quiz-form-row,
  .form-grid-2,
  div.form-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Tutors & Events */
  #tutors,
  #events {
    padding: 56px 0 !important;
  }

  .modal-dialog {
    width: calc(100% - 24px) !important;
    max-width: 100% !important;
    margin: 12px auto !important;
    padding: 20px 16px !important;
    border-radius: 18px !important;
  }

  /* Footer */
  .site-footer,
  footer {
    padding: 52px 0 28px !important;
  }
}

/* Mobile Screens (<= 640px) */
@media (max-width: 640px) {
  .public-container,
  .wrap {
    padding: 0 16px !important;
  }

  .nav {
    padding: 0 14px !important;
  }

  /* Nav Right optimization for phone header */
  .nav-right {
    gap: 8px !important;
  }

  .nav-right .btn-nav-login {
    display: none !important; /* Prominently available inside mobile hamburger menu */
  }

  .lang-switch a {
    padding: 5px 8px !important;
    font-size: 0.7rem !important;
  }

  .hero-cta-group {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .hero-cta-group .btn {
    width: 100% !important;
    min-height: 48px !important;
    justify-content: center !important;
  }

  .tutor-grid,
  div.tutor-grid,
  .event-grid,
  div.event-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .footer-grid,
  div.footer-grid {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
    margin-bottom: 36px !important;
  }

  .footer-bottom {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
  }
}

/* Compact Smartphones (<= 420px) */
@media (max-width: 420px) {
  .hero-stats-row,
  .hero-stats {
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .quiz-card,
  #quiz .card {
    padding: 20px 14px !important;
    border-radius: 16px !important;
  }

  .brand span:last-child {
    font-size: 1.15rem !important;
  }
}

