/* Premium Sailing: shared foundation for every page (tokens, type, buttons, header, nav, footer).
   Brand: PS_Brand Guidlines.pdf (navy, white, graphite; TT Norms Pro). */

@font-face { font-family: "TT Norms Pro"; src: url("fonts/TTNormsPro-Light.ttf") format("truetype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "TT Norms Pro"; src: url("fonts/TTNormsPro-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "TT Norms Pro"; src: url("fonts/TTNormsPro-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --navy: #09497d;          /* primary, from mockup vector data */
  --navy-2: #1d527d;        /* secondary / hover */
  --navy-deep: #06355c;     /* footer, deep panels */
  --graphite: #515352;      /* body text */
  --mist: #ededed;          /* light section background */
  --white: #ffffff;
  --hairline: rgba(9, 73, 125, 0.12);

  --font: "TT Norms Pro", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);   /* critically damped feel, no overshoot */
  --radius: 22px;
  --gutter: clamp(16px, 5vw, 64px);
  --max: 1200px;
  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
/* No rubber-band bounce at the page edges */
html, body { overscroll-behavior: none; }
/* Anchors: one rule for the whole site. Every #target lands with its top exactly at the bottom of the fixed header. */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

/* Page scrollbar: thin, mid-tone navy that reads on white and on the navy bands. Layout width unchanged. */
html { scrollbar-width: thin; scrollbar-color: rgba(140, 165, 190, 0.7) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(140, 165, 190, 0.7); border: 3px solid transparent; border-radius: 999px; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(110, 140, 170, 0.9); }
body {
  margin: 0;
  font: 400 1.0625rem/1.6 var(--font);
  color: var(--graphite);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }

/* Type: light, uppercase, wide tracking is the brand signature (guidelines p.1-6) */
.eyebrow { font-weight: 400; font-size: 0.75rem; letter-spacing: 0.32em; text-transform: uppercase; color: var(--navy); }
.display { font-weight: 300; font-size: clamp(2.5rem, 6vw, 5.25rem); line-height: 1.04; letter-spacing: -0.015em; color: var(--navy); margin: 0; }
.title { font-weight: 300; font-size: clamp(2rem, 4.2vw, 3.5rem); line-height: 1.08; letter-spacing: -0.01em; color: var(--navy); margin: 0; }
.lead { font-weight: 300; font-size: clamp(1.125rem, 1.6vw, 1.375rem); line-height: 1.5; margin: 0; }
.wide { text-transform: uppercase; letter-spacing: 0.18em; }

.container { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* Buttons: feedback on press, not release */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0 1.6em; border-radius: 999px; border: 1px solid transparent;
  font-size: 0.8125rem; font-weight: 400; letter-spacing: 0.16em; text-transform: uppercase;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: transform 100ms ease-out, background-color 300ms var(--ease), color 300ms var(--ease), border-color 300ms var(--ease);
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.btn--primary { background: var(--navy); color: var(--white); }
.btn--primary:hover { background: var(--navy-2); }
.btn--light { background: var(--white); color: var(--navy); }
.btn--light:hover { background: rgba(255, 255, 255, 0.86); }
.btn--ghost { border-color: currentColor; background: transparent; }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.12); }

.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; transform: translateY(-150%); }
.skip-link:focus-visible { transform: none; }

/* Logo: <svg><use href="#ps-mark"/></svg> from the inline sprite at the top of <body>, inherits currentColor */
.logo { display: inline-flex; align-items: center; gap: 12px; color: inherit; min-height: 44px; }
.logo__mark { width: 30px; height: 30px; }
.logo__word { height: 14px; width: auto; aspect-ratio: 2705 / 140; flex: none; } /* PREMIUM SAILING ACADEMY on one line; height = cap height */

/* ---------- Header ----------
   Transparent over a dark hero; a translucent material once scrolled (.is-scrolled) or with the menu open (.is-solid).
   Flicker fix: the material lives on ::before and only its opacity animates. Transitioning backdrop-filter itself
   made Safari rebuild the header layer mid-transition, which repainted (and flashed) the logo. */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; color: var(--white);
  transition: color 500ms var(--ease);
}
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  box-shadow: 0 1px 0 var(--hairline);
  opacity: 0; transition: opacity 500ms var(--ease);
}
.site-header.is-scrolled, .site-header.is-solid { color: var(--navy); }
.site-header.is-scrolled::before, .site-header.is-solid::before { opacity: 1; }
.site-header__inner { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.site-header a:focus-visible, .menu-btn:focus-visible { outline-color: currentColor; }

.nav { display: flex; align-items: center; gap: clamp(16px, 2.4vw, 36px); }
.nav__list { display: flex; gap: clamp(14px, 2vw, 30px); margin: 0; padding: 0; list-style: none; }
.nav__list a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase;
  opacity: 0.86; transition: opacity 300ms var(--ease);
}
.nav__list a:hover, .nav__list a[aria-current="page"] { opacity: 1; }
.nav__cta { min-height: 36px; padding: 0 1.1em; font-size: 0.6875rem; border-color: currentColor; position: relative; }
.nav__cta::before { content: ""; position: absolute; inset: -4px 0; } /* 44px tap target */
.nav__cta:hover { background: rgba(255, 255, 255, 0.14); }
.site-header.is-scrolled .nav__cta, .site-header.is-solid .nav__cta { background: var(--navy); border-color: var(--navy); color: var(--white); }
.site-header.is-scrolled .nav__cta:hover { background: var(--navy-2); }

.menu-btn {
  display: none; width: 44px; height: 44px; margin-right: -10px; padding: 0; border: 0; background: none;
  position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.menu-btn__bar {
  position: absolute; left: 12px; right: 12px; height: 1.5px; background: currentColor; border-radius: 2px;
  transition: transform 450ms var(--ease);
}
.menu-btn__bar:first-child { transform: translateY(-4px); }
.menu-btn__bar:last-child { transform: translateY(4px); }
.menu-btn[aria-expanded="true"] .menu-btn__bar:first-child { transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bar:last-child { transform: rotate(-45deg); }
.menu-btn:active { opacity: 0.6; }
.scrim { display: none; }
@keyframes scrim-in { from { opacity: 0; } }

@media (max-width: 899px) {
  .js .menu-btn { display: block; }
  .js .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 24px;
    padding: 12px var(--gutter) 32px;
    background: var(--white); color: var(--navy);
    box-shadow: 0 1px 0 var(--hairline);
    transform-origin: top right;
    opacity: 0; transform: translateY(-12px) scale(0.98); visibility: hidden;
    transition: opacity 350ms var(--ease), transform 450ms var(--ease), visibility 0s linear 450ms;
  }
  .js .nav.is-open { opacity: 1; transform: none; visibility: visible; transition: opacity 350ms var(--ease), transform 450ms var(--ease); }
  .js .nav__list { flex-direction: column; gap: 0; }
  .js .nav__list li + li { border-top: 1px solid var(--hairline); }
  .js .nav__list a { width: 100%; min-height: 56px; font-size: 0.875rem; font-weight: 300; letter-spacing: 0.24em; opacity: 1; }
  .js .nav__cta, .js .site-header .nav__cta { min-height: 48px; background: var(--navy); border-color: var(--navy); color: var(--white); font-size: 0.75rem; }
  .js .nav__cta::before { content: none; }
  /* the open sheet sits on a solid white header */
  .js .site-header.is-solid::before { background: var(--white); }
  /* scrim below the sheet: a real layer, so a tap on it only closes the menu */
  .js .site-header.is-solid .scrim {
    display: block; position: absolute; top: 100%; left: 0; right: 0; height: 100vh; z-index: -1;
    background: rgba(6, 53, 92, 0.28); animation: scrim-in 350ms var(--ease) both;
  }
  /* no JS: a plain, always visible nav that wraps under the logo */
  html:not(.js) .site-header { position: absolute; height: auto; padding: 8px 0 12px; }
  html:not(.js) .site-header__inner { flex-wrap: wrap; gap: 4px 24px; }
  html:not(.js) .nav { flex-wrap: wrap; gap: 0 20px; }
  html:not(.js) .nav__list { flex-wrap: wrap; gap: 0 16px; }
}
@media (max-width: 1100px) and (min-width: 900px) { .logo__word { height: 11px; } } /* room for the nav between 900 and 1100 */
@media (max-width: 420px) { .logo { gap: 10px; } .logo__mark { width: 26px; height: 26px; } .logo__word { height: 11px; } }
@media (max-width: 370px) { .logo__word { height: 10px; } }

/* ---------- Footer ---------- */
.footer { background: var(--navy-deep); color: rgba(255, 255, 255, 0.72); padding: clamp(56px, 9vh, 88px) 0 calc(32px + env(safe-area-inset-bottom)); }
.footer__inner { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr); gap: 48px clamp(32px, 5vw, 80px); align-items: start; }
.footer__logo { display: inline-block; color: var(--white); }
.footer__logo svg { width: 96px; height: auto; aspect-ratio: 1688 / 1046; }
.footer__mail { margin: 12px 0 0; font-weight: 300; font-size: 0.9375rem; }
.footer__mail a { display: inline-flex; align-items: center; min-height: 44px; color: var(--white); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.4); overflow-wrap: anywhere; }
.footer__about { margin: 28px 0 0; max-width: 30em; font-weight: 300; font-size: 0.9375rem; line-height: 1.7; }
.footer__label { margin: 0 0 8px; font-size: 0.6875rem; letter-spacing: 0.24em; text-transform: uppercase; color: rgba(255, 255, 255, 0.5); }
.footer__nav { margin: 0; padding: 0; list-style: none; }
.footer__nav a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 300; font-size: 0.9375rem; transition: color 300ms var(--ease); }
.footer__nav a:hover { color: var(--white); }
.footer__copy { grid-column: 1 / -1; margin: 0; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.75rem; letter-spacing: 0.08em; }
.footer :focus-visible { outline-color: var(--white); }
@media (max-width: 899px) {
  .footer__inner { grid-template-columns: 1fr 1fr; gap: 40px 24px; }
  .footer__brand { grid-column: 1 / -1; }
}

/* Scroll reveal: add .reveal, JS adds .is-in. Optional --d for stagger. */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 1000ms var(--ease) var(--d, 0ms), transform 1000ms var(--ease) var(--d, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }
html:not(.js) .reveal { opacity: 1; transform: none; } /* no JS: never hide content */

.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { transform: none; transition: opacity 300ms ease; }
  .nav, .nav.is-open { transform: none !important; }
  .scrim { animation: none !important; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .site-header::before { background: var(--white); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
