/* ==========================================================================
   Dallas ESL Classes — dallaseslclasses.com
   Shared design system. Warm, welcoming, trustworthy education brand.
   ========================================================================== */

:root {
  --ink: #15242b;
  --bg: #fbf8f3;
  --surface: #ffffff;
  --brand: #0f6b6b;
  --brand-dark: #0a4f4f;
  --accent: #d98324;
  --accent-dark: #b86a16;
  --muted: #5b6b6b;
  --line: #e6ddd0;
  --ring: rgba(15, 107, 107, .25);

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(21, 36, 43, .05), 0 1px 3px rgba(21, 36, 43, .06);
  --shadow: 0 6px 20px rgba(21, 36, 43, .07), 0 2px 6px rgba(21, 36, 43, .05);
  --shadow-lg: 0 18px 50px rgba(21, 36, 43, .12);

  --maxw: 1120px;
  --gap: clamp(1rem, 3vw, 2rem);

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); text-decoration: underline; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  color: var(--ink);
  margin: 0 0 .5em;
  letter-spacing: -.01em;
  font-optical-sizing: auto;
}
h1 { font-size: clamp(2.15rem, 5vw, 3.4rem); font-weight: 600; }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin-bottom: .4rem; }
strong { font-weight: 600; }

:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.1rem, 4vw, 2rem); }
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--tight { padding-block: clamp(2rem, 5vw, 3.5rem); }
.section--cream { background: var(--bg); }
.section--surface { background: var(--surface); }
.section--brand { background: var(--brand); color: #eafafa; }
.section--ink { background: var(--ink); color: #e7eef0; }
.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .78rem;
  font-weight: 600;
  color: var(--accent-dark);
  margin: 0 0 .8rem;
}
.section--brand .eyebrow, .section--ink .eyebrow { color: var(--accent); }
.lede { font-size: clamp(1.1rem, 2vw, 1.28rem); color: var(--muted); max-width: 62ch; }
.section--brand .lede, .section--ink .lede { color: #cfeaea; }
.measure { max-width: 70ch; }
.center { text-align: center; }
.center .lede { margin-inline: auto; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--brand); color: #fff; padding: .7rem 1rem; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(251, 248, 243, .9);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 70px; }
.brand-link { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); font-family: var(--font-display); font-weight: 600; font-size: 1.16rem; letter-spacing: -.01em; }
.brand-link:hover { text-decoration: none; color: var(--brand-dark); }
.brand-link svg { flex: none; width: 34px; height: 34px; color: var(--brand); }
.brand-link .brand-name { white-space: nowrap; }

.nav { display: flex; align-items: center; gap: .25rem; }
.nav a.navlink {
  color: var(--ink); font-weight: 500; font-size: .98rem; padding: .55rem .7rem; border-radius: 8px;
}
.nav a.navlink:hover { background: rgba(15,107,107,.08); color: var(--brand-dark); text-decoration: none; }
.nav a.navlink[aria-current="page"] { color: var(--brand-dark); }
.nav a.navlink[aria-current="page"]::after { content:""; display:block; height:2px; background: var(--accent); border-radius:2px; margin-top:2px; }

/* Languages dropdown */
.has-dropdown { position: relative; }
.dropdown-toggle { display: inline-flex; align-items: center; gap: .25rem; background: none; border: 0; cursor: pointer; font: inherit; color: var(--ink); font-weight: 500; font-size: .98rem; padding: .55rem .7rem; border-radius: 8px; }
.dropdown-toggle:hover { background: rgba(15,107,107,.08); color: var(--brand-dark); }
.dropdown-toggle svg { width: 14px; height: 14px; transition: transform .2s ease; }
.has-dropdown[data-open="true"] .dropdown-toggle svg { transform: rotate(180deg); }
.dropdown-menu {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 210px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: .4rem; display: none; flex-direction: column;
}
.has-dropdown[data-open="true"] .dropdown-menu { display: flex; }
.dropdown-menu a { padding: .55rem .7rem; border-radius: 8px; color: var(--ink); font-weight: 500; font-size: .95rem; }
.dropdown-menu a:hover { background: rgba(15,107,107,.08); color: var(--brand-dark); text-decoration: none; }

.header-cta { display: inline-flex; align-items: center; gap: .8rem; }
.header-cta .btn { display: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem; line-height: 1;
  padding: .85rem 1.35rem; border-radius: 999px; border: 2px solid transparent; cursor: pointer;
  transition: transform .12s ease, background .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 6px 16px rgba(15,107,107,.25); }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-accent { background: var(--accent); color: #2b1a06; box-shadow: 0 6px 16px rgba(217,131,36,.28); }
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--brand-dark); border-color: var(--brand); }
.btn-outline:hover { background: var(--brand); color: #fff; }
.section--brand .btn-outline, .section--ink .btn-outline { color: #eafafa; border-color: rgba(234,250,250,.7); }
.section--brand .btn-outline:hover, .section--ink .btn-outline:hover { background: #fff; color: var(--brand-dark); }
.btn-light { background: #fff; color: var(--brand-dark); }
.btn-light:hover { background: #f0fafa; color: var(--brand-dark); }
.btn-sm { padding: .6rem 1rem; font-size: .92rem; }

/* Mobile menu controls */
.menu-toggle { display: none; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; cursor: pointer; color: var(--ink); }
.menu-toggle svg { width: 22px; height: 22px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; padding-block: clamp(2.6rem, 6vw, 5rem); }
.hero h1 { margin-bottom: .55rem; }
.hero .lede { margin-bottom: 1.8rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-media { position: relative; }
.hero-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); aspect-ratio: 4/3; object-fit: cover; width: 100%; }
.hero-badge {
  position: absolute; bottom: -14px; left: -14px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: .8rem 1rem; display: flex; align-items: center; gap: .6rem; max-width: 240px;
}
.hero-badge .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 0 4px rgba(217,131,36,.18); }
.hero-badge span { font-size: .9rem; font-weight: 500; color: var(--ink); line-height: 1.3; }
.trustbar { display: flex; flex-wrap: wrap; gap: 1.2rem 1.8rem; margin-top: 1.8rem; color: var(--muted); font-size: .92rem; font-weight: 500; }
.trustbar span { display: inline-flex; align-items: center; gap: .45rem; }
.trustbar svg { width: 18px; height: 18px; color: var(--brand); flex: none; }

/* Page hero (interior pages) */
.page-hero { background: linear-gradient(180deg, rgba(15,107,107,.06), rgba(251,248,243,0)); border-bottom: 1px solid var(--line); }
.page-hero .container { padding-block: clamp(2rem, 5vw, 3.5rem); }
.page-hero h1 { max-width: 18ch; }
.page-hero .lede { margin-top: .6rem; }

/* Breadcrumbs */
.breadcrumbs { font-size: .86rem; color: var(--muted); margin-bottom: 1rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0; }
.breadcrumbs li { margin: 0; display: inline-flex; gap: .4rem; align-items: center; }
.breadcrumbs li:not(:last-child)::after { content: "/"; color: var(--line); }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--brand); }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: clamp(1rem, 2.5vw, 1.6rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #d9ccb8; }
.card-media { aspect-ratio: 16/10; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: 1.25rem 1.3rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { margin-bottom: .35rem; }
.card-body p { color: var(--muted); font-size: .97rem; margin-bottom: 1rem; }
.card-link { margin-top: auto; font-weight: 600; color: var(--brand-dark); display: inline-flex; align-items: center; gap: .35rem; }
.card-link:hover { gap: .55rem; text-decoration: none; }
.card-link::after { content: "→"; transition: transform .15s ease; }

/* Value props */
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem 1.4rem; box-shadow: var(--shadow-sm); }
.feature .ico { width: 46px; height: 46px; border-radius: 12px; background: rgba(15,107,107,.1); display: inline-flex; align-items: center; justify-content: center; color: var(--brand); margin-bottom: .9rem; }
.feature .ico svg { width: 24px; height: 24px; }
.feature h3 { font-size: 1.18rem; }
.feature p { color: var(--muted); margin: 0; font-size: .97rem; }

/* Steps */
.steps { counter-reset: step; }
.step { position: relative; padding-left: 0; }
.step .num { width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; display: inline-flex; align-items: center; justify-content: center; margin-bottom: .9rem; }
.step h3 { font-size: 1.2rem; }
.step p { color: var(--muted); margin: 0; }

/* Pills / chips */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; list-style: none; padding: 0; margin: 1rem 0; }
.chips li { margin: 0; }
.chip { background: rgba(15,107,107,.08); color: var(--brand-dark); border: 1px solid rgba(15,107,107,.16); border-radius: 999px; padding: .4rem .85rem; font-size: .9rem; font-weight: 500; }

/* Prose blocks */
.prose { max-width: 72ch; }
.prose h2 { margin-top: 2.4rem; }
.prose h3 { margin-top: 1.8rem; }
.prose ul li::marker { color: var(--brand); }

/* Split content (image + text) */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.split.reverse .split-media { order: 2; }
.split-media img { border-radius: var(--radius-lg); box-shadow: var(--shadow); aspect-ratio: 4/3; object-fit: cover; width: 100%; }

/* Level cards */
.level-card { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: 1.3rem 1.4rem; box-shadow: var(--shadow-sm); }
.level-card.b2 { border-left-color: var(--accent); }
.level-card.b3 { border-left-color: var(--brand-dark); }
.level-card h3 { font-size: 1.15rem; margin-bottom: .3rem; }
.level-card p { margin: 0; color: var(--muted); font-size: .96rem; }

/* ---------- AI Chat placeholder ---------- */
.chat-placeholder {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); overflow: hidden; max-width: 460px; margin-inline: auto; width: 100%;
}
.chat-head { background: var(--brand); color: #eafafa; padding: 1rem 1.2rem; display: flex; align-items: center; gap: .7rem; }
.chat-head .avatar { width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.18); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.chat-head .avatar svg { width: 20px; height: 20px; color: #fff; }
.chat-head .title { font-weight: 600; font-family: var(--font-display); line-height: 1.1; }
.chat-head .status { font-size: .8rem; color: #b9e4e4; display: inline-flex; align-items: center; gap: .35rem; }
.chat-head .status::before { content:""; width: 8px; height: 8px; border-radius: 50%; background: #7fe3b0; box-shadow: 0 0 0 3px rgba(127,227,176,.25); }
.chat-body { padding: 1.2rem; background: #f6f1e9; min-height: 220px; display: flex; flex-direction: column; gap: .7rem; }
.bubble { max-width: 80%; padding: .7rem .9rem; border-radius: 14px; font-size: .95rem; line-height: 1.45; box-shadow: var(--shadow-sm); }
.bubble.bot { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; align-self: flex-start; }
.bubble.user { background: var(--brand); color: #fff; border-bottom-right-radius: 4px; align-self: flex-end; }
.chat-foot { padding: 1.1rem 1.2rem 1.3rem; background: #fff; border-top: 1px solid var(--line); text-align: center; }
.chat-foot p { font-weight: 600; color: var(--ink); margin-bottom: .9rem; }
.chat-input-mock { display: flex; gap: .5rem; align-items: center; background: #f6f1e9; border: 1px dashed var(--line); border-radius: 999px; padding: .6rem .9rem; color: var(--muted); font-size: .92rem; margin-bottom: 1rem; }
.chat-input-mock .send { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.chat-input-mock .send svg { width: 15px; height: 15px; color: #fff; }

/* ---------- FAQ ---------- */
.faq { max-width: 800px; margin-inline: auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .8rem; box-shadow: var(--shadow-sm); overflow: hidden; }
.faq summary { list-style: none; cursor: pointer; padding: 1.1rem 1.3rem; font-family: var(--font-display); font-weight: 600; font-size: 1.08rem; color: var(--ink); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-body); font-size: 1.5rem; color: var(--brand); font-weight: 400; flex: none; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details[open] summary { color: var(--brand-dark); }
.faq .answer { padding: 0 1.3rem 1.2rem; color: var(--muted); }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); color: #eafafa; border-radius: var(--radius-lg); padding: clamp(2rem, 5vw, 3.4rem); text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #cfeaea; max-width: 56ch; margin-inline: auto; }
.cta-band .hero-cta { justify-content: center; margin-top: 1.6rem; }

/* ---------- Contact form ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(1.6rem, 4vw, 3rem); align-items: start; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: clamp(1.4rem, 3vw, 2.2rem); }
.field { display: grid; gap: .35rem; margin-bottom: 1.05rem; }
.field label { font-weight: 600; font-size: .94rem; color: var(--ink); }
.field .req { color: var(--accent-dark); }
.field input, .field select, .field textarea {
  width: 100%; padding: .8rem .9rem; font: inherit; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); background: #fff; box-shadow: 0 0 0 4px var(--ring); }
.field textarea { resize: vertical; min-height: 110px; }
.hp-field { position: absolute; left: -9999px; height: 0; width: 0; opacity: 0; overflow: hidden; }
#esl-lead-form .btn { width: 100%; }
#esl-lead-msg { margin: 1rem 0 0; font-size: .95rem; font-weight: 500; }
.contact-aside .contact-item { display: flex; gap: .8rem; align-items: flex-start; margin-bottom: 1.3rem; }
.contact-aside .contact-item .ico { width: 42px; height: 42px; border-radius: 11px; background: rgba(15,107,107,.1); color: var(--brand); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.contact-aside .contact-item .ico svg { width: 22px; height: 22px; }
.contact-aside h3 { font-size: 1.05rem; margin-bottom: .2rem; }
.contact-aside p { margin: 0; color: var(--muted); font-size: .96rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c5d2d4; padding-block: clamp(2.6rem, 5vw, 3.6rem) 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 2rem; }
.footer-brand .brand-link { color: #fff; }
.footer-brand .brand-link svg { color: #6fd0d0; }
.footer-brand p { color: #9fb3b5; font-size: .94rem; max-width: 34ch; margin-top: .9rem; }
.footer-col h4 { font-family: var(--font-body); text-transform: uppercase; letter-spacing: .1em; font-size: .76rem; color: #8aa3a5; margin-bottom: .9rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: .5rem; }
.footer-col a { color: #c5d2d4; font-size: .95rem; }
.footer-col a:hover { color: #fff; text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2.4rem; padding-top: 1.4rem; display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between; align-items: center; color: #8aa3a5; font-size: .86rem; }
.footer-bottom .service-area { color: #9fb3b5; }

/* ---------- Motion (reveal on scroll) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .card:hover, .btn:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 880px) {
  .nav { display: none; }
  .header-cta .btn { display: inline-flex; }
  .menu-toggle { display: inline-flex; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-media { order: -1; }
  .hero-badge { left: 8px; bottom: 8px; }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split, .contact-grid { grid-template-columns: 1fr; }
  .split.reverse .split-media { order: -1; }
  /* Mobile nav panel */
  .nav.open {
    display: flex; flex-direction: column; align-items: stretch; gap: .2rem;
    position: absolute; top: 100%; left: 0; right: 0; background: var(--surface);
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: .8rem clamp(1.1rem, 4vw, 2rem) 1.2rem;
  }
  .nav.open a.navlink, .nav.open .dropdown-toggle { width: 100%; font-size: 1.05rem; padding: .75rem .6rem; }
  .nav.open .has-dropdown { width: 100%; }
  .nav.open .dropdown-menu { position: static; display: flex; box-shadow: none; border: 0; padding: 0 0 .4rem .8rem; min-width: 0; }
  .nav.open .has-dropdown[data-open="true"] .dropdown-menu,
  .nav.open .dropdown-menu { display: flex; }
  .nav.open .btn { display: inline-flex; margin-top: .6rem; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero-cta .btn, .cta-band .btn { width: 100%; }
  .brand-link { font-size: 1.05rem; }
  .footer-grid { grid-template-columns: 1fr; }
}
