:root {
  --sea-deep: #663923;
  --sea-mid: #945a39;
  --sea-fade: #bc8153;
  --sea-line: #2f8ea6;
  --nature-line: #4a916d;
  --deck-teak: #a66b46;
  --deck-dark: #79482f;
  --text: #2a180f;
  --surface: #fbf3ec;
  --radius: 18px;
  --shadow: 0 14px 35px rgba(62, 33, 16, 0.16);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background: var(--surface);
}

h1, h2, h3 {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  line-height: 1;
  letter-spacing: .01em;
}
p { line-height: 1.62; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.page-loader {
  position: fixed; inset: 0 0 auto; height: 3px; z-index: 1200;
  background: rgba(255,255,255,.4); pointer-events: none; transition: opacity .45s ease;
}
.page-loader span {
  display: block; width: 35%; height: 100%;
  background: linear-gradient(90deg, var(--sea-line), var(--nature-line), var(--sea-fade));
  animation: loader-scan 1.25s ease-in-out infinite;
}
body.is-ready .page-loader { opacity: 0; }

.page-bg {
  position: fixed; inset: 0; z-index: -2;
  background:
    linear-gradient(165deg, rgba(102,57,35,.16), rgba(188,129,83,.1)),
    url("assets/brand/azmi-deck.png"),
    linear-gradient(170deg, #f7ede3 0%, #f8f0e8 50%, #fdf6ef 100%);
  background-size: cover, 520px auto, cover;
  background-position: center;
  background-blend-mode: multiply, soft-light, normal;
}
.page-bg::before, .page-bg::after { content:""; position:absolute; inset:0; pointer-events:none; }
.page-bg::before {
  background: repeating-linear-gradient(113deg, transparent 0 42px, rgba(47,142,166,.14) 42px 45px, transparent 45px 88px);
  mix-blend-mode: multiply; animation: sea-lines 28s linear infinite;
}
.page-bg::after {
  background: repeating-linear-gradient(-128deg, transparent 0 34px, rgba(74,145,109,.11) 34px 37px, transparent 37px 78px);
  mix-blend-mode: soft-light; animation: sea-lines 34s linear infinite reverse;
}

.site-header, main, .site-footer { transition: opacity .55s ease, transform .55s ease; }
body.is-loading .site-header, body.is-loading main, body.is-loading .site-footer { opacity: 0; transform: translateY(10px); }

main, .site-header {
  width: min(1150px, calc(100% - 2rem)); margin-inline: auto;
}
main { margin-top: 1rem; margin-bottom: 3rem; }

.site-header {
  margin-top: 1rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  background: rgba(255,255,255,.8);
  border: 1px solid rgba(102,57,35,.18);
  border-radius: 999px; padding: .45rem .55rem .45rem 1rem;
  position: sticky; top: .6rem; backdrop-filter: blur(8px);
  z-index: 50;
  overflow: hidden;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.82)),
    url("assets/brand/top-header.png") center 20% / cover no-repeat;
  opacity: 0.35;
  pointer-events: none;
}

.site-header > * {
  position: relative;
  z-index: 1;
}
.brand { display:inline-flex; align-items:center; gap:.6rem; font-weight: 800; color: var(--sea-deep); }
.brand img { width: 42px; height: 48px; }
.desktop-nav { display: none; }
.desktop-nav a, .mobile-nav a {
  padding: .55rem .9rem; border-radius: 999px; font-size: .94rem; font-weight: 700; color:#5d3421;
}
.desktop-nav a.active, .mobile-nav a.active { background: var(--sea-deep); color:#fff; }

.menu-toggle {
  border: 0; border-radius: 999px; background: var(--sea-deep); color: #fff;
  font-weight: 700; padding: .62rem 1rem; cursor: pointer;
}
.mobile-nav-wrap { position: relative; }
.mobile-nav {
  display: none; position: absolute; right: 0; top: calc(100% + .45rem); min-width: 190px;
  background: #fff; border-radius: 14px; box-shadow: var(--shadow); padding: .45rem;
}
.mobile-nav.open { display: grid; gap: .2rem; }

.card {
  background: rgba(255,250,245,.92);
  border-radius: var(--radius);
  border: 1px solid rgba(121,72,47,.16);
  box-shadow: var(--shadow);
  transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.card:hover { transform: translateY(-2px); border-color: rgba(74,145,109,.3); box-shadow: 0 18px 45px rgba(62,33,16,.2); }

.hero {
  position: relative; min-height: clamp(470px, 74vh, 720px); border-radius: 24px;
  overflow: clip; display: grid; align-items: end; padding: clamp(1rem, 4vw, 2.2rem); color: #f2f9fd;
  background: url("assets/photos/photo-01.webp") center/cover no-repeat;
}
.hero::before { content:""; position:absolute; inset:0; background: linear-gradient(180deg, rgba(68,37,21,.12) 25%, rgba(44,22,12,.84) 100%); z-index:0; }
.hero > * { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.2rem, 7vw, 4.7rem); max-width: 12ch; }
.hero p { margin-top: .9rem; max-width: 52ch; }

.pill-row { display:flex; flex-wrap: wrap; gap:.5rem; margin-top: 1rem; }
.pill {
  border:1px solid rgba(255,244,234,.5); border-radius:999px; padding:.4rem .8rem; font-size:.86rem;
  backdrop-filter: blur(6px); background: rgba(255,255,255,.12);
}

.section { margin-top: clamp(1.2rem, 3.4vw, 2.6rem); position: relative; }
.section::before {
  content:""; position:absolute; top:-.35rem; left:.6rem; width: clamp(120px,30vw,240px); height:3px;
  border-radius:999px; background: linear-gradient(90deg, rgba(47,142,166,.7), rgba(74,145,109,.65), transparent); opacity: .5;
}
.section h2 { font-size: clamp(2rem, 5vw, 3rem); color: var(--sea-deep); }

.grid { display:grid; gap: 1rem; }
.two-col { grid-template-columns: 1fr; }

.btn {
  display:inline-block; background: linear-gradient(135deg, var(--sea-deep), var(--sea-mid));
  color:#fff; border-radius:12px; font-weight:800; padding:.68rem 1rem;
}
.btn.alt { background: linear-gradient(135deg, var(--deck-dark), var(--deck-teak)); }

.wa-link,
.course-wa-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.wa-icon {
  width: 15px;
  height: 15px;
  object-fit: contain;
  flex: 0 0 auto;
}

.image-card { border-radius: 16px; overflow: clip; min-height: 240px; }
.image-card img { width:100%; height:100%; object-fit: cover; }

.course-grid { grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); }
.course-card { padding: 1rem; border-left: 5px solid var(--sea-mid); }
.courses-focus .course-card {
  border-left-color: #4a916d;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(233,247,250,.9));
}
.courses-focus .course-card h2 { color: #1f5f73 !important; }

.course-cta { margin-top: .35rem; padding-top: .45rem; border-top: 1px dashed rgba(47,94,115,.2); }
.course-cta-label {
  margin: 0 0 .4rem; font-size: .79rem; font-weight:700; letter-spacing:.02em; color:#315a67; text-transform: uppercase;
}
.course-contact-row { display:flex; flex-wrap:wrap; gap:.4rem; }
.course-wa-pill {
  display:inline-flex; align-items:center; justify-content:center; border-radius:999px;
  padding:.4rem .72rem; font-size:.85rem; font-weight:700; color:#fff; background:linear-gradient(135deg,#1f5f73,#2f8ea6); line-height:1.2;
}
.course-wa-pill.secondary { background: linear-gradient(135deg,#326c8a,#4a916d); }

.gallery-grid { grid-template-columns: repeat(2,1fr); }
.gallery-grid figure { margin:0; overflow: clip; border-radius:14px; min-height:180px; background:#ddd; }
.gallery-grid img { width:100%; height:100%; object-fit:cover; transition: transform .45s ease; cursor: zoom-in; }
.gallery-grid figure:hover img { transform: scale(1.05); }

.contact-grid { grid-template-columns: 1fr; }
.official-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.7rem;
  margin-top: 0.35rem;
}
.official-link-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 1px solid rgba(121, 72, 47, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
  padding: 0.55rem 0.75rem;
  font-weight: 700;
}
.official-link-card img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.official-link-card img[alt*="PADI"] {
  width: 96px;
  height: auto;
}

.site-footer {
  position: relative;
  width: min(1150px, calc(100% - 2rem));
  margin: 0 auto 1.4rem;
  border-radius: 20px;
  overflow: hidden;
  text-align: center;
  padding: 2rem 1rem 2.4rem;
  color: #f5f7f8;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 18px 45px rgba(41, 20, 10, 0.28);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(35, 22, 15, 0.56), rgba(20, 10, 7, 0.78)),
    url("assets/brand/azmi-deck.png") center/cover no-repeat;
}

.site-footer p {
  position: relative;
  z-index: 1;
  margin: 0.15rem 0;
}

.zoomable-photo { cursor: zoom-in; }
.photo-lightbox {
  position: fixed; inset:0; z-index:1000; background: rgba(14,7,4,.84); display:grid; place-items:center; padding:1rem;
}
.photo-lightbox[hidden] { display:none; }
.photo-lightbox img { max-width:min(95vw,1500px); max-height:88vh; border-radius:14px; box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.photo-lightbox-close {
  position: fixed; top:1rem; right:1rem; border:0; border-radius:999px; padding:.5rem .9rem;
  font-weight:800; color:#fff; background: rgba(102,57,35,.9); cursor:pointer;
}

@keyframes loader-scan { 0%{transform:translateX(-120%)} 100%{transform:translateX(380%)} }
@keyframes sea-lines {
  0%{transform:translate3d(-1.5%,0,0)}
  50%{transform:translate3d(1.5%,1%,0)}
  100%{transform:translate3d(-1.5%,0,0)}
}

@media (min-width: 760px) {
  .desktop-nav { display:inline-flex; gap:.2rem; }
  .mobile-nav-wrap { display:none; }
  .two-col { grid-template-columns: 1.1fr 1fr; }
  .gallery-grid { grid-template-columns: repeat(3,1fr); }
  .gallery-grid figure:nth-child(5n + 1) { grid-column: span 2; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(4,1fr); }
  .gallery-grid figure:nth-child(5n + 1) { grid-column: span 1; }
  .gallery-grid figure:nth-child(7n + 3) { grid-column: span 2; }
}
@media (prefers-reduced-motion: reduce) {
  .page-loader span, .page-bg::before, .page-bg::after { animation:none; }
  .site-header, main, .site-footer, .card { transition:none; }
}
