/* =============================================
   DORA Health & Wellbeing – Custom Brand CSS
   (Works alongside Tailwind CDN)
   ============================================= */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

/* ---- Brand Tokens ---- */
:root {
  --gold:    #aa9144;
  --gold-dk: #8e7424;
  --dark:    #1e1c18;
  --warm:    #f4f1ec;
  --beige:   #eddba5;
  --text:    #3d3a34;
  --muted:   #747474;
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  letter-spacing: -0.5px;
}

/* ---- Brand Colours ---- */
.text-gold   { color: var(--gold); }
.bg-gold     { background-color: var(--gold); }
.bg-warm     { background-color: var(--warm); }
.bg-dark     { background-color: var(--dark); }
.border-gold { border-color: var(--gold); }

/* ---- Pattern Background ---- */
.pattern-bg {
  background-image: url('../assets/00-universal/00-brand-pattern-beige-1024x1024.png');
  background-repeat: repeat;
  background-size: 350px;
}

/* ---- Navbar ---- */
#navbar {
  transition: box-shadow 0.3s, background 0.3s;
}
#navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0,0,0,.08);
}

/* ---- Mobile Menu ---- */
#mobile-menu { display: none; }
#mobile-menu.open { display: block; }

/* ---- Hero ---- */
.hero-section {
  min-height: 90vh;
  display: flex;
  align-items: center;
}

/* ---- Lotus Animation ---- */
@keyframes lotusPulse {
  0%   { transform: scale(1);    filter: drop-shadow(0 0 0px rgba(170,145,68,0)); }
  50%  { transform: scale(1.06); filter: drop-shadow(0 0 24px rgba(170,145,68,.4)); }
  100% { transform: scale(1);    filter: drop-shadow(0 0 0px rgba(170,145,68,0)); }
}
.lotus-animated { animation: lotusPulse 4s ease-in-out infinite; }

/* ---- Fade-In on scroll ---- */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(28px); }
  to   { opacity:1; transform:translateY(0); }
}
.fade-up {
  opacity: 0;
  animation: fadeUp 0.8s cubic-bezier(.2,.8,.2,1) forwards;
}
.fade-up.delay-1 { animation-delay:.2s; }
.fade-up.delay-2 { animation-delay:.4s; }
.fade-up.delay-3 { animation-delay:.6s; }

/* ---- Buttons ---- */
.btn-gold {
  display: inline-block;
  background: var(--gold);
  color: #fff;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: background .25s, transform .2s;
  text-decoration: none;
}
.btn-gold:hover { background: var(--gold-dk); transform: translateY(-2px); color:#fff; }

.btn-outline-gold {
  display: inline-block;
  border: 2px solid var(--gold);
  color: var(--gold);
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 600;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all .25s;
  text-decoration: none;
}
.btn-outline-gold:hover { background: var(--gold); color:#fff; }

.btn-white {
  display: inline-block;
  background: #fff;
  color: var(--gold);
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 700;
  font-size: .85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all .25s;
  text-decoration: none;
}
.btn-white:hover { background: var(--gold); color:#fff; }

/* ---- Service Cards (flip) ---- */
.flip-card {
  perspective: 1000px;
  height: 320px;
}
.flip-card-inner {
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .65s cubic-bezier(.4,0,.2,1);
  position: relative;
}
.flip-card:hover .flip-card-inner,
.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}
.flip-card-front,
.flip-card-back {
  position: absolute; inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 16px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.flip-card-front {
  background: #fff;
  box-shadow: 0 4px 24px rgba(0,0,0,.07);
}
.flip-card-back {
  background: var(--beige);
  transform: rotateY(180deg);
}
.flip-card-back h3 { color: var(--dark); margin-bottom:.75rem; font-size:1.1rem; }
.flip-card-back p  { font-size:.85rem; line-height:1.6; color:var(--text); }

/* ---- Testimonial Card ---- */
.testimonial-card {
  background: var(--warm);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  border-left: 4px solid var(--gold);
}
.testimonial-card::before {
  content: '\201C';
  font-size: 5rem;
  color: var(--gold);
  opacity: .2;
  position: absolute;
  top: -10px;
  left: 16px;
  font-family: 'Playfair Display', serif;
  line-height: 1;
}

/* ---- Section Divider ---- */
.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--gold);
  margin-bottom: .75rem;
}

/* ---- Stat Counter ---- */
.stat-card {
  text-align: center;
  padding: 2rem 1rem;
}
.stat-card .number {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
}
.stat-card .label {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--muted);
  margin-top:.5rem;
}

/* ---- Footer ---- */
.footer-link { color: var(--muted); font-size: .9rem; line-height: 2; }
.footer-link:hover { color: var(--gold); }

/* ---- Image utilities ---- */
.img-cover  { width:100%; height:100%; object-fit:cover; }
.rounded-2xl { border-radius: 1rem; }
.rounded-3xl { border-radius: 1.5rem; }
.shadow-soft { box-shadow: 0 8px 40px rgba(0,0,0,.1); }

/* ---- Responsive Tweaks ---- */
@media (max-width: 768px) {
  .hero-section    { min-height: 75vh; }
  .flip-card       { height: 360px; }
}
@media (max-width: 480px) {
  .flip-card       { height: 400px; }
}

/* ============================================================
   DORA MOTION — animation & section-transition system
   (companion to js/dora-motion.js)
============================================================ */

/* ---- page load / leave fades ---- */
.dm-js body { opacity: 0; transition: opacity .7s ease; }
.dm-js.dm-ready body { opacity: 1; }
.dm-js.dm-leaving body { opacity: 0; transition: opacity .4s ease; }
@media (prefers-reduced-motion: reduce) {
  .dm-js body { opacity: 1 !important; transition: none !important; }
}

/* ---- navbar: frosted glass, shadow, shrink, tuck ---- */
#navbar, header#navbar {
  transition: transform .45s cubic-bezier(.4,0,.2,1), box-shadow .35s ease,
              background-color .35s ease, backdrop-filter .35s ease, padding .35s ease;
}
.dm-nav-scrolled {
  background: rgba(255,255,255,.72) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 8px 30px -12px rgba(60,50,30,.22);
}
.dm-nav-scrolled nav, .dm-nav-scrolled > div { padding-top: .25rem; padding-bottom: .25rem; }
.dm-nav-scrolled img { transform: scale(.85); transition: transform .35s ease; }
.dm-nav-tucked { transform: translateY(-58%); }
.dm-nav-tucked:hover, .dm-nav-tucked:focus-within { transform: translateY(0); }

/* ---- scroll reveal ---- */
.dm-reveal { opacity: 0; transform: translateY(26px); 
  transition: opacity .9s cubic-bezier(.25,.6,.3,1), transform .9s cubic-bezier(.25,.6,.3,1); }
.dm-reveal.dm-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .dm-reveal { opacity:1 !important; transform:none !important; } }

/* ---- parallax drift ---- */
.dm-drift { will-change: transform; }

/* ---- photo clusters: bigger, overlapping, layered ---- */
.dm-cluster { position: relative; }
.dm-cluster img { border-radius: 1.5rem; box-shadow: 0 24px 55px -18px rgba(60,50,30,.35); }
.dm-cluster .dm-front { position: relative; z-index: 2; }
.dm-cluster .dm-back  { position: absolute; z-index: 1; }

/* ---- scroll-strengthening section gradients ---- */
.dm-gradient-top, .dm-gradient-bottom { position: relative; }
.dm-gradient-top::before, .dm-gradient-bottom::after {
  content: ""; position: absolute; left: 0; right: 0; height: 220px;
  pointer-events: none; z-index: 1;
  opacity: calc(.35 + .65 * var(--dm-grad, 0));
  transition: opacity .2s linear;
}
.dm-gradient-top::before   { top: 0;    background: linear-gradient(to bottom, var(--dm-from, #f5f0e8), transparent); }
.dm-gradient-bottom::after { bottom: 0; background: linear-gradient(to top,    var(--dm-to,   #ffffff), transparent); }
.dm-grad-white  { --dm-from: #ffffff; }
.dm-grad-warm   { --dm-from: #f5f0e8; }
.dm-grad-to-white { --dm-to: #ffffff; }
.dm-grad-to-warm  { --dm-to: #f5f0e8; }
.dm-grad-to-brand { --dm-to: #2c2a25; }

/* ---- single-line traced overlays ---- */
.dm-trace-wrap { position: relative; display: block; }
.dm-trace-wrap > img { display: block; width: 100%; }
.dm-trace { position: absolute; inset: 6%; width: 88%; height: 88%;
  pointer-events: none; z-index: 3; }
.dm-trace path { stroke-linecap: round; stroke-linejoin: round;
  transition: stroke-dashoffset 2.6s cubic-bezier(.4,0,.2,1) .25s; }
.dm-trace-drawn path { stroke-dashoffset: 0 !important; }
/* per-section trace voices */
.dm-trace--gold-fine  path { stroke: #b99a45; stroke-width: 2;   opacity: .85; }
.dm-trace--gold-bold  path { stroke: #a9852f; stroke-width: 4.5; opacity: .8; }
.dm-trace--white-fine path { stroke: #ffffff; stroke-width: 2;   opacity: .9; }
.dm-trace--white-bold path { stroke: #ffffff; stroke-width: 5;   opacity: .75; }
.dm-trace--dark-soft  path { stroke: #3d372e; stroke-width: 2.5; opacity: .38; }

/* ---- generic draw-in svg ---- */
svg.dm-draw path { fill: none; transition: stroke-dashoffset 3s ease .3s; }
svg.dm-draw.dm-drawn path { stroke-dashoffset: 0 !important; }

/* ---- service flip tiles: stronger, slower, hover shadow ---- */
.flip-card, .service-card { }
.flip-inner, .flip-card-inner { transition-duration: 1.05s !important; }
.flip-card, [class*="flip"] > .relative { }
.service-tile-strong, .flip-card {
  box-shadow: 0 10px 34px -14px rgba(60,50,30,.28);
  border: 1px solid rgba(169,133,47,.16);
  border-radius: 1.25rem;
  transition: box-shadow .5s ease, transform .5s ease;
}
.service-tile-strong:hover, .flip-card:hover {
  box-shadow: 0 26px 60px -18px rgba(60,50,30,.45);
  transform: translateY(-4px);
}

/* ---- scroll-to-top dot ---- */
.dm-top-dot {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 60;
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.82); border: 1px solid rgba(169,133,47,.35);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 10px 28px -10px rgba(60,50,30,.35);
  cursor: pointer; opacity: 0; transform: translateY(14px) scale(.85);
  transition: opacity .45s ease, transform .45s cubic-bezier(.34,1.4,.4,1);
  pointer-events: none;
}
.dm-top-dot.dm-top-visible { opacity: 1; transform: none; pointer-events: auto; }
.dm-top-dot span { display: block; width: 10px; height: 10px; margin: 0 auto;
  border-top: 2px solid #a9852f; border-left: 2px solid #a9852f;
  transform: rotate(45deg) translate(2px,2px); }
.dm-top-dot:hover { box-shadow: 0 14px 34px -10px rgba(60,50,30,.5); }

/* ---- article & legal typography ---- */
.dm-article p { margin: 0 0 1.1rem; line-height: 1.8; color: #57534e; }
.dm-article h2 { font-family: 'Playfair Display', serif; color: #1e1c18; font-size: 1.5rem; margin: 2.2rem 0 .8rem; }
.dm-article h3 { font-family: 'Playfair Display', serif; color: #1e1c18; font-size: 1.15rem; margin: 1.6rem 0 .6rem; }
.dm-article ul { margin: 0 0 1.1rem 1.2rem; list-style: disc; color: #57534e; line-height: 1.7; }
.dm-article li { margin-bottom: .35rem; }
.dm-article strong { color: #1e1c18; }

/* ---------- hero split entrance (text from left, image from right) ---------- */
.dm-hero-left, .dm-hero-right { opacity: 0; transition: opacity .9s ease .15s, transform .9s cubic-bezier(.22,.61,.36,1) .15s; }
.dm-hero-left  { transform: translateX(-44px); }
.dm-hero-right { transform: translateX(44px); }
.dm-js.dm-ready .dm-hero-left, .dm-js.dm-ready .dm-hero-right { opacity: 1; transform: none; }

/* ---------- large hero background line drawing, drawn on load ---------- */
.dm-hero-draw { position: absolute; inset: 0; display: flex; align-items: center; justify-content: flex-end; pointer-events: none; overflow: hidden; }
.dm-hero-draw svg { width: min(70vw, 880px); height: auto; opacity: .32; margin-right: -6%; }
.dm-hero-draw path { fill: none; stroke-dasharray: 2400; stroke-dashoffset: 2400; transition: stroke-dashoffset 5s ease .4s; }
.dm-js.dm-ready .dm-hero-draw path { stroke-dashoffset: 0; }
@media (prefers-reduced-motion: reduce) {
  .dm-hero-left, .dm-hero-right { opacity: 1 !important; transform: none !important; }
  .dm-hero-draw path { stroke-dashoffset: 0 !important; }
}

/* faded illustration behind a section, with white wash so text stays legible */
.dm-section-illus { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.dm-section-illus img { position: absolute; right: -4%; top: 50%; transform: translateY(-50%); height: 110%; opacity: .12; }
.dm-section-illus::after { content: ''; position: absolute; inset: 0; background: rgba(255,255,255,.72); }

/* ============================================================
   HERO ILLUSTRATION — bold line-art PNG, golden glow, faint pulse
   Markup: <div class="dm-hero-art"><img src="…lineart….png"></div>
============================================================ */
.dm-hero-art { position: relative; display: flex; align-items: center; justify-content: center; }
.dm-hero-art::before {                       /* warm glow lifts art off the pattern */
  content: '';
  position: absolute; top: 50%; left: 50%;
  width: clamp(220px, 30vw, 400px); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(170,145,68,.30) 0%, rgba(237,219,165,.20) 45%, rgba(237,219,165,0) 72%);
  border-radius: 50%;
  filter: blur(6px);
  pointer-events: none;
}
.dm-hero-art img {
  position: relative; z-index: 1;
  /* cap BOTH axes so tall portrait art and wide landscape art land at a
     similar visual weight in the hero */
  width: auto; height: auto;
  max-width: min(100%, 420px);
  max-height: clamp(260px, 46vh, 440px);
  animation: dmHeroBreathe 9s ease-in-out infinite;
}
/* barely-there breath — a few pixels over nine seconds */
/* contrast lifts the thin source strokes to a bold, clean black */
@keyframes dmHeroBreathe {
  0%, 100% { transform: scale(1);     filter: contrast(1.6) drop-shadow(0 10px 26px rgba(60,50,30,.16)); }
  50%      { transform: scale(1.012); filter: contrast(1.6) drop-shadow(0 12px 32px rgba(60,50,30,.20)); }
}
@media (prefers-reduced-motion: reduce) { .dm-hero-art img { animation: none; } }

/* ============================================================
   SOFT SECTION EDGES — blends each section into the one above.
   dora-motion.js reads the previous section's background colour
   into --dm-prev; the fade sits inside the section's top padding.
============================================================ */
.dm-soft-top { position: relative; }
.dm-soft-top::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: clamp(36px, 6vh, 72px);
  background: linear-gradient(to bottom, var(--dm-prev, transparent), transparent);
  pointer-events: none;
  z-index: 2;
}

/* ============================================================
   PHOTO FRAMES — fluid, gently alive
   Frame owns layout + parallax; the image inside owns the slow
   scroll zoom, so the two transforms never fight each other.
   <figure class="dm-frame" style="--dm-ar:4/5" data-drift="up" data-speed=".05">
     <img src="…">
   </figure>
============================================================ */
.dm-frame {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  aspect-ratio: var(--dm-ar, 4 / 5);      /* scales with the column, not a fixed px height */
  box-shadow: 0 14px 34px -16px rgba(60,50,30,.30);
  transition: box-shadow .55s cubic-bezier(.25,.6,.3,1);
}
.dm-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: var(--dm-pos, center);
  display: block;
  /* --dm-zoom is driven by scroll position, --dm-hover by the pointer */
  transform: scale(var(--dm-zoom, 1)) scale(var(--dm-hover, 1));
  transition: transform .6s cubic-bezier(.25,.6,.3,1);
  will-change: transform;
}
.dm-frame:hover      { box-shadow: 0 26px 54px -18px rgba(60,50,30,.40); }
.dm-frame:hover img  { --dm-hover: 1.035; }

/* Staggered arrival. The frame also carries data-drift, and the parallax
   writes to its inline transform every tick — so the reveal fades only and
   leaves transform to the drift, otherwise the two fight each other. */
.dm-frame.dm-reveal        { opacity: 0; transform: none;
                             transition: opacity .9s cubic-bezier(.25,.6,.3,1);
                             transition-delay: calc(var(--dm-i, 0) * 90ms); }
.dm-frame.dm-reveal.dm-in  { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .dm-frame img { transform: none !important; transition: none; }
}
