/* Header */
.site-header { position: relative; z-index: 50; background: rgba(255, 253, 248, .96); border-bottom: 1px solid var(--line-soft); box-shadow: 0 1px 0 rgba(255, 255, 255, .6); }
.header-inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 26px; }
.brand { display: inline-flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); font: 400 1.6rem/1.1 var(--serif); letter-spacing: -.012em; white-space: nowrap; }
.brand-mark, .footer-mark { width: 28px; height: 38px; flex-shrink: 0; }
.primary-nav { display: flex; align-items: center; gap: 32px; color: var(--ink); font-size: .96rem; font-weight: 600; }
.primary-nav > a { position: relative; text-decoration: none; transition: color .18s ease; }
.primary-nav > a:not(.button):hover { color: var(--gold-deep); }
.primary-nav > a:not(.button)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 2px; border-radius: 2px; background: var(--gold); transform: scaleX(0); transform-origin: center; transition: transform .18s ease; }
.primary-nav > a:hover::after, .primary-nav > a.is-current::after { transform: scaleX(1); }
.nav-toggle { display: none; width: 44px; height: 42px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); cursor: pointer; }
.nav-toggle span:not(.sr-only) { display: block; height: 2px; margin: 4px 0; border-radius: 2px; background: var(--navy); }

/* Buttons: the app's solid navy primary, with a darker gold for the Academy accent */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 24px; border: 1px solid var(--navy); border-radius: 8px; background: var(--navy); color: #fff; font-size: .98rem; font-weight: 600; line-height: 1.2; letter-spacing: .005em; text-decoration: none; box-shadow: 0 1px 2px rgba(20, 47, 73, .14); cursor: pointer; transition: background-color .18s ease, border-color .18s ease, color .18s ease; }
.button:hover { background: var(--navy-deep); border-color: var(--navy-deep); }
.button svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.button-small { min-height: 42px; padding: 9px 18px; font-size: .92rem; }
.button-outline { background: var(--paper); border-color: rgba(20, 47, 73, .45); color: var(--navy); box-shadow: none; }
.button-outline:hover { background: var(--warm); border-color: var(--navy); color: var(--navy); }
.button-gold { border-color: var(--gold-deep); background: var(--gold-deep); }
.button-gold:hover { background: #6f5522; border-color: #6f5522; }
.button-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }

/* Split hero: copy on one half, a photograph filling the other half to the
   viewport edge. The middle grid line is the section's exact centre, and the
   outer tracks mirror .shell so the copy lines up with the header. */
.split-hero {
  position: relative;
  display: grid;
  grid-template-columns:
    [full-start] minmax(24px, 1fr)
    [content-start] minmax(0, calc(var(--shell) / 2))
    [middle] minmax(0, calc(var(--shell) / 2))
    [content-end] minmax(24px, 1fr)
    [full-end];
  min-height: clamp(540px, 44vw, 640px);
  overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
  background: radial-gradient(circle at 6% 12%, rgba(169, 130, 53, .09), transparent 26rem), var(--paper);
}
.split-hero > .shell { display: contents; }
.split-hero-copy {
  grid-row: 1;
  grid-column: content-start / middle;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(3.5rem, 6vw, 5.5rem) clamp(2rem, 4.5vw, 4.5rem) clamp(3.5rem, 6vw, 5.5rem) 0;
  text-align: left;
}
.split-hero-copy h1 { max-width: 620px; margin-bottom: 24px; font-size: clamp(2.6rem, 4vw, 4.1rem); }
.split-hero-copy > p { max-width: 560px; }
.split-hero-media {
  position: relative;
  grid-row: 1;
  grid-column: middle / full-end;
  min-height: 100%;
  margin: 0;
  background-color: var(--cream);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  -webkit-mask-image: linear-gradient(to right, transparent 0, rgba(0, 0, 0, .45) 12%, rgba(0, 0, 0, .88) 26%, #000 38%);
  mask-image: linear-gradient(to right, transparent 0, rgba(0, 0, 0, .45) 12%, rgba(0, 0, 0, .88) 26%, #000 38%);
}
.split-hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.split-hero--media-left { background: radial-gradient(circle at 94% 12%, rgba(169, 130, 53, .09), transparent 26rem), var(--paper); }
.split-hero--media-left .split-hero-media {
  grid-column: full-start / middle;
  -webkit-mask-image: linear-gradient(to left, transparent 0, rgba(0, 0, 0, .45) 12%, rgba(0, 0, 0, .88) 26%, #000 38%);
  mask-image: linear-gradient(to left, transparent 0, rgba(0, 0, 0, .45) 12%, rgba(0, 0, 0, .88) 26%, #000 38%);
}
.split-hero--media-left .split-hero-copy {
  grid-column: middle / content-end;
  padding-left: clamp(2rem, 4.5vw, 4.5rem);
  padding-right: 0;
}

@media (max-width: 900px) {
  .split-hero,
  .split-hero--media-left {
    grid-template-columns: [full-start] 24px [content-start] minmax(0, 1fr) [content-end] 24px [full-end];
    min-height: 0;
    background: radial-gradient(circle at 50% 100%, rgba(169, 130, 53, .08), transparent 24rem), var(--paper);
  }
  .split-hero .split-hero-media,
  .split-hero--media-left .split-hero-media {
    grid-row: 1;
    grid-column: full-start / full-end;
    min-height: 0;
    height: clamp(280px, 62vw, 440px);
    -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 55%, rgba(0, 0, 0, .5) 80%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 0, #000 55%, rgba(0, 0, 0, .5) 80%, transparent 100%);
  }
  .split-hero .split-hero-copy,
  .split-hero--media-left .split-hero-copy {
    grid-row: 2;
    grid-column: content-start / content-end;
    margin-top: -36px;
    padding: 0 0 clamp(3rem, 8vw, 4rem);
  }
}
@media (max-width: 640px) {
  .split-hero,
  .split-hero--media-left { grid-template-columns: [full-start] 16px [content-start] minmax(0, 1fr) [content-end] 16px [full-end]; }
  .split-hero-copy h1 { font-size: clamp(2.3rem, 10vw, 2.9rem); }
}

/* Icon seals: gold-ringed circles, as on the app's course cards */
.round-icon { width: 72px; height: 72px; display: grid; place-items: center; margin: 0 auto 18px; border: 1px solid var(--gold-soft); border-radius: 50%; background: var(--warm); box-shadow: inset 0 0 0 5px var(--paper); }
.round-icon svg { width: 34px; height: 34px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.icon-blue { color: var(--navy); }
.icon-gold { color: var(--gold-deep); }
.icon-green { color: var(--sage); }
.icon-purple { color: var(--gold-deep); }
.text-link { color: var(--gold-deep); text-decoration: none; font-weight: 700; }

/* Footer */
.site-footer { position: relative; overflow: hidden; background: radial-gradient(ellipse at 100% 0, rgba(169, 130, 53, .09), transparent 55%), var(--navy-deep); border-top: 1px solid rgba(216, 197, 154, .35); color: var(--cream); }
.footer-inner { position: relative; min-height: 92px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 30px; padding: 24px 0; }
.footer-inner p { flex: 1 1 auto; color: rgba(244, 239, 228, .72); font-size: .9rem; }
.footer-mark { width: 24px; height: 33px; }
.social-links { display: flex; gap: 10px; flex-shrink: 0; }
.social-links a { width: 34px; height: 34px; display: grid; place-items: center; color: var(--cream); text-decoration: none; border: 1px solid rgba(216, 197, 154, .45); border-radius: 50%; flex-shrink: 0; transition: background-color .18s ease, border-color .18s ease, color .18s ease; }
.social-links a:hover { border-color: var(--gold-soft); background: rgba(216, 197, 154, .12); color: #fff; }
.social-links svg { width: 16px; height: 16px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .primary-nav { display: none; position: absolute; top: calc(100% + 8px); left: 16px; right: 16px; flex-direction: column; align-items: stretch; gap: 16px; padding: 22px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--paper); box-shadow: var(--shadow-book); }
  .primary-nav.is-open { display: flex; }
  .primary-nav > a:not(.button)::after { display: none; }
  .primary-nav > .button { margin-top: 4px; }
}
@media (max-width: 680px) {
  .header-inner { min-height: 72px; }
  .brand { font-size: 1.22rem; gap: 10px; }
  .brand-mark { width: 22px; height: 30px; }
  .footer-inner { flex-direction: column; justify-content: center; padding: 28px 0; text-align: center; }
  .footer-inner p { flex: 0 0 auto; }
}


/* About navigation dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  transition: color .18s ease;
}

.nav-dropdown-toggle:hover {
  color: var(--gold-deep);
}

.nav-dropdown-toggle::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -10px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .18s ease;
}

.nav-dropdown-toggle:hover::after,
.nav-dropdown-toggle.is-current::after,
.nav-dropdown.is-open .nav-dropdown-toggle::after {
  transform: scaleX(1);
}

.nav-dropdown-toggle svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s ease;
}

.nav-dropdown.is-open .nav-dropdown-toggle svg {
  transform: rotate(180deg);
}

.nav-submenu {
  position: absolute;
  top: calc(100% + 24px);
  left: 50%;
  z-index: 100;
  width: 250px;
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--paper);
  box-shadow: var(--shadow-book);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.nav-submenu::before {
  content: "";
  position: absolute;
  inset: -24px 0 auto;
  height: 24px;
}

.nav-dropdown:hover .nav-submenu,
.nav-dropdown:focus-within .nav-submenu,
.nav-dropdown.is-open .nav-submenu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.nav-submenu a {
  display: block;
  padding: 11px 13px;
  border-radius: 7px;
  color: var(--ink);
  text-decoration: none;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.35;
  transition: background-color .15s ease, color .15s ease;
}

.nav-submenu a:hover,
.nav-submenu a:focus-visible,
.nav-submenu a.is-current {
  background: var(--warm);
  color: var(--gold-deep);
}

@media (max-width: 980px) {
  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    font-size: 1rem;
  }

  .nav-dropdown-toggle::after {
    display: none;
  }

  .nav-submenu {
    position: static;
    width: 100%;
    margin-top: 10px;
    padding: 4px 0 0 12px;
    border: 0;
    border-left: 2px solid var(--line-soft);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }

  /* The desktop open/hover rules translate the menu to centre it under the
     toggle; stacked in the mobile panel it must stay put. */
  .nav-dropdown.is-open .nav-submenu,
  .nav-dropdown:hover .nav-submenu,
  .nav-dropdown:focus-within .nav-submenu {
    transform: none;
  }

  .nav-dropdown.is-open .nav-submenu {
    display: block;
  }

  .nav-dropdown:hover .nav-submenu,
  .nav-dropdown:focus-within .nav-submenu {
    display: none;
  }

  .nav-dropdown.is-open:hover .nav-submenu,
  .nav-dropdown.is-open:focus-within .nav-submenu {
    display: block;
  }
}

.footer-page-links, .footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.4rem; }
.footer-page-links a, .footer-links a { color: var(--cream); text-decoration: none; font-size: .88rem; font-weight: 600; text-underline-offset: 4px; transition: color .15s ease; }
.footer-page-links a:hover, .footer-links a:hover, .footer-page-links a[aria-current="page"] { color: var(--gold-soft); text-decoration: underline; }
