/* Nanmadol Capital — Site Styles
   Palette: deep azure (Pacific) + basalt grey (volcanic stone) + cool stone paper. */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600&family=Inter:wght@300;400;500&display=swap');

:root {
  /* Basalt — primary type and dark sections */
  --ink: #1c2128;
  --ink-soft: #3a4048;

  /* Cool stone — page backgrounds */
  --paper: #e8ebef;
  --paper-warm: #d8dde3;

  /* Deep azure — Pacific around the islets */
  --azure: #0e3858;
  --azure-deep: #082640;
  --azure-bright: #4178a8;   /* legible on dark basalt */

  /* Hairlines & muted */
  --rule: #b2bac3;
  --accent: #14416b;          /* primary accent — deep azure */
  --muted: #6a727c;

  --serif: 'Cormorant Garamond', 'EB Garamond', Georgia, serif;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
}

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

html, body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: opacity 0.2s ease, color 0.2s ease;
}

a:hover {
  opacity: 0.6;
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.25rem 3.5rem;
  border-bottom: 1px solid var(--rule);
}

.brand {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.35rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}

.brand .mark {
  display: inline-block;
  margin-right: 0.4rem;
  color: var(--accent);
}

.site-nav {
  display: flex;
  gap: 2.5rem;
}

.site-nav a {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  position: relative;
  padding-bottom: 4px;
}

.site-nav a.active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--accent);
}

/* ---------- Hero ---------- */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 6rem 3.5rem 8rem;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-inner {
  max-width: 1100px;
  position: relative;
  z-index: 3;
}

/* Wave animation canvas */
.wave-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* Subtle vignette */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 35%,
    rgba(8, 38, 64, 0.06) 100%
  );
}

.eyebrow {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2.25rem;
  display: inline-block;
}

.eyebrow--dark {
  color: var(--azure-bright);
}

/* Display headline */
.display {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: 0.98;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-bottom: 2.25rem;
}

.hero-sub {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.8vw, 1.6rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 640px;
  margin-bottom: 3rem;
}

/* CTA */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--ink);
  transition: gap 0.25s ease, opacity 0.2s ease;
}

.cta:hover {
  gap: 1.1rem;
  opacity: 1;
}

.cta .arrow {
  font-family: var(--serif);
  font-size: 1.1rem;
  letter-spacing: 0;
  transform: translateY(-1px);
}

.cta--dark {
  color: var(--paper);
  border-bottom-color: var(--paper);
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
}

.scroll-cue .line {
  width: 1px;
  height: 48px;
  background: var(--rule);
  position: relative;
  overflow: hidden;
}

.scroll-cue .line::after {
  content: '';
  position: absolute;
  top: -48px;
  left: 0;
  width: 1px;
  height: 24px;
  background: var(--accent);
  animation: scrollDrop 2.2s ease-in-out infinite;
}

@keyframes scrollDrop {
  0% { top: -24px; }
  100% { top: 48px; }
}

/* ---------- Sections (alternating bands) ---------- */

.section {
  padding: 8rem 3.5rem;
  position: relative;
}

.section--dark {
  background: var(--ink);
  color: var(--paper);
}

.section--light {
  background: var(--paper-warm);
  color: var(--ink);
}

.section-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.section-inner--narrow {
  max-width: 820px;
}

.section-inner--center {
  max-width: 820px;
  text-align: center;
}

/* Mission statement */
.statement {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.8rem, 3.4vw, 3rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
  color: var(--paper);
  max-width: 1000px;
  margin-bottom: 5rem;
}

/* Stats grid */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem;
  padding: 3.5rem 0;
  border-top: 1px solid rgba(232, 235, 239, 0.18);
  border-bottom: 1px solid rgba(232, 235, 239, 0.18);
  margin-bottom: 3.5rem;
}

.stat-num {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 4.5vw, 3.8rem);
  line-height: 1;
  color: var(--paper);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.stat-num .plus {
  color: var(--azure-bright);
  font-size: 0.7em;
  margin-left: 0.1em;
}

.stat-lab {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(232, 235, 239, 0.65);
}

/* Pull quote */
.pull-quote {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.9rem, 3.6vw, 3.2rem);
  line-height: 1.2;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin-bottom: 2.25rem;
  max-width: 820px;
}

.pull-quote::before {
  content: '"';
  color: var(--accent);
  margin-right: 0.1em;
}

.pull-quote::after {
  content: '"';
  color: var(--accent);
  margin-left: 0.05em;
}

.principle-body {
  font-family: var(--serif);
  font-size: 1.2rem;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 680px;
}

/* Closing CTA */
.section--cta {
  padding: 7rem 3.5rem;
}

.closing {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--paper);
  margin-bottom: 3rem;
}

/* ---------- Page Sections (About / Namesake / Contact) ---------- */

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 6rem 3.5rem 7rem;
}

.page-heading {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.75rem;
}

.page h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  line-height: 1.12;
  color: var(--ink);
  margin-bottom: 3.5rem;
  letter-spacing: -0.005em;
}

.page h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 1.65rem;
  color: var(--ink);
  margin-top: 3.5rem;
  margin-bottom: 1.2rem;
  letter-spacing: -0.005em;
}

.page p {
  font-family: var(--serif);
  font-size: 1.18rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
  max-width: 740px;
}

.page p.first-paragraph::first-line {
  letter-spacing: 0.04em;
}

.divider {
  width: 60px;
  height: 1px;
  background: var(--accent);
  margin: 2.5rem 0;
  border: 0;
}

/* ---------- Pillars (About) ---------- */

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--rule);
}

.pillar h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  color: var(--ink);
  margin-bottom: 0.9rem;
  letter-spacing: 0.01em;
}

.pillar p {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 300;
  line-height: 1.65;
  color: var(--muted);
  max-width: none;
}

.pillar .num {
  font-family: var(--serif);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--accent);
  display: block;
  margin-bottom: 0.6rem;
  letter-spacing: 0.05em;
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--rule);
}

.contact-block .label {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.contact-block .value {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--ink);
  line-height: 1.55;
}

.contact-block .value a {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1px;
}

/* ---------- Tools Page (public) ---------- */

/* Intro band */
.tools-intro {
  background: var(--paper);
  padding: 6rem 3.5rem 4rem;
}

.tools-intro-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.tools-intro h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 5.5vw, 4.4rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.tools-intro p {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.5vw, 1.4rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 620px;
}

/* The reef — deep azure water around the islets */
.reef {
  background: var(--azure-deep);
  background-image:
    radial-gradient(ellipse at 20% 30%, rgba(65, 120, 168, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 70%, rgba(14, 56, 88, 0.15) 0%, transparent 50%);
  padding: 5rem 3.5rem 7rem;
  position: relative;
  overflow: hidden;
}

/* Subtle wave hatching on the reef */
.reef::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent 0px,
    transparent 28px,
    rgba(65, 120, 168, 0.05) 28px,
    rgba(65, 120, 168, 0.05) 29px
  );
}

.islet-grid {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-flow: dense;
  gap: 1.25rem;
}

/* Islet — basalt stone with stacked-log texture */
.islet {
  position: relative;
  background: #1f242c;
  color: var(--paper);
  aspect-ratio: 1 / 1;
  overflow: hidden;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.4rem 1.4rem 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -2px 0 rgba(0, 0, 0, 0.5),
    0 4px 18px rgba(0, 0, 0, 0.3);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

/* Stacked basalt-log horizontal striations */
.islet::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      0deg,
      rgba(232, 235, 239, 0.025) 0px,
      rgba(232, 235, 239, 0.025) 1px,
      transparent 1px,
      transparent 4px
    ),
    repeating-linear-gradient(
      0deg,
      transparent 0px,
      transparent 22px,
      rgba(0, 0, 0, 0.25) 22px,
      rgba(0, 0, 0, 0.25) 23px
    );
}

/* Subtle diagonal highlight for stone-face shading */
.islet::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.03) 0%,
    transparent 40%,
    transparent 60%,
    rgba(0, 0, 0, 0.18) 100%
  );
}

/* Featured islet — Nan Douwas-scale, real tool */
.islet--featured {
  grid-column: span 2;
  grid-row: span 2;
  padding: 2.25rem 2rem 2rem;
  background: #232830;
}

.islet--featured:hover {
  transform: translateY(-4px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    inset 0 -2px 0 rgba(0, 0, 0, 0.5),
    0 14px 36px rgba(0, 0, 0, 0.45),
    0 0 0 1px var(--azure-bright);
}

.islet-num {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.12em;
  color: var(--azure-bright);
  opacity: 0.75;
}

.islet--featured .islet-num {
  font-size: 1.2rem;
  opacity: 1;
}

.islet-body {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.islet-eyebrow {
  font-family: var(--sans);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--azure-bright);
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}

.islet-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  line-height: 1.1;
  color: var(--paper);
  margin-bottom: 1rem;
  letter-spacing: -0.005em;
}

.islet-desc {
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 300;
  line-height: 1.55;
  color: rgba(232, 235, 239, 0.78);
  margin-bottom: 1.75rem;
  flex-grow: 1;
}

.islet-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--paper);
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--paper);
  align-self: flex-start;
  transition: gap 0.25s ease;
}

.islet--featured:hover .islet-cta {
  gap: 0.9rem;
}

.islet-cta .arrow {
  font-family: var(--serif);
  font-size: 1rem;
}

/* Placeholder islets — undeveloped land */
.islet--placeholder {
  background: #1a1e25;
  opacity: 0.55;
  cursor: default;
}

.islet--placeholder:hover {
  opacity: 0.7;
}

.islet--placeholder .islet-status {
  position: relative;
  z-index: 1;
  font-family: var(--sans);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(232, 235, 239, 0.4);
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding: 2.25rem 3.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.site-footer .disclaimer {
  max-width: 580px;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 820px) {
  .site-header {
    padding: 1.5rem 1.5rem;
    flex-direction: column;
    gap: 1.2rem;
    text-align: center;
  }
  .site-nav {
    gap: 1.4rem;
    flex-wrap: wrap;
    justify-content: center;
  }
  .hero {
    padding: 4rem 1.5rem 6rem;
    min-height: 90vh;
  }
  .page {
    padding: 3.5rem 1.5rem 4.5rem;
  }
  .pillars,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .section {
    padding: 4.5rem 1.5rem;
  }
  .section--cta {
    padding: 4.5rem 1.5rem;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    padding: 2.5rem 0;
    margin-bottom: 2.5rem;
  }
  .tools-intro {
    padding: 3.5rem 1.5rem 2.5rem;
  }
  .reef {
    padding: 3rem 1.5rem 4.5rem;
  }
  .islet-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }
  .islet--featured {
    padding: 1.6rem 1.4rem 1.5rem;
  }
  .islet-title {
    font-size: 1.2rem;
  }
  .islet-desc {
    font-size: 0.8rem;
  }
  .statement {
    margin-bottom: 3rem;
  }
  .scroll-cue {
    display: none;
  }
  .site-footer {
    padding: 1.5rem;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}
