/* ============================================================
   AROHA PHYSIOTHERAPY — Custom styles
   Palette: #1D3557 navy | #457B9D blue | #A8DADC ice
            #F1FAEE mist | #E63946 coral
   ============================================================ */

:root {
  --navy: #1D3557;
  --blue: #457B9D;
  --ice: #A8DADC;
  --mist: #F1FAEE;
  --coral: #E63946;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  background: var(--mist);
  color: var(--navy);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.font-display { font-family: "Sora", "Inter", sans-serif; }

::selection { background: var(--coral); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--mist); }
::-webkit-scrollbar-thumb { background: var(--blue); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--navy); }

/* Anchor scroll offset for fixed navbar */
section[id], div[id], footer[id] { scroll-margin-top: 96px; }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
    background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
  will-change: transform;
  cursor: pointer;
}
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(-1px) scale(0.98); }

.btn-coral {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 12px 28px -10px rgba(230, 57, 70, 0.55);
}
.btn-coral:hover { background: #d32f3f; box-shadow: 0 18px 34px -10px rgba(230, 57, 70, 0.6); }

.btn-navy {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 12px 28px -12px rgba(29, 53, 87, 0.5);
}
.btn-navy:hover { background: #16294a; }

.btn-ice {
  background: var(--ice);
  color: var(--navy);
}
.btn-ice:hover { background: #95c9cc; }

.btn-outline {
  border: 2px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  background: transparent;
  backdrop-filter: blur(6px);
}
.btn-outline:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }

.btn-whatsapp { background: #25D366; color: #fff; box-shadow: 0 12px 28px -10px rgba(37, 211, 102, 0.55); }
.btn-whatsapp:hover { background: #1fb958; }

.btn-block { width: 100%; }

/* ---------- Navbar ---------- */
#site-nav {
  transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}
#site-nav.scrolled {
  background: rgba(29, 53, 87, 0.94);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 30px -12px rgba(29, 53, 87, 0.55);
}
.nav-link {
  position: relative;
  color: rgba(241, 250, 238, 0.85);
  font-weight: 500;
  font-size: 0.94rem;
  transition: color 0.3s ease;
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav-link:hover, .nav-link.active { color: #fff; }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); transform-origin: left; }

/* Mobile menu */
#mobile-menu { transition: max-height 0.5s var(--ease), opacity 0.4s ease; max-height: 0; opacity: 0; overflow: hidden; }
#mobile-menu.open { max-height: 640px; opacity: 1; }

/* ---------- Diagonal / angled sections ---------- */
.clip-slant-down { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 6vw), 0 100%); }
.clip-slant-up { clip-path: polygon(0 6vw, 100% 0, 100% 100%, 0 100%); }
.clip-points-down { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9vw), 50% 100%, 0 calc(100% - 9vw)); }
.clip-hero { clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10vw), 0 100%); }
.clip-hero-flip { clip-path: polygon(0 10vw, 100% 0, 100% 100%, 0 calc(100% - 0vw)); }

/* Diagonal image frames */
.img-diag { clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%); }
.img-diag-2 { clip-path: polygon(0 0, 100% 8%, 100% 100%, 0 92%); }
.img-diag-3 { clip-path: polygon(0 12%, 100% 0, 100% 88%, 0 100%); }

/* ---------- Patterns ---------- */
.bg-grid {
  background-image: linear-gradient(rgba(168, 218, 220, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 218, 220, 0.14) 1px, transparent 1px);
  background-size: 54px 54px;
}
.bg-grid-light {
  background-image: linear-gradient(rgba(29, 53, 87, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 53, 87, 0.07) 1px, transparent 1px);
  background-size: 54px 54px;
}
.bg-dots {
  background-image: radial-gradient(rgba(168, 218, 220, 0.35) 1.5px, transparent 1.5px);
  background-size: 26px 26px;
}
.grain {
  position: relative;
}
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Blobs & decorative animation ---------- */
.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  animation: blob-drift 14s ease-in-out infinite;
}
@keyframes blob-drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.08); }
  66% { transform: translate(-30px, 24px) scale(0.94); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
.float { animation: float 6s ease-in-out infinite; }
.float-slow { animation: float 9s ease-in-out infinite; }

@keyframes spin-slow { to { transform: rotate(360deg); } }
.spin-slow { animation: spin-slow 26s linear infinite; }

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.5); }
  70% { box-shadow: 0 0 0 16px rgba(230, 57, 70, 0); }
  100% { box-shadow: 0 0 0 0 rgba(230, 57, 70, 0); }
}
.pulse-dot { animation: pulse-dot 2.2s infinite; }

@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-track {
  display: flex;
  gap: 3.5rem;
  width: max-content;
  animation: marquee 32s linear infinite;
}

/* ---------- Circular imagery & rings ---------- */
.circle-crop { border-radius: 50%; }
.ring-double {
  box-shadow: 0 0 0 10px rgba(168, 218, 220, 0.35), 0 0 0 20px rgba(168, 218, 220, 0.15);
}
.ring-coral {
  box-shadow: 0 0 0 10px rgba(230, 57, 70, 0.18), 0 0 0 22px rgba(230, 57, 70, 0.08);
}

.stat-ring { transform: rotate(-90deg); }
.stat-ring .bar {
  stroke: var(--coral);
  stroke-linecap: round;
  transition: stroke-dashoffset 1.8s var(--ease);
}
.stat-ring .bar.blue { stroke: var(--ice); }
.stat-ring .bar.navybar { stroke: #fff; }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border: 1px solid rgba(29, 53, 87, 0.06);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.4s ease;
}
.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px -22px rgba(29, 53, 87, 0.28);
}
.card-tilt { transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease); }
.card-tilt:hover { transform: translateY(-6px) rotate(-1.5deg); box-shadow: 0 30px 55px -22px rgba(29, 53, 87, 0.3); }

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  will-change: opacity, transform;
}
.reveal-left { transform: translateX(-56px); }
.reveal-right { transform: translateX(56px); }
.reveal-zoom { transform: scale(0.88); }
.reveal-blur { filter: blur(10px); }
.reveal.in-view {
  opacity: 1;
  transform: none;
  filter: none;
}
.d-1 { transition-delay: 0.08s; }
.d-2 { transition-delay: 0.16s; }
.d-3 { transition-delay: 0.24s; }
.d-4 { transition-delay: 0.32s; }
.d-5 { transition-delay: 0.4s; }
.d-6 { transition-delay: 0.48s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-left, .reveal-right, .reveal-zoom, .reveal-blur {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
  .float, .float-slow, .blob, .marquee-track, .spin-slow { animation: none !important; }
}

/* ---------- Testimonials ---------- */
.t-viewport { overflow: hidden; }
.t-track {
  display: flex;
  transition: transform 0.7s var(--ease);
  will-change: transform;
}
.t-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(29, 53, 87, 0.2);
  transition: all 0.35s ease;
  cursor: pointer;
}
.t-dot.active { width: 30px; background: var(--coral); }

/* ---------- FAQ accordion ---------- */
.acc-head { cursor: pointer; transition: background-color 0.3s ease; }
.acc-icon { transition: transform 0.45s var(--ease); }
.acc-item.open .acc-icon { transform: rotate(45deg); }
.acc-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.55s var(--ease);
}

/* ---------- Page transition overlay ---------- */
#page-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: clip-path 0.7s var(--ease);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
}
#page-loader.done {
  clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
  pointer-events: none;
}
.loader-mark {
  width: 64px;
  height: 64px;
  border: 3px solid rgba(168, 218, 220, 0.25);
  border-top-color: var(--coral);
  border-radius: 50%;
  animation: spin-slow 0.9s linear infinite;
}

#page-transition {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: var(--navy);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.5s var(--ease);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
#page-transition.cover { transform: scaleY(1); pointer-events: all; }

/* ---------- Misc ---------- */
.underline-anim {
  background-image: linear-gradient(var(--coral), var(--coral));
  background-repeat: no-repeat;
  background-size: 0% 3px;
  background-position: 0 100%;
  transition: background-size 0.5s var(--ease);
  padding-bottom: 4px;
}
a:hover .underline-anim, .underline-anim:hover { background-size: 100% 3px; }

.text-gradient {
  background: linear-gradient(92deg, var(--ice) 0%, #fff 55%, var(--ice) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-gradient-dark {
  background: linear-gradient(92deg, var(--coral), #b3232f 60%, var(--navy));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.icon-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.8rem;
  transition: transform 0.4s var(--ease), background-color 0.3s ease, color 0.3s ease;
}
.group:hover .icon-chip { transform: rotate(-6deg) scale(1.08); }

.mask-fade-x {
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

#back-to-top {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s var(--ease);
  transform: translateY(16px);
}
#back-to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }

.img-hover-zoom { overflow: hidden; }
.img-hover-zoom img { transition: transform 0.8s var(--ease); }
.img-hover-zoom:hover img { transform: scale(1.07); }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 4px rgba(69, 123, 157, 0.18);
}

.card-shadow { box-shadow: 0 24px 60px -28px rgba(29, 53, 87, 0.35); }
.shadow-soft { box-shadow: 0 16px 40px -20px rgba(29, 53, 87, 0.18); }
