:root {
  --tide-bg: #F4EFE6;
  --tide-card: #FBF8F3;
  --tide-footer: #E6DED0;
  --tide-shade: #D6CEBF;
  --tide-light: #FFFFFF;
  --tide-tone: #1F6F7A;
  --tide-tone-hover: #165661;
  --tide-coral: #E9A88F;
  --tide-rose: #EAD3C6;
  --tide-ocean: #2F5D8C;
  --tide-plum: #6B4E71;
  --tide-ink: #1A1A2A;
  --tide-muted: #4A4A5C;
  --tide-overlay: rgba(26, 26, 42, 0.7);
  --tide-gradient: linear-gradient(135deg, #1F6F7A 0%, #2E8B8F 60%, #E9A88F 100%);
  --tide-radius-lg: 32px;
  --tide-radius-md: 20px;
  --tide-radius-pill: 999px;
  --tide-shadow-out: 8px 8px 18px var(--tide-shade), -8px -8px 18px var(--tide-light);
  --tide-shadow-in: inset 6px 6px 12px var(--tide-shade), inset -6px -6px 12px var(--tide-light);
  --tide-shadow-deep: 14px 14px 30px rgba(120, 105, 85, 0.25), -10px -10px 24px var(--tide-light);
  --font-display: 'Playfair Display', sans-serif;
  --font-body: 'Inter', sans-serif;
}

/* ---------- View transitions ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: 0.35s ease both tide-vt-out; }
::view-transition-new(root) { animation: 0.45s ease both tide-vt-in; }
@keyframes tide-vt-out { to { opacity: 0; } }
@keyframes tide-vt-in { from { opacity: 0; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--tide-bg);
  color: var(--tide-ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--tide-ink);
}
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--tide-muted); }
a { color: var(--tide-tone); }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--tide-tone);
  outline-offset: 3px;
}
img { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
.tide-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.tide-wrap { width: min(1200px, calc(100% - 40px)); margin-inline: auto; }
.tide-band { position: relative; padding-block: 10dvh; overflow: clip; }
.tide-band-tight { padding-block: 6dvh; }
.tide-heading-wrap { text-align: center; max-width: 720px; margin: 0 auto 5dvh; }
.tide-center-copy { text-align: center; max-width: 760px; margin-inline: auto; }
.tide-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; }
.tide-eyebrow {
  display: inline-block;
  padding: 6px 16px;
  border-radius: var(--tide-radius-pill);
  box-shadow: var(--tide-shadow-in);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--tide-tone);
  margin-bottom: 18px;
}

/* ---------- Header ---------- */
.tide-top {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  background: var(--tide-bg);
  box-shadow: var(--tide-shadow-out);
}
.tide-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--tide-ink);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}
.tide-logo { flex: 0 0 auto; }
.tide-toggle-input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.tide-burger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 12px;
  border-radius: 14px;
  box-shadow: var(--tide-shadow-out);
  cursor: pointer;
}
.tide-burger span:not(.tide-sr) {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--tide-ink);
  border-radius: 2px;
}
.tide-toggle-input:focus-visible ~ .tide-burger { outline: 3px solid var(--tide-tone); outline-offset: 3px; }
.tide-nav-links {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  gap: 8px;
  padding: 16px 20px 22px;
  background: var(--tide-bg);
  box-shadow: var(--tide-shadow-deep);
}
.tide-toggle-input:checked ~ .tide-nav-links { display: flex; }
.tide-nav-links a {
  padding: 12px 18px;
  border-radius: var(--tide-radius-md);
  text-decoration: none;
  color: var(--tide-ink);
  font-weight: 600;
  box-shadow: var(--tide-shadow-out);
  transition: box-shadow 0.3s ease, color 0.3s ease;
}
.tide-nav-links a:hover { box-shadow: var(--tide-shadow-in); color: var(--tide-tone); }
.tide-nav-links a[aria-current="page"] { color: var(--tide-tone); box-shadow: var(--tide-shadow-in); }
.tide-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 3px;
  background: var(--tide-tone);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}
@supports (animation-timeline: scroll()) {
  .tide-progress {
    animation: tide-read-progress linear both;
    animation-timeline: scroll(root block);
  }
}
@keyframes tide-read-progress { to { transform: scaleX(1); } }

@media (min-width: 900px) {
  .tide-burger { display: none; }
  .tide-nav-links {
    display: flex;
    position: static;
    flex-direction: row;
    gap: 10px;
    padding: 0;
    background: none;
    box-shadow: none;
  }
}

/* ---------- Hero and decor ---------- */
.tide-hero {
  position: relative;
  overflow: clip;
  padding-block: 8dvh 10dvh;
}
.tide-hero-minimal { padding-block: 8dvh 4dvh; }
.tide-hero-centered { padding-block: 8dvh 4dvh; }
.tide-hero-split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) {
  .tide-hero-split { grid-template-columns: 55fr 45fr; }
}
.tide-hero-copy { position: relative; z-index: 1; }
.tide-hero-copy p { font-size: 1.08rem; max-width: 560px; }
.tide-hero-frame {
  position: relative;
  z-index: 1;
  padding: 12px;
  border-radius: 32px;
  background: var(--tide-bg);
  box-shadow: var(--tide-shadow-deep), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}
.tide-hero-frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 24px;
}
.tide-deco-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: clip;
}
.tide-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
  animation: tide-drift 26s ease-in-out infinite alternate;
}
.tide-blob-a {
  width: 320px;
  height: 320px;
  background: var(--tide-tone);
  top: -80px;
  left: -80px;
}
.tide-blob-b {
  width: 260px;
  height: 260px;
  background: var(--tide-coral);
  bottom: -60px;
  right: 10%;
  animation-duration: 34s;
}
@keyframes tide-drift {
  from { transform: translate(0, 0) rotate(0deg); }
  to { transform: translate(40px, 30px) rotate(25deg); }
}
.tide-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  padding: 12px 18px;
  border-radius: var(--tide-radius-md);
  background: var(--tide-bg);
  box-shadow: var(--tide-shadow-out);
  font-size: 0.95rem;
  color: var(--tide-ink);
}
.tide-badge-num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--tide-tone);
}
@media (min-width: 900px) {
  .tide-hero-copy { padding-bottom: 60px; }
  .tide-badge { position: absolute; right: 0; bottom: 0; margin: 0; }
}

/* ---------- Buttons ---------- */
.tide-pill-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 26px;
  border: 0;
  border-radius: var(--tide-radius-pill);
  background: var(--tide-tone);
  color: #FFFFFF;
  text-decoration: none;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--tide-shadow-out);
  transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.tide-pill-link:hover {
  background: var(--tide-tone-hover);
  color: #FFFFFF;
  transform: scale(1.03);
  box-shadow: 0 0 0 6px rgba(31, 111, 122, 0.12), var(--tide-shadow-out);
}
.tide-pill-link:active { transform: scale(0.99); }
.tide-pill-ghost { background: var(--tide-bg); color: var(--tide-ink); }
.tide-pill-ghost:hover { background: var(--tide-bg); color: var(--tide-tone); }

/* ---------- Problem / solution ---------- */
.tide-problem-grid { display: grid; gap: 24px; }
@media (min-width: 800px) {
  .tide-problem-grid { grid-template-columns: 1fr 1fr; }
}
.tide-problem-card {
  padding: 32px;
  border-radius: var(--tide-radius-lg);
  box-shadow: var(--tide-shadow-out);
}
.tide-problem-card.is-pain { background: var(--tide-rose); }
.tide-problem-card.is-gain { background: var(--tide-coral); }
.tide-problem-card h3,
.tide-problem-card li { color: var(--tide-ink); }
.tide-points { list-style: none; padding: 0; margin: 0; }
.tide-points li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  color: var(--tide-muted);
}
.tide-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--tide-tone);
  box-shadow: var(--tide-shadow-in);
}
.tide-problem-card.is-gain .tide-points li,
.tide-problem-card.is-pain .tide-points li { color: var(--tide-ink); }

/* ---------- Photo band ---------- */
.tide-photo-band {
  position: relative;
  height: 40vh;
  min-height: 280px;
  overflow: clip;
  display: flex;
}
.tide-photo-short { height: 34vh; min-height: 240px; }
.tide-photo-band > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.tide-photo-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--tide-overlay);
  z-index: 1;
  pointer-events: none;
}
.tide-photo-copy {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}
.tide-photo-text {
  max-width: 760px;
  margin: 0;
  font-size: 1.15rem;
  color: #FFFFFF;
  font-family: var(--font-display);
}

/* ---------- Feature tiles ---------- */
.tide-tile-grid { display: grid; gap: 28px; }
@media (min-width: 700px) {
  .tide-tile-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .tide-tile-grid { grid-template-columns: repeat(4, 1fr); }
}
.tide-grid-three { }
@media (min-width: 1000px) {
  .tide-grid-three { grid-template-columns: repeat(3, 1fr); }
}
.tide-tile {
  padding: 32px 26px;
  border-radius: var(--tide-radius-lg);
  background: var(--tide-bg);
  box-shadow: var(--tide-shadow-out);
  transition: box-shadow 0.4s ease;
}
.tide-tile:hover { box-shadow: var(--tide-shadow-in); }
.tide-tile-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  box-shadow: var(--tide-shadow-in);
  color: var(--tide-tone);
  margin-bottom: 18px;
}
.tide-tile-icon svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tide-tile p { font-size: 0.97rem; }

/* ---------- Numbered list ---------- */
.tide-num-list { list-style: none; padding: 0; margin: 16px 0 0; }
.tide-num-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
  color: var(--tide-ink);
  font-size: 0.95rem;
}
.tide-dot {
  flex: 0 0 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #FFFFFF;
  box-shadow: var(--tide-shadow-out);
}
.tide-dot.c1 { background: var(--tide-tone); }
.tide-dot.c2 { background: var(--tide-coral); color: var(--tide-ink); }
.tide-dot.c3 { background: var(--tide-ocean); }
.tide-dot.c4 { background: var(--tide-plum); }
.tide-icon-list { list-style: none; padding: 0; margin: 0; }
.tide-icon-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
  color: var(--tide-ink);
}

/* ---------- Steps ---------- */
.tide-steps { display: flex; flex-direction: column; gap: 20px; }
@media (min-width: 900px) {
  .tide-steps { flex-direction: row; align-items: stretch; }
  .tide-step { flex: 1; }
}
.tide-step-pill {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 24px;
  border-radius: var(--tide-radius-pill);
  background: var(--tide-bg);
  box-shadow: var(--tide-shadow-out);
}
.tide-step-num {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--tide-tone);
}
.tide-step-word { font-weight: 600; color: var(--tide-ink); }
.tide-step-desc { padding: 0 12px; margin-top: 16px; }
.tide-steps-dash { display: none; }
@media (min-width: 900px) {
  .tide-steps-dash {
    display: block;
    flex: 0 0 40px;
    align-self: flex-start;
    margin-top: 30px;
    border-top: 2px dashed var(--tide-shade);
  }
}

/* ---------- CTA strip ---------- */
.tide-cta-strip { display: flex; justify-content: center; }
.tide-cta-card {
  max-width: 700px;
  width: 100%;
  padding: 40px 32px;
  border-radius: var(--tide-radius-lg);
  background: var(--tide-bg);
  box-shadow: var(--tide-shadow-deep);
  text-align: center;
}

/* ---------- Expert page ---------- */
.tide-rounded-card {
  position: relative;
  padding: 14px;
  border-radius: 32px;
  background: var(--tide-bg);
  box-shadow: var(--tide-shadow-deep);
  max-width: 980px;
  margin-inline: auto;
}
.tide-rounded-card img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 24px;
}
.tide-rounded-card figcaption {
  padding: 14px 8px 4px;
  font-size: 0.92rem;
  color: var(--tide-muted);
  text-align: center;
}
.tide-split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) {
  .tide-split { grid-template-columns: 1fr 1fr; }
  .tide-split-reverse .tide-split-media { order: 2; }
  .tide-split-reverse .tide-split-copy { order: 1; }
}
.tide-split-aside {
  padding: 32px;
  border-radius: var(--tide-radius-lg);
  box-shadow: var(--tide-shadow-out);
  background: var(--tide-bg);
}
.tide-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tide-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 28px 18px;
  border-radius: var(--tide-radius-md);
  box-shadow: var(--tide-shadow-out);
  background: var(--tide-bg);
  text-align: center;
  color: var(--tide-muted);
}
.tide-stat-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.8rem);
  font-weight: 700;
  color: var(--tide-tone);
  line-height: 1.1;
}
.tide-mini-card {
  padding: 32px 26px;
  border-radius: var(--tide-radius-lg);
  background: var(--tide-bg);
  box-shadow: var(--tide-shadow-deep);
}

/* ---------- Forms ---------- */
.tide-form-card {
  max-width: 620px;
  margin: 0 auto;
  padding: 36px 28px;
  border-radius: var(--tide-radius-lg);
  background: var(--tide-bg);
  box-shadow: var(--tide-shadow-deep);
}
.tide-form-card > p { margin-bottom: 24px; }
.tide-field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.tide-field label { font-weight: 600; color: var(--tide-ink); }
.tide-field input,
.tide-field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-radius: var(--tide-radius-md);
  background: var(--tide-bg);
  box-shadow: var(--tide-shadow-in);
  font: inherit;
  color: var(--tide-ink);
}
.tide-field textarea { resize: vertical; min-height: 110px; }
.tide-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 24px;
  font-size: 0.95rem;
}
.tide-check label { color: var(--tide-ink); }
.tide-check input {
  width: 20px;
  height: 20px;
  margin-top: 4px;
  flex: 0 0 auto;
  accent-color: var(--tide-tone);
}
.tide-submit { width: 100%; }
.tide-contact-line { margin: 22px 0 0; text-align: center; font-size: 0.95rem; }

/* ---------- FAQ ---------- */
.tide-faq { max-width: 760px; margin: 0 auto; display: grid; gap: 14px; }
.tide-faq details {
  padding: 18px 22px;
  border-radius: var(--tide-radius-md);
  background: var(--tide-bg);
  box-shadow: var(--tide-shadow-out);
}
.tide-faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--tide-ink);
}
.tide-faq details p { margin: 12px 0 0; }

/* ---------- Thanks page ---------- */
.tide-thanks-wrap { padding-block: 10dvh; }
.tide-thanks {
  display: grid;
  gap: 32px;
  align-items: center;
  justify-items: center;
  text-align: center;
}
@media (min-width: 900px) {
  .tide-thanks { grid-template-columns: 1fr 1fr; text-align: left; }
  .tide-thanks-copy .tide-actions { justify-content: flex-start !important; }
}
.tide-thanks-figure img {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--tide-radius-lg);
  box-shadow: var(--tide-shadow-deep);
}

/* ---------- Legal pages ---------- */
.tide-legal-wrap { min-height: 100dvh; padding-block: 8dvh 10dvh; }
.tide-legal { max-width: 820px; margin: 0 auto; }
.tide-legal h2 { font-size: 1.5rem; margin-top: 1.6em; }
.tide-legal section[id] { margin-top: 2.4em; padding-top: 1em; border-top: 2px solid var(--tide-shade); }

/* ---------- Footer ---------- */
.tide-foot { background: var(--tide-footer); color: var(--tide-ink); }
.tide-foot-inner { display: grid; gap: 22px; padding-block: 48px; }
.tide-foot .tide-brand { color: var(--tide-ink); }
.tide-foot-links { display: flex; flex-wrap: wrap; gap: 18px; }
.tide-foot-links a { color: var(--tide-ink); text-decoration: underline; text-underline-offset: 3px; }
.tide-disclaimer {
  margin: 0;
  padding-left: 12px;
  border-left: 3px solid var(--tide-tone);
  font-size: 0.92rem;
  color: var(--tide-muted);
}
.tide-copy-line { margin: 0; font-size: 0.9rem; color: var(--tide-muted); }

/* ---------- Cookie banner (static, no transforms) ---------- */
.tide-cookie {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 9999;
  max-width: 720px;
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-radius: var(--tide-radius-md);
  background: var(--tide-bg);
  box-shadow: var(--tide-shadow-deep);
}
.tide-cookie[hidden] { display: none; }
.tide-cookie p { margin: 0; color: var(--tide-ink); font-size: 0.95rem; }
.tide-cookie > div { display: flex; gap: 10px; flex-wrap: wrap; }
.tide-cookie button {
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  border-radius: var(--tide-radius-pill);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--tide-shadow-out);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}
.tide-cookie button:hover { box-shadow: var(--tide-shadow-in); }
#accept-cookie { background: var(--tide-tone); color: #FFFFFF; }
#decline-cookie { background: var(--tide-bg); color: var(--tide-ink); }

/* ---------- Reveal (stagger, JS-dependent, visible without JS) ---------- */
.js .tide-reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .tide-reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- Clip reveal for images (scroll-driven) ---------- */
@supports (animation-timeline: view()) {
  .tide-clip {
    animation: tide-unveil linear both;
    animation-timeline: view();
    animation-range: entry 0% cover 45%;
  }
}
@keyframes tide-unveil {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* ---------- Desktop refinements ---------- */
@media (min-width: 1440px) {
  .tide-wrap { width: min(1200px, calc(100% - 40px)); }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  html { view-transition-name: none; }
}