/* ==========================================================================
   NYE at the Beach — common.css
   Shared across all pages: reset, design tokens, typography, layout,
   buttons, image wave dividers, header and footer.
   ========================================================================== */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Colors */
  --navy-950: #061428;
  --navy-900: #0b1d3a;
  --navy-800: #102a52;
  --navy-footer: #041e37;    /* matches wave-footer.jpg */
  --ocean-hero: #01467f;     /* matches hero-bg.jpg / wave-hero.jpg */
  --ocean-700: #0e3f80;
  --ocean-600: #155096;
  --sky-300: #7fb8e0;
  --sky-100: #d9ecf8;
  --cream: #faf4e8;          /* matches the wave artwork */
  --cream-200: #ece4d6;
  --sand: #e9d3a3;
  --gold-300: #ffe38a;
  --gold-400: #f8cc5a;
  --gold-500: #f2b434;
  --gold-600: #d9931c;
  --white: #ffffff;
  --text: #1a2233;
  --text-muted: #4a5568;

  --gradient-gold: linear-gradient(180deg, var(--gold-300) 0%, var(--gold-400) 45%, var(--gold-500) 100%);

  /* Typography */
  --font-display: "Poppins", "Segoe UI", Arial, sans-serif;
  --font-body: "Jost", "Futura", "Segoe UI", Arial, sans-serif;
  --font-script: "Yellowtail", "Brush Script MT", cursive;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem);
  --fs-lg: clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem);
  --fs-xl: clamp(1.75rem, 1.2rem + 2.2vw, 3rem);
  --fs-2xl: clamp(2.1rem, 1.3rem + 3.4vw, 4.25rem);

  /* Layout */
  --container: 1780px;
  --container-narrow: 1200px;
  --gutter: clamp(1rem, 0.4rem + 3vw, 4.5rem);
  --section-y: clamp(3.5rem, 2rem + 6vw, 7.5rem);
  --header-h: 104px;
  --header-h-scrolled: 76px;

  /* Misc */
  --radius-sm: 6px;
  --radius: 14px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 8px rgba(6, 20, 40, 0.12);
  --shadow: 0 14px 40px rgba(6, 20, 40, 0.28);
  --shadow-gold: 0 8px 24px rgba(242, 180, 52, 0.45);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --t-fast: 0.2s var(--ease);
  --t: 0.35s var(--ease);
}

/* ---------- 2. Modern reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text);
  background-color: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, picture, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { line-height: 1.1; overflow-wrap: break-word; }
p { overflow-wrap: break-word; }

:focus-visible {
  outline: 3px solid var(--gold-400);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- 3. Typography ---------- */
.display,
h1, h2 {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
}

.section-title {
  font-size: var(--fs-2xl);
  color: var(--navy-900);
  line-height: 1;
}

.section-subtitle {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: 700;
  text-transform: uppercase;
  color: var(--navy-900);
  margin-top: 0.15em;
}

.eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-400);
}

.text-gold { color: var(--gold-400); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 4. Layout helpers ---------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.container--narrow { max-width: calc(var(--container-narrow) + var(--gutter) * 2); }

.section { position: relative; padding-block: var(--section-y); }

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--gold-400);
  color: var(--navy-900);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: top var(--t-fast);
}
.skip-link:focus { top: 1rem; }

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.85em 2.1em;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 0.85rem + 0.4vw, 1.2rem);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  border-radius: var(--radius-pill);
  transition: transform var(--t-fast), box-shadow var(--t-fast), filter var(--t-fast), background-position var(--t);
  white-space: nowrap;
}

.btn--gold {
  color: var(--navy-900);
  background: var(--gradient-gold);
  background-size: 100% 200%;
  box-shadow: var(--shadow-gold), inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -2px 0 rgba(160, 100, 10, 0.25);
}
.btn--gold:hover {
  transform: translateY(-3px);
  filter: brightness(1.06) saturate(1.05);
  box-shadow: 0 14px 32px rgba(242, 180, 52, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.7);
}
.btn--gold:active { transform: translateY(0); box-shadow: var(--shadow-gold); }

.btn--lg { font-size: clamp(1.05rem, 0.9rem + 0.6vw, 1.5rem); padding: 0.8em 2.4em; }

/* ---------- 6. Wave dividers (reusable, image based) ----------
   Usage: <div class="wave wave--footer" aria-hidden="true"></div>
   Artwork is 1920×231, stretched to full width. Section-specific
   modifiers (hero, lineup) live in the page CSS. */
.wave {
  position: absolute;
  left: 0;
  width: 100%;
  aspect-ratio: 1920 / 231;
  min-height: 48px;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  pointer-events: none;
  z-index: 2;
}

/* Cream (FAQ) flowing into the navy footer */
.wave--footer {
  top: -1px;
  background-image: url("../images/wave-footer.jpg");
}

/* ---------- 7. Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  transition: height var(--t), background-color var(--t), box-shadow var(--t), backdrop-filter var(--t);
}

.site-header.is-scrolled {
  height: var(--header-h-scrolled);
  background-color: rgba(11, 29, 58, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
}

.site-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1.5rem, 0.5rem + 3vw, 4rem);
}

.site-header__brand {
  position: relative;
  z-index: 110;
  flex: none;
  display: block;
  line-height: 0;
  transition: opacity var(--t-fast), transform var(--t-fast);
}
.site-header__brand:hover { opacity: 0.9; transform: scale(1.03); }

.site-header__logo {
  width: clamp(120px, 6rem + 4vw, 172px);
  height: auto;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
  transition: width var(--t);
}
.site-header.is-scrolled .site-header__logo { width: 120px; }

.primary-nav__list {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 0.5rem + 1.6vw, 2.2rem);
}

.primary-nav__link {
  position: relative;
  display: inline-block;
  padding-block: 0.5rem;
  font-family: var(--font-body);
  font-size: clamp(0.85rem, 0.55rem + 0.5vw, 1.2rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--white);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  transition: color var(--t-fast);
}

.primary-nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.2rem;
  height: 2px;
  background: var(--gold-400);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--t-fast);
}

.primary-nav__link:hover,
.primary-nav__link[aria-current="page"] { color: var(--gold-300); }
.primary-nav__link:hover::after,
.primary-nav__link[aria-current="page"]::after { transform: scaleX(1); }

.primary-nav__cta { display: none; }

/* Hamburger */
.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  z-index: 110;
}
.nav-toggle__bar,
.nav-toggle__bar::before,
.nav-toggle__bar::after {
  position: absolute;
  left: 50%;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--t-fast), opacity var(--t-fast), top var(--t-fast);
}
.nav-toggle__bar { top: 50%; transform: translate(-50%, -50%); }
.nav-toggle__bar::before,
.nav-toggle__bar::after { content: ""; transform: translateX(-50%); }
.nav-toggle__bar::before { top: -7px; }
.nav-toggle__bar::after { top: 7px; }

.nav-open .nav-toggle__bar { background: transparent; }
.nav-open .nav-toggle__bar::before { top: 0; transform: translateX(-50%) rotate(45deg); }
.nav-open .nav-toggle__bar::after { top: 0; transform: translateX(-50%) rotate(-45deg); }


/* ---------- 8. Footer ---------- */
.site-footer {
  position: relative;
  background: var(--navy-footer);
  color: var(--white);
  padding-top: calc(12.03vw + clamp(1.5rem, 1rem + 2vw, 3rem));
  padding-bottom: 2rem;
}


.footer-top {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: end;
  gap: 2rem clamp(2rem, 1rem + 4vw, 6rem);
  padding-bottom: clamp(2rem, 1rem + 2vw, 3rem);
}

.footer-contact {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

.footer-contact__icon {
  flex: none;
  width: 34px;
  height: 26px;
  color: var(--gold-500);
  margin-top: 0.15rem;
}

.footer-contact__label {
  font-family: var(--font-display);
  font-size: var(--fs-md);
  font-weight: 600;
  text-transform: uppercase;
  line-height: 1.2;
}

.footer-contact__link {
  font-size: var(--fs-md);
  color: rgba(255, 255, 255, 0.9);
  transition: color var(--t-fast);
}
.footer-contact__link:hover { color: var(--gold-300); }

.newsletter { justify-self: end; width: 100%; max-width: 640px; }

.newsletter__label {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.6rem;
}

.newsletter__field {
  position: relative;
  display: flex;
  align-items: center;
  border: 1.5px solid var(--gold-500);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.02);
  transition: box-shadow var(--t-fast), border-color var(--t-fast);
}
.newsletter__field:focus-within {
  border-color: var(--gold-300);
  box-shadow: 0 0 0 4px rgba(248, 204, 90, 0.18);
}

.newsletter__input {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 0.95rem 1.25rem;
  background: transparent;
  border: 0;
  color: var(--white);
  font-size: var(--fs-base);
}
.newsletter__input::placeholder { color: rgba(255, 255, 255, 0.6); }
.newsletter__input:focus { outline: none; }

.newsletter__btn {
  margin: -1.5px -1.5px -1.5px 0;
  align-self: stretch;
  padding-inline: clamp(1.5rem, 1rem + 2vw, 3rem);
  font-size: var(--fs-base);
}
.newsletter__btn:hover { transform: none; }

.newsletter__msg {
  min-height: 1.4em;
  margin-top: 0.5rem;
  font-size: var(--fs-sm);
  color: var(--gold-300);
}

.footer-bottom {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem 2rem;
}

.footer-logo { display: block; line-height: 0; transition: opacity var(--t-fast), transform var(--t-fast); }
.footer-logo img { width: clamp(130px, 7rem + 4vw, 190px); height: auto; }
.footer-logo:hover { opacity: 0.9; transform: scale(1.03); }

.footer-nav__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem clamp(1rem, 0.4rem + 1.6vw, 2.75rem);
}

.footer-nav__link {
  font-family: var(--font-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-transform: uppercase;
  transition: color var(--t-fast);
}
.footer-nav__link:hover { color: var(--gold-300); }

.social-list { display: flex; gap: 0.75rem; }

.social-list__link {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1.5px solid var(--gold-500);
  border-radius: 50%;
  color: var(--white);
  transition: background-color var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.social-list__link svg { width: 20px; height: 20px; }
.social-list__link:hover {
  background: var(--gold-500);
  color: var(--navy-900);
  transform: translateY(-3px);
}

.footer-copy {
  margin-top: 1.25rem;
  text-align: center;
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.85);
}

/* ---------- 9. Responsive: header & footer ---------- */
@media (max-width: 1100px) {
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .newsletter { grid-column: 1 / -1; justify-self: stretch; max-width: none; }

  .footer-bottom { grid-template-columns: auto auto; }
  .footer-nav { grid-column: 1 / -1; grid-row: 2; }
  .social-list { justify-self: end; }
}

@media (max-width: 1024px) {
  :root { --header-h: 72px; --header-h-scrolled: 64px; }

  .site-header { background-color: rgba(11, 29, 58, 0.55); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
/*  .site-header__inner { justify-content: space-between; }*/
  .site-header__logo, .site-header.is-scrolled .site-header__logo { width: 112px; }
  .nav-toggle { display: block;    position: absolute;
    right: 20px; }

  .primary-nav {
    position: fixed;
    inset: 0;
    z-index: 105;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: calc(var(--header-h) + 1rem) var(--gutter) 2rem;
    background: radial-gradient(ellipse at top, var(--ocean-700), var(--navy-900) 70%);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition: opacity var(--t), transform var(--t), visibility 0s linear 0.35s;
    height: 100vh;
  }
  .nav-open .primary-nav {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity var(--t), transform var(--t), visibility 0s;
  }
  .primary-nav__list { flex-direction: column; gap: 0.5rem; }
  .primary-nav__link { font-size: 1.35rem; font-family: var(--font-display); font-weight: 600; }
  .primary-nav__cta { display: inline-flex; }

  body.nav-open { overflow: hidden; }
}

@media (max-width: 640px) {
  .footer-top { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .footer-bottom { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer-nav { grid-row: auto; }
  .social-list { justify-self: center; }
  .newsletter__input { padding: 0.85rem 1rem; }
  .newsletter__btn { padding-inline: 1.25rem; }
}
