/* ============================================================
   Mirai Eduventure Indonesia — site stylesheet
   Layout, chrome (promo banner / header / footer / nav), the
   design-system components used across pages, and responsive
   rules. Pairs with tokens.css (colors/type/spacing tokens) and
   js/site.js (interactive behaviour) + js/i18n.js (EN/JA copy).
   ============================================================ */

:root{ --promo-h:68px; }

/* ---------- Chrome: promo banner / header / nav ---------- */
.promo-banner-link{position:sticky;top:0;z-index:21;display:block;width:100%;height:var(--promo-h);overflow:hidden;border:none}
.promo-banner-link img{width:100%;height:100%;object-fit:cover;display:block}

.site-header{position:sticky;top:var(--promo-h);z-index:20;display:flex;align-items:center;justify-content:space-between;gap:24px;padding:16px 24px;background:rgba(253,250,246,0.9);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);border-bottom:1px solid var(--border-subtle)}
.site-header .brand{border:none;display:flex;align-items:center}
.site-header .brand img{display:block}

.nav-desktop{display:flex;align-items:center;gap:26px;flex-wrap:wrap}
.nav-desktop a{border:none;font-size:14px;color:var(--text-body)}
.nav-desktop a.is-active{font-weight:500;color:var(--terracotta-600)}

.lang-toggle{border:none;background:var(--ink-100);color:var(--text-heading);display:flex;align-items:center;gap:6px;padding:6px 12px;border-radius:999px;cursor:pointer;font-family:inherit}
.lang-toggle svg{flex:none}
.lang-switch{position:relative}
.lang-menu{display:none;position:absolute;top:calc(100% + 6px);right:0;min-width:160px;background:var(--surface-page);border:1px solid var(--border-subtle);border-radius:10px;box-shadow:var(--shadow-popover);overflow:hidden;z-index:40}
.lang-menu.is-open{display:block}
.lang-menu button{display:block;width:100%;text-align:left;border:none;padding:10px 14px;font-size:13px;background:transparent;color:var(--text-heading);cursor:pointer;font-family:inherit}
.lang-menu button:hover{background:var(--ink-100)}
.lang-menu button.is-active,.lang-switch-mobile button.is-active{background:var(--terracotta-50)}
.lang-switch-mobile{display:flex;gap:8px;margin:16px 0}
.lang-switch-mobile button{flex:1;min-height:48px;border:1px solid var(--border-subtle);background:transparent;color:var(--text-heading);border-radius:8px;font-size:14px;font-weight:500;cursor:pointer;font-family:inherit}

.nav-hamburger{display:none;border:none;background:transparent;cursor:pointer;padding:10px;flex-direction:column;gap:5px;align-items:center;justify-content:center}
.nav-hamburger span{display:block;width:22px;height:2px;background:var(--ink-900)}

.nav-mobile{display:none;position:fixed;inset:0;z-index:30;background:var(--surface-page);flex-direction:column;padding:24px;gap:4px;overflow-y:auto}
.nav-mobile.is-open{display:flex}
.nav-mobile-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}
.nav-mobile-close{border:none;background:transparent;font-size:30px;line-height:1;cursor:pointer;color:var(--ink-900);padding:4px 10px}
.nav-mobile a{border:none;font-size:18px;padding:14px 4px;border-bottom:1px solid var(--border-subtle);color:var(--text-body)}
.nav-mobile a.is-active{font-weight:500;color:var(--terracotta-600)}
.nav-mobile a.btn{color:var(--white);border:1px solid transparent;padding:16px 32px}
html.menu-open .wa-float{display:none}

/* ---------- Footer ---------- */
.site-footer{background:var(--ink-700);color:rgba(253,250,246,0.78);padding:64px 24px 24px}
.site-footer .footer-inner{max-width:var(--container-max);margin:0 auto;display:flex;flex-wrap:wrap;gap:48px;justify-content:space-between}
.site-footer .footer-brand{display:flex;flex-direction:column;align-items:flex-start;gap:24px;max-width:300px}
.site-footer .footer-brand img{flex-shrink:0;align-self:flex-start}
.site-footer .footer-brand p{font-size:13px;line-height:1.6;color:rgba(253,250,246,0.7)}
.site-footer .footer-col{display:flex;flex-direction:column;gap:12px}
.site-footer .footer-col-title{font-size:11px;font-weight:500;letter-spacing:0.14em;text-transform:uppercase;color:rgba(253,250,246,0.5)}
.site-footer .footer-col a{border:none;color:rgba(253,250,246,0.86);font-size:14px}
.site-footer .footer-contact{display:flex;flex-direction:column;gap:12px;max-width:260px}
.site-footer .footer-contact a:not(.footer-social){border:none;color:rgba(253,250,246,0.86);font-size:14px;padding:4px 0}
.site-footer .footer-col a{padding:4px 0}
.site-footer .footer-contact span{color:rgba(253,250,246,0.86);font-size:14px}
.site-footer .footer-contact .footer-address{color:rgba(253,250,246,0.65);font-size:13px;line-height:1.5}
.site-footer .footer-socials{display:flex;flex-direction:column;gap:10px;margin-top:4px}
.site-footer .footer-social{border:none;display:inline-flex;align-items:center;gap:6px;color:rgba(253,250,246,0.86);font-size:14px;min-height:28px}
.site-footer .footer-social img{width:16px;height:16px;object-fit:contain}
.site-footer .footer-bottom{max-width:var(--container-max);margin:24px auto 0;padding-top:16px;border-top:1px solid rgba(253,250,246,0.14);font-size:13px;color:rgba(253,250,246,0.55);display:flex;justify-content:center;flex-wrap:wrap;gap:8px}

/* ---------- Mobile promo bar (replaces the wide image banner on phones) ---------- */
.promo-bar-mobile{display:none;position:sticky;top:0;z-index:21;width:100%;height:var(--promo-h);background:var(--terracotta-600);color:var(--cream);border:none;align-items:center;justify-content:space-between;gap:8px;padding:0 12px;font-size:12px;font-weight:500}
.promo-bar-mobile:hover{color:var(--cream)}
.promo-bar-mobile__text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.promo-bar-mobile__more{flex-shrink:0;text-decoration:underline}

/* ---------- Floating WhatsApp button ---------- */
.wa-float{position:fixed;right:16px;bottom:calc(16px + env(safe-area-inset-bottom));z-index:50;width:56px;height:56px;border-radius:999px;display:flex;align-items:center;justify-content:center;box-shadow:0 4px 16px rgba(0,0,0,0.25);border:none}
.wa-float img{width:100%;height:100%;object-fit:contain}

/* ---------- Scroll lock while a menu / modal is open ---------- */
html.menu-open,html.modal-open{overflow:hidden}

/* ---------- About: safety items ---------- */
.safety-item{background:var(--surface-accent-soft);border-radius:12px;padding:24px;display:flex;flex-direction:column;gap:8px}

/* ---------- Buttons ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;font-family:var(--font-body);font-weight:var(--fw-medium);line-height:1.2;text-decoration:none;cursor:pointer;border-radius:var(--radius-control);transition:var(--transition-control);box-shadow:none;border:1px solid transparent}
.btn-sm{padding:8px 16px;font-size:var(--fs-body-sm)}
.btn-md{padding:12px 24px;font-size:var(--fs-body)}
.btn-lg{padding:16px 32px;font-size:var(--fs-body-lg)}
.btn-block{display:flex;width:100%}
.btn-primary{background:var(--gradient-sunrise-h);color:var(--white)}
.btn-primary:hover{background:var(--terracotta-600);color:var(--white);border-color:transparent}
.btn-secondary{background:transparent;color:var(--terracotta-600);border-color:var(--terracotta-300)}
.btn-secondary:hover{background:var(--terracotta-50)}
.btn-ghost{background:transparent;color:var(--text-heading)}
.btn-ghost:hover{background:var(--ink-100)}
.btn-inverse{background:var(--white);color:var(--terracotta-600)}
.btn-inverse:hover{background:rgba(255,255,255,0.86)}
.btn svg{flex:none}
.btn[disabled]{cursor:not-allowed;opacity:.45}

/* ---------- Card ---------- */
.card{border-radius:var(--radius-card);padding:var(--space-5);background:var(--surface-card);border:1px solid var(--border-subtle);transition:border-color var(--dur-base) var(--ease-out)}
.card--soft{background:var(--surface-accent-soft);border-color:var(--terracotta-100)}
.card--sunken{background:var(--surface-sunken);border-color:var(--border-subtle)}
.card--outline{background:transparent;border-color:var(--border-strong)}

/* ---------- Badge ---------- */
.badge{display:inline-flex;align-items:center;gap:4px;padding:4px 10px;border-radius:var(--radius-sm);font-family:var(--font-body);font-size:var(--fs-caption);font-weight:var(--fw-medium);line-height:1.3}
.badge--neutral{background:var(--ink-100);color:var(--ink-700)}
.badge--accent{background:var(--terracotta-50);color:var(--terracotta-600)}
.badge--solid{background:var(--terracotta-500);color:var(--white)}
.badge--outline{background:transparent;color:var(--ink-700);box-shadow:inset 0 0 0 1px var(--border-strong)}

/* ---------- Country badge ---------- */
.country-badge{display:inline-flex;align-items:center;gap:8px;padding:4px 10px;border-radius:var(--radius-sm);font-family:var(--font-body);font-size:var(--fs-caption);font-weight:var(--fw-medium)}
.country-badge__dot{width:6px;height:6px;border-radius:999px;flex:none}
.country-badge--japan{background:var(--country-jp-soft);color:var(--country-jp)}
.country-badge--japan .country-badge__dot{background:var(--country-jp)}
.country-badge--indonesia{background:var(--country-id-soft);color:var(--country-id)}
.country-badge--indonesia .country-badge__dot{background:var(--country-id)}
.country-badge--vietnam{background:var(--country-vn-soft);color:var(--country-vn)}
.country-badge--vietnam .country-badge__dot{background:var(--country-vn)}
.country-badge.is-solid{color:var(--white)}
.country-badge.is-solid.country-badge--japan{background:var(--country-jp)}
.country-badge.is-solid.country-badge--indonesia{background:var(--country-id)}
.country-badge.is-solid.country-badge--vietnam{background:var(--country-vn)}
.country-badge.is-solid .country-badge__dot{background:var(--white)}

/* ---------- Section heading ---------- */
.section-heading{display:flex;flex-direction:column;gap:var(--space-3);text-align:left;align-items:flex-start;max-width:var(--measure)}
.section-heading--center{text-align:center;align-items:center;max-width:720px;margin-left:auto;margin-right:auto}
.section-heading__eyebrow{font-size:var(--fs-micro);font-weight:var(--fw-medium);letter-spacing:var(--ls-eyebrow);text-transform:uppercase;color:var(--text-muted)}
.section-heading--inverse .section-heading__eyebrow{color:rgba(253,250,246,0.8)}
.section-heading__title{font-size:var(--fs-h1);color:var(--text-heading)}
.section-heading--inverse .section-heading__title{color:var(--cream)}
.section-heading__intro{font-size:var(--fs-body-lg);color:var(--text-body)}
.section-heading--inverse .section-heading__intro{color:rgba(253,250,246,0.86)}

/* ---------- Stat block ---------- */
.stat-block{display:flex;flex-direction:column;gap:var(--space-1)}
.stat-block__value{font-family:var(--font-display);font-weight:var(--fw-medium);font-size:var(--fs-display-2);line-height:var(--lh-tight);letter-spacing:var(--ls-display);color:var(--terracotta-500)}
.stat-block--inverse .stat-block__value{color:var(--cream)}
.stat-block__label{font-size:var(--fs-body-sm);color:var(--text-muted)}
.stat-block--inverse .stat-block__label{color:rgba(253,250,246,0.82)}

/* ---------- CTA banner ---------- */
.cta-banner{background:var(--gradient-sunrise);border-radius:var(--radius-xl);padding:var(--space-7) var(--space-6);display:flex;flex-direction:column;align-items:center;text-align:center;gap:var(--space-4)}
.cta-banner__title{color:var(--cream);font-size:var(--fs-display-2);letter-spacing:var(--ls-display);max-width:720px}
.cta-banner__body{color:rgba(253,250,246,0.9);font-size:var(--fs-body-lg);max-width:620px}
.cta-banner__action{margin-top:var(--space-2)}

/* ---------- Image placeholder (unfilled photo slot) ---------- */
.img-slot{position:relative;display:flex;align-items:center;justify-content:center;text-align:center;background:rgba(127,127,127,0.08);border:1.5px dashed rgba(107,58,49,0.35);color:var(--text-muted);font:13px/1.3 var(--font-body);overflow:hidden;padding:12px;box-sizing:border-box}
.img-slot--rect{border-radius:0}
.img-slot--rounded{border-radius:12px}
.img-slot--circle{border-radius:50%}
.img-slot__cap{max-width:90%}

/* ---------- Modal (used by news / partners / voices) ---------- */
.modal-overlay{display:none;position:fixed;inset:0;z-index:60;align-items:flex-start;justify-content:center;overflow-y:auto;padding:40px 20px;background:rgba(30,12,7,0.55)}
.modal-overlay.is-open{display:flex}
.modal-box{position:relative;background:var(--surface-page);border-radius:16px;max-width:640px;width:100%;max-height:85vh;overflow-y:auto}
.modal-box img{width:100%;aspect-ratio:16/9;object-fit:cover}
.modal-box__body{padding:32px;display:flex;flex-direction:column;gap:12px}
.modal-close{position:absolute;top:16px;right:16px;z-index:2;border:none;background:rgba(30,12,7,0.55);color:var(--cream);width:32px;height:32px;border-radius:999px;font-size:20px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center}

/* ---------- News ---------- */
.news-grid{max-width:var(--container-max);margin:0 auto;padding:0 24px 64px;display:grid;grid-template-columns:repeat(3,1fr);gap:20px}
.news-card{cursor:pointer;display:flex;flex-direction:column;background:var(--surface-card);border:1px solid var(--border-subtle);border-radius:12px;overflow:hidden;text-align:left}
.news-card img{width:100%;aspect-ratio:16/10;object-fit:cover}
.news-card__body{padding:16px;display:flex;flex-direction:column;gap:6px}
.news-card__meta{font-size:11px;color:var(--text-muted);letter-spacing:0.04em}
.news-card__title{font-size:15px;color:var(--text-heading)}
.news-card__excerpt{font-size:13px;color:var(--text-body);line-height:1.5}
.news-card__more{font-size:13px;color:var(--terracotta-600);font-weight:500;margin-top:4px}

/* ---------- Voices ---------- */
.quote-clamp{display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}
.read-more-label{cursor:pointer;color:var(--terracotta-600);font-size:13px;font-weight:500;display:inline-block;margin-top:2px;border:none}
.voice-card{position:relative;background:var(--surface-card);border:1px solid var(--border-subtle);border-radius:12px;padding:20px;display:flex;flex-direction:column;gap:12px}
.voice-card--placeholder{background:repeating-linear-gradient(135deg,var(--ink-100) 0px,var(--ink-100) 10px,var(--surface-card) 10px,var(--surface-card) 20px);border:1px dashed var(--border-strong);opacity:.72}
.voice-card__badge{position:absolute;top:12px;right:12px;background:var(--country-id);color:var(--white);font-size:10px;font-weight:500;padding:2px 8px;border-radius:4px}
.voice-card__head{display:flex;align-items:center;gap:10px}
.voice-card__prog{padding:3px 8px;border-radius:999px;font-size:11px}
.voice-card__quote{font-size:14px;color:var(--text-heading);line-height:1.6;margin:0}
.voice-card--placeholder .voice-card__quote{font-style:italic}
.voice-card__meta{font-size:12px;color:var(--text-muted);border-top:1px solid var(--border-subtle);padding-top:10px}

/* ---------- Home page: hero splash + typewriter ---------- */
@keyframes home-typewriter{from{max-width:0}to{max-width:40ch}}
@keyframes home-caret{50%{border-color:transparent}}
@keyframes home-eyebrow-type{from{max-width:0}to{max-width:30ch}}
.home-hero-eyebrow{display:inline-block;overflow:hidden;white-space:nowrap;line-height:1.15;border-right:3px solid var(--cream);animation:home-eyebrow-type 2.2s steps(24,end) 0.3s 1 normal both,home-caret 0.75s step-end infinite 0.3s}
.home-hero-title{display:inline-block;overflow:hidden;white-space:nowrap;line-height:1.15;max-width:0;border-right:3px solid var(--cream);animation:home-typewriter 2.8s steps(26,end) 2.8s 1 normal both,home-caret 0.75s step-end infinite 2.8s}
@keyframes home-splash-logo-in{from{opacity:0;transform:scale(0.6) translateY(12px)}to{opacity:1;transform:scale(1) translateY(0)}}
.home-splash-logo{opacity:0;animation:home-splash-logo-in 0.7s cubic-bezier(.2,.7,.3,1) 6s 1 normal both}
.home-splash{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}

/* ============================================================
   Responsive — mobile <768px, tablet 768–1023px, desktop ≥1024px
   ============================================================ */
@media (max-width:1023px){
  .nav-desktop{display:none!important}
  .nav-hamburger{display:flex!important;min-width:44px;min-height:44px}
  .lang-toggle{min-height:44px}
  input,select,textarea{font-size:16px!important}
  .site-footer{padding-bottom:calc(88px + env(safe-area-inset-bottom))!important}
}
@media (min-width:768px) and (max-width:1023px){
  [style*="repeat(3, 1fr)"]:not(.testimonial-grid){grid-template-columns:repeat(2,1fr)!important}
}
@media (max-width:767px){
  :root{ --promo-h:36px; }
  .promo-banner-link{display:none}
  .promo-bar-mobile{display:flex}
  .site-header{padding-top:8px!important;padding-bottom:8px!important;padding-left:16px!important;padding-right:16px!important}
  .site-header img{height:26px!important}
  h2{font-size:19px!important;line-height:1.3!important}
  h3{font-size:15px!important;line-height:1.35!important}
  p{font-size:13px!important;line-height:1.55!important}
  .mei-eyebrow{font-size:10px!important}
  section{padding-top:36px!important;padding-bottom:36px!important;padding-left:16px!important;padding-right:16px!important}
  .voices-hero-badge{position:static!important;align-self:flex-start;margin-bottom:12px;display:inline-flex!important}
  .site-footer{padding:24px 16px calc(88px + env(safe-area-inset-bottom))!important}
  .site-footer p{font-size:12px!important}
  .site-footer h3,.site-footer span{font-size:12px!important}
  [style*="display:grid"],[style*="display: grid"]{grid-template-columns:1fr!important}
  [style*="position:sticky"][style*="top:96px"],[style*="position: sticky"][style*="top: 96px"]{position:static!important}
  .news-grid{grid-template-columns:1fr!important}
}
/* Home page only */
body.page-home{}
@media (max-width:767px){
  body.page-home section[style*="min-height:640px"]{min-height:360px!important}
  body.page-home section{padding-top:20px!important;padding-bottom:20px!important}
  body.page-home .home-hero-inner{min-height:0!important;padding:40px 16px!important}
  body.page-home .home-hero-eyebrow,body.page-home .home-hero-title{font-size:clamp(15px,6.5vw,38px)!important}
  body.page-home .home-hero-stats{grid-template-columns:repeat(3,1fr)!important;gap:12px!important}
  body.page-home .programs-grid{gap:14px!important}
  body.page-home section > div[style*="margin-bottom:40px"]{margin-bottom:16px!important}
  body.page-home img[style*="aspect-ratio:4/3"],body.page-home img[style*="aspect-ratio:16/10"]{aspect-ratio:16/9!important}
  body.page-home [style*="min-height:260px"]{min-height:0!important;height:auto!important}
  body.page-home .programs-grid h3{font-size:15px!important}
  body.page-home .programs-grid p{font-size:12px!important;line-height:1.45!important}
  body.page-home .programs-grid span{font-size:10px!important}
  body.page-home .programs-grid a{font-size:12px!important}
}
