/* ============================================================
   KARUNA MENTAL HEALTH — Byron Bay · Stage 1 homepage
   Register: clinical-clean, warm, grounded.
   Palette: warm white · eucalyptus (major) · deep indigo ink · gold = light only
   ============================================================ */

:root{
  --warm-white:#F7F1EE;
  --paper:#FCF7F4;
  --ink:#2A2129;            /* warm near-black body ink */
  --indigo:#2A2129;         /* deep indigo — headings, accents */
  --indigo-soft:#3E4A57;
  --eucalyptus:#4d6152;     /* primary green */
  --eucalyptus-deep:#3c4f42;
  --sage:#aabfa4;
  --sage-pale:#F9EFEB;
  --sand:#ecdfc8;
  --stone:#F0E6E2;
  --gold:#C9A05C;           /* reserved for light: sun, pulses, first ripple ring */
  --gold-pale:#E4C08A;
  --border:#E8DBD6;
  --muted:#75626B;
  --radius:10px;
  --serif:"Cormorant Garamond","Times New Roman",serif;
  --sans:"Inter",system-ui,sans-serif;
  --maxw:1200px;
}

*{margin:0;padding:0;box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  font-family:var(--sans);
  font-weight:300;
  color:var(--ink);
  background:var(--warm-white);
  line-height:1.65;
  font-size:17.5px;
  -webkit-font-smoothing:antialiased;
}
img{max-width:100%;display:block}
a{color:inherit;text-decoration:none}

/* ---------- type ---------- */
h1,h2,h3,.serif{font-family:var(--serif);font-weight:400;color:var(--indigo);line-height:1.12}
h1{font-size:clamp(2.6rem,5.6vw,4.6rem);letter-spacing:.01em}
h2{font-size:clamp(2rem,3.6vw,3rem)}
h3{font-size:1.45rem}
h2 em, h1 em{font-style:italic;color:var(--eucalyptus)}
.kicker{
  font-family:var(--sans);font-size:.72rem;font-weight:500;
  letter-spacing:.22em;text-transform:uppercase;color:var(--eucalyptus);
  display:block;margin-bottom:1.1rem;
}
.lede{font-size:1.15rem;color:var(--muted)}

/* ---------- layout ---------- */
.wrap{max-width:var(--maxw);margin:0 auto;padding:0 clamp(1.2rem,4vw,3rem)}
section{padding:clamp(4rem,9vw,7.5rem) 0;position:relative}

/* ---------- reveal on scroll ---------- */
.reveal{opacity:0;transform:translateY(26px);transition:opacity 1s ease,transform 1s cubic-bezier(.22,.7,.3,1)}
.reveal.in{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){
  .reveal{opacity:1;transform:none;transition:none}
  *{animation-duration:.01s !important;animation-iteration-count:1 !important}
}

/* ---------- header / nav ---------- */
header.site{
  position:fixed;inset:0 0 auto 0;z-index:50;
  display:flex;align-items:center;justify-content:space-between;
  padding:.25rem clamp(1.2rem,3.5vw,2.6rem);
  background:rgba(247,241,238,.94);backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  box-shadow:0 1px 0 var(--border);
  transition:background .45s ease,box-shadow .45s ease,padding .45s ease;
}
header.site.scrolled{
  background:rgba(247,241,238,.92);backdrop-filter:blur(14px);
  box-shadow:0 1px 0 var(--border);padding:.55rem clamp(1.2rem,3.5vw,2.6rem);
}
.brand{display:flex;align-items:center;gap:.65rem;font-family:var(--serif)}
.brand-mark{height:74px;width:auto;display:block}
header.scrolled .brand-mark{height:74px}
.brand .word{font-size:1.55rem;letter-spacing:.04em;color:var(--indigo);transition:color .45s}
.brand .desc{font-size:.7rem;font-family:var(--sans);letter-spacing:.2em;text-transform:uppercase;color:var(--eucalyptus);transition:color .45s}
header.scrolled .brand .word{color:var(--indigo)}
header.scrolled .brand .desc{color:var(--eucalyptus)}
nav.primary{display:flex;gap:2.2rem;align-items:center}
nav.primary a{
  font-size:.97rem;font-weight:400;color:var(--ink);
  padding:.3rem 0;position:relative;transition:color .45s;
}
header.scrolled nav.primary a{color:var(--ink)}
nav.primary a::after{
  content:"";position:absolute;left:0;bottom:0;height:1px;width:0;
  background:var(--gold);transition:width .4s ease;
}
nav.primary a:hover::after{width:100%}
.cta{
  font-size:.86rem;font-weight:500;color:#fff !important;
  background:var(--eucalyptus);border-radius:999px;
  padding:.62rem 1.4rem !important;transition:background .3s,transform .3s;
}
.cta:hover{background:var(--eucalyptus-deep);transform:translateY(-1px)}
.cta::after{display:none}
.nav-toggle{display:none}

/* ---------- services dropdown ---------- */
.nav-drop{position:relative;display:flex;align-items:center}
.nav-drop > a .caret{font-size:.6em;margin-left:.35em;opacity:.7;display:inline-block;transition:transform .3s}
.nav-drop:hover > a .caret,.nav-drop:focus-within > a .caret{transform:translateY(1px) rotate(180deg)}
.drop-menu{
  position:absolute;top:100%;left:50%;min-width:250px;
  transform:translateX(-50%) translateY(10px);
  background:rgba(247,241,238,.66);backdrop-filter:blur(22px) saturate(1.1);
  -webkit-backdrop-filter:blur(22px) saturate(1.1);
  border:1px solid rgba(226,221,210,.7);border-radius:12px;
  box-shadow:0 22px 44px -20px rgba(42,33,41,.3);
  padding:.9rem 0;opacity:0;visibility:hidden;
  transition:opacity .35s ease,transform .35s ease,visibility .35s;
}
.nav-drop:hover .drop-menu,.nav-drop:focus-within .drop-menu{
  opacity:1;visibility:visible;transform:translateX(-50%) translateY(4px);
}
nav.primary .drop-menu a{
  display:block;padding:.72rem 1.7rem;margin:0 .55rem;border-radius:8px;
  color:var(--ink);font-size:.87rem;letter-spacing:.01em;
  transition:background .25s,color .25s;
}
header.site nav.primary .drop-menu a{color:var(--ink)}
header.site.scrolled nav.primary .drop-menu a{color:var(--ink)}
nav.primary .drop-menu a:hover{background:rgba(249,239,235,.85);color:var(--eucalyptus-deep)}
.drop-menu a::after{display:none}

@media (max-width:960px){
  nav.primary{display:none}
  .nav-toggle{display:block;background:none;border:0;color:var(--indigo);font-size:1.6rem;cursor:pointer;
    padding:.45rem .7rem;min-width:44px;min-height:44px;line-height:1}
  header.scrolled .nav-toggle{color:var(--indigo)}
}

/* ---------- mobile nav drawer (built by main.js from nav.primary) ----------
   Desktop is untouched: both the scrim and the drawer are display:none
   above 960px, which is the same breakpoint that hides nav.primary. */
.nav-scrim,.nav-drawer{display:none}

@media (max-width:960px){
  .nav-scrim{
    display:block;position:fixed;inset:0;z-index:60;
    background:rgba(42,33,41,.34);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);
    opacity:0;visibility:hidden;transition:opacity .38s ease,visibility .38s;
  }
  .nav-scrim.open{opacity:1;visibility:visible}

  .nav-drawer{
    display:block;position:fixed;top:0;right:0;z-index:61;
    width:min(86vw,340px);height:100%;height:100dvh;
    background:var(--warm-white);
    border-left:1px solid var(--border);
    box-shadow:-24px 0 60px -30px rgba(42,33,41,.45);
    transform:translateX(100%);visibility:hidden;
    transition:transform .42s cubic-bezier(.22,.7,.3,1),visibility .42s;
    overflow-y:auto;-webkit-overflow-scrolling:touch;
    overscroll-behavior:contain;
  }
  .nav-drawer.open{transform:none;visibility:visible}

  .nav-drawer-inner{
    display:flex;flex-direction:column;
    padding:calc(72px + env(safe-area-inset-top,0px)) 1.4rem
            calc(2rem + env(safe-area-inset-bottom,0px));
    gap:.15rem;
  }
  .nav-drawer-inner a{
    display:flex;align-items:center;min-height:48px;
    padding:.6rem .5rem;border-radius:8px;
    font-family:var(--sans);font-size:1.02rem;font-weight:400;
    color:var(--ink);letter-spacing:.01em;line-height:1.3;
    border-bottom:1px solid rgba(226,221,210,.7);
    transition:background .25s,color .25s;
  }
  .nav-drawer-inner a:active{background:var(--sage-pale);color:var(--eucalyptus-deep)}
  .nav-drawer-inner a[aria-current]{color:var(--eucalyptus-deep);font-weight:500}

  .nav-drawer-inner .drawer-group{display:flex;flex-direction:column}
  .nav-drawer-inner .drawer-group-head{
    font-weight:500;color:var(--indigo);border-bottom:0;
  }
  .nav-drawer-inner .drawer-sub{
    padding-left:1.5rem;font-size:.94rem;color:var(--muted);
    min-height:46px;border-bottom:1px solid rgba(226,221,210,.5);
    position:relative;
  }
  .nav-drawer-inner .drawer-sub::before{
    content:"";position:absolute;left:.55rem;top:50%;width:.5rem;height:1px;
    background:var(--sage);
  }
  .nav-drawer-inner .drawer-group + a{margin-top:.35rem}

  .nav-drawer-inner .drawer-cta{
    justify-content:center;margin-top:1.5rem;min-height:52px;
    background:var(--eucalyptus);color:#fff;border-radius:999px;border-bottom:0;
    font-size:.95rem;font-weight:500;
  }
  .nav-drawer-inner .drawer-cta:active{background:var(--eucalyptus-deep);color:#fff}

  /* the header sits under the drawer normally; while the drawer is open it is
     lifted above so the toggle stays visible and tappable as a close control */
  header.site.nav-open{z-index:62;background:transparent;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
  header.site.nav-open .brand{opacity:0;pointer-events:none;transition:opacity .25s}
  .nav-toggle{transition:color .3s}
  .nav-toggle.open{color:var(--eucalyptus-deep);font-size:1.5rem}

  html.nav-locked,html.nav-locked body{overflow:hidden}
}

@media (max-width:960px) and (prefers-reduced-motion:reduce){
  .nav-drawer,.nav-scrim{transition:none}
}

/* ---------- hero ---------- */
.hero{
  min-height:100svh;display:flex;align-items:center;
  text-align:left;overflow:hidden;padding:0;color:#fff;
}
.hero-media{position:absolute;inset:0;z-index:0}
.hero-media img{
  width:100%;height:100%;object-fit:cover;
  animation:kenburns 36s ease-in-out infinite alternate;
  transform-origin:55% 40%;
}
@keyframes kenburns{from{transform:scale(1.02)}to{transform:scale(1.13) translate(-.6%, -1%)}}
.hero-veil{position:absolute;inset:0;z-index:1;
  background:
    linear-gradient(100deg,rgba(20,24,40,.48) 0%,rgba(20,24,40,.22) 45%,rgba(20,24,40,0) 70%),
    linear-gradient(to bottom,rgba(20,24,40,.25),rgba(20,24,40,.08) 45%,rgba(20,24,40,.45) 100%)}
.hero-light{position:absolute;inset:0;z-index:2;pointer-events:none}
.hero-inner{position:relative;z-index:3;width:100%;
  padding:0 clamp(1.4rem,5vw,4.5rem)}
.hero-copy{max-width:960px}
.hero h1{color:#fff;text-shadow:0 2px 30px rgba(20,24,40,.35);
  font-size:clamp(2.8rem,6.8vw,6.2rem);white-space:nowrap}
.hero-tag{
  font-family:var(--serif);font-style:italic;font-size:clamp(2.7rem,5.8vw,5rem);
  color:var(--gold-pale);margin-top:1.2rem;
}
.hero-tag em{font-style:italic;color:var(--gold-pale)}
@media (max-width:720px){.hero h1{white-space:normal}}
.hero p.sub{
  font-size:clamp(1.05rem,1.8vw,1.3rem);font-weight:300;
  color:#ffffff;text-shadow:0 1px 18px rgba(20,24,40,.45);max-width:560px;margin:1.4rem 0 2.4rem;
}
.hero .cta{font-size:.95rem;padding:.85rem 2.1rem !important}
.scroll-cue{
  position:absolute;bottom:2.2rem;left:50%;transform:translateX(-50%);z-index:3;
  font-size:.7rem;letter-spacing:.25em;text-transform:uppercase;color:rgba(255,255,255,.8);
  display:flex;flex-direction:column;align-items:center;gap:.7rem;
}
.scroll-cue .line{width:1px;height:44px;background:linear-gradient(to bottom,var(--gold-pale),transparent);
  animation:cue 2.6s ease-in-out infinite}
@keyframes cue{0%,100%{transform:scaleY(.55);opacity:.5}50%{transform:scaleY(1);opacity:1}}

/* ---------- why karuna ---------- */
.why{background:#f9efeb}
.why .grid{display:grid;grid-template-columns:1.05fr .95fr;gap:clamp(2.5rem,5vw,4.5rem);align-items:center}
.why .imgwrap{border-radius:var(--radius);overflow:hidden;box-shadow:0 30px 60px -30px rgba(42,33,41,.35)}
.why .imgwrap img{transition:transform 1.2s ease}
.why .imgwrap:hover img{transform:scale(1.03)}
.why p{margin-bottom:1.15rem}
.pullquote{
  margin-top:2rem;padding-left:1.4rem;border-left:2px solid var(--gold);
  font-family:var(--serif);font-size:1.35rem;font-style:italic;color:var(--indigo);line-height:1.4;
}
.why .side{display:flex;flex-direction:column;justify-content:center;gap:1.4rem}
@media (max-width:900px){.why .grid{grid-template-columns:1fr}}

/* ---------- clinical excellence ---------- */
.excellence{background:#1F4E56;color:#f2f0e9}
.excellence .kicker{color:var(--gold-pale)}
.excellence h2{color:#fff}
.excellence h2 em{color:var(--gold-pale)}
.pillars{display:grid;grid-template-columns:repeat(4,1fr);gap:1.6rem;margin-top:3.2rem}
.pillar{border-top:1px solid rgba(228,192,138,.35);padding-top:1.4rem}
.pillar h3{color:var(--gold-pale);font-size:1.3rem;margin-bottom:.6rem}
.pillar p{font-size:1rem;font-weight:400;color:#ffffff}
@media (max-width:900px){.pillars{grid-template-columns:repeat(2,1fr)}}
@media (max-width:560px){.pillars{grid-template-columns:1fr}}

/* ---------- indications ---------- */
.indications{background:var(--warm-white)}
.indications .head{max-width:720px;margin-bottom:3rem}
.ind-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1.1rem}
.ind-card{
  background:var(--paper);border:1px solid var(--border);border-radius:var(--radius);
  padding:1.7rem 1.5rem;display:flex;flex-direction:column;gap:.55rem;
  transition:transform .45s cubic-bezier(.22,.7,.3,1),box-shadow .45s,border-color .45s;
}
.ind-card:hover{transform:translateY(-5px);box-shadow:0 22px 44px -22px rgba(77,97,82,.4);border-color:var(--sage)}
.ind-card h3{font-size:1.28rem;color:var(--eucalyptus-deep)}
.ind-card p{font-size:.9rem;color:var(--muted);flex:1}
.ind-card .more{font-size:.8rem;font-weight:500;color:var(--eucalyptus);letter-spacing:.04em}
.ind-card .more::after{content:" →";transition:margin .3s}
.ind-card:hover .more::after{margin-left:.3rem}
@media (max-width:1020px){.ind-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:560px){.ind-grid{grid-template-columns:1fr}}

/* ---------- karuna difference (icon grid) ---------- */
.difference{background:var(--sage-pale)}
.difference .head{max-width:760px;margin-bottom:3rem}
.diff-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:1.1rem}
.diff-card{
  background:var(--paper);border:1px solid var(--border);border-radius:var(--radius);
  padding:2rem 1.7rem 1.8rem;
  transition:transform .5s cubic-bezier(.22,.7,.3,1),box-shadow .5s;
}
.diff-card:hover{transform:translateY(-6px);box-shadow:0 26px 52px -26px rgba(42,33,41,.35)}
.diff-card .icon{width:88px;height:88px;margin-bottom:1.2rem}
.diff-card .icon svg{width:100%;height:100%;overflow:visible}
.diff-card h3{font-size:1.32rem;margin-bottom:.55rem;color:var(--indigo)}
.diff-card p{font-size:.92rem;color:var(--muted)}
@media (max-width:960px){.diff-grid{grid-template-columns:repeat(2,1fr)}}
@media (max-width:560px){.diff-grid{grid-template-columns:1fr}}

/* ---------- dawn band (closing animated moment) ---------- */
.dawn{padding:0;background:var(--paper);overflow:hidden}
.dawn .band{position:relative;min-height:520px;display:flex;align-items:center;justify-content:center}
.dawn svg.scene{position:absolute;inset:0;width:100%;height:100%}
.dawn .caption{
  position:relative;z-index:2;text-align:center;max-width:680px;padding:0 1.4rem;
  font-family:var(--serif);font-size:clamp(1.5rem,2.8vw,2.2rem);
  color:var(--indigo);line-height:1.35;
}

/* ---------- start / contact ---------- */
.start{background:#8E616A;color:#eef0e9;text-align:center}
.start h2{color:#fff}
.start h2 em{color:var(--gold-pale)}
.start p{max-width:560px;margin:1.2rem auto 2.4rem;color:rgba(238,240,233,.85)}
.start .actions{display:flex;gap:1rem;justify-content:center;flex-wrap:wrap}
.btn{
  display:inline-block;padding:.85rem 1.9rem;border-radius:999px;font-size:.92rem;font-weight:500;
  transition:transform .3s,background .3s,color .3s;
}
.btn.solid{background:var(--gold);color:#2a2415}
.btn.solid:hover{background:var(--gold-pale);transform:translateY(-2px)}
.btn.ghost{border:1px solid rgba(238,240,233,.5);color:#eef0e9}
.btn.ghost:hover{border-color:var(--gold-pale);color:var(--gold-pale);transform:translateY(-2px)}
.crisis{margin-top:3rem;font-size:.82rem;color:rgba(238,240,233,.7)}
.crisis strong{color:#fff;font-weight:500}

/* ---------- footer ---------- */
footer.site{background:#2A2129;color:rgba(233,231,222,.8);padding:4rem 0 2.5rem;font-size:.88rem}
footer .cols{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:2.5rem;margin-bottom:3rem}
footer h4{font-family:var(--serif);font-size:1.05rem;color:#fff;margin-bottom:.9rem;font-weight:400}
footer a{display:block;padding:.18rem 0;color:rgba(233,231,222,.75)}
footer a:hover{color:var(--gold-pale)}
footer .tagline{font-family:var(--serif);font-size:1.25rem;color:#fff;margin-bottom:.8rem}
.ack{border-top:1px solid rgba(233,231,222,.18);padding-top:1.8rem;font-size:.8rem;
  color:rgba(233,231,222,.6);max-width:none}
.legal{margin-top:1.6rem;font-size:.76rem;color:rgba(233,231,222,.45)}
@media (max-width:900px){footer .cols{grid-template-columns:1fr 1fr}}

/* ---------- button chaser: a slow gold light circling the border ----------
   Angle is driven by rAF in main.js (immune to reduced-motion freezes). */
.btn-chase{position:relative}
.btn-chase::before{
  content:"";position:absolute;inset:-2.5px;border-radius:999px;padding:1.6px;
  background:conic-gradient(from calc(var(--chase,0)*1deg),
    transparent 0%,transparent 70%,
    rgba(201,160,92,.15) 80%,var(--gold) 90%,rgba(201,160,92,.15) 97%,transparent 100%);
  -webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
  -webkit-mask-composite:xor;mask-composite:exclude;
  pointer-events:none;
}

/* ---------- click ripple (site-wide interaction language) ---------- */
.click-ripple{
  position:fixed;border-radius:50%;pointer-events:none;z-index:9999;
  border:1.5px solid var(--gold);opacity:.9;
  animation:cr 1.4s ease-out forwards;
}
.click-ripple.second{border-color:var(--eucalyptus);animation-delay:.12s}
@keyframes cr{from{transform:scale(.1);opacity:.85}to{transform:scale(1);opacity:0}}

/* ============================================================
   PHONE PASS
   Everything below is additive and lives inside max-width media
   queries, so desktop rendering is unchanged.
   ============================================================ */

@media (max-width:760px){
  /* long unbroken strings (emails, phone numbers, URLs) must never
     push the page wider than the viewport */
  body{overflow-wrap:break-word}
  h1,h2,h3,.serif{overflow-wrap:break-word}

  /* --- slim header bar: the 74px mark plus the two-line descriptor
     crowded the toggle to a 0px gap at 375px --- */
  header.site{padding:.3rem 1rem}
  header.site.scrolled{padding:.3rem 1rem}
  .brand{gap:.5rem !important;min-width:0}
  .brand-mark,header.scrolled .brand-mark{height:48px}
  .brand .word{font-size:1.3rem}
  .brand .desc{font-size:.58rem;letter-spacing:.14em;line-height:1.2}
  .nav-toggle{flex:0 0 auto;margin-left:.5rem}

  /* --- buttons: real tap targets --- */
  .btn,.cta{
    min-height:48px;display:inline-flex;align-items:center;justify-content:center;
  }
  .start .actions{gap:.75rem}
  .start .actions .btn{width:100%;max-width:22rem}
}

@media (max-width:600px){
  /* the descriptor wrapped to two lines and doubled the bar height */
  .brand .desc{display:none}
  .brand .word{font-size:1.42rem}
}

@media (max-width:560px){
  /* --- hero: the tagline was rendering nearly as large as the title,
     and the pair ate the whole viewport on a 667px phone --- */
  .hero h1{font-size:clamp(2.2rem,10.5vw,2.75rem);line-height:1.08}
  .hero-tag{font-size:clamp(1.65rem,7.6vw,2.05rem);margin-top:.7rem}
  .hero p.sub{font-size:1rem;line-height:1.6;margin:1.1rem 0 1.8rem;max-width:34rem}
  .hero-inner{padding:0 1.25rem}
  .scroll-cue{bottom:1.4rem}
  .scroll-cue .line{height:32px}

  /* --- footer: two 148px columns were unreadable --- */
  footer .cols{grid-template-columns:1fr;gap:1.9rem;margin-bottom:2.2rem}
  footer.site{padding:3rem 0 2rem}
  /* the 92px lockup is set inline in the markup, hence the override */
  footer .tagline img{height:64px !important}
  footer .tagline{font-size:1.15rem}
  .ack{padding-top:1.4rem}

  /* --- calmer vertical rhythm: 64px top and bottom on every section
     stacked up to a lot of empty band on a phone --- */
  section{padding:3.4rem 0}
  .dawn .band{min-height:380px}
  .dawn .caption{font-size:1.25rem;padding:0 1.25rem}
  .pullquote{font-size:1.15rem;margin-top:1.5rem;padding-left:1rem}
  .crisis{margin-top:2rem}

  /* fine print was landing at 12.2px to 13.1px on a phone; the crisis notice
     in particular has to stay readable. Sizes only, wording untouched. */
  .crisis{font-size:.875rem}
  .ack{font-size:.875rem}
  .legal{font-size:.8rem}
  footer.site{font-size:.92rem}
}
