/* =============================================================
   raja-ampat.org — shared stylesheet
   Aesthetic direction: "Deep Marine Editorial"
   Palette: deep navy marine, royal blue, pale blue, gold accent,
   on a pure white background (chosen to let future photos sing).
   Type: Bricolage Grotesque (display) + Spline Sans (body).
   Photos are not available yet: image slots use atmospheric
   blue gradient placeholders meant to be swapped for real photos.
   ============================================================= */

:root {
  /* Marine blues */
  --abyss:      #0a2540;  /* near-black navy : stats / footer bg */
  --deep:       #103562;  /* marine : hero, quote, page-next */
  --teal:       #14406e;  /* mid blue */
  --lagoon:     #1d5f9e;  /* royal blue : primary accent & links */
  --turquoise:  #5b9bd5;  /* light blue : accents on dark bg */
  --foam:       #cfe0f0;  /* pale */

  /* Light surfaces */
  --sand:       #eef4fa;  /* very light blue : alternating sections */
  --cream:      #ffffff;  /* pure white : main background */
  --paper:      #ffffff;

  /* Accents */
  --coral:      #d4a24e;  /* gold : decorative accent */
  --coral-deep: #1d5f9e;  /* royal blue : prose links (readable) */
  --gold:       #d4a24e;

  --ink:        #0e1f30;
  --muted:      #5a6b7d;
  --line:       rgba(14, 31, 48, 0.12);

  --display: "Bricolage Grotesque", "Arial Narrow", Arial, sans-serif;
  --body:    "Spline Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  --maxw: 1180px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--body);
  font-weight: 350;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: 18px;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection { background: var(--lagoon); color: var(--paper); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-optical-sizing: auto;
}

.eyebrow {
  font-family: var(--body);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--lagoon);
  display: inline-flex;
  align-items: center;
  gap: 0.8em;
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--gold);
  display: inline-block;
}
.on-dark .eyebrow, .eyebrow.light { color: var(--turquoise); }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 32px; }
section { position: relative; }

.section-pad { padding: clamp(72px, 11vw, 150px) 0; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px clamp(20px, 4vw, 48px);
  transition: background 0.5s var(--ease), padding 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.nav.scrolled {
  background: rgba(10, 37, 64, 0.88);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  padding-top: 14px;
  padding-bottom: 14px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.brand {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--paper);
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 0.5em;
}
.brand .dot { color: var(--gold); }
.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  color: rgba(255,255,255,0.82);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  position: relative;
  padding: 4px 0;
  transition: color 0.3s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 1px;
  background: var(--turquoise);
  transition: width 0.35s var(--ease);
}
.nav-links a:hover { color: var(--paper); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--paper); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  position: relative;
  overflow: hidden;
  color: var(--paper);
  background:
    radial-gradient(120% 90% at 75% -10%, rgba(91,155,213,0.32), transparent 55%),
    radial-gradient(130% 100% at 10% 110%, rgba(16,53,98,0.92), transparent 60%),
    linear-gradient(165deg, #14406e 0%, #103562 42%, #0a2540 100%);
}
/* drifting light */
.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}
.hero::before {
  width: 60vw; height: 60vw;
  top: -20%; right: -10%;
  background: radial-gradient(circle, rgba(91,155,213,0.30), transparent 65%);
  animation: drift1 18s ease-in-out infinite alternate;
}
.hero::after {
  width: 50vw; height: 50vw;
  bottom: -25%; left: -15%;
  background: radial-gradient(circle, rgba(212,162,78,0.16), transparent 65%);
  animation: drift2 22s ease-in-out infinite alternate;
}
@keyframes drift1 { to { transform: translate(-8%, 12%) scale(1.15); } }
@keyframes drift2 { to { transform: translate(10%, -10%) scale(1.1); } }

/* faint topographic / depth contour lines */
.hero-contours {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  pointer-events: none;
  background-image: repeating-radial-gradient(
    circle at 78% 18%,
    transparent 0,
    transparent 38px,
    rgba(207,224,240,0.05) 39px,
    rgba(207,224,240,0.05) 40px
  );
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
  padding: 0 clamp(20px, 4vw, 48px) clamp(56px, 9vh, 110px);
}
.hero h1 {
  font-size: clamp(4.5rem, 17vw, 15rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.9;
  margin: 0.1em 0 0.18em;
}
.hero h1 em {
  font-style: normal;
  color: var(--turquoise);
}
.hero-lead {
  max-width: 30ch;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  font-weight: 300;
  line-height: 1.5;
  color: rgba(255,255,255,0.88);
}
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  margin-top: 38px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: rgba(207,224,240,0.82);
}
.hero-meta span { display: inline-flex; align-items: center; gap: 0.6em; }
.hero-meta span::before { content: "◆"; color: var(--gold); font-size: 0.7em; }

.scroll-cue {
  position: absolute;
  bottom: 30px;
  right: clamp(20px, 4vw, 48px);
  z-index: 3;
  writing-mode: vertical-rl;
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(207,224,240,0.6);
  display: flex;
  align-items: center;
  gap: 14px;
}
.scroll-cue::after {
  content: "";
  width: 1px; height: 56px;
  background: linear-gradient(var(--turquoise), transparent);
  animation: cue 2.2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes cue { 0%,100%{ transform: scaleY(0.4); opacity:0.4 } 50%{ transform: scaleY(1); opacity:1 } }

/* ---------- Intro / editorial ---------- */
.intro { background: var(--cream); }
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: clamp(40px, 7vw, 100px);
  align-items: start;
}
.intro h2 {
  font-size: clamp(2.2rem, 4.5vw, 3.6rem);
  letter-spacing: -0.025em;
}
.intro h2 em { font-style: normal; color: var(--lagoon); }
.lead-col p { color: var(--muted); margin-bottom: 1.2em; font-size: 1.06rem; }
.lead-col p:first-of-type {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.lead-col p:first-of-type::first-letter {
  font-size: 3.2em;
  float: left;
  line-height: 0.72;
  padding: 0.08em 0.12em 0 0;
  color: var(--gold);
  font-weight: 600;
}

/* ---------- Stats band ---------- */
.stats {
  background: var(--abyss);
  color: var(--paper);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.stat {
  padding: 14px 24px;
  border-left: 1px solid rgba(207,224,240,0.16);
}
.stat:first-child { border-left: 0; padding-left: 0; }
.stat .num {
  font-family: var(--display);
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  font-weight: 500;
  line-height: 1;
  color: var(--turquoise);
  letter-spacing: -0.03em;
}
.stat .num small { font-size: 0.42em; color: var(--gold); vertical-align: super; }
.stat .label {
  margin-top: 10px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.72);
  line-height: 1.4;
}

/* ---------- Section heading block ---------- */
.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 32px;
  margin-bottom: clamp(40px, 6vw, 72px);
  flex-wrap: wrap;
}
.sec-head h2 {
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  max-width: 16ch;
}
.sec-head h2 em { font-style: normal; color: var(--lagoon); }
.sec-head .num-tag {
  font-family: var(--display);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--gold);
  letter-spacing: 0.04em;
}

/* ---------- The Four Kings ---------- */
.kings { background: var(--sand); }
.kings-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.king {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.king:hover { transform: translateY(-6px); box-shadow: 0 24px 50px -28px rgba(14,31,48,0.4); }
.king .ph { aspect-ratio: 3/4; }
.king-body { padding: 22px 22px 26px; }
.king-body .k-num {
  font-family: var(--display);
  font-weight: 500;
  color: var(--gold);
  font-size: 0.95rem;
}
.king-body h3 { font-size: 1.5rem; margin: 4px 0 8px; }
.king-body p { font-size: 0.92rem; color: var(--muted); line-height: 1.55; }

/* ---------- Photo placeholders ---------- */
.ph {
  position: relative;
  background:
    radial-gradient(130% 120% at 25% 15%, rgba(91,155,213,0.55), transparent 55%),
    radial-gradient(120% 130% at 85% 90%, rgba(16,53,98,0.9), transparent 55%),
    linear-gradient(150deg, #1d5f9e, #103562);
  overflow: hidden;
  isolation: isolate;
}
.ph::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg, transparent 0 14px, rgba(255,255,255,0.025) 14px 15px
  );
}
.ph::after {
  content: "◇ photography coming soon";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--body);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(207,224,240,0.6);
}

/* ---------- Guide / explore grid ---------- */
.guide { background: var(--cream); }
.guide-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}
.card {
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  color: var(--paper);
  border: 1px solid var(--line);
  isolation: isolate;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.card.span-3 { grid-column: span 3; }
.card.span-2 { grid-column: span 2; }
.card .ph {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.card .ph::after { opacity: 0.6; }
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(10,37,64,0.94) 0%, rgba(10,37,64,0.4) 45%, transparent 75%);
}
.card:hover { transform: translateY(-5px); box-shadow: 0 28px 56px -30px rgba(14,31,48,0.55); }
.card-body { position: relative; z-index: 2; padding: 28px; }
.card-body .c-num {
  font-family: var(--display);
  font-weight: 500;
  color: var(--turquoise);
  font-size: 0.9rem;
}
.card-body h3 { font-size: clamp(1.5rem, 2.6vw, 2rem); margin: 6px 0 8px; }
.card-body p { font-size: 0.92rem; color: rgba(255,255,255,0.85); max-width: 40ch; }
.card-body .arrow {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--turquoise);
}
.card-body .arrow span { transition: transform 0.4s var(--ease); }
.card:hover .arrow span { transform: translateX(6px); }

/* ---------- Quote / pull ---------- */
.pull {
  background: var(--deep);
  color: var(--paper);
  text-align: center;
}
.pull blockquote {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.8rem, 4.5vw, 3.4rem);
  line-height: 1.18;
  letter-spacing: -0.025em;
  max-width: 22ch;
  margin: 0 auto;
}
.pull blockquote em { font-style: normal; color: var(--turquoise); }
.pull cite {
  display: block;
  margin-top: 32px;
  font-family: var(--body);
  font-style: normal;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(207,224,240,0.6);
}

/* ---------- Footer ---------- */
.footer {
  background: var(--abyss);
  color: rgba(255,255,255,0.7);
  padding: clamp(60px, 8vw, 100px) 0 40px;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(207,224,240,0.14);
}
.footer .brand { font-size: 2rem; margin-bottom: 14px; }
.footer-tag { max-width: 30ch; font-size: 0.95rem; line-height: 1.6; }
.footer-cols { display: flex; gap: clamp(40px, 7vw, 90px); flex-wrap: wrap; }
.footer-cols h4 {
  font-family: var(--body);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--turquoise);
  margin-bottom: 16px;
}
.footer-cols ul { list-style: none; }
.footer-cols li { margin-bottom: 10px; }
.footer-cols a {
  font-size: 0.92rem;
  color: rgba(255,255,255,0.75);
  transition: color 0.3s var(--ease);
}
.footer-cols a:hover { color: var(--turquoise); }
.footer-bottom {
  margin-top: 36px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.5);
}

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.08s; }
.reveal[data-delay="2"] { transition-delay: 0.16s; }
.reveal[data-delay="3"] { transition-delay: 0.24s; }
.reveal[data-delay="4"] { transition-delay: 0.32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero::before, .hero::after, .scroll-cue::after { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Interior page header (non-home pages) ---------- */
.page-hero {
  min-height: 62svh;
  display: flex;
  align-items: flex-end;
  position: relative;
  overflow: hidden;
  color: var(--paper);
  background:
    radial-gradient(120% 90% at 80% 0%, rgba(91,155,213,0.28), transparent 55%),
    linear-gradient(165deg, #14406e, #103562 55%, #0a2540);
}
.page-hero .hero-contours { opacity: 0.4; }
.page-hero-inner {
  position: relative; z-index: 2;
  max-width: var(--maxw); margin: 0 auto; width: 100%;
  padding: 0 clamp(20px,4vw,48px) clamp(48px,7vh,84px);
}
.breadcrumb {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: rgba(207,224,240,0.7);
  margin-bottom: 22px;
}
.breadcrumb a:hover { color: var(--turquoise); }
.breadcrumb span { margin: 0 0.5em; color: var(--gold); }
.page-hero h1 {
  font-size: clamp(2.8rem, 8vw, 6rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}
.page-hero h1 em { font-style: normal; color: var(--turquoise); }
.page-hero .hero-lead { margin-top: 22px; max-width: 46ch; }

/* ---------- Article body (interior pages) ---------- */
.article { background: var(--cream); }
.article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  max-width: 760px;
}
.article-wide { max-width: var(--maxw); }
.prose h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  margin: 1.6em 0 0.5em;
}
.prose h2:first-child { margin-top: 0; }
.prose h2 em { font-style: normal; color: var(--lagoon); }
.prose h3 {
  font-size: 1.35rem;
  margin: 1.4em 0 0.4em;
  color: var(--teal);
}
.prose p { color: var(--ink); margin-bottom: 1.15em; }
.prose p.lead {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.25rem, 2.3vw, 1.55rem);
  line-height: 1.4;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin-bottom: 1.2em;
}
.prose a {
  color: var(--lagoon);
  border-bottom: 1px solid rgba(29,95,158,0.35);
  transition: border-color 0.3s var(--ease);
}
.prose a:hover { border-color: var(--lagoon); }
.prose ul, .prose ol { margin: 0 0 1.3em 1.1em; color: var(--ink); }
.prose li { margin-bottom: 0.55em; padding-left: 0.3em; }
.prose ul li::marker { color: var(--gold); }

/* Info callout box */
.callout {
  background: var(--sand);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 3px;
  padding: 26px 30px;
  margin: 2em 0;
}
.callout .eyebrow { margin-bottom: 12px; }
.callout p:last-child { margin-bottom: 0; }
.callout .figure {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.4rem;
  color: var(--teal);
}

/* Fact table */
.fact-table { width: 100%; border-collapse: collapse; margin: 1.6em 0; font-size: 0.96rem; }
.fact-table th, .fact-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.fact-table th {
  font-family: var(--body);
  font-weight: 500;
  color: var(--teal);
  width: 38%;
  white-space: nowrap;
}
.fact-table tr:hover td { background: rgba(91,155,213,0.08); }

/* Article inline image slot */
.figure-slot { margin: 2.2em 0; }
.figure-slot .ph { aspect-ratio: 16/9; border-radius: 3px; }
.figure-slot figcaption {
  margin-top: 12px;
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
}

/* Next/prev page nav */
.page-next {
  background: var(--deep);
  color: var(--paper);
}
.page-next a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: clamp(40px,6vw,72px) 0;
  flex-wrap: wrap;
}
.page-next .pn-label {
  font-size: 0.74rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--turquoise);
  margin-bottom: 8px;
}
.page-next .pn-title {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 500;
}
.page-next .pn-arrow { font-size: 2.4rem; color: var(--gold); transition: transform 0.4s var(--ease); }
.page-next a:hover .pn-arrow { transform: translateX(10px); }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .intro-grid { grid-template-columns: 1fr; gap: 40px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 24px; border-left: 1px solid rgba(207,224,240,0.16); }
  .stat:first-child { padding-left: 24px; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .kings-grid { grid-template-columns: repeat(2, 1fr); }
  .guide-grid { grid-template-columns: repeat(2, 1fr); }
  .card.span-3, .card.span-2 { grid-column: span 1; }
}
/* Full horizontal menu only on wide screens; hamburger below 1080px */
@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 4px;
    padding: 20px 28px 28px;
    background: rgba(10,37,64,0.97);
    backdrop-filter: blur(14px);
  }
  .nav-toggle {
    display: block;
    color: var(--paper);
    font-size: 1.5rem;
    line-height: 1;
  }
}
@media (min-width: 1081px) {
  .nav-links { gap: 24px; }
}
@media (max-width: 720px) {
  body { font-size: 17px; }
  .kings-grid { grid-template-columns: 1fr; }
  .guide-grid { grid-template-columns: 1fr; }
  .hero-meta { gap: 14px 22px; }
  .sec-head { flex-direction: column; align-items: flex-start; }
}
