/* ==========================================================================
   TheraHealth — premium polish layer (v5)
   Loaded after the core stylesheet. Visual refinement only; no content changes.
   ========================================================================== */

/* ---------- Typography: self-hosted variable fonts ---------- */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/fraunces-latin-standard-normal.woff2") format("woff2-variations"),
       url("/fonts/fraunces-latin-standard-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/fraunces-latin-standard-italic.woff2") format("woff2-variations"),
       url("/fonts/fraunces-latin-standard-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/inter-latin-standard-normal.woff2") format("woff2-variations"),
       url("/fonts/inter-latin-standard-normal.woff2") format("woff2");
}

:root {
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-soft: cubic-bezier(.33, 1, .68, 1);
  --shadow-sm: 0 1px 2px rgba(13, 30, 66, .06), 0 2px 6px rgba(13, 30, 66, .05);
  --shadow-md: 0 2px 4px rgba(13, 30, 66, .04), 0 12px 28px -6px rgba(13, 30, 66, .14);
  --shadow-lg: 0 4px 10px rgba(13, 30, 66, .05), 0 30px 70px -20px rgba(13, 30, 66, .32);
  --hairline: rgba(23, 43, 91, .09);
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-feature-settings: "cv11", "ss01", "ss03";
  letter-spacing: -.006em;
}

::selection { background: rgba(122, 203, 40, .28); color: var(--navy-deep); }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2 {
  font-weight: 380;
  letter-spacing: -.022em;
  line-height: 1.02;
  text-wrap: balance;
  font-variation-settings: "opsz" 144;
}
h1 { line-height: 1; letter-spacing: -.028em; }
h1 em, h2 em {
  font-weight: 340;
  letter-spacing: -.018em;
  font-variation-settings: "opsz" 144;
}
p { text-wrap: pretty; }

.service-card h3,
.support-caption,
.feedback h2,
.about-copy .lead,
.approach-copy blockquote {
  font-variation-settings: "opsz" 48;
}
.about-copy .lead { font-weight: 400; letter-spacing: -.012em; font-size: 23px; line-height: 1.42; margin-bottom: 22px; }
.about-copy p { line-height: 1.75; }

.eyebrow, .section-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .22em;
}
.section-kicker span {
  width: 30px; height: 30px;
  font-size: 10px; font-weight: 700;
  border-color: rgba(23, 43, 91, .18);
  font-feature-settings: "tnum";
}

/* ---------- Header ---------- */
.site-header {
  background: rgba(248, 247, 242, .72);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom-color: transparent;
  transition: height .45s var(--ease-out), background-color .45s var(--ease-out),
              box-shadow .45s var(--ease-out), border-color .45s var(--ease-out);
}
.site-header.is-scrolled {
  height: 72px;
  background: rgba(248, 247, 242, .86);
  border-bottom-color: var(--hairline);
  box-shadow: 0 10px 30px -18px rgba(13, 30, 66, .25);
}
.site-header .brand-mark img { transition: width .45s var(--ease-out); }
.site-header.is-scrolled .brand-mark img { width: 178px; }

nav a { position: relative; padding: 6px 0; color: #3f4a58; }
nav a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 1.5px; border-radius: 2px;
  background: var(--green);
  transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease-out);
}
nav a:hover { color: var(--navy); }
nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ---------- Buttons & links ---------- */
.button {
  position: relative;
  overflow: hidden;
  font-weight: 650;
  letter-spacing: -.005em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 1px 2px rgba(31, 74, 6, .18), 0 10px 24px -10px rgba(89, 157, 24, .6);
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out), background-color .3s ease, color .3s ease;
}
.button::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .8s var(--ease-out);
  pointer-events: none;
}
.button:hover {
  background: #86d831;
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .4), 0 2px 4px rgba(31, 74, 6, .16), 0 18px 34px -12px rgba(89, 157, 24, .7);
}
.button:hover::before { transform: translateX(120%); }
.button:active { transform: translateY(0); transition-duration: .12s; }
.button svg, .text-link svg, .service-card a svg, .text-link span {
  transition: transform .45s var(--ease-out);
}
.button:hover svg, .text-link:hover svg, .service-card a:hover svg { transform: translateX(4px); }
.text-link:hover span { transform: translateY(3px); }

.button-outline { box-shadow: none; }
.button-outline:hover { background: var(--navy); color: #fff; box-shadow: 0 14px 30px -14px rgba(13, 30, 66, .55); }
.button-outline::before { display: none; }

.text-link {
  border-bottom: 0;
  padding-bottom: 5px;
  background-image: linear-gradient(var(--green), var(--green)), linear-gradient(rgba(23, 43, 91, .2), rgba(23, 43, 91, .2));
  background-size: 0% 1.5px, 100% 1px;
  background-position: 0 100%, 0 100%;
  background-repeat: no-repeat;
  transition: background-size .55s var(--ease-out), color .3s ease;
}
.text-link:hover { background-size: 100% 1.5px, 100% 1px; }

/* ---------- Hero ---------- */
.hero { min-height: 720px; }
.hero-intro { color: #5a6573; font-size: 19px; line-height: 1.7; letter-spacing: -.01em; }
.hero-trust p { letter-spacing: 0; }
.avatar-stack span { box-shadow: 0 2px 6px rgba(13, 30, 66, .12); }

.hero-visual { overflow: visible; }
.hero-slideshow { box-shadow: var(--shadow-lg); }
.hero-slideshow::after {
  content: "";
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: linear-gradient(180deg, rgba(13, 30, 66, 0) 60%, rgba(13, 30, 66, .28) 100%);
}
.hero-shape { animation: th-float 14s ease-in-out infinite; }

.care-note {
  background: rgba(255, 255, 255, .9);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  backdrop-filter: blur(14px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, .7);
  box-shadow: 0 1px 2px rgba(8, 21, 45, .06), 0 24px 50px -16px rgba(8, 21, 45, .38);
  animation: th-float-note 9s ease-in-out 2s infinite;
}
.care-note span { box-shadow: inset 0 0 0 1px rgba(89, 157, 24, .15); }

/* Load-in choreography (above the fold, CSS only) */
@keyframes th-rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes th-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes th-unveil { from { clip-path: inset(0 0 100% 0 round 0 0 0 150px); } to { clip-path: inset(0 0 0 0 round 0 0 0 150px); } }
@keyframes th-pop { from { opacity: 0; transform: translateY(16px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes th-float { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-14px, 12px); } }
@keyframes th-float-note { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

.hero-copy .eyebrow    { animation: th-rise 1s var(--ease-out) .1s both; }
.hero-copy h1          { animation: th-rise 1.1s var(--ease-out) .2s both; }
.hero-copy .hero-intro { animation: th-rise 1.1s var(--ease-out) .35s both; }
.hero-copy .button-row { animation: th-rise 1.1s var(--ease-out) .48s both; }
.hero-copy .hero-trust { animation: th-rise 1.1s var(--ease-out) .6s both; }
.hero-visual           { animation: th-fade 1s ease .05s both; }
.hero-slideshow        { animation: th-unveil 1.4s var(--ease-out) .15s both; }
.care-note             { animation: th-pop .9s var(--ease-out) 1s both, th-float-note 9s ease-in-out 2s infinite; }

/* ---------- Values strip ---------- */
.values-strip {
  min-height: 84px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  color: #2a3c66;
  border-bottom-color: var(--hairline);
}
.values-strip svg { width: 15px; height: 15px; }

/* ---------- Sections rhythm ---------- */
.section { padding-top: clamp(96px, 10vw, 156px); padding-bottom: clamp(96px, 10vw, 156px); }
.about-grid { align-items: start; margin-top: 56px; }

/* ---------- Services ---------- */
.services {
  position: relative;
  background:
    radial-gradient(900px 520px at 85% 0%, rgba(91, 143, 197, .14), transparent 70%),
    radial-gradient(700px 500px at 0% 100%, rgba(122, 203, 40, .07), transparent 70%),
    var(--navy-deep);
}
.section-heading { margin-bottom: 64px; }
.section-heading > p { line-height: 1.75; color: #aebbd0; }
.service-grid { gap: 22px; }
.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .02));
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  padding: 38px;
  transition: transform .6s var(--ease-out), border-color .5s ease, box-shadow .6s var(--ease-out), background-color .5s ease;
  isolation: isolate;
}
.service-card::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  border-radius: inherit;
  background: radial-gradient(420px 260px at 15% 0%, rgba(122, 203, 40, .12), transparent 70%);
  opacity: 0;
  transition: opacity .6s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(122, 203, 40, .38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 30px 60px -25px rgba(0, 0, 0, .55);
}
.service-card:hover::before { opacity: 1; }
.service-card-top > span:last-child { font-feature-settings: "tnum"; letter-spacing: .08em; color: #6f86aa; }
.service-icon {
  width: 54px; height: 54px;
  border-color: rgba(255, 255, 255, .12);
  background: rgba(122, 203, 40, .06);
  transition: box-shadow .6s var(--ease-out), border-color .5s ease, background-color .5s ease, transform .6s var(--ease-out);
}
.service-card:hover .service-icon {
  border-color: rgba(122, 203, 40, .5);
  background: rgba(122, 203, 40, .12);
  box-shadow: 0 0 0 6px rgba(122, 203, 40, .06), 0 0 32px rgba(122, 203, 40, .28);
  transform: scale(1.04);
}
.service-card h3 { font-weight: 400; font-size: 29px; letter-spacing: -.02em; margin: 32px 0 14px; }
.service-card p { color: #aebbd0; line-height: 1.7; }
.service-card ul {
  flex: 1 1 auto;
  border-color: rgba(255, 255, 255, .07);
  margin: 22px 0 26px;
}
.service-card li { color: #d3dcea; margin: 10px 0; line-height: 1.45; }
.service-card li svg { flex: 0 0 auto; opacity: .9; }
.service-card > a { margin-top: auto; align-self: flex-start; letter-spacing: .01em; }

/* ---------- Who we support ---------- */
.support-image-wrap { border-radius: 100px 4px 4px; }
.support-image {
  box-shadow: var(--shadow-lg);
}
.support-image-wrap { overflow: visible; }
.support-caption {
  font-weight: 450;
  letter-spacing: -.01em;
  box-shadow: 0 20px 40px -18px rgba(53, 100, 10, .55);
}
.support-copy > p { line-height: 1.7; }
.audience-grid { gap: 16px 22px; margin-top: 38px; }
.audience-grid span {
  font-weight: 600;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .7);
  border: 1px solid var(--hairline);
  border-radius: 4px 14px;
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), border-color .4s ease;
}
.audience-grid span:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: rgba(122, 203, 40, .45); }

/* ---------- Approach ---------- */
.approach {
  background:
    radial-gradient(800px 600px at 75% 50%, rgba(255, 255, 255, .55), transparent 70%),
    #eef4e8;
}
.approach-principle {
  background: rgba(255, 255, 255, .72);
  border-color: rgba(23, 43, 91, .06);
  padding: 15px 18px;
  gap: 14px;
  grid-template-columns: 30px 1fr;
  box-shadow: var(--shadow-sm);
  transition: transform .45s var(--ease-out), box-shadow .45s var(--ease-out), background-color .4s ease;
}
.approach-principle:hover { transform: translateX(4px); background: #fff; box-shadow: var(--shadow-md); }
.approach-principle > svg { width: 30px; height: 30px; box-shadow: 0 0 0 1px rgba(89, 157, 24, .18); }
.approach-copy blockquote { font-weight: 350; font-size: 24px; letter-spacing: -.01em; border-left-width: 2px; padding-left: 26px; }

.care-model-3d canvas { filter: saturate(.86) contrast(.97); }
.care-sphere-label { font-weight: 500; letter-spacing: -.005em; font-variation-settings: "opsz" 36; text-shadow: 0 1px 10px rgba(9, 25, 54, .45); }
.care-centre-label { font-weight: 400; box-shadow: 0 0 0 8px rgba(255, 255, 255, .28), 0 14px 36px rgba(23, 43, 91, .22); }

/* ---------- Booking ---------- */
.booking {
  background:
    radial-gradient(900px 600px at 0% 0%, rgba(91, 143, 197, .16), transparent 70%),
    var(--navy);
}
.booking-intro > p { line-height: 1.75; }
.contact-shortcuts { gap: 18px; }
.contact-shortcuts a { padding: 6px 0; transition: transform .45s var(--ease-out); font-size: 17px; }
.contact-shortcuts a:hover { transform: translateX(4px); }
.contact-shortcuts svg {
  box-sizing: content-box;
  padding: 11px;
  border-radius: 50%;
  background: rgba(122, 203, 40, .1);
  box-shadow: inset 0 0 0 1px rgba(122, 203, 40, .25);
}
.contact-shortcuts small { font-size: 10px; margin-bottom: 2px; }

.booking-form {
  box-shadow: 0 2px 6px rgba(0, 0, 0, .08), 0 50px 100px -30px rgba(0, 0, 0, .55);
}
.booking-form label { font-size: 12.5px; font-weight: 600; letter-spacing: .005em; gap: 8px; margin-bottom: 20px; }
input, select, textarea {
  min-height: 52px;
  padding: 14px 16px;
  font-size: 15px;
  background: #f6f7f4;
  border: 1px solid #e1e6e9;
  border-radius: 10px;
  transition: border-color .3s ease, box-shadow .3s ease, background-color .3s ease;
}
textarea { min-height: 112px; resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: #9aa3ad; }
input:hover, select:hover, textarea:hover { border-color: #cdd5da; }
input:focus, select:focus, textarea:focus {
  background: #fff;
  border-color: var(--green-dark);
  box-shadow: 0 0 0 4px rgba(122, 203, 40, .18);
}
select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 44px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%23172b5b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
}
.privacy-note { font-size: 11.5px; color: #7d8590; }
.form-button { min-height: 56px; font-size: 15px; margin-top: 14px; }

/* ---------- Feedback ---------- */
.feedback { padding-top: 56px; padding-bottom: 56px; }
.feedback-icon { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .5); }
.feedback h2 { font-weight: 400; letter-spacing: -.015em; }

/* ---------- Footer ---------- */
footer { background: #081631; padding-top: 88px; }
.footer-brand .brand-mark {
  background: none;
  padding: 0;
  border-radius: 0;
}
.footer-brand .brand-mark {
  background: url("/therahealth-logo-stacked-light.svg") left center / contain no-repeat;
}
.footer-brand .brand-mark img { width: 200px; visibility: hidden; }
.footer-brand p { line-height: 1.7; color: #9fadc2; }
footer h3 { font-size: 11px; font-weight: 600; letter-spacing: .2em; color: #e6ecf4; }
footer a { color: #a9b6c9; transition: color .3s ease, transform .4s var(--ease-out); width: fit-content; }
footer a:hover { color: #fff; transform: translateX(3px); }
footer a svg { color: var(--green); }
.footer-bottom { border-top-color: rgba(255, 255, 255, .07); color: #7f8da3; }

/* ---------- Scroll reveal (enabled by polish.js; content is visible without JS) ---------- */
.th-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease-soft), transform 1.1s var(--ease-out);
  transition-delay: var(--th-delay, 0s);
}
.th-reveal.th-in { opacity: 1; transform: none; }
.th-reveal-img { clip-path: inset(12% 0 0 0 round 100px 4px 4px); transform: scale(1.04); transition: clip-path 1.4s var(--ease-out), transform 1.6s var(--ease-out); }
.th-reveal-img.th-in { clip-path: inset(0 0 0 0 round 100px 4px 4px); transform: none; }
/* service cards and principles keep their hover transforms once revealed */
.service-card.th-reveal.th-in,
.approach-principle.th-reveal.th-in,
.audience-grid span.th-reveal.th-in { transition-delay: 0s; transition: transform .6s var(--ease-out), border-color .5s ease, box-shadow .6s var(--ease-out), background-color .5s ease, opacity 1s var(--ease-soft); }

/* ---------- Mobile menu ---------- */
.mobile-menu-panel {
  transition-property: opacity, transform, visibility, top;
  background: rgba(248, 247, 242, .94);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  transform: translateY(-10px);
  transition: opacity .35s var(--ease-out), transform .5s var(--ease-out), visibility .5s;
}
.mobile-menu-panel nav > a {
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity .4s ease, transform .5s var(--ease-out);
}
.mobile-menu-panel nav > a:not(.button) { font-family: var(--serif); font-weight: 400; font-size: 24px; letter-spacing: -.02em; padding: 16px 4px; border-bottom-color: var(--hairline); }
.mobile-menu-open .mobile-menu-panel nav > a { opacity: 1; transform: none; }
.mobile-menu-open .mobile-menu-panel nav > a:nth-child(1) { transition-delay: .05s; }
.mobile-menu-open .mobile-menu-panel nav > a:nth-child(2) { transition-delay: .1s; }
.mobile-menu-open .mobile-menu-panel nav > a:nth-child(3) { transition-delay: .15s; }
.mobile-menu-open .mobile-menu-panel nav > a:nth-child(4) { transition-delay: .2s; }
.mobile-menu-open .mobile-menu-panel nav > a:nth-child(5) { transition-delay: .25s; }
.menu-button { width: 44px; height: 44px; display: none; place-items: center; border-radius: 50%; transition: background-color .3s ease; }
.menu-button:hover { background: rgba(23, 43, 91, .06); }

/* ---------- Responsive ---------- */
@media (max-width: 1050px) {
  .menu-button { display: grid; }
}
@media (max-width: 800px) {
  .site-header.is-scrolled { height: 64px; }
  .site-header.is-scrolled .brand-mark img { width: 160px; }
  .mobile-menu-panel { top: 72px; }
  .th-scrolled .mobile-menu-panel { top: 64px; }
  .hero { min-height: 0; }
  .values-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 18px;
    padding: 26px 26px;
    justify-items: start;
    letter-spacing: .14em;
  }
  .service-card { padding: 30px 26px; }
  .support-image-wrap, .th-reveal-img, .th-reveal-img.th-in { clip-path: none; }
  @keyframes th-unveil { from { clip-path: inset(0 0 100% 0 round 0 0 0 90px); } to { clip-path: inset(0 0 0 0 round 0 0 0 90px); } }
}
@media (max-width: 520px) {
  h1 { font-size: 50px; }
  h2 { font-size: 41px; }
  .values-strip { font-size: 10px; letter-spacing: .12em; }
  .audience-grid span { padding: 11px 13px; }
  .care-sphere-label { font-size: 12.5px; }
  .booking-form { border-radius: 5px 36px; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .th-reveal, .th-reveal-img { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .hero-image { animation: none !important; }
  .hero-slide-one { opacity: 1; }
}
