/* CCH Trades Education - homepage and gallery styles */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --accent: #2f66d0;
  --accent-light: #8db0f5;
  --accent-dark: #1f4fa8;
  --accent-tint: #eaf1fd;
  --ink: #12203a;
  --ink-soft: #4f6079;
  --paper: #ffffff;
  --paper-soft: #f3f7fc;
  --border: #dbe4f1;
  --shadow-sm: 0 2px 10px rgba(47, 102, 208, 0.08);
  --shadow-md: 0 16px 40px rgba(47, 102, 208, 0.14);
  --radius-card: 16px;
  --radius-pill: 999px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --max-w: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Manrope', ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 15px; letter-spacing: -0.01em;
  text-decoration: none; color: var(--ink); white-space: nowrap;
}
.nav-logo img { height: 34px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; font-size: 14px; font-weight: 600; color: var(--ink-soft); transition: color 0.2s var(--ease); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--accent); }
@media (max-width: 760px) { .nav-links { display: none; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  white-space: nowrap; padding: 12px 24px; border-radius: var(--radius-pill);
  font-weight: 600; font-size: 14px; letter-spacing: 0.01em; text-decoration: none;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--ink); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-on-photo { background: #fff; color: var(--accent-dark); }
.btn-on-photo:hover { background: var(--accent-tint); }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,0.55); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,0.12); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 92vh; min-height: 92dvh;
  display: flex; align-items: center; overflow: hidden; background: #091428;
}
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center right; }
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(8,20,44,0.92) 0%, rgba(8,20,44,0.78) 32%, rgba(8,20,44,0.35) 58%, rgba(8,20,44,0.08) 78%);
}
.hero-content { position: relative; z-index: 2; max-width: 1200px; padding: 0 24px; margin: 0 auto; width: 100%; }
.hero-inner { max-width: 560px; }
.hero h1 {
  font-size: clamp(2.6rem, 5.4vw, 4rem);
  line-height: 1.05; letter-spacing: -0.025em; font-weight: 800; color: #fff; margin: 0 0 18px;
}
.hero h1 .word { display: inline-block; opacity: 0; transform: translateY(18px); animation: word-in 0.7s var(--ease) forwards; }
.hero h1 .accent-word { color: var(--accent-light); }
@keyframes word-in { to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .hero h1 .word { opacity: 1; transform: none; animation: none; } }
.hero p { color: rgba(255,255,255,0.88); font-size: 1.15rem; max-width: 34ch; margin: 0 0 30px; }
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Section basics ---------- */
section { padding: 88px 0; }
.section-soft { background: var(--paper-soft); }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.7rem); letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 14px; font-weight: 800; }
.lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 52ch; margin: 0 0 8px; }

/* ---------- Framed extra text (details) ---------- */
.frame {
  margin-top: 28px; max-width: 820px;
  border: 1px solid var(--border); border-radius: var(--radius-card);
  background: var(--paper); box-shadow: var(--shadow-sm);
}
.frame summary {
  list-style: none; cursor: pointer; padding: 18px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-weight: 700; color: var(--accent-dark);
}
.frame summary::-webkit-details-marker { display: none; }
.frame summary::after {
  content: "+"; flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent-tint); color: var(--accent);
  font-size: 20px; line-height: 1; transition: transform 0.25s var(--ease);
}
.frame[open] summary::after { content: "\2212"; }
.frame summary:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 2px; border-radius: var(--radius-card); }
.frame-body { padding: 0 24px 24px; }
.frame-body p { color: var(--ink-soft); margin: 0 0 14px; max-width: 64ch; }
.frame-body p:last-child { margin-bottom: 0; }

/* ---------- Intro ---------- */
.intro .wrap { max-width: 900px; }
.intro h2 { font-size: clamp(2.1rem, 4.2vw, 3.2rem); max-width: 18ch; }

/* ---------- Stats band ---------- */
.stats-band { background: var(--accent); color: #fff; padding: 72px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat-card { border: 1px solid rgba(255,255,255,0.22); border-radius: var(--radius-card); padding: 28px 22px; background: rgba(255,255,255,0.06); }
.stat-number { font-size: clamp(2.4rem, 4vw, 3.2rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin-bottom: 10px; }
.stat-label { font-size: 0.95rem; color: rgba(255,255,255,0.82); font-weight: 600; }
@media (max-width: 860px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .stats-grid { grid-template-columns: 1fr; } }

/* ---------- Trades ---------- */
.trades-header { margin-bottom: 44px; }
.trade-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-bottom: 28px; }
.trade-card {
  position: relative; display: block; color: inherit; text-decoration: none;
  border-radius: var(--radius-card); overflow: hidden; aspect-ratio: 3 / 4;
  box-shadow: var(--shadow-md); background: var(--paper-soft);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.trade-card:nth-child(1) { --tilt: -2deg; }
.trade-card:nth-child(2) { --tilt: 1.5deg; }
.trade-card:nth-child(3) { --tilt: -1deg; }
.trade-card:nth-child(4) { --tilt: 2deg; }
.trade-card:nth-child(5) { --tilt: -1.5deg; }
.trade-card:hover, .trade-card:focus-visible { transform: rotate(0deg) translateY(-8px) scale(1.07); box-shadow: 0 28px 56px rgba(47,102,208,0.28); z-index: 3; }
.trade-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.trade-card:hover img { transform: scale(1.05); }
.trade-card-label {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 16px;
  background: linear-gradient(0deg, rgba(8,20,44,0.85), rgba(8,20,44,0));
  color: #fff; font-weight: 800; font-size: 1.05rem; letter-spacing: -0.01em;
}
@media (max-width: 980px) { .trade-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .trade-cards { grid-template-columns: repeat(2, 1fr); } .trade-card { transform: none !important; } }
.chip-list { list-style: none; margin: 0 0 28px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chip-list li, .chip {
  padding: 9px 18px; border: 1px solid var(--border); border-radius: var(--radius-pill);
  background: var(--paper); font-size: 14px; font-weight: 600; color: var(--ink);
}

/* ---------- Internship ---------- */
.pilot-badge {
  display: inline-block; padding: 6px 14px; border-radius: var(--radius-pill);
  background: var(--accent-tint); color: var(--accent); font-size: 13px; font-weight: 700; margin-bottom: 16px;
}
.tagline { margin: 28px 0 0; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.01em; color: var(--accent-dark); }

/* ---------- Sponsors ---------- */
.sponsors-header { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.sponsors-header .lede { margin-left: auto; margin-right: auto; }
.sponsor-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; align-items: center; }
.sponsor-tile {
  border: 1px solid var(--border); border-radius: 12px; padding: 24px; height: 100px;
  display: flex; align-items: center; justify-content: center; background: var(--paper);
  filter: grayscale(1); opacity: 0.75; transition: filter 0.25s var(--ease), opacity 0.25s var(--ease);
}
.sponsor-tile:hover { filter: grayscale(0); opacity: 1; }
.sponsor-tile img { max-height: 64px; max-width: 100%; width: auto; }
@media (max-width: 700px) { .sponsor-grid { grid-template-columns: repeat(2, 1fr); } }
.partner-names { max-width: 900px; margin: 40px auto 0; text-align: center; }
.partner-names h3 { font-size: 1rem; font-weight: 700; color: var(--ink-soft); margin: 0 0 18px; }
.partner-names ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.partner-names li { padding: 8px 16px; border: 1px solid var(--border); border-radius: var(--radius-pill); font-size: 0.92rem; font-weight: 600; background: var(--paper); }

/* ---------- Apply / employers ---------- */
.apply-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.apply-card { border: 1px solid var(--border); border-radius: var(--radius-card); padding: 40px; background: var(--paper); }
.apply-card.is-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.apply-card h3 { font-size: 1.5rem; margin: 0 0 12px; font-weight: 800; letter-spacing: -0.01em; }
.apply-card p { color: var(--ink-soft); margin: 0 0 24px; max-width: 46ch; }
.apply-card.is-primary p { color: rgba(255,255,255,0.88); }
.apply-card.is-primary .btn-primary { background: #fff; color: var(--accent-dark); }
.apply-card.is-primary .btn-primary:hover { background: var(--accent-tint); }
@media (max-width: 780px) { .apply-grid { grid-template-columns: 1fr; } .apply-card { padding: 28px; } }

/* ---------- Footer ---------- */
footer { border-top: 1px solid var(--border); padding: 56px 0 40px; background: var(--paper-soft); }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.2fr; gap: 40px; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; margin-bottom: 12px; }
.footer-brand img { height: 32px; }
.footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); margin: 0 0 14px; font-weight: 700; }
.footer-col p, .footer-col a { color: var(--ink-soft); font-size: 0.95rem; text-decoration: none; margin: 0 0 8px; display: block; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); font-size: 0.85rem; color: var(--ink-soft); }
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center;
  background: rgba(8,20,44,0.92); padding: 24px;
}
.lightbox[hidden] { display: none; }
.lb-img { max-width: min(92vw, 1100px); max-height: 88vh; object-fit: contain; border-radius: 8px; }
.lb-btn {
  position: absolute; width: 48px; height: 48px; border: 0; border-radius: 50%;
  background: rgba(255,255,255,0.14); color: #fff; font-size: 28px; line-height: 1; cursor: pointer;
  transition: background 0.2s var(--ease);
}
.lb-btn:hover { background: rgba(255,255,255,0.28); }
.lb-btn[hidden] { display: none; }
.lb-close { top: 20px; right: 20px; }
.lb-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ---------- Split layout: main point left, colored bullet card right ---------- */
.split { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: center; }
.split-main h2 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); line-height: 1.28; margin-bottom: 18px; }
.hl {
  background: var(--accent); color: #fff; padding: 0 0.2em; border-radius: 10px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.points-card { border-radius: 24px; padding: 40px; }
.points-card.is-tint { background: var(--accent-tint); border: 1px solid #cfe0fa; }
.points-card.is-navy { background: #15325f; color: #fff; }
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.points li { position: relative; padding-left: 30px; font-size: 1.12rem; line-height: 1.45; color: var(--ink); }
.points li::before {
  content: ""; position: absolute; left: 0; top: 0.5em; width: 12px; height: 12px;
  border-radius: 50%; background: var(--accent);
}
.points li strong { font-weight: 800; }
.is-navy .points li { color: rgba(255,255,255,0.92); }
.is-navy .points li::before { background: var(--accent-light); }
.points-card .btn { margin-top: 28px; }
.intro .wrap { max-width: var(--max-w); }
.intro .frame { max-width: none; margin-top: 36px; }
.employer-strip {
  margin-top: 32px; padding: 28px 32px; border: 1px solid var(--border); border-radius: 20px; background: var(--paper);
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.employer-strip h3 { margin: 0 0 4px; font-size: 1.25rem; font-weight: 800; letter-spacing: -0.01em; }
.employer-strip p { margin: 0; color: var(--ink-soft); }
.employer-strip .teacher-list { flex-direction: row; flex-wrap: wrap; gap: 24px; margin-top: 0; }

.teacher-list { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 24px; }
.teacher { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.teacher-name { margin: 0; font-weight: 800; font-size: 1rem; }
.teacher-role { margin: 0 0 4px; color: var(--ink-soft); font-size: 0.9rem; }
.is-navy .teacher-role { color: rgba(255,255,255,0.72); }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 28px; }
  .points-card { padding: 28px; }
}

/* ---------- Trade card hover video (forward + reversed clip) ---------- */
.trade-vids { position: absolute; inset: 0; opacity: 0; transition: opacity 0.25s var(--ease); pointer-events: none; }
.trade-card.has-video .trade-vids { opacity: 1; }
.trade-vids video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; visibility: hidden; }
.trade-vids video.is-on { visibility: visible; }
.trade-card-label { z-index: 2; }

/* ---------- Trade cards are buttons that open a detail panel ---------- */
button.trade-card { width: 100%; padding: 0; border: 0; font: inherit; text-align: left; cursor: pointer; }
.trade-card-label { display: block; }
.trade-card-label::after { content: "+"; float: right; font-weight: 600; opacity: 0.85; }
.trade-card[aria-expanded="true"] { outline: 4px solid var(--accent); outline-offset: 3px; }
.trade-card[aria-expanded="true"] .trade-card-label::after { content: "\2212"; }
.trade-card:focus-visible { outline: 4px solid var(--accent-light); outline-offset: 3px; }

.trade-panels { margin-bottom: 36px; }
.trade-panel {
  position: relative; background: var(--paper); border: 1px solid var(--border); border-radius: 24px;
  padding: 36px; box-shadow: var(--shadow-md); animation: panel-in 0.45s var(--ease);
}
.trade-panel[hidden] { display: none; }
@keyframes panel-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .trade-panel { animation: none; } }
.panel-close {
  position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--paper); font-size: 24px; line-height: 1; cursor: pointer; color: var(--ink);
}
.panel-close:hover { border-color: var(--accent); color: var(--accent); }
.panel-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 36px; align-items: start; }
.panel-text h3 { font-size: clamp(1.8rem, 3vw, 2.4rem); letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 6px; font-weight: 800; }
.panel-sub { margin: 0 0 18px; color: var(--ink-soft); font-weight: 600; }
.panel-text .points-card { padding: 28px; border-radius: 20px; }
.panel-text .points li { font-size: 1.05rem; }
.panel-photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pp { position: relative; display: block; aspect-ratio: 1 / 1; border-radius: 16px; overflow: hidden; background: var(--paper-soft); }
.pp[hidden] { display: none; }
.pp img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease); }
.pp:hover img { transform: scale(1.06); }
.pp:focus-visible { outline: 3px solid var(--accent-light); outline-offset: 3px; }
.pp .more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(8,20,44,0.55); color: #fff; font-size: 1.8rem; font-weight: 800; }
.panel-photos.is-3 .pp:first-child { grid-column: span 2; aspect-ratio: 2 / 1; }
.chip-note { margin: -12px 0 0; color: var(--ink-soft); font-size: 0.95rem; }
@media (max-width: 860px) { .panel-grid { grid-template-columns: 1fr; gap: 24px; } .trade-panel { padding: 24px; } .panel-close { top: 10px; right: 10px; } }

/* ---------- Stats tags ---------- */
.band-title { color: #fff; margin: 0 0 32px; }
.stat-tag { display: inline-block; margin-bottom: 14px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.72); }

/* ---------- Email reveal ---------- */
.email-cta { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.email-reveal { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 10px 10px 18px; border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--paper); animation: panel-in 0.3s var(--ease); }
.email-reveal[hidden] { display: none; }
.email-address { font-weight: 700; color: var(--accent-dark); text-decoration: none; }
.email-address:hover { text-decoration: underline; }
.copy-btn { font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 8px 16px; border-radius: var(--radius-pill); border: 0; background: var(--accent-tint); color: var(--accent-dark); }
.copy-btn:hover { background: #d9e6fc; }
