/* ============================================================================
   SMCA — custom styles layered on top of Tailwind (Play CDN)
   Kept small on purpose: Tailwind utilities do most of the work.
============================================================================ */

:root {
  --pine: #16243F;
  --pine-2: #24395E;
  --clay: #9A7B1E;
  --honey: #E6B43C;
  --cream: #F5F1E8;
  --ink: #1B2433;
}

html { scroll-behavior: smooth; }
body {
  -webkit-font-smoothing: antialiased;
  /* Turn OFF ligatures/contextual alternates so f, ff, fi, fl render as plain letters
     (optimizeLegibility was forcing the quirky joined-f glyphs). */
  font-variant-ligatures: none;
  font-feature-settings: "liga" 0, "dlig" 0, "calt" 0;
}

/* --- Display type: let Fraunces show real weight + optical contrast ------- */
.font-display {
  font-optical-sizing: auto;
  letter-spacing: -0.015em;
}

/* --- Honey "highlight underline" used on key words (not a thin stripe) ---- */
.u-highlight {
  background-image: linear-gradient(transparent 62%, rgba(230,180,60,0.45) 62%);
  background-repeat: no-repeat;
  padding: 0 0.05em;
}

/* --- Links inside body copy --------------------------------------------- */
.link-clay {
  color: var(--clay);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  transition: color 0.15s ease;
}
.link-clay:hover { color: #7D6418; }

/* --- Visible focus states (a11y) ---------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--honey);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Mountain motif: quiet, layered, never loud -------------------------- */
.mountain-motif {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  width: 100%;
  pointer-events: none;
  user-select: none;
  line-height: 0;
}

/* --- Scroll reveal (Framer-Motion-lite via IntersectionObserver) ---------
   IMPORTANT: content is hidden ONLY when JS is active (html.js). If JS is
   disabled, slow, or fails, everything stays fully visible — the page can
   never render blank. The reveal is a progressive enhancement, not a gate. */
html.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
html.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
/* Stagger helpers */
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }

/* Respect reduced-motion: no transforms, instant reveal */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

/* --- Mobile nav panel --------------------------------------------------- */
.mobile-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.mobile-panel.open {
  max-height: calc(100vh - 72px);
  max-height: calc(100dvh - 72px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* --- Cards: soft lift on hover ------------------------------------------ */
.card-lift { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card-lift:hover { transform: translateY(-4px); }

/* --- Sticky header subtle shadow once scrolled -------------------------- */
.site-header { transition: box-shadow 0.2s ease, background-color 0.2s ease; }
.site-header.scrolled { box-shadow: 0 8px 24px -16px rgba(22,36,63,0.35); }

/* --- Logo: render the navy crest as solid white on dark backgrounds ------- */
.logo-white { filter: brightness(0) invert(1); }

/* --- Image placeholders: show the fallback label only when the photo 404s --- */
.img-fallback {
  background-image: repeating-linear-gradient(
    45deg, rgba(0,0,0,0.03), rgba(0,0,0,0.03) 12px,
    rgba(0,0,0,0.06) 12px, rgba(0,0,0,0.06) 24px
  );
}
.img-fallback .img-fallback-label { display: block !important; }

/* --- Form: honeypot must be invisible to humans, visible to bots --------- */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* --- NAVS intro splash: spins the ship's wheel once per session on load --- */
.navs-intro-lock { overflow: hidden; }
.navs-intro {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.4rem; background: #16243F;
  opacity: 1; transition: opacity .6s ease;
}
.navs-intro.is-leaving { opacity: 0; pointer-events: none; }
.navs-intro-wheel {
  width: clamp(104px, 18vw, 156px); height: clamp(104px, 18vw, 156px);
  animation: navsIntroPop .6s cubic-bezier(.2,.8,.2,1) both;
  filter: drop-shadow(0 6px 24px rgba(0,0,0,.35));
}
.navs-intro-rot {
  transform-box: fill-box; transform-origin: center;
  animation: navsIntroSpin 1.75s cubic-bezier(.22,.68,.16,1) both;
}
.navs-intro-name {
  font-family: 'Fraunces', Georgia, serif;
  color: #E6B43C; font-weight: 600; letter-spacing: .03em;
  font-size: clamp(.82rem, 2.6vw, 1.08rem); text-align: center;
  padding: 0 1.5rem; opacity: 0;
  animation: navsIntroFade .7s ease .55s both;
}
@keyframes navsIntroSpin { from { transform: rotate(0deg); } to { transform: rotate(720deg); } }
@keyframes navsIntroPop  { from { transform: scale(.6);  opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes navsIntroFade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

@media (prefers-reduced-motion: reduce) {
  .navs-intro-rot, .navs-intro-wheel, .navs-intro-name { animation: none; }
}

/* --- Language switcher + Google Translate cleanup ----------------------- */
#google_translate_element {
  position: absolute !important;
  left: -9999px !important;
  top: 0;
  width: 1px; height: 1px; overflow: hidden;
}
.goog-te-banner-frame, .goog-te-banner-frame.skiptranslate { display: none !important; }
body { top: 0 !important; position: static !important; }
.goog-te-gadget { height: 0; overflow: hidden; font-size: 0 !important; }
.goog-tooltip, #goog-gt-tt, .goog-te-balloon-frame { display: none !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
[data-lang-menu] { min-width: 11rem; }

/* --- Pop-up sheets (info + form previews) & Welcome card ----------------- */
.sheet-lock { overflow: hidden; }
.sheet-overlay {
  position: fixed; inset: 0; z-index: 9998;
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet-overlay[hidden] { display: none; }
@media (min-width: 640px) {
  .sheet-overlay { align-items: center; padding: 1.5rem; }
}
.sheet-backdrop {
  position: absolute; inset: 0;
  background: rgba(11,18,32,0.55); backdrop-filter: blur(2px);
  opacity: 0; transition: opacity 0.25s ease;
}
.sheet-overlay.is-open .sheet-backdrop { opacity: 1; }
.sheet-panel {
  position: relative; background: var(--cream);
  width: 100%; max-width: 640px;
  max-height: 90vh; max-height: 90dvh; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 1.25rem 1.25rem 0 0;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
  transform: translateY(28px); opacity: 0;
  transition: transform 0.3s cubic-bezier(.22,1,.36,1), opacity 0.3s ease;
}
@media (min-width: 640px) {
  .sheet-panel { border-radius: 1.25rem; box-shadow: 0 30px 60px -20px rgba(0,0,0,0.45); }
}
.sheet-overlay.is-open .sheet-panel { transform: none; opacity: 1; }
.sheet-x {
  position: absolute; top: 0.8rem; right: 0.8rem; z-index: 3;
  width: 2.25rem; height: 2.25rem; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9999px; background: rgba(22,36,63,0.07); color: var(--pine);
  font-size: 1.5rem; line-height: 1; transition: background 0.15s ease;
}
.sheet-x:hover { background: rgba(22,36,63,0.15); }
.sheet-body { padding: 1.9rem 1.4rem 2rem; }
@media (min-width: 640px) { .sheet-body { padding: 2.4rem 2.4rem 2.4rem; } }
.sheet-preview {
  width: 100%; border-radius: 0.6rem; border: 1px solid rgba(22,36,63,0.12);
  box-shadow: 0 8px 24px -16px rgba(22,36,63,0.5); display: block;
}

/* Welcome card — narrower, centered */
.welcome-card {
  position: relative; background: var(--cream);
  width: 100%; max-width: 460px;
  max-height: 92vh; max-height: 92dvh; overflow-y: auto;
  border-radius: 1.25rem 1.25rem 0 0; text-align: center;
  box-shadow: 0 -10px 40px rgba(0,0,0,0.3);
  transform: translateY(28px); opacity: 0;
  transition: transform 0.3s cubic-bezier(.22,1,.36,1), opacity 0.3s ease;
  padding: 2.4rem 1.6rem 2rem;
}
@media (min-width: 640px) {
  .welcome-card { border-radius: 1.25rem; box-shadow: 0 30px 60px -20px rgba(0,0,0,0.45); padding: 2.8rem 2.4rem 2.2rem; }
}
.sheet-overlay.is-open .welcome-card { transform: none; opacity: 1; }

/* "New here?" header re-open link (injected by JS) */
.help-link {
  display: none; align-items: center; gap: 0.3rem;
  font-size: 0.9rem; font-weight: 500; color: rgba(22,36,63,0.62);
  background: none; border: 0; cursor: pointer; transition: color 0.15s ease;
}
.help-link:hover { color: var(--clay); }
@media (min-width: 640px) { .help-link { display: inline-flex; } }

/* --- "Back" link bar on interior pages (injected by JS) ------------------ */
.back-bar { background: var(--cream); border-bottom: 1px solid rgba(22,36,63,0.08); }
.back-link {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.6rem 0; font-size: 0.92rem; font-weight: 500;
  color: var(--pine); background: none; border: 0; cursor: pointer;
  transition: color 0.15s ease;
}
.back-link:hover { color: var(--clay); }
.back-link svg { transition: transform 0.15s ease; }
.back-link:hover svg { transform: translateX(-3px); }

/* --- "Now enrolling" banner (injected by JS; auto-hides after Sep 1) ------ */
.enroll-bar { background: var(--honey); color: var(--pine); }
.enroll-inner {
  position: relative; max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: center;
  flex-wrap: wrap; gap: 0.2rem 0.7rem;
  padding: 0.5rem 2.6rem; text-align: center;
  font-size: 0.9rem; font-weight: 500;
}
.enroll-inner a {
  font-weight: 700; text-decoration: underline;
  text-underline-offset: 2px; white-space: nowrap;
}
.enroll-inner a:hover { color: #7D6418; }
.enroll-bar button[data-enroll-close] {
  position: absolute; right: 0.4rem; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--pine); cursor: pointer;
  font-size: 1.35rem; line-height: 1; padding: 0.1rem 0.5rem; opacity: 0.7;
}
.enroll-bar button[data-enroll-close]:hover { opacity: 1; }
