/* ============================================
   Mitch Brown Photo Freedive: Modern Self-Hosted Site
   Design: cinematic ocean / editorial photography
   ============================================ */

/* ----- Reset & base ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.65;
  color: #1a2332;
  background: #fafaf7;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color .25s ease, opacity .25s ease; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ----- Typography ----- */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: #0a1929;
}
h1 { font-size: clamp(2.5rem, 6vw, 5rem); font-weight: 400; }
h2 { font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 400; }
h3 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
h4 { font-size: 1.35rem; }

.eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #2a8b9c;
  margin-bottom: 1rem;
  display: inline-block;
}

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ----- Layout helpers ----- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container--narrow { max-width: 820px; }
.container--wide { max-width: 1400px; }
.section { padding: 5rem 0; }
.section--lg { padding: 7rem 0; }
.section--dark { background: #0a1929; color: #e6eef5; }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: #f7f5ee; }
.section--dark .eyebrow { color: #5dd6e6; }
.section--cream { background: #f5f1e8; }

.grid { display: grid; gap: 2rem; }
.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: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 3.5rem 0; }
  .section--lg { padding: 4.5rem 0; }
}

/* ----- Header / Nav ----- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1rem 0;
  transition: background .35s ease, padding .35s ease, box-shadow .35s ease;
  background: rgba(10, 25, 41, 0);
}
.site-header.scrolled {
  background: rgba(10, 25, 41, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.6rem 0;
  box-shadow: 0 2px 30px rgba(0,0,0,0.15);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1400px; margin: 0 auto; padding: 0 1.5rem;
}
.site-header__brand { display: flex; align-items: center; gap: 0.85rem; }
.site-header__brand img { height: 48px; width: auto; }
.site-header__brand-text {
  color: #fff;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  line-height: 1.1;
  font-weight: 500;
  letter-spacing: 0.01em;
}
.site-header__brand-text small {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
  font-weight: 400;
  margin-top: 2px;
}

.nav { display: flex; align-items: center; gap: 2rem; }
.nav a {
  color: #f7f5ee;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  position: relative;
  padding: 0.4rem 0;
}
.nav a::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0;
  height: 1px; background: #5dd6e6;
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s ease;
}
.nav a.active::after { transform: scaleX(1); }
@media (hover: hover) {
  .nav a:hover::after { transform: scaleX(1); }
}

.nav-toggle {
  display: none;
  color: #fff;
  font-size: 1.5rem;
  padding: 0.5rem;
  position: relative;
  z-index: 250; /* must sit above mobile .nav (z-index: 200) so it stays tappable when menu is open */
}

@media (max-width: 850px) {
  .nav-toggle { display: block; }
  .nav {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 100%; max-width: 360px;
    background: #0a1929;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 6rem 2.5rem 2.5rem;
    transform: translateX(100%);
    transition: transform .35s ease;
    box-shadow: -10px 0 50px rgba(0,0,0,0.3);
    /* Lift mobile nav out of parent header's stacking/backdrop context */
    z-index: 200;
    isolation: isolate;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .nav.open { transform: translateX(0); background: #0a1929; }
  .nav a { font-size: 1.1rem; padding: 0.8rem 0; width: 100%; border-bottom: 1px solid rgba(255,255,255,0.08); }

  /* When mobile menu is open, force header fully opaque so the
     scrolled-state translucency doesn't bleed page content through it. */
  .site-header:has(.nav.open) {
    background: #0a1929 !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

/* ----- Buttons ----- */
.btn {
  display: inline-block;
  padding: 0.95rem 2rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-radius: 2px;
  transition: all .3s ease;
  cursor: pointer;
  border: 1px solid transparent;
  text-align: center;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(42,139,156,0.18);
}

/* Suppress iOS first-tap-as-hover behavior on all interactive surfaces */
.nav a, .card, .photo-grid__item, .nav-toggle {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(0,0,0,0.05);
}
.btn--primary {
  background: #2a8b9c;
  color: #fff;
}
.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.6);
}
.btn--dark {
  background: #0a1929;
  color: #fff;
}
@media (hover: hover) {
  .btn--primary:hover { background: #1f6f7d; transform: translateY(-2px); box-shadow: 0 10px 30px rgba(42, 139, 156, 0.3); }
  .btn--ghost:hover { background: #fff; color: #0a1929; }
  .btn--dark:hover { background: #1a2c44; transform: translateY(-2px); }
}

/* ----- Hero ----- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(135deg, #0a1929 0%, #1e3a5f 50%, #0a4d63 100%);
}
.hero__bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 1;
}
.hero__bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,25,41,0.4) 0%, rgba(10,25,41,0.55) 60%, rgba(10,25,41,0.85) 100%);
}
.hero__content {
  position: relative; z-index: 2;
  padding: 0 1.5rem;
  max-width: 900px;
}
.hero__title {
  color: #fff;
  font-size: clamp(2.5rem, 7vw, 6rem);
  font-weight: 300;
  line-height: 1.05;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.hero__subtitle {
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.85rem, 1.4vw, 1.05rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 2.5rem;
  font-weight: 400;
}
.hero__cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.hero--page {
  min-height: 55vh;
  padding-top: 80px;
}
.hero--page .hero__title { font-size: clamp(2.2rem, 5.5vw, 4.5rem); }

/* Scroll cue */
.scroll-cue {
  position: absolute; left: 50%; bottom: 2.5rem; transform: translateX(-50%);
  z-index: 2; color: #fff;
  font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase;
  opacity: 0.7;
}
.scroll-cue::after {
  content: ''; display: block;
  width: 1px; height: 36px;
  background: #fff; margin: 0.6rem auto 0;
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; transform-origin: top; }
  50%      { transform: scaleY(1);   opacity: 1; }
}

/* ----- Cards (course tiles, etc) ----- */
.card {
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 20px rgba(10,25,41,0.06);
  transition: transform .35s ease, box-shadow .35s ease;
  display: flex; flex-direction: column;
}
@media (hover: hover) {
  .card:hover { transform: translateY(-6px); box-shadow: 0 20px 50px rgba(10,25,41,0.12); }
}
.card__image {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, #1e3a5f, #0a4d63);
  background-size: cover; background-position: center;
  position: relative;
}
.card__image::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(10,25,41,0.4));
}
.card__body { padding: 1.75rem; flex: 1; display: flex; flex-direction: column; }
.card__tag {
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: #2a8b9c; font-weight: 600;
  margin-bottom: 0.6rem;
}
.card__title { margin-bottom: 0.5rem; font-size: 1.6rem; }
.card__excerpt { color: #4a5867; font-size: 0.95rem; flex: 1; }
.card__meta { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid #ebe7dc; display: flex; align-items: center; justify-content: space-between; }
.card__meta-text { font-size: 0.85rem; color: #6a7888; }
.card__cta {
  font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: #2a8b9c; font-weight: 600;
}
.card__cta::after { content: ' →'; transition: transform .25s ease; display: inline-block; }
@media (hover: hover) {
  .card:hover .card__cta::after { transform: translateX(4px); }
}

/* ----- Course detail page ----- */
.course-detail { padding: 5rem 0; }
.course-detail__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 4rem;
  align-items: start;
}
@media (max-width: 900px) {
  .course-detail__grid { grid-template-columns: 1fr; gap: 2.5rem; }
}
.course-detail__sidebar {
  position: sticky; top: 100px;
  background: #f5f1e8;
  padding: 2rem;
  border-radius: 4px;
}
@media (max-width: 900px) { .course-detail__sidebar { position: static; } }

.course-detail h2 { margin: 2.5rem 0 1rem; }
.course-detail h2:first-child { margin-top: 0; }
.course-detail h3 { margin: 2rem 0 0.75rem; font-size: 1.5rem; }

.course-detail ul {
  list-style: none;
  padding: 0;
}
.course-detail ul li {
  padding: 0.5rem 0 0.5rem 1.75rem;
  position: relative;
  border-bottom: 1px solid #ebe7dc;
}
.course-detail ul li:last-child { border-bottom: none; }
.course-detail ul li::before {
  content: '';
  position: absolute; left: 0; top: 1rem;
  width: 8px; height: 8px;
  border: 1.5px solid #2a8b9c;
  border-radius: 50%;
}

/* Sidebar fact list */
.fact-list { list-style: none; padding: 0; }
.fact-list li {
  display: flex; justify-content: space-between;
  padding: 0.85rem 0;
  border-bottom: 1px solid #ddd6c5;
  font-size: 0.95rem;
}
.fact-list li:last-child { border-bottom: none; }
.fact-list .label { color: #6a7888; letter-spacing: 0.04em; }
.fact-list .value { font-weight: 600; color: #0a1929; }

/* ----- FareHarbor wrapper ----- */
.fh-wrapper {
  background: #fff;
  padding: 1.5rem;
  border-radius: 4px;
  box-shadow: 0 2px 14px rgba(10,25,41,0.06);
  margin: 2rem 0;
  min-height: 120px;
}
.fh-wrapper__heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: #0a1929;
}

/* ----- Photo grid (gallery) ----- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}
.photo-grid__item {
  position: relative;
  aspect-ratio: 1;
  background: linear-gradient(135deg, #1e3a5f, #0a4d63);
  background-size: cover; background-position: center;
  overflow: hidden;
  cursor: pointer;
  transition: transform .4s ease;
}
.photo-grid__item:nth-child(7n+1) { grid-row: span 2; aspect-ratio: 1 / 2; }
@media (hover: hover) {
  .photo-grid__item:hover { transform: scale(1.02); }
}
.photo-grid__item::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(10,25,41,0.15);
  transition: opacity .3s;
}
@media (hover: hover) {
  .photo-grid__item:hover::after { opacity: 0; }
}

/* ----- FAQ ----- */
.faq-list { max-width: 820px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid #ddd6c5;
  padding: 1.5rem 0;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  color: #0a1929;
  font-weight: 500;
  padding: 0.5rem 0;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: '+';
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 1.8rem;
  color: #2a8b9c;
  transition: transform .25s ease;
}
.faq-item[open] summary::after { content: '−'; }
.faq-item__body {
  padding-top: 1rem;
  color: #4a5867;
  line-height: 1.7;
}

/* ----- CTA Banner ----- */
.cta-banner {
  background: linear-gradient(135deg, #0a1929 0%, #1e3a5f 100%);
  color: #fff;
  text-align: center;
  padding: 6rem 1.5rem;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, rgba(93, 214, 230, 0.08) 0%, transparent 70%);
}
.cta-banner > * { position: relative; }
.cta-banner h2 { color: #fff; margin-bottom: 1rem; }
.cta-banner p { opacity: 0.85; max-width: 600px; margin: 0 auto 2.5rem; }

/* ----- Footer ----- */
.site-footer {
  background: #0a1929;
  color: #a8b5c5;
  padding: 4rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.site-footer h4 {
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  font-weight: 600;
}
.site-footer ul { list-style: none; padding: 0; }
.site-footer li { margin-bottom: 0.6rem; }
.site-footer a { color: #a8b5c5; font-size: 0.93rem; }
@media (hover: hover) {
  .site-footer a:hover { color: #5dd6e6; }
}
.site-footer__brand img { height: 60px; width: auto; margin-bottom: 1rem; filter: brightness(0) invert(1); }
.site-footer__brand p { font-size: 0.93rem; line-height: 1.7; }
.site-footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 1.5rem;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  font-size: 0.82rem;
  opacity: 0.6;
}

/* ----- Two-column section ----- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
.two-col--reverse > :first-child { order: 2; }
@media (max-width: 850px) {
  .two-col { grid-template-columns: 1fr; gap: 2.5rem; }
  .two-col--reverse > :first-child { order: 0; }
}
.two-col__image {
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, #1e3a5f, #0a4d63);
  background-size: cover; background-position: center;
  border-radius: 2px;
}

/* ----- Reveal animation ----- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ----- Utilities ----- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 3rem; }
