/* SITE-1 — responsive pro pass
   Goal: mobile is a deliberately recomposed layout, not a scaled desktop. */

html, body { width: 100%; max-width: 100%; overflow-x: clip; }
body { min-width: 0; }
img, video, iframe, svg { max-width: 100%; }
.wrap, .nav-shell, main, section, footer, header { min-width: 0; }

@media (max-width: 1100px) {
  .nav-shell { width: min(calc(100% - 32px), 1320px); }
  .desktop-nav { gap: 14px; }
  .desktop-nav a { font-size: .82rem; }
  .header-call { display: none; }
  .hero-educal-grid { grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: 28px; }
  .hero-blob { width: min(46vw,470px); height: min(46vw,470px); }
  .float-card { min-width: 190px; }
}

/* Tablet: switch the whole site to a single-column reading flow. */
@media (max-width: 960px) {
  :root { --header-h: 72px; }
  body { padding-bottom: 0; }
  .site-header { position: sticky; top: 0; }
  .nav-shell { height: 72px; width: calc(100% - 28px); gap: 12px; }
  .desktop-nav, .header-call, .nav-cta { display: none !important; }
  .menu-toggle { display: flex !important; margin-left: auto; flex: 0 0 46px; }
  .mobile-menu { inset: 72px 0 0; height: calc(100dvh - 72px); }
  .mobile-menu-inner { height: 100%; width: min(calc(100% - 32px), 620px); padding: 24px 0 max(32px, env(safe-area-inset-bottom)); }
  .mobile-menu nav a { font-size: clamp(1.7rem, 6vw, 2.3rem); }

  .wrap { width: min(calc(100% - 40px), 760px); }
  .section-space { padding: 76px 0; }

  .hero-educal { display: block; min-height: auto; }
  .hero-educal-grid { display: grid; grid-template-columns: 1fr; gap: 42px; padding: 64px 0 72px; }
  .hero-educal-copy { max-width: 720px; }
  .hero-educal-copy h1 { font-size: clamp(3.1rem, 9vw, 5.3rem); max-width: 760px; }
  .hero-educal-copy > p { max-width: 660px; }
  .hero-educal-visual { width: min(100%, 700px); min-height: 0; aspect-ratio: 1.2 / 1; margin-inline: auto; }
  .hero-blob { width: 74%; height: auto; aspect-ratio: 1; right: 3%; top: 3%; }
  .hero-main-photo { width: 70%; height: 78%; right: 2%; top: 6%; }
  .hero-small-photo { width: 34%; left: 4%; bottom: 3%; }
  .float-card-top { left: 1%; top: 26%; }
  .float-card-bottom { right: 1%; bottom: 10%; }

  .category-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .feature-split-grid,
  .admission-showcase-grid,
  .footer-cta-grid,
  .inner-hero-grid,
  .story-grid,
  .network-grid,
  .establishment-focus,
  .contact-editorial,
  .admission-layout { grid-template-columns: minmax(0,1fr) !important; gap: 44px !important; }

  .feature-image-stack { min-height: 0; aspect-ratio: 1.15 / 1; width: min(100%,680px); margin-inline: auto; }
  .feature-image-main { width: 78%; height: 82%; }
  .feature-image-small { width: 43%; height: 46%; }

  .info-band-home-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .info-band-home-grid > div { padding: 24px 16px !important; border-right: 1px solid rgba(255,255,255,.13); border-bottom: 1px solid rgba(255,255,255,.13); }
  .info-band-home-grid > div:nth-child(2n) { border-right: 0; }
  .info-band-home-grid > div:nth-last-child(-n+2) { border-bottom: 0; }

  .news-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .news-card.featured { grid-column: 1/-1; }
  .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; gap: 34px; }
  .footer-contact { grid-column: 1/-1; }

  .inner-hero { padding: 74px 0 66px; }
  .inner-hero h1 { font-size: clamp(3.2rem, 10vw, 5.5rem); }
  .inner-hero-side, .establishment-info { border-left: 0 !important; border-right: 0 !important; padding-left: 0 !important; padding-right: 0 !important; }
  .story-photo, .map-frame { width: 100%; }
  .principle-row, .cycle-long, .info-band-grid, .guidance-steps > div, .contact-prep-grid { grid-template-columns: 1fr !important; gap: 10px !important; }
  .news-index-row { grid-template-columns: 86px minmax(0,1fr) 20px; gap: 16px; }
  .form-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

/* Phones: remove fragile absolute desktop compositions. */
@media (max-width: 640px) {
  :root { --header-h: 66px; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
  .nav-shell { height: 66px; width: calc(100% - 24px); }
  .site-header .brand img { width: 38px; height: 38px; }
  .site-header .brand-copy strong { font-size: .84rem; }
  .site-header .brand-copy span { font-size: .61rem; margin-top: 3px; }
  .menu-toggle { width: 44px; height: 44px; flex-basis: 44px; }
  .mobile-menu { inset: 66px 0 0; height: calc(100dvh - 66px); }
  .mobile-menu-inner { width: calc(100% - 28px); padding-top: 18px; }
  .mobile-menu nav a { padding: 14px 0; font-size: clamp(1.55rem, 8vw, 2.05rem); }
  .mobile-menu-actions { grid-template-columns: 1fr 1fr; margin-top: 18px; }

  .wrap { width: calc(100% - 28px); max-width: none; }
  .section-space { padding: 58px 0; }
  h2 { font-size: clamp(2rem, 9.6vw, 2.85rem); line-height: 1.06; }
  p { line-height: 1.67; }
  .eyebrow, .section-label { font-size: .65rem; letter-spacing: .07em; }

  .hero-educal-grid { gap: 30px; padding: 42px 0 46px; }
  .hero-educal-copy h1 { font-size: clamp(2.65rem, 12.3vw, 3.85rem); line-height: 1.01; margin: 14px 0 18px; }
  .hero-educal-copy > p { font-size: .95rem; line-height: 1.65; margin-bottom: 24px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .hero-actions .btn, .hero-actions .hero-text-link { width: 100%; min-height: 50px; justify-content: center; text-align: center; }
  .hero-trust { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; margin-top: 26px; border-top: 1px solid rgba(14,17,51,.10); border-bottom: 1px solid rgba(14,17,51,.10); }
  .hero-trust > div { display: grid; gap: 1px; justify-items: center; padding: 13px 5px; text-align: center; min-width: 0; }
  .hero-trust strong { font-size: 1.18rem; }
  .hero-trust span { font-size: .56rem; line-height: 1.25; }
  .hero-trust-divider { display: none; }

  /* Mobile hero is intentionally simpler and more robust. */
  .hero-educal-visual { aspect-ratio: 4 / 3; width: 100%; min-height: 0; border-radius: 18px; overflow: hidden; background: #dfe9ff; box-shadow: 0 18px 42px rgba(14,17,51,.12); }
  .hero-main-photo { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 18px; transform: none !important; box-shadow: none; }
  .hero-main-photo img { object-position: 55% center; }
  .hero-blob, .hero-small-photo, .float-card, .hero-ring, .hero-dots { display: none !important; }

  .center-heading { margin: 0 0 30px; text-align: left; }
  .center-heading .eyebrow { justify-content: flex-start; }
  .center-heading p { margin-left: 0; }

  .category-grid { grid-template-columns: 1fr; gap: 12px; }
  .category-card { min-height: 0; padding: 18px; display: grid; grid-template-columns: 52px minmax(0,1fr) 22px; gap: 14px; align-items: center; }
  .category-icon { width: 52px; height: 52px; }
  .category-icon svg { width: 25px; height: 25px; }
  .category-card h3 { margin: 0 0 2px; font-size: 1.18rem; }
  .category-card p { font-size: .78rem; }
  .category-arrow { position: static; justify-self: end; }
  .category-card::before { width: 86px; height: 86px; }

  .feature-split-grid { gap: 34px !important; }
  .feature-image-stack { width: 100%; aspect-ratio: 1.15 / 1; min-height: 0; }
  .feature-image-main { inset: 0 auto auto 0; width: 100%; height: 100%; border-radius: 14px; }
  .feature-image-small { display: none; }
  .feature-badge { left: 12px; bottom: 12px; min-width: 0; width: auto; max-width: calc(100% - 24px); padding: 10px 12px; }
  .feature-badge strong { font-size: 1.55rem; }
  .feature-badge span { font-size: .62rem; }
  .feature-copy h2 { margin-top: 12px; }
  .check-list li { align-items: flex-start; }

  .info-band-home { padding: 22px 0; }
  .info-band-home-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .info-band-home-grid > div { padding: 18px 6px !important; }
  .info-number { font-size: 1.8rem; }
  .info-band-home-grid div > span:last-child { font-size: .54rem; line-height: 1.3; }

  .admission-showcase-grid { gap: 30px !important; }
  .admission-copy .btn { width: 100%; }
  .admission-steps article { grid-template-columns: 48px minmax(0,1fr); gap: 14px; }
  .admission-steps article > span { font-size: .7rem; }

  .section-heading-split, .section-heading-row { display: grid !important; grid-template-columns: 1fr !important; gap: 16px !important; align-items: start !important; margin-bottom: 28px; }
  .news-card-grid { grid-template-columns: 1fr; gap: 12px; }
  .news-card, .news-card.featured { grid-column: auto; min-height: 0; padding: 24px 20px; }
  .news-card h3 { font-size: 1.35rem; }

  .footer-cta { padding: 54px 0; }
  .footer-cta-grid { gap: 24px !important; }
  .footer-cta h2 { font-size: clamp(2rem, 9vw, 2.8rem); }
  .button-row { display: grid; grid-template-columns: 1fr; width: 100%; }
  .button-row .btn { width: 100%; }
  .site-footer { padding-top: 52px; }
  .footer-grid { grid-template-columns: 1fr !important; gap: 30px; padding-bottom: 38px; }
  .footer-identity, .footer-contact { grid-column: auto !important; }
  .footer-contact { border-top: 1px solid rgba(255,255,255,.12); padding-top: 24px; }
  .footer-bottom { min-height: 0; padding: 20px 0 24px; flex-direction: column; align-items: flex-start; gap: 6px; }

  .mobile-actions { display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)); position: fixed; z-index: 2600; left: 0; right: 0; bottom: 0; height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: rgba(255,255,255,.98); border-top: 1px solid var(--edu-border); box-shadow: 0 -10px 30px rgba(14,17,51,.08); }
  .mobile-actions a { min-width: 0; display: grid; place-items: center; align-content: center; gap: 2px; text-decoration: none; font-size: .65rem; font-weight: 700; border-right: 1px solid var(--edu-border); }
  .mobile-actions a:last-child { border-right: 0; }
  .mobile-actions .primary { background: var(--edu-blue); color: #fff; }
  .mobile-action-icon { font-size: .95rem; line-height: 1; }

  /* Inner pages */
  .inner-hero { padding: 54px 0 46px; }
  .inner-hero-grid { gap: 22px !important; }
  .inner-hero h1 { font-size: clamp(2.7rem, 13vw, 4.1rem); line-height: .98; margin-top: 16px; overflow-wrap: anywhere; }
  .inner-hero-side { padding-bottom: 0; }
  .inner-hero-side p { font-size: .94rem; }

  .story-grid, .network-grid, .establishment-focus, .contact-editorial, .admission-layout { gap: 30px !important; }
  .story-photo img { width: 100%; height: auto; }
  .hero-big-number strong { font-size: clamp(7rem, 40vw, 10rem); }

  .principle-row, .cycle-long { padding: 24px 0; grid-template-columns: 1fr !important; gap: 8px !important; }
  .principle-row h3, .cycle-long-copy h3 { font-size: 1.35rem; }
  .cycle-long-main h2 { font-size: clamp(2rem, 10vw, 3rem); }
  .info-band-grid { grid-template-columns: 1fr !important; gap: 12px !important; }
  .info-band-grid h2 { font-size: clamp(2rem, 9vw, 2.8rem); }
  .guidance-steps > div { grid-template-columns: 34px minmax(0,1fr) !important; gap: 10px 12px !important; }
  .guidance-steps > div small { grid-column: 2; }
  .news-index-row { grid-template-columns: 1fr 20px; gap: 12px; padding: 22px 0; }
  .news-index-row > span { grid-column: 1/-1; }
  .news-index-row h3 { font-size: 1.25rem; }
  .contact-prep-grid { grid-template-columns: 1fr !important; gap: 16px !important; }
  .contact-buttons { display: grid; grid-template-columns: 1fr; }
  .contact-buttons .btn { width: 100%; }

  .admission-aside { position: static !important; }
  .admission-form-shell { padding: 22px 16px !important; }
  .form-grid { grid-template-columns: 1fr !important; gap: 0; }
  .editorial-form input, .editorial-form select, .editorial-form textarea { width: 100%; font-size: 16px; }
  .consent { align-items: flex-start; }
  .success-actions { display: grid; gap: 12px; }
  .success-actions .btn { width: 100%; }
  .map-frame iframe { width: 100% !important; min-height: 320px; }
}

@media (max-width: 380px) {
  .wrap { width: calc(100% - 22px); }
  .brand-copy strong { font-size: .78rem !important; }
  .brand-copy span { font-size: .56rem !important; }
  .hero-educal-copy h1 { font-size: clamp(2.35rem, 12.8vw, 3.1rem); }
  .hero-trust span { font-size: .5rem; }
  .category-card { grid-template-columns: 46px minmax(0,1fr) 18px; padding: 15px; }
  .category-icon { width: 46px; height: 46px; }
  .mobile-menu-actions { grid-template-columns: 1fr; }
  .mobile-menu-actions .primary { grid-column: auto; }
  .inner-hero h1 { font-size: clamp(2.35rem, 13vw, 3.25rem); }
}

@media (orientation: landscape) and (max-height: 540px) and (max-width: 960px) {
  .mobile-menu-inner { padding-top: 10px; }
  .mobile-menu nav a { padding: 9px 0; font-size: 1.35rem; }
  .mobile-menu-actions { margin-top: 10px; grid-template-columns: repeat(3,1fr); }
  .mobile-menu-actions .primary { grid-column: auto; }
}

@media (hover: none), (pointer: coarse) {
  [data-tilt], [data-card-tilt], [data-float-card] { transform: none !important; }
  .category-card:hover, .btn:hover { transform: none; }
}


/* === PRODUCTION POLISH v6 === */
:where(a, button, input, select, textarea) { -webkit-tap-highlight-color: rgba(43,78,255,.12); }
:where(a, button) { touch-action: manipulation; }
:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid rgba(43,78,255,.42);
  outline-offset: 3px;
}
.desktop-nav a[aria-current="page"] { color: var(--edu-navy); }
.mobile-menu nav a[aria-current="page"] { color: var(--edu-blue); }
.mobile-menu nav a[aria-current="page"]::after { content: "•"; margin-left: auto; font-family: Inter, sans-serif; font-size: .8rem; }
section[id], article[id] { scroll-margin-top: calc(var(--header-h) + 20px); }
h1, h2, .center-heading h2, .feature-copy h2, .footer-cta h2 { text-wrap: balance; }
p, li, .contact-detail a, .contact-detail strong, .footer-contact a, .footer-contact p { overflow-wrap: anywhere; }
.form-honeypot { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; }
.editorial-form button[aria-busy="true"] { cursor: wait; opacity: .78; }
.editorial-form input:invalid:not(:placeholder-shown), .editorial-form textarea:invalid:not(:placeholder-shown) { box-shadow: none; }
.error-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 20px; }
.error-actions-section { min-height: 260px; display: flex; align-items: center; }

@media (max-width: 640px) {
  .error-actions { display: grid; grid-template-columns: 1fr; align-items: stretch; }
  .error-actions .btn { width: 100%; }
  .error-actions .text-button { justify-self: start; }
}

@media (prefers-contrast: more) {
  .site-header, .category-card, .news-card, .admission-form-shell { border-color: currentColor; }
  :where(a, button, input, select, textarea):focus-visible { outline-width: 4px; }
}

@media print {
  .site-header, .mobile-actions, .page-progress, .footer-cta, .site-footer, .menu-toggle { display: none !important; }
  body { padding: 0 !important; color: #000; background: #fff; }
  main { display: block; }
  a { text-decoration: underline; }
}
