/* Home page: hero (full-bleed photo + 2×2 cards), highlights band, majors, admission, partners, contact. */

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; isolation: isolate; overflow: hidden; color: var(--paper); background: var(--maroon-dk); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  /* Unsplash photo-1496247749665-49cf5b1022e9 ("interior of large industrial factory"), free Unsplash License. */
  background: url("../assets/photos/hero-steel.jpg") center 50% / cover no-repeat; filter: brightness(42%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  /* Readability scrim: solid behind the text column, fading out before the photo cards. */
  background: linear-gradient(90deg, rgba(42, 8, 12, .92) 0%, rgba(42, 8, 12, .8) 38%, rgba(42, 8, 12, .3) 62%, rgba(42, 8, 12, 0) 100%);
}
.hero-inner {
  min-height: 100vh; padding: calc(var(--header-h) + 4vh) 0 var(--space-16);
  display: grid; grid-template-columns: 1.05fr 1fr; gap: var(--space-12); align-items: center;
}
.hero-copy { text-shadow: 0 1px 3px rgba(0, 0, 0, .55); }
.kicker { font-family: var(--font-display); font-weight: 600; font-size: clamp(18px, 2vw, 24px); }
.kicker i { color: var(--gold); margin-right: 6px; }
.hero-title { font-weight: 800; line-height: 1.1; margin: 14px 0 18px; font-size: clamp(34px, 5.6vw, 104px); text-shadow: 0 4px 24px rgba(0, 0, 0, .45); }
.hero-title span { display: block; white-space: nowrap; }
.hero-title span:last-child { color: var(--gold); margin-top: .08em; } /* room for Thai upper vowels/tone marks */
.hero-lead { max-width: 34em; font-size: clamp(18px, 1.5vw, 20px); font-weight: 500; line-height: 1.7; color: var(--paper); }
.facts { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 10px; margin: 26px 0 0; padding: 0; list-style: none; }
.facts li {
  display: flex; align-items: center; gap: var(--space-2); padding: var(--space-2) 14px; border-radius: var(--radius-full);
  background: rgba(20, 4, 6, .55); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(4px);
  font-family: var(--font-display); font-weight: 500; font-size: 16px; text-shadow: none;
}
.facts i { color: var(--gold); }
.badge {
  display: inline-block; margin-top: 22px; background: var(--maroon); color: var(--gold-lt);
  font-family: var(--font-display); font-weight: 600; padding: 6px 14px; border-radius: var(--radius-sm);
}
.badge { text-shadow: none; }
.badge small { font-weight: 500; color: rgba(255, 255, 255, .92); }
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); text-shadow: none; }
.hero-actions .btn-ghost { color: var(--paper); }
.hero-actions .btn-ghost:hover { background: var(--paper); border-color: var(--paper); color: var(--maroon-dk); }

.hero-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.photo-card {
  position: relative; height: clamp(230px, 15.5vw, 300px); border-radius: var(--radius-card); overflow: hidden; display: block;
  color: var(--paper); text-decoration: none; background: var(--maroon) center / cover no-repeat;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.photo-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(42, 26, 28, 0) 35%, rgba(42, 26, 28, .88) 100%); }
.photo-card .label { position: absolute; left: 20px; right: 20px; bottom: 16px; z-index: 1; }
.photo-card h2 { font-size: 24px; }
.photo-card p { font-size: 15px; color: rgba(255, 255, 255, .88); margin-top: 2px; }
.photo-card .go {
  position: absolute; top: 16px; right: 16px; z-index: 1; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--gold); color: var(--maroon-dk);
  transform: scale(.85); opacity: 0; transition: .3s var(--ease);
}
.photo-card:hover, .photo-card:focus-visible { transform: translateY(-10px); box-shadow: var(--shadow-lift); color: var(--paper); }
.photo-card:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--gold), var(--shadow-lift); }
.photo-card:hover .go, .photo-card:focus-visible .go { transform: scale(1); opacity: 1; }
.hero-cards .photo-card:nth-child(even) { margin-top: 40px; }

@media (max-width: 960px) {
  /* Single column: text spans the full width, so darken evenly instead of left-to-right. */
  .hero::after { background: rgba(42, 8, 12, .6); }
  .hero-inner { grid-template-columns: 1fr; gap: var(--space-8); min-height: 0; }
  /* One column: size the unbroken title to the viewport (it is ~7.2em wide in Prompt 800). */
  .hero-title { font-size: min(calc((100vw - 48px) / 7.6), 72px); }
  .hero, .hero-inner { min-height: 0; }
  .hero-cards .photo-card:nth-child(even) { margin-top: 0; }
}
@media (max-width: 520px) {
  .hero-cards { grid-template-columns: 1fr; }
  .photo-card { height: 180px; }
}

/* ---------- highlights band (SectionBand) ---------- */
.why { position: relative; background: var(--cream); padding-block: var(--space-16); overflow: hidden; }
.why-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: var(--space-8); align-items: center; }
.why-band { position: relative; padding: var(--space-8) var(--space-12) var(--space-8) 0; color: #f6eced; }
.why-band::before {
  content: ""; position: absolute; inset: 0 0 0 -100vw; background: var(--maroon-dk);
  clip-path: polygon(0 0, 100% 0, calc(100% - 64px) 100%, 0 100%);
}
.why-band > * { position: relative; }
.why-band ol { list-style: none; margin: var(--space-6) 0 0; padding: 0; display: grid; gap: var(--space-4); }
.why-band li { display: flex; gap: var(--space-3); align-items: baseline; font-size: 18px; }
.why-band b { color: var(--paper); }
.why-band .num {
  flex: none; width: 30px; height: 30px; border-radius: var(--radius-full); background: var(--gold); color: var(--maroon-dk);
  font-family: var(--font-display); font-weight: 700; font-size: 16px; line-height: 30px; text-align: center;
}
.why-photo { border-radius: var(--radius-card); overflow: hidden; aspect-ratio: 4 / 3; box-shadow: var(--shadow-lift); }
.why-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 35%; }
@media (max-width: 960px) {
  .why-grid { grid-template-columns: 1fr; }
  .why-band { padding-right: var(--space-8); }
}

/* ---------- majors (MajorTile) ---------- */
.majors-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: var(--space-3); }
.major-tile {
  display: flex; align-items: center; gap: var(--space-3); min-height: 76px; padding: var(--space-3) var(--space-4);
  background: var(--paper); border: 1px solid var(--rule-soft); border-left: var(--stroke-chip) solid var(--gold);
  border-radius: var(--radius-xs); color: var(--ink); text-decoration: none;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.major-tile:hover { border-color: var(--maroon); border-left-color: var(--maroon); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(74, 15, 21, .12); color: var(--ink); }
.major-tile .ic {
  flex: none; width: 44px; height: 44px; border-radius: var(--radius-full); background: var(--maroon); color: var(--paper);
  display: grid; place-items: center; font-size: 18px;
}
.major-tile b { display: block; font-family: var(--font-display); font-weight: 600; font-size: 16px; line-height: 1.35; }
.major-tile small { color: var(--muted); font-size: 14px; }

/* ---------- admission summary ---------- */
.admission { background: var(--paper); }
.admission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-12); align-items: start; }
.qual-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-4); counter-reset: q; }
.qual-list li { position: relative; padding-left: 52px; }
.qual-list li::before {
  counter-increment: q; content: counter(q); position: absolute; left: 0; top: 0;
  width: 36px; height: 36px; border-radius: var(--radius-full); background: var(--maroon); color: var(--paper);
  font-family: var(--font-display); font-weight: 700; display: grid; place-items: center;
}
.qual-rule { margin-top: var(--space-4); color: var(--muted); font-size: 15px; }
.note-chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); padding: 0; list-style: none; }
.note-chips li { background: var(--highlight); color: var(--maroon-dk); padding: 6px 14px; border-radius: var(--radius-full); font-size: 15px; font-weight: 500; }
.note-chips i { color: var(--maroon); margin-right: 6px; }
.terms { list-style: none; margin: var(--space-6) 0 0; padding: 0; display: grid; gap: var(--space-2); }
.terms li { display: flex; justify-content: space-between; gap: var(--space-4); padding: var(--space-2) 0; border-bottom: 1px solid var(--rule-soft); }
.terms b { font-family: var(--font-display); font-weight: 600; color: var(--maroon); }
.terms small { color: var(--muted); }
.admission .btn { margin-top: var(--space-6); }
@media (max-width: 860px) { .admission-grid { grid-template-columns: 1fr; gap: var(--space-8); } }

/* ---------- partners ---------- */
.partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-4); }
.partner-grid figure {
  margin: 0; background: var(--paper); border-radius: 16px; padding: var(--space-4); height: 110px;
  display: grid; place-items: center; border: 1px solid var(--rule-soft);
}
.partner-grid img { max-height: 64px; width: auto; object-fit: contain; }

/* ---------- contact band ---------- */
.contact-band { background: var(--maroon); color: var(--paper); position: relative; overflow: hidden; }
.contact-band::before {
  content: ""; position: absolute; inset: 0 0 0 auto; width: 38%; background: var(--maroon-dk);
  clip-path: polygon(var(--slant-panel) 0, 100% 0, 100% 100%, 0 100%);
}
.contact-grid { position: relative; display: grid; grid-template-columns: 1.2fr 1fr; gap: var(--space-8); align-items: center; }
.contact-band h2 { font-size: clamp(26px, 3.4vw, 40px); }
.contact-band h2 span { color: var(--gold); }
.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); font-size: 18px; }
.contact-list a { color: var(--paper); text-decoration: none; }
.contact-list a:hover { color: var(--gold-lt); text-decoration: underline; }
.contact-list i {
  width: 40px; height: 40px; border-radius: var(--radius-full); background: rgba(255, 255, 255, .12);
  display: inline-grid; place-items: center; color: var(--gold); margin-right: var(--space-3);
}
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
  .contact-band::before { display: none; }
}

/* ---------- open recruitment round ---------- */
.dot { width: 10px; height: 10px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 rgba(61, 220, 132, .7); animation: pulse 2s infinite; flex: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(61, 220, 132, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 132, 0); } }

.open-pill { text-shadow: none;
  display: inline-flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-4);
  padding: 6px 16px; border-radius: var(--radius-full); background: rgba(255, 255, 255, .14); backdrop-filter: blur(4px);
  color: var(--paper); text-decoration: none; font-family: var(--font-display); font-weight: 600; font-size: 15px;
  border: 1px solid rgba(246, 215, 122, .5);
}
.open-pill:hover { background: var(--gold); color: var(--maroon-dk); }
.open-pill i { font-size: 12px; }

.recruit {
  scroll-margin-top: var(--space-4); padding-block: var(--space-16); color: var(--paper);
  background: radial-gradient(120% 80% at 100% 0%, var(--maroon) 0%, var(--maroon-dk) 60%);
}
.recruit-grid { display: grid; grid-template-columns: minmax(260px, 0.8fr) 1.2fr; gap: var(--space-12); align-items: start; }
.recruit-poster { margin: 0; position: sticky; top: var(--space-6); border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-lift); }
.recruit-poster img { width: 100%; height: auto; }

.open-flag { display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-display); font-weight: 600; color: var(--gold-lt); }
.recruit-kicker { margin-top: var(--space-3); color: rgba(255, 255, 255, .8); font-size: 15px; }
.recruit-body h2 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; line-height: 1.15; margin-top: var(--space-2); }
.recruit-body h2 span { color: var(--gold); }
.recruit-sub { margin-top: var(--space-2); color: rgba(255, 255, 255, .85); }

.benefits { list-style: none; margin: var(--space-8) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--space-3); }
.benefits li {
  display: flex; gap: var(--space-3); align-items: center; padding: var(--space-3) var(--space-4);
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(246, 215, 122, .25); border-radius: 16px;
}
.benefits .ic {
  flex: none; width: 46px; height: 46px; border-radius: var(--radius-full); border: 2px solid var(--gold);
  color: var(--gold); display: grid; place-items: center; font-size: 18px;
}
.benefits b { display: block; font-family: var(--font-display); font-weight: 600; line-height: 1.35; }
.benefits small { color: rgba(255, 255, 255, .75); font-size: 14px; }

.recruit-qual { margin-top: var(--space-8); background: var(--cream); color: var(--ink); border-radius: var(--radius-card); padding: var(--space-6); }
.recruit-qual h3 { font-size: 22px; color: var(--maroon); }
.recruit-qual .qual-note { color: var(--muted); font-size: 15px; margin-top: var(--space-1); }
.recruit-qual ul { margin: var(--space-3) 0 0; padding-left: 1.2em; display: grid; gap: var(--space-1); }
.recruit-qual li::marker { color: var(--maroon); }
.recruit-qual .special {
  margin-top: var(--space-4); padding: var(--space-3) var(--space-4); border-radius: 12px;
  background: linear-gradient(90deg, var(--gold), var(--gold-lt)); color: var(--maroon-dk);
}
.recruit-qual .special i { color: var(--maroon); }

.recruit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-6); margin-top: var(--space-8); }
.recruit-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3); }
.recruit-buttons .btn-ghost { color: var(--paper); }
.recruit-buttons .btn-ghost:hover { background: var(--paper); border-color: var(--paper); color: var(--maroon-dk); }
.recruit .btn-gold { font-size: 18px; padding: 12px 24px; }
.fb-name { color: rgba(255, 255, 255, .85); }
.fb-name i { color: var(--gold); }
.recruit-qr { margin: 0; text-align: center; background: var(--paper); color: var(--maroon); padding: var(--space-2); border-radius: 12px; font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.recruit-notes { margin-top: var(--space-4); font-size: 14px; color: rgba(255, 255, 255, .7); }

.admission-open {
  margin-top: var(--space-6); padding: var(--space-3) var(--space-4); border-radius: 12px;
  background: var(--maroon); color: var(--paper);
}
.admission-open i { color: var(--gold); }
.admission-open a { color: var(--gold-lt); font-weight: 600; }

@media (max-width: 860px) {
  .recruit-grid { grid-template-columns: 1fr; }
  .recruit-poster { position: static; max-width: 420px; }
}

/* CLS: reserve room for the fact pills home.js fills in (44px pills; measured: 1 row ≥1760px, 2 rows desktop, 4 rows on phones) */
#hero-facts { min-height: 98px; }
@media (max-width: 520px) { #hero-facts { min-height: 206px; } }
@media (min-width: 1760px) { #hero-facts { min-height: 44px; } }
