/* OC Care Alliance site styles. Page layout and colors live inline in each page; this file adds
   behavior-dependent styles (navigation, forms, reviews), phone sizing, and accessibility. */
html { scroll-behavior: smooth; }
body { margin: 0; background: #FFFFFF; color: #1D1D1F; }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid #1E94C8; outline-offset: 3px; border-radius: 6px; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 50; background: #0B2545; color: #FFFFFF; padding: 10px 16px; border-radius: 980px; text-decoration: none; font: 500 14px Inter, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif; }
.skip-link:focus { top: 12px; }
mark.todo { background: #FFF2B8; color: #5F4A00; padding: 0 4px; border-radius: 4px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Header and navigation */
.site-header { top: env(safe-area-inset-top, 0px) !important; }
.site-nav { position: relative; }
.nav-links { margin-left: auto; }
.nav-links a:hover { color: #0F6E8C !important; }
.nav-right { display: flex; align-items: center; gap: 12px; }
.nav-call:hover { background: #163A6B !important; }
.nav-toggle { display: none; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 14px; border-radius: 980px; border: 1px solid #D2D2D7; background: #FFFFFF; color: #1D1D1F; font: 500 14px Inter, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif; cursor: pointer; }
.nav-toggle[aria-expanded="true"] { background: #1D1D1F; color: #FFFFFF; border-color: #1D1D1F; }
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav-links { display: none !important; width: 100%; flex-direction: column !important; align-items: stretch !important; gap: 0 !important; padding: 8px 0 12px; margin-left: 0; }
  .nav-links.open { display: flex !important; }
  .nav-links a { padding: 14px 4px !important; border-top: 1px solid rgba(0, 0, 0, 0.08); font-size: 17px !important; }
  .nav-right { margin-left: auto; }
  .nav-call { padding: 10px 14px !important; }
}
@media (max-width: 480px) {
  .site-nav { gap: 12px !important; padding-left: 16px !important; padding-right: 16px !important; }
  .site-nav > a span { font-size: 17px !important; }
  .nav-call { font-size: 0 !important; padding: 10px 16px !important; min-height: 44px; display: inline-flex; align-items: center; box-sizing: border-box; }
  .nav-call::after { content: "Call"; font-size: 14px; }
}

/* Phone sizing for inline-styled type and spacing */
@media (max-width: 720px) {
  h1 { font-size: clamp(40px, 11vw, 52px) !important; line-height: 1.02 !important; }
  h2 { font-size: clamp(30px, 8.2vw, 38px) !important; }
  h3 { font-size: 24px !important; }
  [style*="font-size: 22px"] { font-size: 18px !important; }
  [style*="font-size: 21px"], [style*="font-size: 20px"] { font-size: 18px !important; }
  [style*="padding: 120px 24px 128px"] { padding: 72px 24px 80px !important; }
  [style*="padding: 104px 24px"] { padding: 64px 24px !important; }
  [style*="padding: 96px 24px"] { padding: 64px 24px !important; }
  [style*="padding: 88px 24px"] { padding: 56px 24px !important; }
  [style*="padding: 72px 24px 88px"] { padding: 48px 24px 56px !important; }
  [style*="border-radius: 28px; padding: 40px"] { padding: 28px !important; }
  [style*="padding: 36px;"] { padding: 24px !important; }
  [style*="grid-template-columns: 150px minmax(0, 1fr)"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns: 150px minmax(0, 1fr)"] img { width: 120px !important; }
  [style*="justify-self: end"] { justify-self: start !important; }
  .water { min-height: 0 !important; }
}
@media (min-width: 721px) and (max-width: 1024px) {
  h1 { font-size: clamp(52px, 7.5vw, 76px) !important; }
}

/* Appointment card */
.appt-card a[href]:hover { opacity: 0.88; }

/* Three-part headline: phrases rise in one after another when scrolled into view */
.tri { display: inline-block; transition: opacity 0.8s cubic-bezier(.2,.7,.2,1), transform 0.8s cubic-bezier(.2,.7,.2,1); }
.tri:nth-child(2) { transition-delay: 0.12s; } .tri:nth-child(3) { transition-delay: 0.24s; }
.tri:nth-child(4) { transition-delay: 0.36s; } .tri:nth-child(5) { transition-delay: 0.48s; }
.tri-dot { opacity: 0.45; }
.tri-wait .tri { opacity: 0; transform: translateY(18px); }

/* Outcome bars grow when scrolled into view; card graphics drift slowly */
.bar { transform-origin: bottom; transition: transform 1.1s cubic-bezier(.2,.7,.2,1) 0.2s; }
.reveal-wait .bar { transform: scaleY(0); }
.float { animation: floatY 9s ease-in-out infinite alternate; }
@keyframes floatY { from { transform: translate(0, 0) rotate(0deg); } to { transform: translate(10px, -18px) rotate(1.6deg); } }

/* Hero headline: each word forms at the center of the hero (letters resolve from a soft blue blur),
   then glides to its place. Afterwards a faint two-beat glow, a slow heartbeat, with no movement. */
.hw { display: inline-block; white-space: nowrap; animation: wordMove 2.4s cubic-bezier(.45,0,.15,1) both; animation-delay: calc(var(--i, 0) * 1.5s + 0.3s); will-change: transform; }
@keyframes wordMove { 0%, 52% { transform: translate(var(--dx, 0px), var(--dy, 0px)) scale(1.1); } 100% { transform: none; } }
.hl { display: inline-block; animation: crystal 1.1s cubic-bezier(.16,1,.3,1) both; animation-delay: calc(var(--i, 0) * 1.5s + var(--n, 0) * 0.07s + 0.3s); }
@keyframes crystal { 0% { opacity: 0; filter: blur(14px); transform: translateY(0.16em) scale(0.97); color: #7DC6E9; } 55% { opacity: 1; filter: blur(1.5px); color: #CFEAF8; } 100% { opacity: 1; filter: blur(0px); transform: none; color: #FFFFFF; } }
.rise > .beat { animation: heartbeat 3.4s ease-in-out 6.2s infinite; }
@keyframes heartbeat { 0%, 36%, 100% { text-shadow: 0 0 0 rgba(159, 213, 238, 0); } 8% { text-shadow: 0 0 28px rgba(159, 213, 238, 0.42); } 16% { text-shadow: 0 0 12px rgba(159, 213, 238, 0.12); } 24% { text-shadow: 0 0 22px rgba(159, 213, 238, 0.28); } }
.rise-b { animation-delay: 4.7s !important; }

/* Hero water: seen from the deep. Light falls in soft shafts from the surface, tiny specks rise,
   a soft light trails the pointer and the background shapes shift with depth. */
.water { min-height: min(calc(100vh - 57px), 920px) !important; }
.water-layer { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.water-glow { position: absolute; left: 0; top: 0; width: 720px; height: 720px; margin: -360px 0 0 -360px; border-radius: 50%; background: radial-gradient(circle, rgba(125, 198, 233, 0.20) 0%, rgba(125, 198, 233, 0.08) 38%, rgba(125, 198, 233, 0) 68%); opacity: 0; transition: opacity 1.2s ease; will-change: transform; }
.water.is-live .water-glow { opacity: 1; }
.deep-top { position: absolute; inset: 0; background: radial-gradient(90% 55% at 55% -12%, rgba(125, 198, 233, 0.30), rgba(125, 198, 233, 0) 70%); }
.deep-ray { position: absolute; top: -25%; height: 150%; background: linear-gradient(180deg, rgba(159, 213, 238, 0.20), rgba(159, 213, 238, 0.05) 55%, rgba(159, 213, 238, 0) 82%); filter: blur(22px); transform-origin: top center; animation: deepSway 16s ease-in-out infinite alternate; }
@keyframes deepSway { from { transform: skewX(-20deg) translateX(-30px); opacity: 0.45; } to { transform: skewX(-13deg) translateX(40px); opacity: 1; } }
.deep-mote { position: absolute; bottom: -12px; border-radius: 50%; background: rgba(255, 255, 255, 0.5); filter: blur(0.6px); animation: deepRise linear infinite; }
@keyframes deepRise { 0% { transform: translate(0, 0); opacity: 0; } 12% { opacity: 0.55; } 85% { opacity: 0.25; } 100% { transform: translate(var(--dx, 0px), -900px); opacity: 0; } }
.faces img { transition: transform 0.4s cubic-bezier(.2,.7,.2,1); }
@media (hover: hover) { .faces:hover img { transform: translateY(-3px); } }

/* Hero marks turn slowly in depth */
.water .float { animation: floatDeep 14s ease-in-out infinite alternate; }
.water .float-b { animation-duration: 18s; animation-direction: alternate-reverse; }
@keyframes floatDeep { from { transform: perspective(1400px) translate3d(0, 0, 0) rotateX(4deg) rotateY(-7deg); } to { transform: perspective(1400px) translate3d(10px, -18px, 0) rotateX(-2deg) rotateY(6deg); } }

/* Physicians heading: raised off the page with a slow, slight pulse */
.lift{text-shadow:0 1px 0 rgba(255,255,255,.9),0 2px 3px rgba(11,37,69,.22),0 10px 22px rgba(11,37,69,.10);animation:liftPulse 4.6s ease-in-out infinite}
@keyframes liftPulse{0%,100%{transform:scale(1);text-shadow:0 1px 0 rgba(255,255,255,.9),0 2px 3px rgba(11,37,69,.22),0 10px 22px rgba(11,37,69,.10)}50%{transform:scale(1.014);text-shadow:0 1px 0 rgba(255,255,255,.9),0 3px 5px rgba(11,37,69,.24),0 16px 30px rgba(11,37,69,.16)}}

/* Heartbeat trace running across the approach section */
.ecg { stroke-dasharray: 150 850; animation: ecgRun 6s linear infinite; }
@keyframes ecgRun { from { stroke-dashoffset: 1000; } to { stroke-dashoffset: 0; } }

#approach .float { animation: floatDeep 16s ease-in-out infinite alternate; }
#approach .float-b { animation-duration: 21s; animation-direction: alternate-reverse; }

/* Approach icons: the diamond turns and glints, light runs through the check, then the heart draws itself */
.gem{animation:gemSpin 7s ease-in-out infinite alternate}
@keyframes gemSpin{from{transform:perspective(160px) rotateY(-58deg)}to{transform:perspective(160px) rotateY(58deg)}}
.gem-glint{animation:gemGlint 7s ease-in-out infinite alternate}
@keyframes gemGlint{0%,30%{stroke-opacity:0}50%{stroke-opacity:1}70%,100%{stroke-opacity:0}}
.chk-shine{stroke-dasharray:22 100;stroke-dashoffset:122;opacity:0;animation:chkShine 9s ease-in-out infinite}
@keyframes chkShine{0%,28%{stroke-dashoffset:122;opacity:0}32%{opacity:1}50%{stroke-dashoffset:0;opacity:1}54%,100%{stroke-dashoffset:0;opacity:0}}
.hrt-form{stroke-dasharray:100;stroke-dashoffset:100;opacity:0;animation:hrtForm 9s ease-in-out infinite}
@keyframes hrtForm{0%,49%{stroke-dashoffset:100;opacity:0}51%{stroke-dashoffset:98;opacity:1}74%{stroke-dashoffset:0;opacity:1}92%{stroke-dashoffset:0;opacity:1}100%{stroke-dashoffset:0;opacity:0}}

/* Scroll progress line */
.progress { position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 30; transform-origin: left center; transform: scaleX(0); background: linear-gradient(90deg, #7DC6E9, #1E94C8); pointer-events: none; }

/* Tiles tilt toward the pointer with a moving highlight; cards and tiles arrive one after another */
.tile { transform-style: preserve-3d; }
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 0.4s ease; background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0) 60%); }
.tile.is-tilt::after { opacity: 1; }
.cascade > * { transition: opacity 0.9s ease calc(var(--k, 0) * 0.11s), transform 0.4s cubic-bezier(.2,.7,.2,1); }
.cascade > :nth-child(2) { --k: 1; } .cascade > :nth-child(3) { --k: 2; } .cascade > :nth-child(4) { --k: 3; } .cascade > :nth-child(5) { --k: 4; }
.cascade.rv-wait > * { opacity: 0; }
.card img { transition: transform 0.7s cubic-bezier(.2,.7,.2,1); }
@media (hover: hover) { .card:hover img { transform: scale(1.03); } }
.water .float, .water .rise-b { will-change: translate; }

/* Hover lift on tiles and physician cards; hero entrance; sections fade up on scroll */
.tile, .card { transition: transform 0.4s cubic-bezier(.2,.7,.2,1); }
@media (hover: hover) { .tile:hover, .card:hover { transform: translateY(-6px); } }
.float-b { animation-duration: 12s; animation-direction: alternate-reverse; }
@keyframes riseIn { from { opacity: 0; transform: translateY(18px); } }
.rise > * { animation: riseIn 0.9s cubic-bezier(.2,.7,.2,1) both; }
.rise > :nth-child(2) { animation-delay: 0.08s; } .rise > :nth-child(3) { animation-delay: 0.16s; } .rise > :nth-child(4) { animation-delay: 0.24s; }
.rise-b { animation: riseIn 2s cubic-bezier(.2,.7,.2,1) 0.3s both; }
.rise-b > * { animation: none; }
.rv { transition: opacity 0.9s cubic-bezier(.2,.7,.2,1), transform 0.9s cubic-bezier(.2,.7,.2,1); }
.rv-wait { opacity: 0; transform: translateY(28px); }

/* Physician cards on phones: small photo beside the text instead of five full-height cards */
@media (max-width: 720px) {
  #physicians .card, #faculty .card { display: grid !important; grid-template-columns: 104px minmax(0, 1fr); gap: 4px 16px !important; padding: 16px !important; align-content: start; }
  #physicians .card img, #faculty .card img { grid-row: 1 / span 5; border-radius: 14px !important; }
}

/* Phone refinements: headline box, lighter tile graphics, chart bars that fit */
@media (max-width: 720px) {
  h1 { width: auto !important; height: auto !important; }
  .tile .float { opacity: 0.26 !important; }
  .water > .float { opacity: 0.2 !important; }
  #pain .float { width: 300px; height: 300px; margin-left: -150px !important; bottom: 34px !important; }
}
@media (max-width: 480px) {
  .bar { width: 30px !important; }
  #outcomes [style*="gap: 40px"] { gap: 16px !important; padding: 0 4px !important; }
}

/* Reviews */
.rev-grid { transition: opacity 0.35s ease; }
.rev-grid.fading { opacity: 0; }
.rev-card { background: #F5F5F7; border-radius: 24px; padding: 28px; display: flex; flex-direction: column; gap: 14px; min-height: 220px; }
.rev-text { font-size: 17px; line-height: 1.5; color: #1D1D1F; flex: 1 1 auto; }
.rev-meta { font-size: 14px; color: #5F5F66; }
.rev-stars { display: flex; gap: 2px; }
.rev-controls button:hover { border-color: #1D1D1F; }
.rev-dots span { width: 8px; height: 8px; border-radius: 50%; background: #D2D2D7; display: inline-block; }
.rev-dots span.on { background: #1D1D1F; }
.rev-link { font-size: 15px; font-weight: 500; color: #0F6E8C; text-decoration: none; }
.rev-link:hover { text-decoration: underline; }

/* Buttons and links */
a[href^="tel:"] { white-space: nowrap; }
[style*="border-radius: 980px"]:is(a, button) { transition: transform 0.15s ease, background 0.15s ease; }
[style*="border-radius: 980px"]:is(a, button):active { transform: scale(0.98); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .float, .rise > *, .rise-b, .lift { animation: none !important; }
  .gem, .gem-glint, .gem-star, .chk-shine, .hrt-form { animation: none !important; } .gem-star { opacity: 0 !important; } .gem-glint, .chk-shine { opacity: 0 !important; } .hrt-form { stroke-dashoffset: 0 !important; opacity: 1 !important; }
  .ecg { animation: none !important; stroke-dasharray: none !important; stroke-opacity: 0.2 !important; }
  .hw, .hl, .rise > .beat { animation: none !important; }
  .tile, .card, .rv { transition: none !important; }
  .deep-ray { animation: none !important; } .deep-mote, .progress { display: none !important; }
  .cascade > *, .card img, .faces img { transition: none !important; }
  .tile:hover, .card:hover { transform: none !important; }
  .rev-grid, .tri, .bar, [style*="border-radius: 980px"] { transition: none !important; }
}
@media print {
  .site-header, .nav-toggle, .rev-controls { display: none !important; }
}
