/* ─────────────────────────────────────────────────────
   CAT Training Australia — Bold Story design system
   Shared across all pages. Page-specific styles live in
   each HTML file's own <style> block.
   ───────────────────────────────────────────────────── */

/* ─────────────────────────────────────────────────────
   ASTRA CONTAINER OVERRIDES — LANDING CANVAS RESET
   ───────────────────────────────────────────────────── */
:root {
  --cream:     #f5e6d3;
  --cream-2:   #ead8be;
  --ink:       #1d1626;
  --ink-2:     #4a3f54;
  --ink-3:     #7d7185;
  --plum:      #4a2658;
  --plum-light:#6e3a78;
  --orange:    #e07a3c;
  --orange-deep:#c45a2a;
  --teal:      #5a9491;
  --mustard:   #e6b14a;
  --pink:      #d4778c;

  --font-display: "DM Serif Display", "Yeseva One", Georgia, serif;
  --font-body:    "Space Grotesk", "Familjen Grotesk", system-ui, sans-serif;
  --font-script:  "Caveat", cursive;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--cream); }
body {
  font-family: var(--font-body);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--orange); color: var(--cream); }

/* film grain overlay (matches landing) */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.18;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.05 0 0 0 0 0.15 0 0 0 0.5 0'/></filter><rect width='180' height='180' filter='url(%23n)'/></svg>");
}

/* ── NAV ───────────────────────────── */
.nav {
  padding: 24px 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--cream);
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(29, 22, 38, 0.12);
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.logo-mark {
  width: 68px; height: 68px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.logo-mark svg, .logo-mark img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
/* Footer can show a darker variant on dark backgrounds */
footer .logo-mark { background: var(--cream); border-radius: 8px; padding: 4px; }
.logo-text { line-height: 1; }
.logo-text .nm {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  display: block;
  line-height: 1;
}
.logo-text .nm em { font-style: italic; color: var(--orange); }
.logo-text .sub {
  display: block;
  margin-top: 6px;
  font-family: var(--font-body);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
  font-size: 14.5px;
  font-weight: 500;
}
.nav-links a { color: var(--ink); text-decoration: none; padding: 6px 2px; position: relative; }
.nav-links a:not(.nav-cta):hover { color: var(--orange); }
.nav-links a.is-active { color: var(--orange); }
.nav-links a.is-active::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--orange);
}
.nav-links .has-sub { position: relative; }
.nav-links .has-sub::after {
  content: "";
  display: inline-block;
  margin-left: 6px;
  width: 6px; height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

/* ── NEW DROPDOWN INTERACTION INTERFACE ── */
.nav-item-dropdown {
  position: relative;
  display: inline-block;
}

.nav-links .nav-item-dropdown > a.has-sub {
  font-weight: 500;
  font-size: 14.5px;
  text-decoration: none;
  position: relative;
  padding: 4px 0;
  display: inline-flex;
  align-items: center;
}

/* Ensure the absolute panel matches the design values from the template */
.nav-links .nav-item-dropdown .submenu {
  position: absolute !important;
  top: 100% !important;
  left: -16px !important;
  background: var(--cream) !important;
  border: 1px solid var(--ink) !important;
  border-radius: 4px !important;
  padding: 8px 4px !important;
  min-width: 220px !important;
  opacity: 0 !important;
  visibility: hidden !important;
  transform: translateY(-4px) !important;
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s !important;
  box-shadow: 6px 6px 0 var(--plum) !important;
  z-index: 99999 !important;
  margin-top: 8px !important;
  display: block !important;
}

/* Trigger interaction display smoothly on hover states */
.nav-item-dropdown:hover .submenu,
.nav-item-dropdown:focus-within .submenu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  transition: opacity .18s ease, transform .18s ease, visibility 0s !important;
}

.nav-links .nav-item-dropdown .submenu a {
  display: block !important;
  padding: 8px 16px !important;
  font-size: 13.5px !important;
  color: var(--ink) !important;
  text-decoration: none !important;
  width: 100% !important;
  border-bottom: none !important;
}

.nav-links .nav-item-dropdown .submenu a:hover {
  background: var(--mustard) !important;
  color: var(--ink) !important;
}

.dropdown-arrow {
  font-size: 11px;
  margin-left: 4px;
  display: inline-block;
  transition: transform 0.2s ease;
}
.nav-item-dropdown:hover .has-sub .dropdown-arrow {
  transform: rotate(180deg);
  color: var(--orange);
}

.nav-cta {
  padding: 10px 18px !important;
  background: var(--plum);
  color: var(--cream) !important;
  border-radius: 999px;
  font-weight: 600;
  font-size: 13.5px;
}
.nav-cta:hover { background: var(--orange); }

/* ── BUTTONS ─────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 26px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  transition: all .15s;
  cursor: pointer;
  border: 0;
  font-family: var(--font-body);
}
.btn-primary { background: var(--plum); color: var(--cream); }
.btn-primary:hover { background: var(--orange); transform: translateY(-2px); }
.btn-secondary {
  background: transparent;
  border: 1.5px solid var(--ink);
  color: var(--ink);
}
.btn-secondary:hover { background: var(--ink); color: var(--cream); }
.btn-cream {
  background: var(--cream);
  color: var(--ink);
}
.btn-cream:hover { background: var(--mustard); }
.play-dot {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--orange);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.play-dot::after {
  content: "";
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent var(--cream);
  transform: translateX(1px);
}

/* ── COMMON LABELS ─────────────────── */
.eyebrow,
.section-label {
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--orange);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}
.eyebrow::before, .eyebrow::after {
  content: "";
  display: block;
  width: 24px; height: 1.5px;
  background: var(--orange);
}
.section-label::before {
  content: "";
  display: block;
  width: 32px; height: 1.5px;
  background: currentColor;
}

/* ── MARQUEE STRIP ─────────────────── */
.strip {
  background: var(--ink);
  color: var(--cream);
  padding: 22px 0;
  overflow: hidden;
}
.marquee {
  display: flex;
  gap: 56px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 28px;
  white-space: nowrap;
  animation: scroll 32s linear infinite;
}
.marquee > span { display: inline-flex; gap: 56px; align-items: center; }
.marquee .star {
  width: 16px; height: 16px;
  background: var(--orange);
  border-radius: 50%;
}
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── MEMBERS / FINAL ─────────────── */
.members {
  margin-top: 90px;
  padding: 36px 0;
  border-top: 1px solid rgba(29,22,38,0.18);
  border-bottom: 1px solid rgba(29,22,38,0.18);
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 56px;
  flex-wrap: wrap;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.members .badge { display: flex; align-items: center; gap: 12px; color: var(--ink); }
.members .badge-dot {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--cream-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 16px;
  font-style: italic;
  letter-spacing: 0;
  text-transform: none;
}

/* ── FOOTER ─────────────────────── */
footer {
  padding: 64px 56px 36px;
  background: var(--ink);
  color: var(--cream);
  font-size: 13px;
  line-height: 1.6;
}
footer .inner {
  max-width: 1300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
}
@media (max-width: 800px) { footer .inner { grid-template-columns: 1fr; } }
footer h4 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 400;
  font-style: italic;
  margin: 0 0 14px;
  color: var(--mustard);
}
footer ul { list-style: none; padding: 0; margin: 0; }
footer li { margin: 6px 0; }
footer a { color: rgba(245,230,211,.7); text-decoration: none; }
footer a:hover { color: var(--orange); }
footer .ack {
  max-width: 760px;
  margin: 40px auto 0;
  padding-top: 28px;
  border-top: 1px solid rgba(245,230,211,.15);
  font-size: 12.5px;
  line-height: 1.7;
  color: rgba(245,230,211,.55);
}

/* ── PAGE HEADER (used on every non-home page) ── */
.page-head {
  padding: 80px 56px 64px;
  max-width: 1300px;
  margin: 0 auto;
  position: relative;
}
.page-head .crumb {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 600;
  margin-bottom: 20px;
}
.page-head .crumb a { color: var(--ink-3); text-decoration: none; }
.page-head .crumb a:hover { color: var(--orange); }
.page-head .crumb-sep { margin: 0 10px; color: var(--ink-3); }
.page-head h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(56px, 7vw, 96px);
  line-height: 0.94;
  letter-spacing: -0.025em;
  margin: 0 0 28px;
  max-width: 18ch;
  text-wrap: balance;
}
.page-head h1 em { font-style: italic; color: var(--orange); }
.page-head .lede {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.35;
  color: var(--ink-2);
  max-width: 36ch;
  margin: 0 0 0;
}
.page-head .lede em { font-style: italic; color: var(--plum); }

/* ── FINAL CTA (re-usable) ─────────── */
.final {
  padding: 130px 56px 90px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.final-illus {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
}
.final-illus .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
}
.final-illus .b1 { width: 160px; height: 160px; background: var(--orange); top: 8%; left: 12%; }
.final-illus .b2 { width: 110px; height: 110px; background: var(--teal); top: 18%; right: 18%; }
.final-illus .b3 { width: 180px; height: 180px; background: var(--mustard); bottom: 18%; left: 22%; }
.final-illus .b4 { width: 120px; height: 120px; background: var(--pink); bottom: 30%; right: 12%; }
.final h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(48px, 6vw, 80px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin: 0 auto 28px;
  max-width: 16ch;
  text-wrap: balance;
  position: relative;
  z-index: 1;
}
.final h2 em { font-style: italic; color: var(--orange); }
.final p {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink-2);
  max-width: 46ch;
  margin: 0 auto 36px;
  line-height: 1.4;
  position: relative;
  z-index: 1;
}
.final .btn { position: relative; z-index: 1; }


/* ── MOBILE NAV (hamburger) ──────────────────────────── */
.nav-toggle-cb { display: none; }
.nav-toggle { display: none; }

@media (max-width: 900px) {
  .nav { flex-wrap: wrap; padding: 18px 24px; }
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center;
    gap: 5px; width: 46px; height: 46px; margin-left: auto;
    padding: 11px; cursor: pointer; border-radius: 8px;
    -webkit-tap-highlight-color: transparent;
  }
  .nav-toggle span {
    display: block; width: 100%; height: 2.5px; border-radius: 2px;
    background: var(--ink);
    transition: transform .28s ease, opacity .2s ease;
  }
  .nav-links {
    order: 3; flex-basis: 100%; flex-direction: column;
    align-items: stretch; gap: 0;
    max-height: 0; overflow: hidden;
    transition: max-height .32s ease;
  }
  .nav-toggle-cb:checked ~ .nav-links {
    max-height: 85vh; overflow-y: auto; margin-top: 12px;
  }
  .nav-links > a:not(.nav-cta) {
    width: 100%; padding: 15px 4px; font-size: 16px;
    border-bottom: 1px solid var(--cream-2);
  }
  .nav-links .has-sub::after { display: none; }
  
  .nav-links > a:not(.nav-cta),
  .nav-links .nav-item-dropdown > a.has-sub {
    width: 100% !important; 
    padding: 15px 4px !important; 
    font-size: 16px !important;
    border-bottom: 1px solid var(--cream-2) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }

  /* ── MOBILE NAV DROPDOWN ADJUSTMENTS (SPECIFICITY MATCH) ── */
  
  /* Force the parent dropdown item to wrap cleanly onto its own block line */
  .nav-links .nav-item-dropdown {
    display: block !important;
    width: 100% !important;
  }

  /* CRITICAL STEP: Match the exact selector structure from desktop to force layout resets */
  .nav-links .nav-item-dropdown .submenu {
    position: static !important; /* Pulls it completely out of floating/clipping layers */
    opacity: 1 !important; 
    visibility: visible !important; 
    transform: none !important;
    box-shadow: none !important; 
    border: 0 !important; 
    border-radius: 0 !important; 
    min-width: 0 !important;
    background: transparent !important; /* Blends natively into the mobile slide-out drawer */
    padding: 6px 0 12px 20px !important; /* Indents child menu modules for clean visual hierarchy */
    margin-top: 0 !important;
    display: block !important;
    transition: none !important;
  }

  /* Style adjustment for submenu links inside the responsive drawer stack */
  .nav-links .nav-item-dropdown .submenu a {
    display: block !important;
    padding: 10px 0 !important;
    font-size: 15px !important;
    color: var(--ink) !important;
    border-bottom: none !important;
    width: 100% !important;
    opacity: 0.85;
  }

  /* Change text color to orange on touch highlight states */
  .nav-links .nav-item-dropdown .submenu a:hover {
    background: transparent !important;
    color: var(--orange) !important;
    opacity: 1;
  }

  /* Prevent rotation transitions from breaking baseline box parameters on mobile */
  .nav-links .nav-item-dropdown .has-sub .dropdown-arrow {
    transform: none !important;
    font-size: 14px !important;
    color: var(--ink-3) !important;
  }
  .nav-cta { align-self: flex-start; margin-top: 16px; }

  /* hamburger → X when open */
  .nav-toggle-cb:checked ~ .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav-toggle-cb:checked ~ .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-toggle-cb:checked ~ .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
}

/* Scoped to target only your custom body class with standard specificity */
body.cat-custom-canvas,
body.cat-custom-canvas .site,
body.cat-custom-canvas #page,
body.cat-custom-canvas .site-content {
    background-color: var(--cream, #f5e6d3);
}
