/* Coastal Wellness Health — design tokens
   Soft sage/seafoam palette, editorial-warm type system.
*/

:root {
  /* Palette — sand / seafoam / sage / pine */
  --cw-sand-50:  #faf6ee;       /* page background, warmer than off-white */
  --cw-sand-100: #f4ede2;       /* base card / hero wash */
  --cw-sand-200: #ebe1d1;       /* divider, subtle fill */
  --cw-sand-300: #d9cab0;       /* warm accents, line work */

  --cw-foam-50:  #eef3ee;       /* faintest seafoam wash */
  --cw-foam-100: #dfe7e0;       /* card fill */
  --cw-foam-200: #c5d4c8;

  --cw-sage-300: #a8c0b5;       /* signature mid-tone */
  --cw-sage-400: #82a497;
  --cw-sage-500: #6b8a86;       /* secondary brand */
  --cw-sage-600: #547370;

  --cw-pine-700: #3e5856;
  --cw-pine-800: #2f4845;       /* primary brand / headings */
  --cw-pine-900: #1f3331;       /* deep ink for body text */

  --cw-ink:      #1f3331;       /* body */
  --cw-ink-soft: #4a6260;       /* secondary text */
  --cw-ink-mute: #7a8c8a;       /* tertiary */

  --cw-line:     #d9d1c2;       /* hairline rules */
  --cw-line-soft:#e6dec9;

  --cw-clay:     #c98a5d;       /* very sparing accent — only for in-text emphasis */
  --cw-bone:     #ffffff;

  /* Type */
  --font-display: "Newsreader", "Cormorant Garamond", Georgia, serif;
  --font-sans:    "DM Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* Scale (1920 desktop reference, but fluid) */
  --step--1: clamp(0.78rem, 0.76rem + 0.1vw, 0.85rem);
  --step-0:  clamp(0.95rem, 0.92rem + 0.15vw, 1.05rem);
  --step-1:  clamp(1.1rem,  1.05rem + 0.2vw,  1.2rem);
  --step-2:  clamp(1.3rem,  1.2rem + 0.4vw,   1.55rem);
  --step-3:  clamp(1.6rem,  1.4rem + 0.8vw,   2.1rem);
  --step-4:  clamp(2.1rem,  1.7rem + 1.6vw,   3.2rem);
  --step-5:  clamp(2.8rem,  2.1rem + 2.8vw,   4.6rem);
  --step-6:  clamp(3.6rem,  2.5rem + 4.4vw,   6.4rem);

  /* Spacing (8px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;
  --space-11: 160px;

  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-lg: 18px;
  --radius-xl: 28px;
  --radius-full: 999px;

  --shadow-soft: 0 1px 2px rgba(31,51,49,0.04), 0 8px 24px -12px rgba(31,51,49,0.10);
  --shadow-lift: 0 2px 4px rgba(31,51,49,0.05), 0 24px 60px -28px rgba(31,51,49,0.18);

  --content-max: 1320px;
  --content-narrow: 880px;

  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--cw-sand-50);
  color: var(--cw-ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }

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

a {
  color: var(--cw-pine-800);
  text-decoration-color: var(--cw-sage-300);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration-color: var(--cw-pine-800); }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--cw-pine-900);
  letter-spacing: -0.01em;
  line-height: 1.08;
  margin: 0;
  font-optical-sizing: auto;
  font-variation-settings: "opsz" 28;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

::selection { background: var(--cw-sage-300); color: var(--cw-pine-900); }

/* Layout helpers */
.cw-container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px);
}
.cw-narrow {
  max-width: var(--content-narrow);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 56px);
}
.cw-section {
  padding: clamp(56px, 8vw, 128px) 0;
}

/* Eyebrow label — used everywhere */
.cw-eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cw-sage-600);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.cw-eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--cw-sage-500);
  display: inline-block;
}

/* Buttons */
.cw-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
}
.cw-btn--primary {
  background: var(--cw-pine-800);
  color: var(--cw-sand-50);
}
.cw-btn--primary:hover {
  background: var(--cw-pine-900);
  transform: translateY(-1px);
}
.cw-btn--ghost {
  background: transparent;
  color: var(--cw-pine-800);
  border-color: var(--cw-pine-800);
}
.cw-btn--ghost:hover {
  background: var(--cw-pine-800);
  color: var(--cw-sand-50);
}
.cw-btn--quiet {
  background: var(--cw-sand-100);
  color: var(--cw-pine-800);
  padding: 10px 18px;
  font-size: 13px;
}
.cw-btn--quiet:hover { background: var(--cw-sand-200); }

/* Hairlines */
.cw-rule {
  height: 1px;
  background: var(--cw-line-soft);
  border: 0;
  margin: 0;
}

/* Tag / pill */
.cw-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--cw-foam-100);
  color: var(--cw-pine-800);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
}

/* Header / Nav */
.cw-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 238, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease-out), background 0.3s var(--ease-out);
}
.cw-header.is-scrolled {
  border-bottom-color: var(--cw-line-soft);
}
.cw-nav {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 18px 0;
}
.cw-logo {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--cw-pine-900);
  letter-spacing: -0.01em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 400;
  flex-shrink: 0;
}
.cw-logo svg { flex-shrink: 0; }
.cw-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.cw-logo-text small {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cw-sage-600);
  margin-top: 4px;
  font-weight: 500;
}
.cw-nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  align-items: center;
}
.cw-nav-link {
  font-size: 14px;
  color: var(--cw-pine-900);
  text-decoration: none;
  position: relative;
  padding: 6px 0;
  transition: color 0.2s var(--ease-out);
  white-space: nowrap;
}
.cw-nav-link:hover { color: var(--cw-sage-600); }
.cw-nav-link.is-active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0; right: 0;
  height: 1px;
  background: var(--cw-sage-500);
}
.cw-phone-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--cw-pine-900);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  background: var(--cw-foam-100);
  transition: all 0.2s var(--ease-out);
}
.cw-phone-cta:hover {
  background: var(--cw-sage-300);
}
.cw-phone-cta .cw-phone-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cw-sage-500);
  position: relative;
}
.cw-phone-cta .cw-phone-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: var(--cw-sage-500);
  opacity: 0.4;
  animation: cw-pulse 2.4s ease-out infinite;
}
@keyframes cw-pulse {
  0%   { transform: scale(0.6); opacity: 0.5; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* Footer */
.cw-footer {
  background: var(--cw-pine-800);
  color: var(--cw-sand-100);
  padding: 80px 0 32px;
  margin-top: 80px;
}
.cw-footer h2, .cw-footer h3, .cw-footer h4 { color: var(--cw-sand-50); }
.cw-footer a { color: var(--cw-sand-100); text-decoration-color: var(--cw-sage-400); }
.cw-footer a:hover { color: var(--cw-bone); }
.cw-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 56px;
  padding-bottom: 64px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.cw-footer-col h4 {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cw-sage-300);
  font-weight: 500;
  margin-bottom: 18px;
}
.cw-footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.cw-footer-col a { text-decoration: none; font-size: 14px; }
.cw-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  font-size: 12.5px;
  color: var(--cw-sage-300);
}

/* Page header (inner pages) */
.cw-page-head {
  padding: clamp(72px, 10vw, 140px) 0 clamp(40px, 6vw, 72px);
  background: linear-gradient(180deg, var(--cw-foam-50) 0%, var(--cw-sand-50) 100%);
  border-bottom: 1px solid var(--cw-line-soft);
}
.cw-page-head h1 {
  font-size: var(--step-5);
  margin-top: 16px;
  max-width: 16ch;
}
.cw-page-head p {
  margin-top: 24px;
  color: var(--cw-ink-soft);
  font-size: var(--step-1);
  max-width: 60ch;
  line-height: 1.5;
}

/* Reveal-on-scroll */
.cw-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.cw-reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Hide some nav links on medium screens to prevent wrap */
@media (max-width: 1180px) {
  .cw-nav-links { gap: 18px; }
  .cw-nav-link { font-size: 13px; }
}
@media (max-width: 1080px) {
  .cw-nav-links .cw-nav-link[data-secondary] { display: none; }
}
@media (max-width: 980px) {
  .cw-phone-cta {
    padding: 8px 12px;
    font-size: 0;
    gap: 0;
  }
  .cw-phone-cta::after {
    content: "Call";
    font-size: 13px;
    font-weight: 500;
    color: var(--cw-pine-900);
  }
  .cw-nav { gap: 16px; }
  .cw-nav-links { gap: 14px; }
}

/* Mobile */
@media (max-width: 880px) {
  .cw-nav-links { display: none; }
  .cw-footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .cw-footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
}
