/* ==========================================================================
   layout.css - reset, base, grid, header, footer, responsive scaffolding
   Mobile-first. Breakpoints: 768px (tablet), 1024px (desktop).
   ========================================================================== */

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 500; line-height: 1.15; color: var(--ink); }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 768px) { .container { padding-inline: 2rem; } }

.section { padding-block: var(--space-xl); position: relative; }
@media (min-width: 1024px) { .section { padding-block: var(--space-2xl); } }

.section-head { text-align: center; max-width: 720px; margin-inline: auto; margin-bottom: var(--space-lg); }
.section-head.left { text-align: left; margin-inline: 0; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal-dark);
  margin-bottom: 0.75rem;
}
[data-bg="dark"] .eyebrow { color: #BFEDE6; }

h1 { font-size: clamp(2rem, 6vw, 3.25rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 4.2vw, 2.4rem); font-weight: 500; }
h3 { font-size: clamp(1.18rem, 2.4vw, 1.32rem); font-weight: 500; }
.lead { font-size: clamp(1rem, 2.2vw, 1.12rem); color: #3a5560; }
[data-bg="dark"] .lead { color: rgba(255,255,255,0.86); }

.accent { color: var(--teal-dark); font-weight: 700; }
[data-bg="dark"] .accent { color: #BFEDE6; }
.text-grad {
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem;
  padding: 0.95rem 1.85rem; border-radius: var(--radius-pill);
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
  white-space: nowrap; line-height: 1;
}
.btn-primary { background: var(--grad-cta); color: var(--cta-fg); box-shadow: var(--shadow-md); }
.btn-primary:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.btn-secondary {
  background: transparent; color: var(--white);
  border: 2px solid rgba(255,255,255,0.55);
}
.btn-secondary:hover { background: rgba(255,255,255,0.12); border-color: var(--white); }
[data-bg="light"] .btn-secondary, .btn-secondary.on-light {
  color: var(--teal-dark); border-color: rgba(33,106,116,0.45);
}
[data-bg="light"] .btn-secondary:hover, .btn-secondary.on-light:hover {
  background: var(--teal-tint); border-color: var(--teal-dark);
}

/* Bounce CTA */
@keyframes ctaBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-7px) scale(1.04); }
}
.btn-bounce { animation: ctaBounce 1.5s var(--ease) infinite; }
.btn-bounce:hover { animation-play-state: paused; }
@media (hover: none) { .btn-bounce { animation: none; } }
@media (prefers-reduced-motion: reduce) { .btn-bounce { animation: none; } }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 100;
  height: var(--header-h);
  display: flex; align-items: center;
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease), backdrop-filter var(--dur) var(--ease);
}
.site-header .container { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

/* Header is a translucent glass bar. Initial state (over the hero) = more see-through
   "real glass"; once scrolled it softens to a whiter, frostier glass. */
.site-header[data-mode="light"] {
  background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
}

/* Logo (horizontal lockup — only the colorway swaps with the bg) */
.logo { display: flex; align-items: center; height: 56px; position: relative; overflow: visible; }
.logo a { display: flex; align-items: center; height: 100%; }
.logo-full { height: 52px; transition: opacity var(--dur) var(--ease); }
.logo img { height: 100%; width: auto; }
/* Over the hero the logo is white; once scrolled out it switches to the teal lockup. */
.logo .logo-blue { display: none; }
.logo .logo-white { display: block; }
.site-header.scrolled .logo .logo-white { display: none; }
.site-header.scrolled .logo .logo-blue { display: block; }

/* scrolled: soften to a whiter, frosted glass with subtle elevation */
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px) saturate(1.1); -webkit-backdrop-filter: blur(12px) saturate(1.1);
  box-shadow: 0 6px 24px rgba(21, 48, 58, 0.12);
}

/* Nav: a centered pill ("button" border) floating in the header */
.main-nav { display: none; }
@media (min-width: 1024px) {
  .main-nav {
    display: flex; align-items: center; gap: 1.4rem; width: max-content; white-space: nowrap;
    position: absolute; left: 57%; top: 50%; transform: translate(-50%, -50%);
    padding: 0.4rem 0.5rem 0.4rem 1.4rem; border-radius: var(--radius-pill);
    border: 1px solid rgba(21, 48, 58, 0.16);
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 2px 12px rgba(21, 48, 58, 0.08);
  }
}
.main-nav a.nav-link {
  font-family: var(--font-display); font-weight: 600; font-size: 0.98rem;
  position: relative; padding-block: 0.3rem; transition: color var(--dur) var(--ease);
}
.site-header[data-mode="dark"] .nav-link { color: rgba(255,255,255,0.92); }
.site-header[data-mode="light"] .nav-link { color: var(--ink); }
.nav-link::after {
  content: ""; position: absolute; inset-inline-start: 0; bottom: -2px;
  width: 0; height: 2px; background: var(--grad-brand); transition: width var(--dur) var(--ease);
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
@media (hover: none) { .nav-link:hover::after { width: 0; } }

.nav-cta { padding: 0.65rem 1.3rem; font-size: 0.95rem; }

/* Hamburger */
.nav-toggle {
  display: inline-flex; flex-direction: column; gap: 5px; width: 44px; height: 44px;
  align-items: center; justify-content: center;
}
@media (min-width: 1024px) { .nav-toggle { display: none; } }
.nav-toggle span { width: 26px; height: 2.5px; border-radius: 2px; background: currentColor; transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease); }
/* Hamburger: white over the hero, ink once scrolled (matches the logo swap) */
.nav-toggle { color: var(--white); }
.site-header.scrolled .nav-toggle { color: var(--ink); }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  position: fixed; inset-block-start: var(--header-h); inset-inline: 0; z-index: 99;
  background: var(--white); box-shadow: var(--shadow-lg);
  transform: translateY(-120%); transition: transform var(--dur) var(--ease);
  padding: 1.25rem; display: flex; flex-direction: column; gap: 0.4rem;
}
.mobile-menu.open { transform: translateY(0); }
@media (min-width: 1024px) { .mobile-menu { display: none; } }
.mobile-menu a {
  font-family: var(--font-display); font-weight: 600; font-size: 1.1rem;
  padding: 0.9rem 0.6rem; border-radius: var(--radius-sm); color: var(--ink);
}
.mobile-menu a:hover { background: var(--teal-tint); }
.mobile-menu .btn { margin-top: 0.5rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.82); padding-block: var(--space-xl) var(--space-md); }
.footer-grid { display: grid; gap: 2.25rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1.1fr; } }
.footer-brand img { height: 44px; width: auto; margin-bottom: 1rem; }
.footer-slogan { font-family: var(--font-display); font-weight: 600; color: #BFEDE6; margin-bottom: 1rem; }
.footer-col h4 { color: var(--white); font-size: 1.02rem; margin-bottom: 1rem; }
.footer-col ul { display: flex; flex-direction: column; gap: 0.6rem; }
.footer-col a, .footer-col li { font-size: 0.96rem; color: rgba(255,255,255,0.78); transition: color var(--dur) var(--ease); }
.footer-col a:hover { color: #BFEDE6; }
.footer-contact a { display: block; }
.footer-social { display: flex; gap: 0.75rem; margin-top: 0.5rem; flex-wrap: wrap; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px;
  border-radius: var(--radius-pill); background: rgba(255,255,255,0.08); color: var(--white);
  transition: background var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.footer-social a:hover { background: var(--grad-brand); transform: translateY(-2px); }
.footer-social svg { width: 19px; height: 19px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12); margin-top: 2.5rem; padding-top: 1.5rem;
  display: flex; flex-direction: column; gap: 0.5rem; align-items: center; text-align: center;
  font-size: 0.88rem; color: rgba(255,255,255,0.62);
}
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; text-align: left; }
}
.footer-legal { display: flex; gap: 1.25rem; }
.footer-credit { text-align: center; font-size: 0.84rem; color: rgba(255,255,255,0.5); margin-top: 1rem; }
.footer-credit a { color: #BFEDE6; font-weight: 600; }
.footer-credit a:hover { text-decoration: underline; }

/* ---------- Skip link + utilities ---------- */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 200;
  background: var(--white); color: var(--teal-dark); padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius-sm) 0; font-weight: 700;
}
.skip-link:focus { left: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--c-teal); outline-offset: 3px; border-radius: 4px; }
body.menu-open { overflow: hidden; }
