/* =====================================================================
   Club of Swimming Dolphin's — Design System
   Source of truth: brief §3. Fraunces + Montserrat.
   ===================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Surfaces (pastel) */
  --surface-page: #f5f7fe;
  --surface-frozen: #c9e1fc;
  --surface-baby: #8fc0ff;
  --surface-wisteria: #7e9ed6;
  --surface-gold: #f8f0cd;
  --surface-white: #ffffff;
  --surface-bone: #f1f3f8;

  /* Action & text (vibrant) */
  --ink-navy: #1e3a5f;
  --action-cornflower: #4d96ff;
  --action-cornflower-deep: #2f6fd6;
  --accent-cyan: #00a2cb;
  --accent-cyan-deep: #04767d;
  --accent-mustard: #ffd93d;
  --accent-orange: #ff943d;
  --text-body: #42506b;
  --text-muted: #6b7280;
  --line: rgba(30, 58, 95, 0.1);
  --line-strong: rgba(30, 58, 95, 0.18);

  /* Tweakable roles (driven by tweaks panel) */
  --accent: var(--action-cornflower-deep); /* italic accent word, eyebrows */
  --display-font: "Fraunces";
  --section-gap: 96px;

  /* Radii */
  --r-sm: 14px;
  --r-md: 35px;
  --r-lg: 50px;
  --r-pill: 999px;

  /* Shadows — soft, navy-tinted. NEVER colored glow. */
  --sh-sm: 0 6px 18px rgba(30, 58, 95, 0.07);
  --sh-md: 0 14px 34px rgba(30, 58, 95, 0.12);
  --sh-lg: 0 22px 50px rgba(30, 58, 95, 0.16);

  /* Layout */
  --container: 1550px;
  --gutter: 24px;

  --body-font: "Montserrat", system-ui, sans-serif;
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--body-font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-body);
  background: var(--surface-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img,
svg,
video {
  display: block;
  max-width: 100%;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font-family: inherit;
  cursor: pointer;
}
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  color: var(--ink-navy);
  font-weight: 600;
}
p {
  margin: 0;
}

body::-webkit-scrollbar {
  width: 12px;
  background: var(--surface-page);
}
body::-webkit-scrollbar-thumb {
  background: rgba(30, 58, 95, 0.2);
  border-radius: var(--r-pill);
}

/* ---------- Type ---------- */
.display {
  font-family: var(--display-font), "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  font-variation-settings:
    "SOFT" 40,
    "opsz" 144,
    "wght" 600;
  letter-spacing: -0.015em;
}
h1.h1 {
  font-family: var(--display-font), "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  font-variation-settings:
    "SOFT" 30,
    "opsz" 144,
    "wght" 600;
  font-weight: 600;
  font-size: clamp(34px, 5.4vw, 64px);
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
h2.h2 {
  font-family: var(--display-font), "Fraunces", Georgia, serif;
  font-optical-sizing: auto;
  font-variation-settings:
    "SOFT" 30,
    "opsz" 120,
    "wght" 600;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.018em;
  text-wrap: balance;
}
h3.h3 {
  font-family: var(--display-font), "Fraunces", Georgia, serif;
  font-variation-settings:
    "SOFT" 20,
    "opsz" 60,
    "wght" 600;
  font-size: clamp(20px, 2.2vw, 22px);
  line-height: 1.2;
}
.accent {
  font-family: var(--display-font), "Fraunces", Georgia, serif;
  font-style: italic;
  font-variation-settings:
    "wght" 500,
    "opsz" 144,
    "SOFT" 40;
  font-weight: 500;
  color: var(--accent);
}
.eyebrow {
  font-family: var(--body-font);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--accent-cyan-deep);
  margin: 0;
}
.lead {
  font-size: clamp(17px, 1.4vw, 19px);
  line-height: 1.6;
  color: var(--text-body);
}
.muted {
  color: var(--text-muted);
}
.legal {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--text-muted);
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section {
  padding-block: var(--section-gap);
  position: relative;
}
.section--tight {
  padding-block: calc(var(--section-gap) * 0.7);
}
.section-head {
  max-width: 720px;
  margin-bottom: 80px;
}
.section-head.center {
  margin-inline: auto;
  text-align: center;
}
.section-head .eyebrow {
  margin-bottom: 14px;
}
.section-head p {
  margin-top: 16px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--body-font);
  font-weight: 600;
  font-size: 15.5px;
  padding: 14px 26px;
  border-radius: var(--r-pill);
  border: 1.5px solid transparent;
  transition:
    transform 0.25s cubic-bezier(0.2, 0.7, 0.3, 1),
    box-shadow 0.25s,
    background 0.2s,
    color 0.2s;
  min-height: 48px;
  white-space: nowrap;
}
.btn svg {
  width: 18px;
  height: 18px;
}
.btn--primary {
  background: var(--ink-navy);
  color: #fff;
  box-shadow: var(--sh-sm);
}
.btn--primary:hover {
  transform: scale(0.97);
  box-shadow: var(--sh-md);
  background: #16314f;
}
.btn--corn {
  background: var(--action-cornflower);
  color: #fff;
  box-shadow: var(--sh-sm);
}
.btn--corn:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
}
.btn--outline {
  background: transparent;
  color: var(--ink-navy);
  border-color: var(--line-strong);
}
.btn--outline:hover {
  transform: translateY(-3px);
  border-color: var(--ink-navy);
  box-shadow: var(--sh-sm);
}
.btn--mustard {
  background: var(--accent-mustard);
  color: var(--ink-navy);
  box-shadow: var(--sh-sm);
  font-weight: 700;
}
.btn--mustard:hover {
  transform: translateY(-3px);
  box-shadow:
    0 16px 34px rgba(255, 217, 61, 0.35),
    var(--sh-sm);
}
.btn--white {
  background: #fff;
  color: var(--ink-navy);
  box-shadow: var(--sh-sm);
}
.btn--white:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-md);
}
.btn--ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}
.btn--ghost:hover {
  background: rgba(255, 255, 255, 0.22);
}
.btn--sm {
  padding: 10px 18px;
  font-size: 14px;
  min-height: 40px;
}

/* arrow link */
.arrow-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  color: var(--action-cornflower-deep);
}
.arrow-link svg {
  width: 18px;
  height: 18px;
  transition: transform 0.25s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.arrow-link:hover svg {
  transform: translateX(6px);
}

/* ---------- Pills / badges ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--body-font);
  font-weight: 600;
  font-size: 12.5px;
  padding: 5px 13px;
  border-radius: var(--r-pill);
  background: var(--surface-frozen);
  color: var(--accent-cyan-deep);
  letter-spacing: 0.01em;
}
.pill--age {
  background: rgba(143, 192, 255, 0.22);
  color: var(--action-cornflower-deep);
}
.pill--cyan {
  background: rgba(0, 194, 203, 0.14);
  color: var(--accent-cyan-deep);
}
.pill--navy {
  background: rgba(30, 58, 95, 0.08);
  color: var(--ink-navy);
}
.pill--promo {
  background: var(--accent-mustard);
  color: var(--ink-navy);
  font-weight: 700;
}
.pill--limit {
  background: rgba(255, 217, 61, 0.22);
  color: #8a6d00;
}
.pill--price {
  background: var(--ink-navy);
  color: #fff;
}
.pill--dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.9;
}

/* placeholder tag */
.ph-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--body-font);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  background: rgba(30, 58, 95, 0.55);
  color: #fff;
  backdrop-filter: blur(4px);
}
.ph-note {
  border-left: 0; /* avoid the cliché left-accent-card; use a dotted chip instead */
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: #8a6d00;
  background: rgba(255, 217, 61, 0.16);
  border: 1px dashed rgba(255, 217, 61, 0.7);
  padding: 7px 13px;
  border-radius: var(--r-pill);
}

/* ---------- Card primitives ---------- */
.card {
  background: var(--surface-white);
  border-radius: var(--r-lg);
  /* box-shadow: var(--sh-sm); */
  border: 1px solid var(--line);
  transition:
    transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1),
    box-shadow 0.3s;
}
.card--hover:hover {
  transform: translateY(-5px);
  box-shadow: var(--sh-md);
}

/* =====================================================================
   Photo placeholder — pastel block, subtle pool-water gradient,
   thin line icon + [FOTO: …] label. Organic corner.
   ===================================================================== */
.photo {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background:
    radial-gradient(
      120% 90% at 20% 12%,
      rgba(255, 255, 255, 0.55),
      transparent 50%
    ),
    radial-gradient(
      130% 120% at 85% 100%,
      rgba(0, 194, 203, 0.3),
      transparent 55%
    ),
    linear-gradient(155deg, #bfe0ff 0%, #8fc0ff 45%, #5fa8e6 100%);
  isolation: isolate;
}
.photo--organic {
  border-radius: 60px var(--r-lg) var(--r-lg) var(--r-lg);
}
.photo--organic-2 {
  border-radius: var(--r-lg) 60px var(--r-lg) var(--r-lg);
}
.photo--gold {
  background:
    radial-gradient(
      120% 90% at 18% 12%,
      rgba(255, 255, 255, 0.55),
      transparent 50%
    ),
    radial-gradient(
      130% 120% at 85% 100%,
      rgba(255, 217, 61, 0.45),
      transparent 55%
    ),
    linear-gradient(155deg, #fff3c4 0%, #ffe27a 50%, #f4c23c 100%);
}
.photo--frozen {
  background:
    radial-gradient(
      120% 90% at 20% 10%,
      rgba(255, 255, 255, 0.7),
      transparent 50%
    ),
    linear-gradient(160deg, #eaffff 0%, #c2f4f6 50%, #8fe0e6 100%);
}
.photo--wisteria {
  background:
    radial-gradient(
      120% 90% at 20% 12%,
      rgba(255, 255, 255, 0.45),
      transparent 50%
    ),
    linear-gradient(155deg, #afc4e8 0%, #7e9ed6 55%, #5c7fbe 100%);
}
/* caustics / water shimmer */
.photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    repeating-linear-gradient(
      115deg,
      rgba(255, 255, 255, 0.1) 0 2px,
      transparent 2px 26px
    ),
    repeating-linear-gradient(
      65deg,
      rgba(255, 255, 255, 0.07) 0 2px,
      transparent 2px 32px
    );
  mix-blend-mode: soft-light;
  opacity: 0.8;
}
.photo__icon {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.85);
}
.photo__icon svg {
  width: 46px;
  height: 46px;
  stroke-width: 1.5;
}
.photo__tag {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 2;
}
.photo--gold .photo__icon {
  color: rgba(30, 58, 95, 0.5);
}

/* aspect helpers */
.ar-43 {
  aspect-ratio: 4/3;
}
.ar-11 {
  aspect-ratio: 1/1;
}
.ar-32 {
  aspect-ratio: 3/2;
}
.ar-169 {
  aspect-ratio: 16/9;
}
.ar-45 {
  aspect-ratio: 4/5;
}

/* ---------- Organic blobs ---------- */
.blob {
  position: absolute;
  z-index: -1;
  filter: blur(0.5px);
  pointer-events: none;
}
.blob--mustard {
  background: var(--accent-mustard);
  opacity: 0.5;
}
.blob--cyan {
  background: var(--accent-cyan);
  opacity: 0.45;
}
.blob--corn {
  background: var(--action-cornflower);
  opacity: 0.4;
}
.blob-shape-1 {
  border-radius: 42% 58% 60% 40% / 48% 42% 58% 52%;
}
.blob-shape-2 {
  border-radius: 60% 40% 47% 53% / 42% 58% 42% 58%;
}

/* ---------- Wave divider ---------- */
.wave {
  display: block;
  width: 100%;
  line-height: 0;
}
.wave svg {
  width: 100%;
  height: auto;
  display: block;
}

/* ---------- Reveal animation (GSAP-driven; progressive enhancement) ---------- */
/* Hidden pre-animation only when JS is on AND motion is allowed. GSAP writes inline styles to reveal. */
html.js:not(.no-anim) .reveal {
  opacity: 0;
}
html:not(.js) .reveal,
html.no-anim .reveal {
  opacity: 1 !important;
  transform: none !important;
}

/* Heading word-reveal */
.split .word {
  display: inline-block;
  will-change: transform, opacity;
}
html.js:not(.no-anim) .split .word {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal,
  .split .word {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}

/* ---------- Lenis smooth scroll ---------- */
html.lenis,
html.lenis body {
  height: auto;
}
.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}
.lenis.lenis-stopped {
  overflow: clip;
}

/* grain overlay utility for big pastel fields */
.grain {
  position: relative;
}
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%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)' opacity='0.5'/%3E%3C/svg%3E");
}
.grain > * {
  position: relative;
  z-index: 1;
}
