:root {
  --lake-1: #0b3d42;
  --lake-2: #0e5e63;
  --turquoise: #14c4b4;
  --turquoise-bright: #3fe8d4;
  --limestone: #e8e2d3;
  --limestone-dark: #cfc6ae;
  --ink: #0a1f22;
  --paper: #f6f4ee;
  --rust: #b3441e;
  --malachite: #1f7a5c;
  --shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  font-size: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Iowan Old Style", "Georgia", "Times New Roman", serif;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.12;
  margin: 0 0 0.4em;
  letter-spacing: -0.01em;
}

p { line-height: 1.6; margin: 0 0 1em; }

a { color: inherit; }

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 31, 34, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--paper);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--turquoise-bright), var(--turquoise) 60%, var(--lake-1));
  box-shadow: 0 0 12px var(--turquoise);
}

.nav-links {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: rgba(246, 244, 238, 0.85);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--turquoise-bright); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--paper);
  display: block;
}

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

.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: var(--paper);
}

.hero-water {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 30% 20%, rgba(63, 232, 212, 0.35), transparent 60%),
    radial-gradient(ellipse 70% 50% at 80% 80%, rgba(20, 196, 180, 0.25), transparent 60%),
    linear-gradient(160deg, var(--lake-1) 0%, var(--lake-2) 45%, #0a2e33 100%);
}

.hero-water::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.04) 0px,
    rgba(255, 255, 255, 0.04) 2px,
    transparent 2px,
    transparent 60px
  );
  animation: shimmer 14s linear infinite;
}

@keyframes shimmer {
  0% { transform: translateX(0); }
  100% { transform: translateX(120px); }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.eyebrow {
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.78rem;
  color: var(--turquoise-bright);
  margin-bottom: 14px;
}

.hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 700;
}

.turquoise-text {
  color: var(--turquoise-bright);
}

.hero-sub {
  font-size: 1.15rem;
  color: rgba(246, 244, 238, 0.85);
  max-width: 680px;
  margin: 20px auto 32px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  display: inline-block;
  padding: 14px 28px;
  border-radius: 100px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: linear-gradient(135deg, var(--turquoise-bright), var(--turquoise));
  color: var(--ink);
  box-shadow: 0 8px 24px -6px rgba(20, 196, 180, 0.6);
}

.btn-ghost {
  border: 1px solid rgba(246, 244, 238, 0.4);
  color: var(--paper);
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-cue span {
  display: block;
  width: 22px;
  height: 36px;
  border: 2px solid rgba(246, 244, 238, 0.5);
  border-radius: 100px;
  position: relative;
}

.scroll-cue span::after {
  content: "";
  position: absolute;
  top: 6px;
  left: 50%;
  width: 4px;
  height: 8px;
  background: var(--turquoise-bright);
  border-radius: 100px;
  transform: translateX(-50%);
  animation: bob 1.6s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { top: 6px; opacity: 1; }
  50% { top: 16px; opacity: 0.3; }
}

/* ---------- Fact strip ---------- */

.fact-strip {
  background: var(--limestone);
  padding: 64px 24px;
  border-bottom: 1px solid var(--limestone-dark);
}

.fact-strip-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.fact h3 {
  font-size: 1.05rem;
  color: var(--lake-1);
}

.fact p { font-size: 0.95rem; color: #40443c; }

/* ---------- Sections ---------- */

.section {
  padding: 88px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.section.alt {
  background: linear-gradient(180deg, transparent, rgba(20, 196, 180, 0.05), transparent);
  max-width: none;
}

.section.alt > * {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-head .eyebrow { color: var(--lake-2); }

.section-head h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  color: var(--lake-1);
}

.section-sub {
  color: #55594f;
  font-size: 1.02rem;
}

/* ---------- Filter ---------- */

.filter-row {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  border: 1px solid var(--limestone-dark);
  background: #fff;
  padding: 9px 20px;
  border-radius: 100px;
  cursor: pointer;
  font-size: 0.88rem;
  color: var(--lake-1);
  transition: all 0.2s;
}

.filter-btn:hover { border-color: var(--turquoise); }

.filter-btn.active {
  background: var(--lake-1);
  border-color: var(--lake-1);
  color: var(--paper);
}

/* ---------- Cards ---------- */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.rock-card {
  perspective: 1400px;
  height: 300px;
  cursor: pointer;
  outline: none;
}

.rock-card.hidden-cat { display: none; }

.rock-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.65s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}

.rock-card.flipped .rock-card-inner {
  transform: rotateY(180deg);
}

.rock-face {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  backface-visibility: hidden;
  padding: 28px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.rock-front {
  color: var(--paper);
  justify-content: flex-end;
}

.rock-front h3 {
  font-size: 1.25rem;
  color: #fff;
}

.rock-front .tag {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0;
}

.rock-icon {
  font-size: 2.2rem;
  margin-bottom: auto;
  opacity: 0.9;
}

.flip-hint {
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.6;
  margin-top: 14px;
}

.rock-back {
  background: #fff;
  border: 1px solid var(--limestone-dark);
  transform: rotateY(180deg);
  overflow-y: auto;
}

.rock-back h3 {
  font-size: 1.05rem;
  color: var(--lake-1);
}

.rock-back p {
  font-size: 0.86rem;
  color: #3a3d36;
  margin-bottom: 0.8em;
}

/* swatches */
.swatch-limestone { background: linear-gradient(150deg, #a6a184, #7d7a63); }
.swatch-coral { background: linear-gradient(150deg, #3f8f8a, #175c58); }
.swatch-ammonite { background: linear-gradient(150deg, #5a4a8a, #2d2455); }
.swatch-jasper { background: linear-gradient(150deg, var(--rust), #6e2410); }
.swatch-phosphate { background: linear-gradient(150deg, #4a4038, #221d18); }
.swatch-quartzite { background: linear-gradient(150deg, #c7b3a8, #8f7566); }
.swatch-trilobite { background: linear-gradient(150deg, #3a5a4a, #1c332a); }

/* ---------- Site list ---------- */

.site-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.site-card {
  background: #fff;
  border: 1px solid var(--limestone-dark);
  border-radius: var(--radius);
  padding: 28px;
  position: relative;
  transition: transform 0.25s, box-shadow 0.25s;
}

.site-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.site-num {
  font-family: "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--turquoise);
  letter-spacing: 0.1em;
}

.site-card h3 {
  font-size: 1.12rem;
  color: var(--lake-1);
  margin-top: 6px;
}

.site-card p {
  font-size: 0.92rem;
  color: #4a4d45;
}

/* ---------- Rules ---------- */

.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.rule {
  background: var(--limestone);
  border-radius: var(--radius);
  padding: 26px;
}

.rule h3 {
  font-size: 1.02rem;
  color: var(--lake-1);
}

.rule p {
  font-size: 0.9rem;
  color: #4a4d45;
  margin-bottom: 0;
}

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

.site-footer {
  background: var(--ink);
  color: rgba(246, 244, 238, 0.6);
  padding: 32px 24px;
  text-align: center;
  font-size: 0.82rem;
}

.site-footer p { margin: 0; max-width: 700px; margin: 0 auto; }

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

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

@media (max-width: 820px) {
  .fact-strip-inner { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--lake-1);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .section { padding: 64px 20px; }
}
