/* ============================================================
   HP AI Foundry — landing page styles
   Branding mirrors HP Gaming Garage:
   - Palette: black / white, with HP blue accents
   - Type:    HP Forma DJR Office (self-hosted, assets/ttf/)
   - Buttons: solid black, square corners (0 radius)
   - Layout:  high-contrast, generous whitespace, square cards,
              alternating light/dark feature sections
   ============================================================ */

/* ---------- Brand font: HP Forma DJR Office (self-hosted) ---------- */
@font-face {
  font-family: "HP Forma DJR";
  src: url("../assets/ttf/HPFormaDJROffice-Regular.ttf") format("truetype");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "HP Forma DJR";
  src: url("../assets/ttf/HPFormaDJROffice-Italic.ttf") format("truetype");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "HP Forma DJR";
  src: url("../assets/ttf/HPFormaDJROffice-Medium.ttf") format("truetype");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "HP Forma DJR";
  src: url("../assets/ttf/HPFormaDJROffice-MediumItalic.ttf") format("truetype");
  font-weight: 500; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "HP Forma DJR";
  src: url("../assets/ttf/HPFormaDJROffice-Bold.ttf") format("truetype");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "HP Forma DJR";
  src: url("../assets/ttf/HPFormaDJROffice-BoldItalic.ttf") format("truetype");
  font-weight: 700; font-style: italic; font-display: swap;
}

:root {
  --black:   #000000;
  --ink:     #1E1E22;   /* near-black for dark sections */
  --white:   #FFFFFF;
  --gray:    #595959;   /* muted body text — darkened to ~7:1 on white for WCAG AA */
  --gray-2:  #555555;
  --line:    #E0E0E0;   /* hairline borders */
  --bg-soft: #F4F4F4;   /* light card / section fill */
  --accent:  #024AD8;   /* electric blue accent (matches source site) */
  --hp-blue: #0096D6;   /* HP master-brand blue */

  --font: "HP Forma DJR", "Archivo", Arial, Helvetica, sans-serif;
  --maxw: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* ---------- Accessibility: visible keyboard focus (WCAG 2.4.7) ---------- */
a:focus-visible,
button:focus-visible,
.btn:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--black);
  background: var(--white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- Typography ---------- */
h1, h2, h3 { font-weight: 700; line-height: 1.1; margin: 0 0 0.4em; }
h1 { font-size: clamp(40px, 6vw, 64px); }
h2 { font-size: clamp(32px, 4.5vw, 50px); }
h3 { font-size: 22px; }
p  { font-size: 16px; color: var(--gray); margin: 0 0 1em; }
.eyebrow { font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: var(--accent); font-weight: 700; margin-bottom: 12px; }

/* ---------- Buttons (square, high-contrast) ---------- */
.btn { display: inline-block; background: var(--black); color: var(--white); padding: 12px 28px; font-size: 15px; font-weight: 700; border: 2px solid var(--black); border-radius: 0; cursor: pointer; transition: background .15s, color .15s; }
.btn:hover { background: var(--white); color: var(--black); }
.btn--ghost { background: transparent; color: var(--black); }
.btn--ghost:hover { background: var(--black); color: var(--white); }
.btn--sm { padding: 8px 18px; font-size: 14px; }

/* ---------- Header / nav ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--white); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav__logo { display: flex; align-items: center; gap: 10px; }
.nav__logo img { height: 40px; width: auto; }
.nav__logo span { font-weight: 700; font-size: 18px; }
.nav__links { display: flex; gap: 28px; align-items: center; }
.nav__links a { font-size: 15px; }
.nav__links a:hover { color: var(--accent); }

/* Hamburger toggle — hidden on desktop, shown on mobile */
.nav__toggle {
  display: none; background: none; border: 0; cursor: pointer; padding: 10px;
  flex-direction: column; gap: 5px;
}
.nav__toggle span {
  display: block; width: 24px; height: 2px; background: var(--black);
  transition: transform .2s, opacity .2s;
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- FAQ accordion ---------- */
.faq { max-width: 820px; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  list-style: none; cursor: pointer; padding: 18px 36px 18px 0; position: relative;
  font-weight: 700; font-size: 17px; color: var(--black);
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font-size: 24px; font-weight: 400; color: var(--accent); transition: transform .2s;
}
.faq__item[open] summary::after { content: "\2212"; }
.faq__item p { margin: 0 0 18px; max-width: 70ch; }

/* ---------- Legal pages ---------- */
.legal { max-width: 760px; }
.legal h1 { font-size: clamp(32px, 5vw, 46px); margin-bottom: 6px; }
.legal h2 { font-size: 22px; margin: 32px 0 8px; }
.legal p { max-width: 70ch; }
.legal__date { color: var(--gray); font-size: 14px; margin-bottom: 28px; }
.legal a { color: var(--accent); text-decoration: underline; }
.legal__back { margin-top: 40px; font-weight: 700; }
.legal__back a { text-decoration: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 120px 0;
  background-image:
    linear-gradient(90deg, rgba(8,12,24,.92) 0%, rgba(8,12,24,.78) 45%, rgba(8,12,24,.45) 100%),
    url("../assets/images/hero.jpg");
  background-size: cover;
  background-position: center right;
  color: var(--white);
}
.hero__inner { max-width: 660px; }
.hero .eyebrow { color: #8FB4FF; }
.hero h1 { color: var(--white); text-wrap: balance; }
.hero__lede { color: #E6E9F2; font-size: 18px; max-width: 52ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }
.btn--on-dark { color: var(--white); border-color: var(--white); }
.btn--on-dark:hover { background: var(--white); color: var(--black); }

/* ---------- Section scaffolding ---------- */
.section { padding: 72px 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--ink); color: var(--white); }
.section--dark h2, .section--dark h3 { color: var(--white); }
.section--dark p { color: #c9c9cf; }
.section__head { max-width: 760px; margin-bottom: 40px; }

/* ---------- Course cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card { background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column; }
.card__img { aspect-ratio: 3/2; object-fit: cover; width: 100%; height: auto; display: block; }
.card__body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin-bottom: 8px; }
.card p { flex: 1; }
.card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; }
.card__dur { font-size: 13px; font-weight: 700; color: var(--gray-2); }
.card .eyebrow { margin-bottom: 6px; }

/* ---------- Stats / facts row ---------- */
.facts { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { text-align: center; padding: 24px 8px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat strong { display: block; font-size: 40px; font-weight: 700; line-height: 1; color: var(--accent); }
.stat span { font-size: 13px; text-transform: uppercase; letter-spacing: 2px; color: var(--gray); }

/* ---------- Feature grid (programme overview) ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.feature { background: var(--white); border: 1px solid var(--line); padding: 24px; }
.feature h3 { font-size: 18px; margin-bottom: 8px; }
.feature p { margin: 0; }

/* ---------- Curriculum tracks ---------- */
.track { margin-bottom: 40px; }
.track > h3 { font-size: 22px; border-left: 4px solid var(--accent); padding-left: 14px; margin-bottom: 18px; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.track__link { font-size: 14px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.track__link:hover { text-decoration: underline; }
.modules { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 32px; }
.modules li { display: flex; align-items: baseline; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; color: var(--black); }
.modules li span { font-weight: 700; color: var(--accent); font-size: 14px; min-width: 24px; }

/* ---------- Split (text + media) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.split img { border: 1px solid var(--line); width: 100%; }
/* Transparent instructor cutout — no border, no crop, sits on the section background */
.split__img { border: 1px solid var(--line); height: auto; display: block; width: 100%; max-width: 380px; margin: 0 auto; }
.split__cta { display: flex; flex-wrap: wrap; gap: 14px; }
@media (min-width: 901px) {
  .split > div:last-child { align-self: start; }
  /* Lift the instructor photo grid up to align with the heading */
  .teach-grid { margin-top: -150px; }
}

/* ---------- Instructor photo grid (2×2 squares, right column) ---------- */
.teach-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: auto; gap: 16px; align-content: start;
}
.split .teach-grid__img {
  width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover;
  display: block; border: 1px solid var(--line); max-width: none;
  border-radius: 14px;
}

/* ---------- Testimonials carousel ---------- */
.testimonials { margin-top: 64px; }
.carousel { position: relative; display: flex; align-items: center; gap: 12px; }
.carousel__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 3);
  gap: 24px; overflow-x: auto; scroll-behavior: smooth; scroll-snap-type: x mandatory;
  padding: 4px; flex: 1; scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.tcard {
  scroll-snap-align: start; background: var(--white); border: 1px solid var(--line);
  padding: 28px 24px; margin: 0; display: flex; flex-direction: column; gap: 14px;
}
.tcard__photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.tcard blockquote { margin: 0; font-size: 16px; line-height: 1.6; color: var(--ink); flex: 1; }
.tcard figcaption strong { display: block; font-size: 15px; }
.tcard figcaption span { font-size: 13px; color: var(--gray); }
.carousel__btn {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--white); color: var(--black); font-size: 22px; line-height: 1; cursor: pointer;
  transition: background .15s, color .15s;
}
.carousel__btn:hover { background: var(--black); color: var(--white); }
.checklist { list-style: none; margin: 0 0 24px; padding: 0; }
.checklist li { position: relative; padding: 10px 0 10px 32px; border-bottom: 1px solid var(--line); font-size: 16px; color: var(--gray); }
.checklist li strong { color: var(--black); }
.checklist li::before { content: ""; position: absolute; left: 0; top: 16px; width: 14px; height: 8px; border-left: 3px solid var(--accent); border-bottom: 3px solid var(--accent); transform: rotate(-45deg); }

/* ---------- Meet your instructor ---------- */
.instructor { display: grid; grid-template-columns: 320px 1fr; gap: 48px; align-items: start; }
.instructor__photo img { width: 100%; aspect-ratio: 1/1; object-fit: cover; border: 1px solid var(--line); }
.instructor__name { margin-top: 16px; }
.instructor__name strong { display: block; font-size: 20px; }
.instructor__name span { font-size: 14px; color: var(--accent); font-weight: 700; }
.instructor__bio .lead { font-size: 24px; font-weight: 700; color: var(--black); line-height: 1.3; margin-bottom: 20px; border-left: 4px solid var(--accent); padding-left: 16px; }
.instructor__bio p { font-size: 16px; }
.instructor__bio strong { color: var(--black); }

/* ---------- Faculty ---------- */
.people { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.person { text-align: center; }
.person img { aspect-ratio: 1/1; object-fit: cover; width: 100%; margin-bottom: 12px; }
.person strong { display: block; font-size: 16px; }
.person span { font-size: 13px; color: var(--gray); }

/* ---------- Labs / hackathons gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery figure { margin: 0; }
.gallery img { aspect-ratio: 3/2; object-fit: cover; width: 100%; }
.gallery figcaption { font-size: 14px; font-weight: 700; margin-top: 8px; }

/* ---------- Partners ---------- */
.partners { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; align-items: center; }
.partners img { width: 100%; opacity: .9; }

/* ---------- Testimonial ---------- */
.quote { max-width: 820px; margin: 0 auto; text-align: center; }
.quote__mark { width: 64px; margin: 0 auto 16px; }
.quote__text { font-size: 22px; line-height: 1.5; color: var(--white); font-weight: 400; }
.quote__person { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 24px; }
.quote__person img { width: 56px; height: 56px; object-fit: cover; }
.quote__person strong { display: block; }
.quote__person span { font-size: 13px; color: #c9c9cf; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: 14px; color: var(--gray); }
.site-footer .row { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.site-footer a { color: var(--gray); }
.site-footer a:hover { color: var(--accent); }
.site-footer nav { display: flex; gap: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { padding: 88px 0; background-image:
    linear-gradient(180deg, rgba(8,12,24,.82) 0%, rgba(8,12,24,.70) 100%),
    url("../assets/images/hero.jpg"); background-position: center; }
  .hero__inner { max-width: 100%; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .people { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .partners { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .carousel__track { grid-auto-columns: calc((100% - 24px) / 2); }
  .instructor { grid-template-columns: 1fr; gap: 24px; }
  .instructor__photo { max-width: 320px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid var(--line); }
  .modules { grid-template-columns: 1fr; }

  .nav__toggle { display: flex; }
  .nav__links {
    display: none;
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line);
    padding: 8px 24px 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
  .nav__links a.btn { margin-top: 12px; border: 2px solid var(--black); text-align: center; padding: 12px; }
}
@media (max-width: 560px) {
  .cards { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .stat { border-right: 0; }
  .carousel__track { grid-auto-columns: 100%; }
}
