/* Maldives Golf Association — design system
   Studio Cinematic × Travel Editorial on a deep ocean-navy base.
   Display: Fraunces · Body: Inter · Accent: lagoon turquoise · Honour: sand gold */

:root {
  --bg: #06121e;
  --surface: #0b1d2e;
  --surface-2: #102840;
  --text: #eef4f7;
  --muted: #8fa6b6;
  --accent: #36c9d9;
  --accent-deep: #1d8fa0;
  --gold: #c9a45c;
  --green: #2fa05a;
  --hairline: rgba(255, 255, 255, 0.08);
  --hairline-strong: rgba(255, 255, 255, 0.16);
  --container: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(96px, 12vw, 168px);
  --r-card: 16px;
  --r-img: 12px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video { max-width: 100%; display: block; }

a { color: inherit; }

::selection { background: var(--accent-deep); color: #fff; }

/* ---------- type ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 560;
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0 0 0.4em;
}

.display-xl { font-size: clamp(44px, 7.2vw, 104px); }
.display-l  { font-size: clamp(36px, 5vw, 72px); }
.display-m  { font-size: clamp(28px, 3.6vw, 48px); }
.display-s  { font-size: clamp(22px, 2.6vw, 32px); }

.label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 20px;
}
.label::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold);
  opacity: 0.7;
}

.lede {
  font-size: clamp(17px, 1.5vw, 20px);
  color: var(--muted);
  max-width: 62ch;
  margin: 0;
}

.muted { color: var(--muted); }

/* underline-draw links */
.u {
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1.5px;
  transition: background-size 240ms cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}
.u:hover, .u:focus-visible { background-size: 100% 1.5px; }

/* ---------- layout ---------- */

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: calc(var(--section-y) * 0.6); }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}

@media (max-width: 860px) {
  .grid-2 { grid-template-columns: 1fr; }
}

/* film grain — static, zero animation cost */
.grain { position: relative; }
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 200ms var(--ease-out), background-color 200ms, border-color 200ms, color 200ms;
  cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: #04222a; }
.btn--primary:hover { background: #4fd6e4; }
.btn--ghost { border-color: var(--hairline-strong); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--gold { background: var(--gold); color: #241a05; }
.btn--gold:hover { background: #d8b46e; }

.btn .arrow { transition: transform 200ms var(--ease-out); }
.btn:hover .arrow { transform: translateX(3px); }

/* ---------- nav ---------- */

.nav {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 100;
  transition: background-color 300ms, border-color 300ms, backdrop-filter 300ms;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border-bottom-color: var(--hairline);
}
.nav__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 14px var(--gutter);
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-right: auto;
}
.nav__brand img { width: 44px; height: 44px; }
.nav__brand b {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.1;
}
.nav__brand span { display: block; font-size: 10px; letter-spacing: 0.22em; color: var(--muted); font-weight: 500; }
.nav__links { display: flex; align-items: center; gap: 26px; }
.nav__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: color 160ms;
}
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--text); }
.nav__links a[aria-current="page"] { color: var(--accent); }
.nav__cta { font-size: 14px; padding: 10px 20px; }

.nav__burger {
  display: none;
  background: none;
  border: 0;
  width: 44px;
  height: 44px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
}
.nav__burger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: transform 240ms var(--ease-out), opacity 200ms;
}

@media (max-width: 960px) {
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; }
  .nav.open .nav__burger span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav.open .nav__burger span:nth-child(2) { opacity: 0; }
  .nav.open .nav__burger span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

.nav__panel {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 90;
  background: color-mix(in srgb, var(--bg) 96%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 110px var(--gutter) 40px;
}
.nav.open + .nav__panel { display: block; }
.nav__panel a {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(28px, 7vw, 40px);
  padding: 14px 0;
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  color: var(--text);
}
.nav__panel a[aria-current="page"] { color: var(--accent); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: clip;
}
.hero--short { min-height: 72svh; }

.hero__media,
.hero__media video,
.hero__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--bg) 0%, color-mix(in srgb, var(--bg) 55%, transparent) 34%, color-mix(in srgb, var(--bg) 18%, transparent) 60%, color-mix(in srgb, var(--bg) 38%, transparent) 100%);
}

/* slow Ken Burns when the hero is a still image */
@media (prefers-reduced-motion: no-preference) {
  .hero__media img.kenburns { animation: kenburns 26s var(--ease-out) both; transform-origin: 60% 40%; }
}
@keyframes kenburns {
  from { transform: scale(1.12); }
  to { transform: scale(1); }
}

.hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding: 0 var(--gutter) clamp(64px, 9vh, 120px);
}
.hero__content .lede { margin-top: 18px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

/* staggered word reveal */
.sw .w {
  display: inline-block;
  overflow: clip;
  vertical-align: bottom;
}
.sw .w > span { display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .sw .w > span {
    opacity: 0;
    transform: translateY(0.95em);
    animation: sw-up 760ms var(--ease-out) forwards;
    animation-delay: calc(var(--i, 0) * 85ms + 150ms);
  }
}
@keyframes sw-up { to { opacity: 1; transform: none; } }

.hero__scrollcue {
  position: absolute;
  bottom: 28px;
  right: var(--gutter);
  z-index: 2;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  writing-mode: vertical-rl;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.hero__scrollcue::after {
  content: "";
  width: 1px;
  height: 48px;
  background: linear-gradient(var(--muted), transparent);
}
@media (prefers-reduced-motion: no-preference) {
  .hero__scrollcue::after { animation: cue 2.2s ease-in-out infinite; }
}
@keyframes cue {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.4; }
}
@media (max-width: 700px) { .hero__scrollcue { display: none; } }

/* ---------- reveal on scroll (IO adds .in) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .rv {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
    transition-delay: var(--d, 0ms);
  }
  .rv.in { opacity: 1; transform: none; }
}

/* ---------- cards ---------- */

.card-img {
  position: relative;
  border-radius: var(--r-img);
  overflow: clip;
  aspect-ratio: 4 / 3;
}
.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1200ms var(--ease-out);
}
@media (prefers-reduced-motion: no-preference) {
  a:hover .card-img img, .card-img:hover img { transform: scale(1.06); }
}

.facilities {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 1024px) { .facilities { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .facilities { grid-template-columns: 1fr; } }

.facility {
  text-decoration: none;
  display: block;
}
.facility .card-img { aspect-ratio: 3 / 4; }
.facility h3 { font-size: 20px; margin: 16px 0 2px; }
.facility p { margin: 0; font-size: 13.5px; color: var(--muted); }
.facility .num {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  font-family: var(--font-display);
  font-size: 15px;
  color: #fff;
  background: color-mix(in srgb, var(--bg) 55%, transparent);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 4px 12px;
}

/* people */
.people {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: clamp(20px, 3vw, 36px);
}
.person { text-align: left; }
.person .pic {
  border-radius: var(--r-img);
  overflow: clip;
  aspect-ratio: 1;
  background: radial-gradient(120% 100% at 50% 0%, var(--surface-2), var(--surface));
  border: 1px solid var(--hairline);
}
.person .pic img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.person h3 { font-size: 19px; margin: 14px 0 2px; }
.person p { margin: 0; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold); font-weight: 600; }

/* stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  border-top: 1px solid var(--hairline);
  padding-top: 36px;
  margin-top: 56px;
}
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 560;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.stat b .suffix { color: var(--accent); }
.stat span { font-size: 13px; color: var(--muted); letter-spacing: 0.06em; }

/* ---------- marquee ---------- */

.marquee {
  overflow: clip;
  white-space: nowrap;
  border-block: 1px solid var(--hairline);
  padding-block: 28px;
  position: relative;
}
.marquee__inner { display: inline-flex; align-items: center; gap: clamp(48px, 6vw, 96px); padding-right: clamp(48px, 6vw, 96px); }
@media (prefers-reduced-motion: no-preference) {
  .marquee__inner { animation: mq 48s linear infinite; }
  .marquee:hover .marquee__inner { animation-play-state: paused; }
}
@keyframes mq { to { transform: translateX(-50%); } }
.marquee img {
  height: 52px;
  width: auto;
  max-width: 170px;
  object-fit: contain;
  /* white plates → readable on dark */
  background: #fff;
  border-radius: 10px;
  padding: 8px 14px;
  opacity: 0.92;
}

/* ---------- event timeline ---------- */

.timeline { border-left: 1px solid var(--hairline-strong); margin-left: 8px; }
.tl-item { position: relative; padding: 0 0 40px 36px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 8px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent);
}
.tl-item .when {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.tl-item h3 { font-size: 22px; margin: 6px 0 6px; }
.tl-item p { margin: 0; color: var(--muted); font-size: 15px; }

/* ---------- doc cards ---------- */

.docs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .docs { grid-template-columns: 1fr; } }
.doc {
  display: flex;
  flex-direction: column;
  gap: 28px;
  justify-content: space-between;
  padding: 28px;
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 200ms, transform 200ms var(--ease-out);
}
.doc:hover { border-color: var(--accent); transform: translateY(-3px); }
.doc h3 { font-size: 20px; margin: 0; }
.doc p { margin: 6px 0 0; font-size: 14px; color: var(--muted); }
.doc .get { font-size: 13px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }

/* ---------- gallery ---------- */

.masonry {
  columns: 3;
  column-gap: 16px;
}
@media (max-width: 1024px) { .masonry { columns: 2; } }
@media (max-width: 600px) { .masonry { columns: 1; } }
.masonry a {
  display: block;
  margin-bottom: 16px;
  border-radius: var(--r-img);
  overflow: clip;
  break-inside: avoid;
}
.masonry img {
  width: 100%;
  transition: transform 900ms var(--ease-out), opacity 300ms;
}
.masonry a:hover img { transform: scale(1.04); }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 5vmin;
}
.lightbox.open { display: flex; }
.lightbox img { max-height: 90svh; max-width: 92vw; width: auto; border-radius: var(--r-img); }
.lightbox button {
  position: absolute;
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  width: 48px;
  height: 48px;
  font-size: 20px;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.lightbox .lb-close { top: 24px; right: 24px; }
.lightbox .lb-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-next { right: 24px; top: 50%; transform: translateY(-50%); }

/* ---------- bands / callouts ---------- */

.band {
  position: relative;
  overflow: clip;
  border-radius: var(--r-card);
}
.band__media, .band__media img, .band__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.band__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, color-mix(in srgb, var(--bg) 88%, transparent) 18%, color-mix(in srgb, var(--bg) 40%, transparent) 70%, transparent);
}
.band__content { position: relative; z-index: 2; padding: clamp(40px, 6vw, 88px); max-width: 640px; }

/* info rows (contact) */
.info-list { display: grid; gap: 0; }
.info-row {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid var(--hairline);
}
@media (max-width: 640px) { .info-row { grid-template-columns: 1fr; gap: 6px; } }
.info-row .k { font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); font-weight: 600; padding-top: 4px; }
.info-row .v { font-size: clamp(18px, 2vw, 24px); font-family: var(--font-display); }
.info-row .v small { display: block; font-family: var(--font-body); font-size: 14px; color: var(--muted); margin-top: 6px; }

/* ---------- page hero (inner pages) ---------- */

.pagehead {
  padding: calc(96px + var(--section-y) * 0.5) 0 0;
}
.pagehead .label { margin-bottom: 14px; }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--hairline);
  margin-top: var(--section-y);
  padding: 72px 0 40px;
  background: linear-gradient(to bottom, var(--bg), #040d16);
}
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 40px;
}
@media (max-width: 960px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__brand { display: flex; align-items: flex-start; gap: 16px; }
.footer__brand img { width: 56px; height: 56px; }
.footer__brand b { font-family: var(--font-display); font-size: 18px; display: block; }
.footer__brand p { font-size: 13px; color: var(--muted); margin: 6px 0 0; max-width: 30ch; }
.footer h4 {
  font-family: var(--font-body);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 16px;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer ul a { font-size: 14px; color: var(--muted); text-decoration: none; transition: color 160ms; }
.footer ul a:hover { color: var(--text); }
.footer__meta {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid var(--hairline);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 32px;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--muted);
}

/* ---------- utilities ---------- */

.center { text-align: center; }
.mt-0 { margin-top: 0; }
.flow > * + * { margin-top: 1.1em; }

@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;
  }
}

/* focus */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- forms ---------- */

.form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 24px;
  max-width: 780px;
  margin-top: 44px;
}
.field { display: grid; gap: 8px; align-content: start; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.field label .req { color: var(--accent); }
.field input,
.field select,
.field textarea {
  font: 500 15px/1.5 var(--font-body);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--hairline-strong);
  border-radius: 10px;
  padding: 13px 16px;
  width: 100%;
  transition: border-color 160ms, background-color 160ms;
}
.field :is(input, select, textarea):focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface-2);
}
.field ::placeholder { color: rgba(143, 166, 182, 0.6); }
.field select { appearance: none; }
.field select option { background: var(--surface); color: var(--text); }
.field input[type="file"] { padding: 10px; }
.field input[type="file"]::file-selector-button {
  font: 600 13px var(--font-body);
  color: var(--text);
  background: transparent;
  border: 1px solid var(--hairline-strong);
  border-radius: 999px;
  padding: 8px 16px;
  margin-right: 14px;
  cursor: pointer;
}
.field .hint { margin: 0; font-size: 12.5px; color: var(--muted); }
.field--check {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}
.field--check input {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: none;
}
.field--check .req { color: var(--accent); }
.form__status { grid-column: 1 / -1; margin: 0; font-size: 15px; display: none; }
.form__status.ok { display: block; color: var(--accent); }
.form__status.err { display: block; color: #e08a80; }
.form__actions { grid-column: 1 / -1; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 640px) {
  .form { grid-template-columns: 1fr; }
}
