/* Web shell — wraps the print-sized .page elements (1920x1080) into a
   scaled, scrollable single-page site with a sticky sidebar nav. */

:root {
  --bg-deep: #001f3a;
  --bg-mid: #003566;
  --marine: #0062A8;
  --cyan: #069DE5;
  --rule: rgba(255,255,255,0.18);
  --ink: #ffffff;
  --ink-mute: rgba(255,255,255,0.7);
  --ink-soft: rgba(255,255,255,0.55);
  --sidebar-w: 280px;
  --header-h: 76px;
}

html, body {
  margin: 0;
  padding: 0;
  background: #0062A8;
  color: var(--ink);
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}
body {
  background: linear-gradient(225deg, #1a7ab5 0%, #0062A8 45%, #003f71 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

* { box-sizing: border-box; }

a { color: inherit; text-decoration: none; }

/* ---------- App shell ---------- */

.app {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: var(--header-h) 1fr;
  min-height: 100vh;
}

.app-header {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: linear-gradient(180deg, #00284a 0%, #001f3a 100%);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.85);
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
}

.app-header .brand {
  display: flex;
  align-items: center;
  gap: 18px;
}

.app-header .brand img {
  height: 26px;
  display: block;
}

.app-header .title {
  font-family: 'Turret', 'Georgia', serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.01em;
  line-height: 1;
}

.app-header .subtitle {
  font-family: 'RobotoCond', 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-top: 4px;
}

/* Header FoF lockup — white wordmark sitting directly on the dark header */
.app-header .header-fof {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 32px;
  z-index: 1;
}
.app-header .header-fof .fof-header {
  height: 30px;
  width: auto;
  display: block;
}

/* ---------- Quick links bar ---------- */

/* close on click outside via a tiny invisible backdrop trick */
/* ---------- Sidebar ---------- */

.app-nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  width: var(--sidebar-w);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 28px 22px 60px 32px;
  border-right: 1.5px solid rgba(255, 255, 255, 0.85);
  background: #001a30;
  z-index: 60;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.2, 0.0, 0.0, 1.0);
  box-shadow: 12px 0 32px -12px rgba(0,0,0,0.45);
}
.app-nav.open {
  transform: translateX(0);
}

/* Burger button */
.nav-toggle {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 8px;
  margin-right: 12px;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  transition: background 0.12s;
}
.nav-toggle:hover { background: rgba(255,255,255,0.08); }
.nav-toggle span {
  display: block;
  height: 2px;
  width: 20px;
  background: #ffffff;
  border-radius: 1px;
  transition: transform 0.22s, opacity 0.22s;
}
.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);
}

/* Backdrop — invisible, captures outside-click to close */
.nav-backdrop {
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: transparent;
  z-index: 55;
  pointer-events: none;
}
.nav-backdrop.show {
  pointer-events: auto;
}

.app-nav::-webkit-scrollbar { width: 8px; }
.app-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }
.app-nav::-webkit-scrollbar-track { background: transparent; }

.tier-group { margin-bottom: 22px; }
.tier-label { display: none; }

.tier-label {
  font-family: 'RobotoCond', 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 10px 0;
  display: block;
}

.tier-name {
  font-family: 'Turret', 'Georgia', serif;
  font-weight: 700;
  font-size: 14px;
  margin: 0 0 8px 0;
  color: var(--ink);
}

.nav-list { list-style: none; margin: 0; padding: 0; }

.nav-list li { margin: 0; }

.nav-list a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 6px 0 6px 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--ink-mute);
  border-left: 2px solid transparent;
  padding-left: 10px;
  margin-left: -10px;
  transition: color 0.15s, border-color 0.15s;
}

.nav-list a:hover { color: var(--ink); }

.nav-list a.active {
  color: #8AE8FF;
  border-left-color: #8AE8FF;
}
.nav-list a.active .nav-num {
  color: #8AE8FF;
}

.nav-num {
  font-family: 'RobotoCond', 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  min-width: 22px;
  transition: color 0.15s;
}

/* ---------- Main scroll area ---------- */

.app-main {
  padding: 32px 40px 80px 40px;
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
}

.page-card {
  position: relative;
  margin-bottom: 36px;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 14px;
  background:
    radial-gradient(ellipse 80% 60% at 80% 30%, rgba(6,157,229,0.25) 0%, rgba(6,157,229,0) 60%),
    linear-gradient(135deg, #002a52 0%, #003c75 50%, #002a52 100%);
  scroll-margin-top: calc(var(--header-h) + 16px);
  box-shadow: 0 18px 60px -20px rgba(0,0,0,0.55);
  overflow: hidden;
}

.page-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.55);
  font-family: 'RobotoCond', 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.page-card-meta .title-text { color: var(--ink); }

/* The container that holds the 1920x1080 .page and scales it down.
   Scale is set via the --scale CSS custom property by JS on load/resize,
   which is more reliable than container queries across browsers. */
.page-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  --scale: 0.66;
}

.page-frame > .page {
  position: absolute;
  top: 0; left: 0;
  width: 1920px;
  height: 1080px;
  transform-origin: top left;
  transform: scale(var(--scale));
}

/* Hide the rolling-hill curve in the web view — only the PDF needs it */
.page-frame .rolling-hill { display: none; }

/* ---------- Hero / intro ---------- */

.app-hero {
  border: 1.5px solid rgba(255, 255, 255, 0.85);
  border-radius: 14px 14px 140px 14px;
  background:
    radial-gradient(ellipse 80% 60% at 80% 30%, rgba(6,157,229,0.25) 0%, rgba(6,157,229,0) 60%),
    linear-gradient(135deg, #002a52 0%, #003c75 50%, #002a52 100%);
  padding: 48px 56px;
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
}

.app-hero::before {
  content: '';
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(255,255,255,0.18);
  pointer-events: none;
  border-radius: 6px 6px 124px 6px;
}

.app-hero .eyebrow {
  font-family: 'RobotoCond', 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  margin: 0 0 14px 0;
}

.app-hero h1 {
  font-family: 'Turret', 'Georgia', serif;
  font-weight: 700;
  font-size: 52px;
  line-height: 1.05;
  letter-spacing: -0.005em;
  margin: 0 0 18px 0;
  max-width: 780px;
}

.app-hero p {
  font-size: 16px;
  line-height: 1.55;
  max-width: 720px;
  color: var(--ink-mute);
  margin: 0 0 6px 0;
}

.app-hero .stats {
  margin-top: 22px;
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
}

/* Hero download button — pill-shaped, matches icons-download-all style */
.app-hero .hero-download {
  display: inline-block;
  margin-top: 24px;
  padding: 14px 28px;
  font-family: 'RobotoCond', 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #001f3a;
  background: #ffffff;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
  cursor: pointer;
}
.app-hero .hero-download:hover {
  background: #8AE8FF;
  transform: translateY(-1px);
}

.app-hero .stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-hero .stat .num {
  font-family: 'Turret', 'Georgia', serif;
  font-weight: 700;
  font-size: 28px;
}

.app-hero .stat .lbl {
  font-family: 'RobotoCond', 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- Footer ---------- */

.app-footer {
  margin-top: 60px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-family: 'RobotoCond', 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
}

/* ---------- Tier banner inside main column ---------- */

.tier-banner {
  margin: 24px 0 16px 0;
  padding: 12px 16px;
  border-left: 3px solid var(--cyan);
  background: rgba(6,157,229,0.06);
}

.tier-banner .lbl {
  font-family: 'RobotoCond', 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
}

.tier-banner .name {
  font-family: 'Turret', 'Georgia', serif;
  font-weight: 700;
  font-size: 22px;
  margin-top: 2px;
}

.tier-banner .desc {
  font-size: 13px;
  color: var(--ink-mute);
  margin-top: 4px;
  max-width: 680px;
}

/* ---------- Mobile: collapse sidebar ---------- */

@media (max-width: 980px) {
  .app-main {
    padding: 24px 20px 60px 20px;
  }
}

/* Expandable sidebar sections (replaces old tier-group structure) */

/* ---------- Volume switcher: header tabs (desktop) + sidebar list (mobile) ---------- */

/* Wordmark wrapper makes the logo a home link */
.app-header .brand-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.app-header .brand-link:hover img {
  opacity: 0.85;
  transition: opacity 0.15s;
}

/* Header volume tabs */
.app-header .volume-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: 18px;
  padding-left: 18px;
  border-left: 1px solid rgba(255,255,255,0.18);
  height: 34px;
}
.app-header .volume-tabs a {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: rgba(255,255,255,0.62);
  text-decoration: none;
  padding: 7px 14px;
  border-radius: 4px;
  position: relative;
  transition: color 0.15s, background 0.15s;
  white-space: nowrap;
}
.app-header .volume-tabs a:hover {
  color: #ffffff;
  background: rgba(255,255,255,0.06);
}
.app-header .volume-tabs a.active {
  color: #8AE8FF;
  font-weight: 700;
}
.app-header .volume-tabs a.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: -3px;
  height: 2px;
  background: #8AE8FF;
  border-radius: 1px;
}

/* Sidebar volume switcher — only visible on mobile */
.app-nav .nav-volumes {
  display: none;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.app-nav .nav-volumes-title {
  font-family: 'RobotoCond', 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(138,232,255,0.85);
  margin: 0 0 10px 0;
}
.app-nav .nav-volumes a {
  display: block;
  font-family: 'Roboto', sans-serif;
  font-size: 15px;
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 6px;
  margin: 0 -10px 4px -10px;
  transition: background 0.12s, color 0.12s;
}
.app-nav .nav-volumes a:hover {
  background: rgba(255,255,255,0.06);
  color: #ffffff;
}
.app-nav .nav-volumes a.active {
  background: rgba(6,157,229,0.18);
  color: #8AE8FF;
  font-weight: 500;
}

/* Mobile: hide header tabs and FoF lockup, show sidebar volumes */
@media (max-width: 900px) {
  .app-header .volume-tabs { display: none; }
  .app-header .header-fof { display: none; }
  .app-nav .nav-volumes { display: block; }
}
ructure) */
.nav-section {
  margin-bottom: 28px;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 22px;
}
.nav-section:last-of-type { border-bottom: none; }
.app-nav .nav-section > summary,
.app-nav summary.nav-section-name {
  list-style: none !important;
  cursor: pointer !important;
  padding: 12px 0 18px 0 !important;
  font-family: 'Turret', 'Georgia', serif !important;
  font-weight: 700 !important;
  font-size: 19px !important;
  letter-spacing: -0.005em !important;
  color: #8AE8FF !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  user-select: none !important;
  transition: color 0.12s, opacity 0.12s !important;
}
.nav-section > summary::-webkit-details-marker { display: none; }
.nav-section > summary::marker { content: ''; }
.nav-section > summary::after {
  content: '+';
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  font-size: 20px;
  color: #8AE8FF;
  margin-left: 12px;
  flex-shrink: 0;
  transition: transform 0.18s;
  opacity: 0.85;
}
.nav-section[open] > summary::after { content: '\2013'; }
.nav-section > summary:hover { color: #ffffff; }
.nav-section > summary:hover::after { color: #ffffff; opacity: 1; }


/* Iconography library — per-icon download chips and 'download all' CTA */
.icon-dl {
  font-family: 'RobotoCond', 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  padding: 2px 6px;
  border-radius: 2px;
  transition: color 0.12s, background 0.12s;
  cursor: pointer;
}
.icon-dl:hover {
  color: #ffffff;
  background: rgba(6,157,229,0.2);
}
.icon-dl-all {
  display: inline-block;
  font-family: 'RobotoCond', 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #001f3a;
  background: #ffffff;
  padding: 16px 32px;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s, transform 0.15s;
  cursor: pointer;
}
.icon-dl-all:hover {
  background: #8AE8FF;
  transform: translateY(-1px);
}
