/* ==========================================================================
   Y2O — brand.css
   Global styles, tokens, utilities
   ========================================================================== */

@import url("https://fonts.googleapis.com/css2?family=Sora:wght@500;600;700&family=Source+Sans+3:wght@400;500;600&display=swap");

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand colours */
  --maroon: #7B2D26;
  --navy: #1F2B6C;
  --deepNavy: #151D48;
  --teal: #1A9E8F;
  --lightTeal: #F0F9F8;
  --gold: #D4A843;
  --nearBlack: #1A1A1A;
  --warmGrey: #6B6B6B;
  --warmIvory: #F7F1EA;
  --coolGrey: #E5E9F2;
  --white: #FFFFFF;

  /* Type */
  --font-heading: "Sora", "Inter", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Inter", system-ui, sans-serif;

  /* Shadow */
  --shadow-card: 0 2px 12px rgba(31, 43, 108, 0.06);
  --shadow-card-hover: 0 6px 24px rgba(31, 43, 108, 0.10);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  /* Layout */
  --container-max: 1280px;
}

/* --------------------------------------------------------------------------
   Reset / Base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  max-width: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--nearBlack);
  background: var(--white);
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Overflow hardening — keep content inside the viewport at every width */
section, .container, .grid, .card { min-width: 0; }
a, .pill, .tag, .badge, .source-link, .chip { overflow-wrap: break-word; word-break: normal; }

a {
  color: var(--teal);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover {
  color: var(--deepNavy);
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

ul, ol {
  list-style: none;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--deepNavy);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h1, h2, h3, h4 {
  text-wrap: balance;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

h1 {
  font-size: clamp(42px, 6vw, 76px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

h2 {
  font-size: clamp(32px, 4.5vw, 56px);
  letter-spacing: -0.035em;
  line-height: 1.06;
}

h3 {
  font-size: clamp(21px, 2vw, 28px);
  line-height: 1.16;
}

@media (max-width: 640px) {
  h1 { font-size: clamp(38px, 10vw, 52px); line-height: 1.04; }
  h2 { font-size: clamp(30px, 8vw, 44px); line-height: 1.06; }
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
}

p, li {
  text-wrap: pretty;
  overflow-wrap: normal;
  word-break: normal;
}

p {
  color: var(--nearBlack);
}

p + p {
  margin-top: 1rem;
}

.prose {
  max-width: 60ch;
}

.prose p {
  margin-bottom: 1rem;
}

.lead {
  font-size: clamp(1.125rem, 0.5vw + 1rem, 1.375rem);
  color: var(--warmGrey);
  line-height: 1.55;
  max-width: 60ch;
}

/* Eyebrow */
.eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--maroon);
}

/* --------------------------------------------------------------------------
   Layout: container + sections
   -------------------------------------------------------------------------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

@media (min-width: 768px) {
  .container {
    padding-left: 40px;
    padding-right: 40px;
  }
}

.section-pad-lg {
  padding-top: 96px;
  padding-bottom: 96px;
}

.section-pad-md {
  padding-top: 72px;
  padding-bottom: 72px;
}

.section-pad-sm {
  padding-top: 48px;
  padding-bottom: 48px;
}

@media (max-width: 1024px) {
  .section-pad-lg { padding-top: 64px; padding-bottom: 64px; }
  .section-pad-md { padding-top: 56px; padding-bottom: 56px; }
  .section-pad-sm { padding-top: 40px; padding-bottom: 40px; }
}

@media (max-width: 640px) {
  .section-pad-lg { padding-top: 48px; padding-bottom: 48px; }
  .section-pad-md { padding-top: 40px; padding-bottom: 40px; }
  .section-pad-sm { padding-top: 32px; padding-bottom: 32px; }
}

/* --------------------------------------------------------------------------
   Section backgrounds
   -------------------------------------------------------------------------- */
.bg-white      { background: var(--white); color: var(--nearBlack); }
.bg-navy       { background: var(--navy); color: var(--white); }
.bg-deepNavy   { background: var(--deepNavy); color: var(--white); }
.bg-lightTeal  { background: var(--lightTeal); color: var(--nearBlack); }
.bg-warmIvory  { background: var(--warmIvory); color: var(--nearBlack); }
.bg-coolGrey   { background: var(--coolGrey); color: var(--nearBlack); }

/* Inverted heading colour on dark sections */
.bg-navy h1, .bg-navy h2, .bg-navy h3, .bg-navy h4,
.bg-deepNavy h1, .bg-deepNavy h2, .bg-deepNavy h3, .bg-deepNavy h4 {
  color: var(--white);
}

.bg-navy p, .bg-deepNavy p {
  color: rgba(255, 255, 255, 0.85);
}

.bg-navy .eyebrow,
.bg-deepNavy .eyebrow {
  color: var(--gold);
}

.bg-navy a:not(.btn-primary):not(.btn-secondary),
.bg-deepNavy a:not(.btn-primary):not(.btn-secondary) {
  color: var(--lightTeal);
}

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px;
  border: 1px solid rgba(31, 43, 108, 0.04);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

@media (min-width: 768px) {
  .card { padding: 32px; }
}

.card:hover {
  box-shadow: var(--shadow-card-hover);
}

.card--hover:hover {
  transform: translateY(-2px);
}

.card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--deepNavy);
  margin-bottom: 8px;
}

.card-body {
  color: var(--warmGrey);
  font-size: 1rem;
  line-height: 1.55;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  padding: 16px 32px;
  border-radius: var(--radius-md);
  transition: all 0.18s ease;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--teal);
  color: var(--white);
  border: 1px solid var(--teal);
}

.btn-primary:hover {
  background: #178a7d; /* teal -8% */
  border-color: #178a7d;
  color: var(--white);
}

.btn-secondary {
  background: transparent;
  color: var(--deepNavy);
  border: 1px solid var(--deepNavy);
}

.btn-secondary:hover {
  background: var(--deepNavy);
  color: var(--white);
}

.bg-navy .btn-secondary,
.bg-deepNavy .btn-secondary {
  color: var(--white);
  border-color: var(--white);
}

.bg-navy .btn-secondary:hover,
.bg-deepNavy .btn-secondary:hover {
  background: var(--white);
  color: var(--deepNavy);
}

.btn-primary svg,
.btn-secondary svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

@media (max-width: 640px) {
  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   FAQ accordion
   -------------------------------------------------------------------------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--coolGrey);
  border-left: 3px solid var(--coolGrey);
  overflow: hidden;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.faq-item.open {
  border-left-color: var(--teal);
  background: var(--lightTeal);
  box-shadow: var(--shadow-card);
}

.faq-question {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  width: 100%;
  text-align: left;
  padding: 20px 24px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.0625rem;
  color: var(--deepNavy);
  background: transparent;
}

.faq-question > span { overflow-wrap: break-word; min-width: 0; }

.faq-question .faq-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--navy);
  transition: transform 0.25s ease;
}

.faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer-inner {
  padding: 0 24px 22px;
  color: var(--nearBlack);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 65ch;
}

/* --------------------------------------------------------------------------
   Utility helpers
   -------------------------------------------------------------------------- */
.text-center { text-align: center; }
.text-maroon { color: var(--maroon); }
.text-teal { color: var(--teal); }
.text-navy { color: var(--navy); }
.text-deepNavy { color: var(--deepNavy); }
.text-warmGrey { color: var(--warmGrey); }
.text-white { color: var(--white); }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.gap-32 { gap: 32px; }

.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.mb-32 { margin-bottom: 32px; }
.mb-48 { margin-bottom: 48px; }

/* Image placeholder */
.img-placeholder {
  background: var(--coolGrey);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  min-height: 220px;
  color: var(--warmGrey);
  font-style: italic;
  font-size: 0.9375rem;
}

/* Section header pattern */
.section-header {
  max-width: 760px;
  margin: 0 0 48px;
}

.section-header.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-header .eyebrow {
  margin-bottom: 12px;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header .lead {
  margin-left: 0;
}

.section-header.center .lead {
  margin-left: auto;
  margin-right: auto;
}

/* --------------------------------------------------------------------------
   Wordmark
   -------------------------------------------------------------------------- */
/* --------------------------------------------------------------------------
   Wordmark / Logo
   -------------------------------------------------------------------------- */
.wordmark {
  display: inline-flex;
  align-items: center;
  line-height: 1;
  text-decoration: none;
  flex-shrink: 0;
}

.wordmark img {
  display: block;
  height: 34px;
  width: auto;
  max-width: 100%;
}

.footer-brand .wordmark img {
  height: auto;
  width: auto;
  max-width: 120px;
  max-height: 56px;
  margin-bottom: 14px;
}

/* Legacy text fallback (kept harmless if encountered) */
.wordmark .dot { color: var(--teal); }

.bg-navy .wordmark,
.bg-deepNavy .wordmark {
  color: var(--white);
}

/* --------------------------------------------------------------------------
   Topbar (above navbar)
   -------------------------------------------------------------------------- */
.topbar {
  background: var(--maroon);
  color: var(--warmIvory);
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 0;
}

.topbar-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 0 rgba(212, 168, 67, 0.55);
  animation: topbar-pulse 2.6s infinite;
  flex-shrink: 0;
}

.topbar-sep {
  color: var(--gold);
  margin: 0 4px;
}

@keyframes topbar-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(212, 168, 67, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(212, 168, 67, 0); }
  100% { box-shadow: 0 0 0 0 rgba(212, 168, 67, 0); }
}

@media (max-width: 640px) {
  .topbar { font-size: 0.6875rem; }
  .topbar-inner { padding: 7px 0; }
}

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--coolGrey);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--deepNavy);
  position: relative;
  padding: 6px 0;
}

.nav-links a:hover {
  color: var(--teal);
}

.nav-links a.active {
  color: var(--teal);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--teal);
  color: var(--white) !important;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9375rem;
  height: 44px;
  padding: 0 24px;
  min-width: 160px;
  border-radius: 14px;
  transition: background 0.18s ease;
  white-space: nowrap;
}

.nav-cta:hover {
  background: #178a7d;
  color: var(--white) !important;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: var(--deepNavy);
}

.nav-toggle svg { width: 24px; height: 24px; }

@media (max-width: 980px) {
  .nav-links a:not(.nav-cta) { display: none; }
}

@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; }
  .nav-cta { display: none; }
  .nav-links { display: none; }

  .nav.open .nav-links {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--coolGrey);
    padding: 8px 0 16px;
    box-shadow: var(--shadow-card);
  }

  .nav.open .nav-links a {
    display: block;
    padding: 14px 24px;
    border-bottom: 1px solid var(--coolGrey);
  }

  .nav.open .nav-links a.active::after { display: none; }

  .nav.open .nav-links .nav-cta {
    display: inline-flex;
    margin: 16px 24px 0;
    justify-content: center;
  }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.footer {
  background: var(--white);
  color: var(--deepNavy);
  border-top: 1px solid var(--teal);
  padding: 64px 0 32px;
}

.footer-headline {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--teal);
  margin-bottom: 44px;
  text-wrap: balance;
}

.footer-top {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--maroon);
  letter-spacing: 0.02em;
  margin-bottom: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1.2fr;
  gap: 40px;
  margin-bottom: 40px;
}

@media (max-width: 980px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.footer-col h5 {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--maroon);
  margin-bottom: 16px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: var(--deepNavy);
  font-size: 0.9375rem;
}

.footer-col a:hover { color: var(--teal); }

.footer-brand p {
  font-size: 0.9375rem;
  color: var(--warmGrey);
  max-width: 36ch;
  margin-top: 12px;
}

.footer-brand .gta-line {
  margin-top: 12px;
  color: var(--maroon);
  font-weight: 600;
}

.footer-bottom {
  border-top: 1px solid var(--coolGrey);
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.875rem;
  color: var(--warmGrey);
}

/* --------------------------------------------------------------------------
   Misc
   -------------------------------------------------------------------------- */
.dot-sep {
  color: var(--teal);
  margin: 0 8px;
  font-weight: 700;
}

.divider {
  height: 1px;
  background: var(--coolGrey);
  border: 0;
}

/* Focus accessibility */
a:focus-visible,
button:focus-visible,
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 6px;
}
