/* Love Math Studio — public website */
:root {
  --orange: #E85D2C;
  --orange-dark: #cf4c1e;
  --ink: #1A1A1A;
  --ink-2: #2A2A2A;
  --cream: #F8F4EE;
  --cream-2: #F1EBE1;
  --muted: #6b6560;
  --line: #e6dfd4;
  --white: #fff;
  --serif: 'Fraunces', 'Times New Roman', serif;
  --sans: 'Avenir Next', 'Avenir', 'Mulish', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  --radius: 20px;
  --wrap: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--ink); background: var(--cream); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; letter-spacing: -0.01em; }
h1 em, h2 em, h3 em { color: var(--orange); font-style: italic; font-weight: 400; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--orange); margin-bottom: 14px; }
.lead { color: var(--muted); font-size: 17px; }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 26px; border-radius: 999px; font-weight: 700; font-size: 15px; text-decoration: none; border: 0; cursor: pointer; transition: transform .2s, background .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-orange { background: var(--orange); color: #fff; }
.btn-orange:hover { background: var(--orange-dark); }
.btn-white { background: #fff; color: var(--orange); }
.btn-dark { background: var(--ink); color: #fff; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(248,244,238,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: .08em; font-size: 15px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--orange); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-style: italic; font-size: 18px; }
.brand span.o { color: var(--orange); }
.nav { display: flex; gap: 6px; }
.nav a { text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px; }
.nav a:hover { background: var(--cream-2); }
.nav a.active { background: var(--ink); color: #fff; }
.nav a.nav-cta { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; background: var(--orange); color: #fff; }
.nav a.nav-cta:hover { background: var(--orange-dark); }
.nav-toggle { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px auto; }

/* Hero */
.hero { position: relative; color: #fff; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: url('/images/hero-classroom.jpg') center/cover no-repeat; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20,16,12,.86) 0%, rgba(20,16,12,.55) 55%, rgba(20,16,12,.25) 100%); }
.hero .wrap { position: relative; padding-top: 110px; padding-bottom: 110px; }
.hero h1 { font-size: clamp(52px, 9vw, 104px); line-height: .95; }
.hero h1 em { color: var(--orange); }
.hero p.sub { max-width: 520px; margin: 24px 0 32px; font-size: 18px; color: rgba(255,255,255,.88); }
.hero-quote { margin-top: 48px; max-width: 420px; padding: 18px 22px; border-left: 3px solid var(--orange); background: rgba(255,255,255,.08); border-radius: 0 14px 14px 0; font-size: 15px; }
.hero-quote cite { display: block; margin-top: 8px; font-style: normal; font-weight: 700; color: var(--orange); font-size: 13px; }

/* Marquee */
.marquee { background: var(--orange); color: #fff; overflow: hidden; white-space: nowrap; padding: 16px 0; font-weight: 700; font-size: 20px; }
.marquee-track { display: inline-block; animation: marquee 40s linear infinite; }
.marquee-track span { margin: 0 22px; }
.marquee-track span.dot { margin: 0; opacity: .7; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Feature strip */
.features { background: #fff; padding: 40px 0; border-bottom: 1px solid var(--line); }
.features .grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.feature svg { width: 34px; height: 34px; color: var(--ink); margin: 0 auto 10px; }
.feature strong { display: block; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; }
.feature span { font-size: 13px; color: var(--muted); }

/* Sections */
section.block { padding: 96px 0; }
.card { background: #fff; border-radius: var(--radius); padding: 48px; }
.center { text-align: center; }
.sec-title { font-size: clamp(34px, 5vw, 52px); margin-bottom: 10px; }

/* Google reviews */
.reviews-google { background: var(--ink); padding: 72px 0; color: #fff; }
.reviews-google h2 { font-size: 32px; text-align: center; margin-bottom: 26px; }

/* Mission + video */
.mission { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; border-left: 6px solid var(--orange); }
.mission h2 { font-size: clamp(32px, 4vw, 44px); margin-bottom: 26px; }
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; background: var(--cream); border-radius: 14px; padding: 18px; }
.pillars div { border-left: 2px solid var(--orange); padding-left: 12px; }
.pillars strong { display: block; font-family: var(--serif); font-size: 20px; }
.pillars span { font-size: 13px; color: var(--muted); }
.video { position: relative; padding-top: 56.25%; border-radius: 14px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* About split */
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.split h2 { font-size: clamp(36px, 5vw, 54px); margin-bottom: 22px; }
.split p { color: var(--muted); margin-bottom: 18px; }
.photo-stack { position: relative; max-width: 380px; margin-left: auto; }
.photo-stack img { border-radius: 18px; position: relative; z-index: 1; }
.photo-stack .badge { position: absolute; z-index: 2; top: -18px; right: -24px; width: 120px; height: 120px; background: var(--orange); color: #fff; border-radius: 16px; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.photo-stack .badge b { font-family: var(--serif); font-size: 40px; line-height: 1; }
.photo-stack .badge small { font-size: 11px; text-align: center; line-height: 1.3; margin-top: 4px; }
.byline { border-left: 3px solid var(--orange); padding-left: 14px; margin: 26px 0; }
.byline b { display: block; font-family: var(--serif); font-size: 22px; }
.byline span { font-size: 13px; color: var(--muted); }

/* How it works */
.how { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 64px 48px; text-align: center; }
.how h2 { font-size: clamp(34px, 5vw, 48px); }
.how .lead { color: rgba(255,255,255,.6); margin-bottom: 40px; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: left; }
.step { background: var(--ink-2); border-radius: 16px; padding: 28px; }
.step .num { font-family: var(--serif); font-size: 40px; color: var(--orange); line-height: 1; }
.step h3 { font-size: 22px; margin: 10px 0 4px; }
.step .tag { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.step p { margin-top: 12px; color: rgba(255,255,255,.75); font-size: 15px; }

/* Programs */
.programs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 44px; }
.program { border-radius: 18px; padding: 30px 26px; position: relative; overflow: hidden; min-height: 340px; display: flex; flex-direction: column; }
.program .big { position: absolute; top: 10px; right: 18px; font-family: var(--serif); font-size: 84px; opacity: .14; line-height: 1; }
.program .pill { display: inline-block; align-self: flex-start; font-size: 11px; font-weight: 800; letter-spacing: .1em; padding: 5px 12px; border-radius: 999px; margin-bottom: 18px; }
.program h3 { font-size: 30px; margin-bottom: 8px; }
.program .sub { font-weight: 700; font-size: 14px; margin-bottom: 18px; }
.program p { font-size: 15px; margin-top: auto; }
.program p b { display: block; font-family: var(--serif); font-size: 20px; font-weight: 500; margin-bottom: 6px; }
.p-dark { background: var(--ink); color: #fff; } .p-dark .pill { background: var(--orange); color: #fff; }
.p-orange { background: var(--orange); color: #fff; } .p-orange .pill { background: #fff; color: var(--orange); }
.p-cream { background: var(--cream); color: var(--ink); border: 1px solid var(--line); } .p-cream .pill { background: var(--ink); color: #fff; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq h2 { font-size: clamp(36px, 5vw, 52px); }
.faq-list { margin-top: 32px; background: #fff; border-radius: 18px; overflow: hidden; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 0; }
.faq-item button { width: 100%; text-align: left; background: none; border: 0; padding: 20px 24px; font: inherit; font-weight: 600; font-size: 16px; display: flex; justify-content: space-between; gap: 16px; cursor: pointer; color: var(--ink); }
.faq-item button::after { content: '+'; color: var(--orange); font-size: 22px; line-height: 1; transition: transform .25s; }
.faq-item.open button::after { transform: rotate(45deg); }
.faq-item .answer { display: none; padding: 0 24px 22px; color: var(--muted); }
.faq-item.open .answer { display: block; }

/* Locations */
.campuses { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 36px; }
.campus { background: var(--cream); border-radius: 18px; padding: 14px; }
.campus img { border-radius: 12px; aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.campus .info { padding: 18px 8px 8px; }
.campus h3 { font-family: var(--sans); font-size: 15px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.campus p { color: var(--muted); font-size: 15px; margin: 6px 0 14px; }
.days { display: flex; gap: 8px; }
.days span { background: #fff; border: 1px solid var(--line); color: var(--orange); font-weight: 700; font-size: 13px; border-radius: 999px; padding: 4px 14px; }

/* CTA */
.cta { background: var(--orange); color: #fff; border-radius: var(--radius); padding: 72px 32px; text-align: center; }
.cta .eyebrow { color: rgba(255,255,255,.85); }
.cta h2 { font-size: clamp(36px, 5vw, 54px); }
.cta h2 em { color: #fff; }
.cta p { margin: 12px auto 28px; max-width: 520px; color: rgba(255,255,255,.9); }

/* Student reviews */
.testimonials { background: var(--ink); color: #fff; padding: 96px 0; text-align: center; }
.testimonials h2 { font-size: clamp(36px, 5vw, 52px); }
.testimonials .lead { color: rgba(255,255,255,.6); }
.slider { position: relative; max-width: 760px; margin: 36px auto 0; padding: 0 56px; }
.slide { display: none; }
.slide.active { display: block; animation: fade .5s; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.stars { color: var(--orange); letter-spacing: 4px; margin-bottom: 18px; }
.slide blockquote { font-size: 18px; line-height: 1.75; color: rgba(255,255,255,.88); }
.slide cite { display: block; margin-top: 18px; font-style: normal; font-weight: 700; color: rgba(255,255,255,.6); font-size: 14px; }
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background: none; border: 1px solid rgba(255,255,255,.25); color: #fff; width: 42px; height: 42px; border-radius: 50%; cursor: pointer; font-size: 18px; }
.slider-btn.prev { left: 0; } .slider-btn.next { right: 0; }
.dots { display: flex; justify-content: center; gap: 8px; margin-top: 28px; }
.dots button { width: 8px; height: 8px; border-radius: 50%; border: 0; background: rgba(255,255,255,.3); cursor: pointer; padding: 0; }
.dots button.active { background: var(--orange); }

/* Footer */
.site-footer { background: var(--ink); color: rgba(255,255,255,.7); padding: 56px 0 28px; border-top: 1px solid rgba(255,255,255,.08); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.site-footer .brand { color: #fff; }
.site-footer h4 { color: var(--orange); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer a { text-decoration: none; display: block; margin-bottom: 6px; font-size: 14px; }
.site-footer a:hover { color: #fff; }
.socials { display: flex; gap: 10px; margin-bottom: 14px; }
.socials a { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08); display: grid; place-items: center; margin: 0; }
.socials svg { width: 18px; height: 18px; fill: #fff; }
.copy { margin-top: 40px; font-size: 13px; color: rgba(255,255,255,.4); }

/* Contact button (bottom right) */
.fab { position: fixed; right: 18px; bottom: 18px; z-index: 60; }
.fab-main { width: 60px; height: 60px; border-radius: 50%; background: var(--orange); color: #fff; border: 0; cursor: pointer; display: grid; place-items: center; box-shadow: 0 6px 20px rgba(232,93,44,.4); transition: transform .2s, background .2s; }
.fab-main:hover { transform: scale(1.06); }
.fab.open .fab-main { background: var(--ink); }
.fab-main .ic-close { display: none; } .fab.open .ic-chat { display: none; } .fab.open .ic-close { display: block; }
.fab-menu { position: absolute; right: 0; bottom: 72px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; opacity: 0; pointer-events: none; transform: translateY(10px); transition: .25s; }
.fab.open .fab-menu { opacity: 1; pointer-events: auto; transform: none; }
.fab-item { display: flex; align-items: center; gap: 10px; background: #fff; padding: 7px 18px 7px 7px; border-radius: 999px; box-shadow: 0 4px 16px rgba(0,0,0,.12); text-decoration: none; font-size: 14px; font-weight: 600; white-space: nowrap; }
.fab-item i { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 800; color: #fff; }
.fab-item i svg { width: 16px; height: 16px; }
.i-kakao { background: #FEE500; color: #3C1E1E !important; } .i-phone { background: #34C759; } .i-sms { background: #5856D6; } .i-mail { background: var(--orange); }

/* Promo popups — three separate cards, each closes on its own (like the old Wix site) */
.promo { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.72); display: flex; align-items: center; justify-content: center; padding: 24px; overflow-y: auto; }
.promo[hidden] { display: none; }
.promo-cards { display: flex; gap: 20px; align-items: flex-start; justify-content: center; width: 100%; max-width: 1180px; margin: auto; }
.promo-card { position: relative; flex: 0 1 370px; max-width: min(370px, calc(100vh - 230px)); border-radius: 18px; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.5); animation: up .4s cubic-bezier(.16,1,.3,1) both; }
.promo-card:nth-child(2) { animation-delay: .08s; } .promo-card:nth-child(3) { animation-delay: .16s; }
@keyframes up { from { transform: translateY(16px) scale(.97); opacity: 0; } to { transform: none; opacity: 1; } }
.promo-card[hidden] { display: none; }
.promo-card img { width: 100%; height: auto; }
.promo-card .cta-wrap { padding: 14px 16px 12px; }
.promo-card a.go { display: block; text-align: center; padding: 13px; border-radius: 999px; font-weight: 800; text-decoration: none; font-size: 14px; }
.promo-close { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.55); color: #fff; font-size: 21px; line-height: 1; cursor: pointer; z-index: 2; }
.promo-later { display: block; margin: 8px auto 0; background: none; border: 0; color: rgba(255,255,255,.7); text-decoration: underline; cursor: pointer; font: inherit; font-size: 13px; }
@media (max-width: 900px) {
  .promo { align-items: flex-start; }
  .promo-cards { flex-direction: column; align-items: center; }
  .promo-card { flex: none; width: 100%; max-width: 400px; }
}

/* Programs page */
.course { display: grid; grid-template-columns: 380px 1fr; gap: 36px; align-items: center; background: #fff; border-radius: var(--radius); padding: 22px; text-decoration: none; color: var(--ink); margin-bottom: 24px; transition: transform .2s, box-shadow .2s; }
.course:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,.08); }
.course img { border-radius: 14px; width: 100%; }
.course-body { padding: 8px 12px 8px 0; }
.course-tag { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--orange); margin-bottom: 10px; }
.course h2 { font-size: clamp(30px, 4vw, 42px); margin-bottom: 8px; }
.course-when { font-weight: 700; font-size: 15px; margin-bottom: 14px; }
.course p { color: var(--muted); margin-bottom: 12px; }
.course ul { margin: 0 0 22px 20px; color: #3d3833; font-size: 15px; }
.course li { margin-bottom: 4px; }
.course-btn { background: var(--accent); color: var(--accent-ink); }

/* Sub pages */
.page-hero { padding: 96px 0 48px; text-align: center; }
.page-hero h1 { font-size: clamp(40px, 6vw, 68px); }
.prose { max-width: 760px; margin: 0 auto; padding-bottom: 96px; }
.prose p, .prose li { color: #3d3833; font-size: 17px; margin-bottom: 18px; }
.prose h2 { font-size: 26px; margin: 40px 0 14px; }
.prose ul { padding-left: 22px; }
.prose .meta { color: var(--muted); font-size: 14px; margin-bottom: 30px; }

.instructor { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: center; background: var(--ink); color: #fff; border-radius: var(--radius); padding: 48px; }
.instructor h1 { font-size: clamp(44px, 6vw, 64px); font-style: italic; }
.instructor img { border-radius: 14px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 36px; }
.stat { background: #fff; border-radius: 16px; padding: 24px; }
.stat b { font-family: var(--serif); font-size: 40px; font-weight: 500; color: var(--orange); display: block; line-height: 1.1; }
.stat span { font-weight: 700; font-size: 14px; display: block; }
.stat small { color: var(--muted); font-size: 13px; }
.results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 36px; }
.results img { border-radius: 14px; aspect-ratio: 1; object-fit: cover; width: 100%; background: #fff; }
.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.quotes blockquote { background: #fff; border-radius: 16px; padding: 26px; font-family: var(--serif); font-size: 22px; }
.quotes cite { display: block; font-family: var(--sans); font-style: normal; font-size: 13px; color: var(--muted); margin-top: 10px; }
.posts { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 36px; }
.post-card { background: #fff; border-radius: 18px; overflow: hidden; text-decoration: none; transition: transform .2s; }
.post-card:hover { transform: translateY(-4px); }
.post-card img { aspect-ratio: 16/9; object-fit: cover; width: 100%; }
.post-card div { padding: 22px 24px 26px; }
.post-card h3 { font-size: 24px; margin-bottom: 8px; }
.post-card p { color: var(--muted); font-size: 15px; }
.post-card small { display: block; margin-top: 12px; color: var(--muted); font-size: 13px; }
.donate-box { background: #fff; border-radius: 18px; padding: 28px; margin-top: 10px; }
.donate-box p { margin-bottom: 6px; }

@media (max-width: 900px) {
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--cream); flex-direction: column; padding: 12px 20px 20px; border-bottom: 1px solid var(--line); }
  .nav.open { display: flex; }
  .nav a.nav-cta { margin: 8px 0 0; justify-content: center; }
  .nav-toggle { display: block; }
  .features .grid, .stats { grid-template-columns: repeat(2, 1fr); }
  .mission, .split, .steps, .programs, .campuses, .footer-grid, .instructor, .results, .quotes, .posts, .course { grid-template-columns: 1fr; }
  .card, .how, .instructor { padding: 32px 22px; }
  section.block { padding: 64px 0; }
  .photo-stack { margin: 20px auto 0; }
  .photo-stack .badge { right: -8px; }
  .pillars { grid-template-columns: 1fr; }
  .slider { padding: 0; }
  .slider-btn { display: none; }
  .hero .wrap { padding-top: 80px; padding-bottom: 80px; }
}
