/* Haven Grove design tokens — the CMS Theme tab maps onto these custom properties. */
:root {
  --color-primary: #7b6cf6;
  --color-primary-dark: #5a4ad8;
  --color-primary-light: #a995f2;
  --color-secondary: #1d1b29;
  --color-accent: #e9c6a0;
  --color-accent-dark: #a07656;
  --color-surface: #faf6f1;
  --color-lilac: #f1eeff;
  --color-default: #4a4858;
  --color-muted: #7d7a89;
  --color-line: #ece6de;
  --font-default: 'Plus Jakarta Sans', sans-serif;
  --font-primary: 'Plus Jakarta Sans', sans-serif;
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --radius: 28px;
  --section-max-width: 80rem;
  --header-h: 92px;
  --section-pad-y: 110px;
  --base-size: 16px;
  --ease: cubic-bezier(.2, .75, .25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: var(--base-size); scroll-behavior: smooth; }
body { font-family: var(--font-default); color: var(--color-default); line-height: 1.7; background: #fff; }
h1, h2, h3, h4, h5 { font-family: var(--font-heading); color: var(--color-secondary); font-weight: 800; line-height: 1.1; letter-spacing: -.025em; }
a { color: inherit; text-decoration: none; transition: color .25s ease; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
::selection { background: var(--color-primary); color: #fff; }

.container { max-width: var(--section-max-width); margin: 0 auto; padding: 0 24px; }
section { padding: var(--section-pad-y) 0; position: relative; }
/* entrance start positions (e.g. 60px off to the right) must never widen the page;
   clip (unlike hidden) keeps sticky children working */
section, footer { overflow-x: clip; }
section.warm { background: var(--color-surface); }
section.lilac { background: var(--color-lilac); }

/* lavender → sand gradient text, as in the hero headline */
.grad { background: linear-gradient(100deg, var(--color-primary) 0%, var(--color-primary-light) 38%, var(--color-accent-dark) 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── Buttons: pill with a round arrow badge ── */
.btn {
  display: inline-flex; align-items: center; gap: .8rem; background: var(--color-primary); color: #fff;
  font: 700 1rem var(--font-primary); padding: .55rem 1.6rem .55rem .55rem; border-radius: 999px; border: 0; cursor: pointer;
  box-shadow: 0 14px 30px -12px color-mix(in srgb, var(--color-primary) 70%, transparent); transition: background .3s ease, transform .3s var(--ease), box-shadow .3s ease;
}
.btn .knob { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--color-primary); transition: transform .35s var(--ease); }
.btn .knob svg { width: 20px; height: 20px; }
.btn:hover { background: var(--color-primary-dark); transform: translateY(-2px); box-shadow: 0 18px 36px -12px color-mix(in srgb, var(--color-primary-dark) 75%, transparent); }
.btn:hover .knob { transform: rotate(-45deg); }
.btn.plain { padding: .95rem 1.8rem; }
/* knob after the label (e.g. "Book a Visit ↗") */
.btn.end { padding: .55rem .55rem .55rem 1.7rem; }
.btn.end:hover .knob { transform: rotate(45deg); }
/* soft secondary pill: white with a lavender glow */
.btn.soft { background: #fff; color: var(--color-secondary); padding: .95rem 1.7rem;
  box-shadow: 0 0 0 1.5px var(--color-lilac), 0 14px 30px -16px color-mix(in srgb, var(--color-primary) 55%, transparent); }
.btn.soft:hover { background: var(--color-lilac); color: var(--color-primary-dark); }
.btn.light { background: #fff; color: var(--color-secondary); box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .25); }
.btn.light .knob { background: var(--color-primary); color: #fff; }
.btn.ghost { background: transparent; color: var(--color-secondary); box-shadow: inset 0 0 0 1.5px var(--color-line); padding: .9rem 1.6rem; }
.btn.ghost:hover { box-shadow: inset 0 0 0 1.5px var(--color-primary); color: var(--color-primary); }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* ── Section heads ── */
.eyebrow { display: inline-flex; align-items: center; gap: .55rem; padding: .4rem 1rem; border-radius: 999px; background: var(--color-lilac); color: var(--color-primary-dark);
  font: 700 .78rem var(--font-primary); text-transform: uppercase; letter-spacing: .14em; }
.warm .eyebrow { background: #fff; }
.lilac .eyebrow { background: #fff; }
.section-head { max-width: 720px; margin-bottom: 60px; }
.section-head h2 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); margin: 1rem 0 1rem; }
.section-head > p { color: var(--color-muted); font-size: 1.06rem; }
.section-head.centered { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.split { max-width: none; display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px 64px; align-items: end; }
.section-head.split h2 { margin-bottom: 0; }

/* soft decorative arcs, like the thin lines in the hero */
.arcs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.arcs::before, .arcs::after { content: ''; position: absolute; border: 10px solid var(--color-line); border-radius: 50%; }
.arcs::before { width: 900px; height: 900px; left: -420px; top: -300px; }
.arcs::after { width: 700px; height: 700px; right: -380px; bottom: -420px; }

.tick-list { list-style: none; display: grid; gap: .7rem; }
.tick-list li { display: flex; gap: .7rem; align-items: flex-start; color: var(--color-secondary); font-weight: 500; }
.tick-list li::before { content: ''; flex: none; width: 22px; height: 22px; margin-top: .15em; border-radius: 50%; background: var(--color-lilac); }
/* the tick, drawn in CSS so it follows the theme colours */
.tick-list li { position: relative; }
.tick-list li::after { content: ''; position: absolute; left: 8.5px; top: calc(.15em + 5.5px); width: 5px; height: 9px;
  border: solid var(--color-primary); border-width: 0 2.4px 2.4px 0; transform: rotate(45deg); }

/* ── Header ── */
/* The header is ALWAYS var(--header-h) tall: changing its height while sticky moved the
   page under it, which re-crossed the scroll threshold and made header + hero flicker.
   Scrolling only changes paint (background, shadow) — never layout. No backdrop blur:
   blurring over the hero's clipped, blended slideshow every frame flickers in Chrome. */
.site-header { position: sticky; top: 0; z-index: 60; height: var(--header-h); transition: background-color .3s ease, box-shadow .3s ease; }
.site-header.scrolled, .site-header.open { background-color: rgba(255, 255, 255, .97); box-shadow: 0 10px 30px -18px color-mix(in srgb, var(--color-secondary) 25%, transparent); }
.site-header.open { height: auto; }
/* logo left · menu centred · call + booking on the right (over the hero's sand shape) */
.site-header .bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 2rem; height: var(--header-h); }
.site-header .actions { justify-self: end; display: flex; align-items: center; gap: .7rem; }
.logo { justify-self: start; display: inline-flex; align-items: center; gap: .6rem; font: 800 1.55rem var(--font-heading); color: var(--color-secondary); letter-spacing: -.03em; }
.logo img { max-height: 44px; width: auto; }
.logo .mark { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light)); }
.logo .mark svg { width: 24px; height: 24px; }
.nav { display: flex; gap: 2.2rem; font-weight: 600; font-size: .95rem; color: var(--color-secondary); }
.nav a { position: relative; padding: .3rem 0; }
.nav a::after { content: ''; position: absolute; left: 50%; bottom: -4px; width: 6px; height: 6px; margin-left: -3px; border-radius: 50%; background: var(--color-primary); transform: scale(0); transition: transform .3s var(--ease); }
.nav a:hover, .nav a.router-link-exact-active, .nav a.router-link-active:not([href="/"]) { color: var(--color-primary); }
.nav a.router-link-exact-active::after, .nav a.router-link-active:not([href="/"])::after { transform: scale(1); }
.header-call { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: var(--color-primary); box-shadow: 0 10px 24px -14px color-mix(in srgb, var(--color-secondary) 45%, transparent); transition: background .25s ease, color .25s ease, transform .3s var(--ease); }
.header-call:hover { background: var(--color-primary); color: #fff; transform: translateY(-2px); }
.header-call svg { width: 19px; height: 19px; }
.site-header .btn { padding: .4rem 1.3rem .4rem .4rem; font-size: .95rem; white-space: nowrap; }
.site-header .btn .knob { width: 36px; height: 36px; }
/* home page: the hero's sand shape runs under the header — centre "Book a Visit"
   in the sand band (HeroBlock sets --hg-blob-cta-x), call icon just to its left */
@media (min-width: 1021px) {
  .hg-has-blob .site-header .actions { position: absolute; top: 50%; left: var(--hg-blob-cta-x); transform: translate(-50%, -50%); }
  .hg-has-blob .site-header .header-call { position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%); }
  .hg-has-blob .site-header .header-call:hover { transform: translateY(calc(-50% - 2px)); }
}
.menu-btn { display: none; justify-self: end; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--color-lilac); cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px; }
.menu-btn span { width: 18px; height: 2px; border-radius: 2px; background: var(--color-primary-dark); transition: transform .3s ease, opacity .3s ease; }
.site-header.open .menu-btn span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header.open .menu-btn span:nth-child(2) { opacity: 0; }
.site-header.open .menu-btn span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.mobile-panel { padding: 6px 24px 22px; }
.mobile-panel a:not(.btn) { display: block; padding: .85rem 0; border-bottom: 1px solid var(--color-line); font-weight: 600; color: var(--color-secondary); }
.mobile-panel .btn { margin-top: 1.1rem; }
.drop-enter-active, .drop-leave-active { transition: opacity .25s ease, transform .25s ease; }
.drop-enter-from, .drop-leave-to { opacity: 0; transform: translateY(-8px); }

/* ── Forms ── */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: block; font-weight: 700; font-size: .85rem; color: var(--color-secondary); margin-bottom: .4rem; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; background: #fff; border: 1.5px solid var(--color-line); border-radius: 16px; padding: .9rem 1.1rem; color: var(--color-secondary);
  transition: border-color .25s ease, box-shadow .25s ease;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 15%, transparent); }
.form-grid ::placeholder { color: color-mix(in srgb, var(--color-muted) 70%, #fff); }
.field-err { color: #c0362c; font-size: .82rem; margin-top: .35rem; }

/* ══ Motion: section-enter animations (plugins/motion.client.ts) ══
   Hidden states apply only while html.hg-motion is set and the section has not
   entered the frame yet; --i staggers siblings, --d adds a fixed delay. */
.hg-motion [data-anim] {
  transition:
    opacity .8s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms)),
    transform 1s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms)),
    filter .9s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms)),
    clip-path 1.1s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms));
}
.hg-motion section:not(.hg-inview) [data-anim], .hg-motion footer:not(.hg-inview) [data-anim] { opacity: 0; }
.hg-motion section:not(.hg-inview) [data-anim="up"], .hg-motion footer:not(.hg-inview) [data-anim="up"] { transform: translateY(42px); }
.hg-motion section:not(.hg-inview) [data-anim="down"] { transform: translateY(-34px); }
.hg-motion section:not(.hg-inview) [data-anim="left"] { transform: translateX(60px); }
.hg-motion section:not(.hg-inview) [data-anim="right"] { transform: translateX(-60px); }
.hg-motion section:not(.hg-inview) [data-anim="zoom"] { transform: scale(.88); }
.hg-motion section:not(.hg-inview) [data-anim="blur"] { filter: blur(14px); transform: scale(1.04); }
.hg-motion section:not(.hg-inview) [data-anim="pop"] { transform: translateY(18px) scale(.8); }
/* headings rise out of a mask */
.hg-motion section:not(.hg-inview) [data-anim="rise"] { clip-path: inset(0 0 100% 0); transform: translateY(40%); }
.hg-motion section.hg-inview [data-anim="rise"] { clip-path: inset(-10% -5% -20% -5%); }
/* photos unveil with a wipe while settling from a slight zoom */
.hg-motion section:not(.hg-inview) [data-anim="clip"] { opacity: 1; clip-path: inset(0 0 100% 0 round var(--radius)); }
.hg-motion section.hg-inview [data-anim="clip"] { clip-path: inset(0 0 0 0 round var(--radius)); }
.hg-motion [data-anim="clip"] img { transition: transform 1.6s var(--ease) calc(var(--i, 0) * 90ms + var(--d, 0ms)); }
.hg-motion section:not(.hg-inview) [data-anim="clip"] img { transform: scale(1.18); }
/* lines draw from left to right */
.hg-motion section:not(.hg-inview) [data-anim="draw"] { opacity: 1; transform: scaleX(0); transform-origin: left; }
.hg-motion [data-anim="draw"] { transition-duration: 1.4s; }

/* gentle idle float for the hero's chat bubbles (on a child, so it never fights the entrance) */
@keyframes hg-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.float { animation: hg-float 6s ease-in-out infinite; }
.float.slow { animation-duration: 8s; animation-delay: -2s; }
.float.late { animation-delay: -4s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float { animation: none; }
}

@media (max-width: 1020px) {
  .nav, .site-header .actions { display: none; }
  .site-header .bar { grid-template-columns: 1fr auto; }
  .menu-btn { display: inline-flex; }
  .section-head.split { grid-template-columns: 1fr; gap: 14px; }
}
@media (max-width: 640px) {
  :root { --section-pad-y: 76px; --radius: 22px; }
  .form-grid { grid-template-columns: 1fr; }
  .section-head { margin-bottom: 40px; }
}

/* Header wordmark on phones: one line, even for a longer business name */
@media (max-width: 560px) { .site-header .logo { font-size: 1.12rem; white-space: nowrap; letter-spacing: -.02em; } }
@media (max-width: 360px) { .site-header .logo { font-size: 1rem; } }
@media (max-width: 560px) { .site-header .logo > span:not(.mark) { text-shadow: 0 0 12px #fff, 0 0 4px #fff, 0 0 2px #fff; } }

/* Logo text beside the logo (Settings › Logo text: one line per line, Logo subtext underneath) */
.logo .wordmark { display: inline-flex; flex-direction: column; justify-content: center; line-height: 1.05; }
.logo .wl { display: block; }
.logo .sub { display: block; margin-top: .3em; font-size: .5em; font-weight: 500; letter-spacing: .01em; color: var(--color-muted); }

/* a wide logo image (or one still loading) can never push the header past the screen */
.logo { min-width: 0; }
.logo img { max-width: min(46vw, 240px); object-fit: contain; }
.logo .wordmark { min-width: 0; }
