/* AIH component styles. Pairs with tokens.css + base.css. */

/* ============ Splash ============ */
.splash {
  min-height: 100svh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 90% at 80% 0%, rgb(248 200 204 / 0.35), transparent 60%),
    radial-gradient(120% 90% at 0% 100%, rgb(0 181 157 / 0.18), transparent 55%),
    var(--color-bg);
  text-align: center;
  padding: var(--space-8);
}
.splash__mark {
  font-size: clamp(3rem, 12vw, 6rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  background: var(--grad-dawn);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.splash__slogan { color: var(--color-text-muted); font-size: var(--text-lg); margin-top: var(--space-2); }
.splash__slogan--th { font-size: var(--text-base); }

/* ============ Announcement bar ============ */
.announce {
  background: var(--aih-navy);
  color: var(--aih-white);
  position: relative;
}
.announce::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--grad-dawn);
}
.announce__inner {
  display: flex; align-items: center; justify-content: center; gap: var(--space-2);
  padding-block: var(--space-2);
  font-size: var(--text-sm); font-weight: 500; text-align: center;
}
.announce__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--aih-pink);
  box-shadow: 0 0 0 0 rgb(248 200 204 / 0.7);
  animation: announce-pulse 2.4s ease-out infinite;
  flex-shrink: 0;
}
@keyframes announce-pulse {
  0% { box-shadow: 0 0 0 0 rgb(248 200 204 / 0.6); }
  70% { box-shadow: 0 0 0 7px rgb(248 200 204 / 0); }
  100% { box-shadow: 0 0 0 0 rgb(248 200 204 / 0); }
}

/* ============ Header ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Solid by default (when scrolled past the hero, and on inner pages). */
  background: var(--color-bg);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.3s ease, border-color 0.3s ease, background 0.3s ease, color 0.3s ease;
}
/* Over the full-screen hero (page at top): glassy + transparent, blends into the photo. */
.site-header--hero {
  background: color-mix(in srgb, var(--color-bg) 14%, transparent);
  backdrop-filter: blur(6px);
  border-bottom-color: transparent;
  box-shadow: none;
}
/* The hero scrim is dark, so force light header text/controls while transparent. */
.site-header--hero .site-nav__link,
.site-header--hero .lang-switch,
.site-header--hero .icon-btn { color: #fff; }
.site-header--hero .site-nav__link:hover { color: #fff; opacity: 0.82; }
.site-header--hero .site-nav__link[aria-current] { color: #fff; }
.site-header--hero .lang-switch { border-color: rgb(255 255 255 / 0.5); }
.site-header--hero .lang-switch:hover { border-color: #fff; color: #fff; }
.site-header--hero .icon-btn { border-color: rgb(255 255 255 / 0.4); }
.site-header--hero .icon-btn:hover { border-color: #fff; }
.site-header__bar {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  min-height: var(--header-h);
}
.site-header__logo { display: inline-flex; align-items: center; flex-shrink: 0; }
.site-header__logo img { height: 46px; width: auto; }
@media (max-width: 480px) { .site-header__logo img { height: 38px; } }

.site-nav { margin-inline-start: auto; }
.site-nav__list { display: flex; gap: var(--space-2); list-style: none; align-items: center; }
.site-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  text-decoration: none;
  border-radius: var(--radius-sm);
  position: relative;
}
.site-nav__link:hover { color: var(--color-link); }
.site-nav__link[aria-current] { color: var(--color-link); }
.site-nav__link[aria-current]::after {
  content: "";
  position: absolute;
  left: var(--space-3); right: var(--space-3); bottom: 6px;
  height: 2px; border-radius: 2px;
  background: var(--grad-dawn);
}

.site-header__actions { display: flex; align-items: center; gap: var(--space-2); }
.lang-switch {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0 var(--space-2);
  font-size: var(--text-sm); font-weight: 600; color: var(--color-text);
  text-decoration: none; border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
}
.lang-switch:hover { border-color: var(--color-primary); color: var(--color-link); }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0;
  background: transparent; border: 1px solid var(--color-border);
  border-radius: var(--radius-full); cursor: pointer; color: var(--color-text);
  font-size: 1.1rem; line-height: 1;
}
.icon-btn:hover { border-color: var(--color-primary); }
.site-header__burger { display: none; }

.mobile-nav { display: none; border-bottom: 1px solid var(--color-border); background: var(--color-surface); }
.mobile-nav--open { display: block; }
.mobile-nav__list { list-style: none; display: flex; flex-direction: column; padding-block: var(--space-3); }
.mobile-nav__link {
  display: block; padding: var(--space-3) var(--space-2);
  font-size: var(--text-base); font-weight: 500; color: var(--color-text); text-decoration: none;
  border-bottom: 1px solid var(--color-border);
}
.mobile-nav__link[aria-current] { color: var(--color-link); }
.mobile-nav__cta { margin-top: var(--space-4); width: 100%; }

@media (max-width: 920px) {
  .site-nav, .site-header__cta { display: none; }
  .site-header__burger { display: inline-flex; }
}

/* ============ Anchored sections (single-page nav) ============ */
.anchor { scroll-margin-top: calc(var(--header-h) + var(--space-4)); }

/* ============ Generic section bits ============ */
.eyebrow {
  display: inline-block;
  font-size: var(--text-sm); font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--color-link); margin-bottom: var(--space-3);
}
.section-head { max-width: 56ch; margin-bottom: var(--space-12); }
.section--tint { background: var(--color-surface-2); }
.section--surface { background: var(--color-surface); }
.lead { font-size: var(--text-lg); color: var(--color-text-muted); }

/* ============ Hero slideshow (full-screen) ============ */
.hero-show {
  position: relative;
  /* fill the viewport minus the announcement bar so the dots stay in view */
  min-height: calc(100svh - 2.75rem);
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  /* pull up under the sticky header so the photo fills the viewport */
  margin-top: calc(-1 * var(--header-h));
}
.hero-show__stage { position: absolute; inset: 0; z-index: -1; }
.hero-show__slide {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
  will-change: opacity;
}
.hero-show__slide.is-active { opacity: 1; }
.hero-show__img,
.hero-show__slide picture { display: block; width: 100%; height: 100%; }
.hero-show__img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero-show__scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgb(15 32 56 / 0.42) 0%, rgb(15 32 56 / 0) 16%),
    linear-gradient(105deg, rgb(15 32 56 / 0.78) 0%, rgb(15 32 56 / 0.45) 42%, rgb(15 32 56 / 0.12) 70%),
    linear-gradient(0deg, rgb(15 32 56 / 0.55) 0%, rgb(15 32 56 / 0) 38%);
}
.hero-show__overlay {
  position: relative;
  width: 100%;
  padding-block: calc(var(--header-h) + var(--space-6)) var(--space-16);
}
.hero-show__body { max-width: 30ch; color: #fff; }
.hero-show__eyebrow { color: #fff; opacity: 0.92; }
.hero-show__title {
  font-size: var(--text-3xl, var(--text-2xl));
  line-height: 1.05;
  margin-bottom: var(--space-6);
  color: #fff;
  text-wrap: balance;
}
.hero-show__title .text-gradient { display: inline; }
.hero-show__lead {
  font-size: var(--text-lg);
  color: rgb(255 255 255 / 0.92);
  max-width: 48ch;
  margin-bottom: var(--space-8);
  text-shadow: 0 1px 12px rgb(15 32 56 / 0.35);
}
.hero-show__actions { display: flex; flex-wrap: wrap; gap: var(--space-4); }

/* slide dots */
.hero-show__dots {
  position: absolute; z-index: 2;
  left: 50%; bottom: var(--space-6); transform: translateX(-50%);
  display: flex; gap: var(--space-3);
}
.hero-show__dot {
  width: 12px; height: 12px; border-radius: var(--radius-full);
  border: 1.5px solid rgb(255 255 255 / 0.85);
  background: transparent; cursor: pointer; padding: 0;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.hero-show__dot.is-active { background: #fff; transform: scale(1.15); }
.hero-show__dot:hover { background: rgb(255 255 255 / 0.6); }

/* scroll cue */
.hero-show__scroll {
  position: absolute; z-index: 2;
  right: var(--space-8); bottom: var(--space-6);
  display: inline-flex; align-items: center; gap: var(--space-2);
  color: #fff; opacity: 0.9; font-size: var(--text-sm); font-weight: 600;
  text-decoration: none;
}
.hero-show__scroll:hover { opacity: 1; text-decoration: none; }
.hero-show__scroll svg { animation: hero-bob 1.8s ease-in-out infinite; }
@keyframes hero-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

@media (max-width: 860px) {
  .hero-show__overlay { padding-block: calc(var(--header-h) + var(--space-8)) var(--space-16); }
  .hero-show__scroll { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-show__slide { transition: none; }
  .hero-show__scroll svg { animation: none; }
}

/* ============ Intro / statement ============ */
.statement { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(var(--space-6), 4vw, var(--space-16)); align-items: start; }
.statement__heading { font-size: var(--text-xl); }
.statement__body p + p { margin-top: var(--space-4); }
.statement__body { color: var(--color-text-muted); }
@media (max-width: 760px) { .statement { grid-template-columns: 1fr; gap: var(--space-6); } }

/* ============ A-I-H pillars (typographic, not icon-circles) ============ */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-8); }
.pillar { padding-top: var(--space-6); border-top: 2px solid var(--color-border); }
.pillar__letter {
  font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 700; line-height: 1;
  background: var(--grad-dawn); -webkit-background-clip: text; background-clip: text; color: transparent;
  display: block; margin-bottom: var(--space-4);
}
.pillar:nth-child(2) .pillar__letter { background: var(--grad-sky); -webkit-background-clip: text; background-clip: text; }
.pillar:nth-child(3) .pillar__letter { background: linear-gradient(90deg, var(--aih-blue), var(--aih-navy)); -webkit-background-clip: text; background-clip: text; }
.pillar__title { font-size: var(--text-lg); margin-bottom: var(--space-2); }
.pillar__body { color: var(--color-text-muted); font-size: var(--text-base); }
@media (max-width: 760px) { .pillars { grid-template-columns: 1fr; gap: var(--space-6); } }

/* ============ Feature split (image + text, alternating) ============ */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(var(--space-6), 4vw, var(--space-16));
  align-items: center; margin-block: var(--section-y);
}
.feature--flip .feature__media { order: 2; }
.feature__media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); aspect-ratio: 3 / 2; }
.feature__media img { width: 100%; height: 100%; object-fit: cover; }
.feature__body h2 { font-size: var(--text-xl); margin-bottom: var(--space-4); }
.feature__body p { color: var(--color-text-muted); }
@media (max-width: 760px) {
  .feature { grid-template-columns: 1fr; gap: var(--space-5); margin-block: var(--space-12); }
  .feature--flip .feature__media { order: 0; }
}

/* ============ Facilities gallery ============ */
.fac-group { margin-block: clamp(var(--space-12), 7vw, var(--space-24)); }
.fac-group__head { max-width: 60ch; margin-bottom: var(--space-8); }
.fac-group__head h2 { font-size: var(--text-xl); margin-bottom: var(--space-3); }
.fac-group__head p { color: var(--color-text-muted); }
.fac-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.fac-grid__item { border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); background: var(--color-surface-2); }
.fac-grid__item--wide { grid-column: span 2; }
.fac-grid img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; }
.fac-grid--single { grid-template-columns: 1fr; }
.fac-grid--single .fac-grid__item { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.fac-grid--single img { aspect-ratio: 16 / 9; }
@media (max-width: 760px) {
  .fac-grid__item--wide { grid-column: span 1; }
  .fac-grid--single img { aspect-ratio: 4 / 3; }
}

/* ============ CTA band ============ */
.cta-band {
  border-radius: var(--radius-lg);
  padding: clamp(var(--space-8), 5vw, var(--space-16));
  background:
    radial-gradient(120% 140% at 100% 0%, rgb(248 200 204 / 0.5), transparent 55%),
    var(--color-surface);
  border: 1px solid var(--color-border);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: var(--space-6);
}
.cta-band__text { max-width: 48ch; }
.cta-band__text h2 { font-size: var(--text-xl); margin-bottom: var(--space-2); }
.cta-band__text p { color: var(--color-text-muted); }

/* ============ Video ============ */
.video-embed { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.video-embed__frame { width: 100%; height: 100%; border: 0; }
.video-embed__facade {
  border: 0; cursor: pointer; padding: 0;
  background-size: cover; background-position: center;
  display: grid; place-items: center;
}
.video-embed__facade::before { content: ""; position: absolute; inset: 0; background: rgb(0 37 69 / 0.28); transition: background 0.2s ease; }
.video-embed__facade:hover::before { background: rgb(0 37 69 / 0.18); }
.video-embed__play {
  position: relative; width: 76px; height: 76px; border-radius: var(--radius-full);
  background: var(--color-surface); color: var(--color-link);
  display: grid; place-items: center; font-size: 1.6rem; padding-left: 4px;
  box-shadow: var(--shadow-lg);
}

/* ============ Page intro / hero (interior) ============ */
.page-hero { padding-block: clamp(var(--space-12), 6vw, var(--space-16)); border-bottom: 1px solid var(--color-border); }
.page-hero h1 { font-size: var(--text-xl); max-width: 18ch; margin-bottom: var(--space-4); }
.page-hero .lead { max-width: 60ch; }

/* ============ Prose blocks (about) ============ */
.split-pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(var(--space-6), 4vw, var(--space-12)); }
@media (max-width: 760px) { .split-pair { grid-template-columns: 1fr; gap: var(--space-6); } }
.block h2 { font-size: var(--text-lg); margin-bottom: var(--space-3); }
.block p { color: var(--color-text-muted); }

/* ============ Contact ============ */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(var(--space-8), 5vw, var(--space-16)); align-items: start; }
@media (max-width: 860px) { .contact-layout { grid-template-columns: 1fr; gap: var(--space-8); } }
.contact-info dl { display: grid; gap: var(--space-5); margin-top: var(--space-6); }
.contact-info dt { font-size: var(--text-sm); font-weight: 600; color: var(--color-text); text-transform: uppercase; letter-spacing: 0.04em; }
.contact-info dd { color: var(--color-text-muted); margin-top: var(--space-1); }
.contact-info a { color: var(--color-link); }

/* ============ Forms ============ */
.contact-form { display: flex; flex-direction: column; gap: var(--space-5); }
.contact-form__heading { font-size: var(--text-lg); }
.field { display: flex; flex-direction: column; gap: var(--space-2); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
@media (max-width: 540px) { .field-row { grid-template-columns: 1fr; } }
.field label { font-size: var(--text-sm); font-weight: 600; }
.field input, .field textarea {
  width: 100%; padding: 0.7rem 0.9rem; min-height: 44px;
  background: var(--color-bg); color: var(--color-text);
  border: 1px solid var(--color-border); border-radius: var(--radius-md);
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { border-color: var(--color-primary); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--color-error); }
.field__error { color: var(--color-error); font-size: var(--text-sm); }
.field--consent .consent { display: grid; grid-template-columns: auto 1fr; gap: var(--space-3); align-items: start; font-size: var(--text-sm); color: var(--color-text-muted); font-weight: 400; }
.consent input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--color-primary); }
.consent a { color: var(--color-link); }
.contact-form__submit { align-self: flex-start; }
.contact-form--success { gap: var(--space-3); }
.contact-form--success h3 { color: var(--color-success); }

/* ============ Placeholder ============ */
.placeholder-note h2 { font-size: var(--text-lg); margin-bottom: var(--space-2); color: var(--color-text); }

/* ============ 404 / lp ============ */
.centered-state { min-height: 60vh; display: grid; place-items: center; text-align: center; padding-block: var(--section-y); }
.centered-state__inner { max-width: 48ch; }
.centered-state h1 { font-size: var(--text-xl); margin-bottom: var(--space-4); }
.centered-state p { color: var(--color-text-muted); margin-bottom: var(--space-8); }

/* ============ Footer ============ */
.site-footer { background: var(--color-surface); border-top: 1px solid var(--color-border); margin-top: var(--section-y); padding-block: var(--space-16) var(--space-8); }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1.4fr 1fr; gap: var(--space-8); }
.site-footer__emblem { height: 48px; width: auto; }
.site-footer__tagline { margin-top: var(--space-4); color: var(--color-text-muted); max-width: 36ch; }
.site-footer__rsu { margin-top: var(--space-3); font-weight: 600; color: var(--color-text); font-size: var(--text-sm); }
.site-footer__opening { color: var(--color-text-muted); font-size: var(--text-sm); }
.site-footer__heading { font-size: var(--text-sm); text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text); margin-bottom: var(--space-4); }
.site-footer__col ul { list-style: none; display: grid; gap: var(--space-2); }
.site-footer__col a { color: var(--color-text-muted); text-decoration: none; font-size: var(--text-sm); }
.site-footer__col a:hover { color: var(--color-link); }
.site-footer__address { font-style: normal; color: var(--color-text-muted); font-size: var(--text-sm); line-height: 1.7; }
.site-footer__address a { color: var(--color-link); }
.site-footer__base { margin-top: var(--space-12); color: var(--color-text-muted); font-size: var(--text-sm); }
.site-footer__rule { margin-bottom: var(--space-6); opacity: 0.7; }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .site-footer__grid { grid-template-columns: 1fr; gap: var(--space-8); } }

/* ============ Utility ============ */
.img-fallback { aspect-ratio: 3 / 2; background: var(--color-surface-2); border-radius: var(--radius-md); }
.stack-gap > * + * { margin-top: var(--space-6); }
