/* "Spread the smile" across every page. Loads after style.css. All movement is switched off under reduced motion. */
:root { --night: #0b0d2a; --neon: #ff4f7b; --aqua: #4fd1ff; }

/* ---------- Scroll smile: a line under the header that curls into a smile as you read ---------- */
.smile-meter { position: fixed; z-index: 55; left: 0; right: 0; top: var(--nav-h); height: 26px; pointer-events: none; }
.smile-meter path { fill: none; stroke: var(--neon); stroke-width: 4; stroke-linecap: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 5px var(--neon)); }

/* ---------- Page banners become neon signs ---------- */
.page-banner { position: relative; overflow: hidden; background: radial-gradient(110% 140% at 85% 0%, #2d349a 0%, var(--night) 62%); min-height: 300px; display: flex; align-items: center; isolation: isolate; }
.page-banner .container { position: relative; z-index: 2; }
.page-banner h1 { color: #fff; text-shadow: 0 0 6px rgba(255,79,123,.9), 0 0 28px rgba(255,79,123,.55); }
.banner-script { font: 700 30px "Dancing Script", cursive; color: #ffd3de; margin: 0 0 4px; text-shadow: 0 0 12px var(--neon); }
.banner-art { position: absolute; z-index: 1; right: max(16px, calc(50% - 570px)); top: 50%; width: 220px; height: 220px; margin-top: -110px; overflow: visible; }
.banner-art path, .banner-art circle { fill: none; stroke: #ffe3ea; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 4px var(--neon)) drop-shadow(0 0 14px var(--neon)); }
@media (max-width: 767px) { .banner-art { width: 120px; height: 120px; margin-top: -60px; right: -14px; opacity: .45; } }
.spark { position: absolute; z-index: 1; width: 14px; height: 14px; pointer-events: none; background: var(--yellow); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.pop { position: fixed; z-index: 90; }

.site-footer { background: radial-gradient(90% 120% at 15% 0%, #2b3190 0%, var(--night) 70%); }
.spread-btn { min-height: 48px; padding: 0 22px; border-radius: 99px; border: 2px solid var(--neon); background: transparent; color: #fff; font: 700 26px "Dancing Script", cursive; text-shadow: 0 0 10px var(--neon); box-shadow: 0 0 14px rgba(255,79,123,.6), inset 0 0 12px rgba(255,79,123,.35); cursor: pointer; margin-top: 8px; }

.section-head h2::after { content: ""; display: block; width: 88px; height: 14px; margin-top: 10px; border-bottom: 4px solid var(--yellow); border-radius: 0 0 50% 50%; }
.card { transition: box-shadow .25s ease, transform .25s ease; }

/* ---------- Tooth buddy ---------- */
.buddy { position: fixed; z-index: 45; left: 12px; bottom: 84px; display: flex; align-items: flex-end; gap: 8px; pointer-events: none; }
@media (min-width: 768px) { .buddy { left: 20px; bottom: 20px; } }
.buddy button { pointer-events: auto; cursor: pointer; }
.buddy-face { width: 60px; height: 68px; padding: 0; background: none; border: 0; flex: none; filter: drop-shadow(0 6px 10px rgba(11,13,42,.35)); }
.buddy-face svg { width: 100%; height: 100%; display: block; }
.buddy-say { pointer-events: auto; position: relative; max-width: min(260px, calc(100vw - 100px)); margin-bottom: 18px; background: #fff; color: var(--text); border: 2px solid var(--navy); border-radius: 18px 18px 18px 4px; padding: 12px 52px 12px 16px; font-size: 15px; line-height: 1.45; box-shadow: var(--shadow); }
.buddy-say p { margin: 0; }
.buddy-close { position: absolute; right: 0; top: 0; width: 48px; height: 48px; border: 0; background: none; color: var(--navy); font-size: 24px; line-height: 1; }

/* ---------- About ---------- */
.years { display: grid; gap: 8px; justify-items: center; text-align: center; }
.years-num { font: 700 clamp(110px, 22vw, 240px)/1 var(--font-head); color: var(--yellow); text-shadow: 0 0 50px rgba(255,204,0,.5); margin: 0; font-variant-numeric: tabular-nums; max-width: none; }
.night-band { background: radial-gradient(120% 90% at 20% 0%, #232a78 0%, var(--night) 60%); color: #e9ebff; padding: var(--section-pad) 0; }
.night-band h2 { color: #fff; }
.night-band p { margin-left: auto; margin-right: auto; }
.night-band :focus-visible { outline-color: var(--yellow); }
.orbit-wrap .focus-list li a { display: flex; align-items: center; min-height: 48px; }
@media (min-width: 1100px) {
  .orbit-wrap { position: relative; height: 620px; margin: 0 auto 8px; }
  .orbit-wrap .focus-list { display: block; position: absolute; inset: 0; }
  .orbit-wrap .focus-list li { position: absolute; width: 270px; text-align: center; transform: translate(-50%, -50%); list-style: none; }
  .orbit-wrap .focus-list li::before { content: none; }
  .orbit-wrap .focus-list li a { justify-content: center; padding: 14px 18px; border-radius: 99px; background: #fff; border: 2px solid var(--navy); box-shadow: var(--shadow); font-weight: 600; text-decoration: none; }
  .orbit-wrap .focus-list li a:hover, .orbit-wrap .focus-list li a:focus-visible { background: var(--yellow); }
  .orbit-wrap svg { position: absolute; left: 50%; top: 50%; width: 560px; height: 560px; transform: translate(-50%, -50%); }
  .orbit-ring { fill: none; stroke: var(--navy); stroke-opacity: .25; stroke-width: 2; stroke-dasharray: 3 12; stroke-linecap: round; transform-origin: 280px 280px; }
  .orbit-core { fill: var(--navy); }
}
.band-photos { display: grid; gap: 18px; list-style: none; }
@media (min-width: 768px) { .band-photos { grid-template-columns: repeat(3, 1fr); } }
.band-photos img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); }
.principle { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; transition: transform .2s ease; }

/* ---------- Services ---------- */
.concern-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 32px; }
.concern-bar p { width: 100%; margin: 0; font-weight: 600; color: var(--navy); }
.concern-bar button, .tabs button { min-height: 48px; padding: 8px 18px; border-radius: 99px; border: 2px solid var(--navy); background: #fff; color: var(--navy); font: inherit; cursor: pointer; }
.concern-bar button[aria-pressed="true"], .tabs button[aria-pressed="true"] { background: var(--navy); color: #fff; font-weight: 600; box-shadow: 0 0 16px rgba(43,49,144,.5); }
.treatment.is-match .treatment-panel { box-shadow: 0 0 0 4px var(--neon), 0 0 34px rgba(255,79,123,.55); }
.treatment-panel { position: relative; }
.treatment-panel .scene { display: block; width: 100%; height: auto; border-radius: var(--radius); background: radial-gradient(100% 100% at 50% 0%, #2b3190, var(--night)); }
.replay { display: block; margin: 10px auto 0; min-height: 48px; padding: 0 22px; border-radius: 99px; border: 2px solid var(--navy); background: #fff; color: var(--navy); font: inherit; font-weight: 600; cursor: pointer; }
.scene .t { fill: #fff; stroke: #c5c9ee; stroke-width: 2; }
.scene .gum { fill: #e98a93; } .scene .bone { fill: #f1dfbf; } .scene .metal { fill: #aeb4c4; stroke: #6c7390; stroke-width: 2; }
.scene .line { fill: none; stroke: #e6e9f5; stroke-width: 4; stroke-linecap: round; }
.scene .gold { fill: var(--yellow); } .scene .pink { fill: var(--neon); } .scene .stain { fill: #c9a23a; } .scene .pulp { fill: #b3243f; } .scene .fillm { fill: var(--yellow); }
.scene .dim { fill: #d9b46a; }
.scene g, .scene path, .scene rect, .scene circle { transform-box: fill-box; transform-origin: center; }

/* ---------- Gallery ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.photo-grid li { transition: transform .3s ease; }
.photo-btn { border-radius: var(--radius); overflow: hidden; }
.photo-btn img { transition: transform .5s ease; aspect-ratio: 4 / 3; object-fit: cover; width: 100%; height: auto; }
.photo-btn:hover img { transform: scale(1.07); }

/* ---------- Reviews ---------- */
.gauge { width: min(300px, 80vw); height: auto; display: block; margin: 0 auto; }
.gauge circle { fill: none; stroke-width: 18; }
.gauge .track { stroke: rgba(255,255,255,.14); }
.gauge .value { stroke: var(--yellow); stroke-linecap: round; filter: drop-shadow(0 0 8px var(--yellow)); transform: rotate(-90deg); transform-origin: center; transition: stroke-dashoffset 1.8s ease; }
.gauge text { fill: #fff; font: 700 66px var(--font-head); text-anchor: middle; }
.rating-split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .rating-split { grid-template-columns: 340px 1fr; gap: 64px; } }
.bubbles { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 22px; list-style: none; padding: 12px 0; }
.bubbles li { display: grid; place-content: center; text-align: center; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #fff, #dfe3ff); color: var(--navy); box-shadow: 0 14px 34px rgba(43,49,144,.25); padding: 12px; font-family: var(--font-head); font-weight: 600; line-height: 1.25; }
.bubbles li span { display: block; font-size: 34px; }
.bubbles .b1 { width: 210px; height: 210px; } .bubbles .b2 { width: 186px; height: 186px; } .bubbles .b3 { width: 150px; height: 150px; } .bubbles .b4 { width: 140px; height: 140px; font-size: 14px; }

/* ---------- FAQ as a conversation ---------- */
.faq-search { margin-bottom: 24px; }
.faq-search label { display: block; font-weight: 600; color: var(--navy); margin-bottom: 8px; }
.faq-search input { width: 100%; min-height: 56px; border: 2px solid var(--navy); border-radius: 99px; padding: 0 24px; font: inherit; }
.chat .acc-item { border: 0; margin-bottom: 14px; }
.chat .acc-btn { width: auto; max-width: 92%; margin-left: auto; display: flex; background: var(--navy); color: #fff; border-radius: 24px 24px 4px 24px; padding: 14px 22px; gap: 16px; }
.chat .acc-btn .acc-icon { color: var(--yellow); }
.chat .acc-panel { position: relative; max-width: 88%; margin: 10px 0 0 56px; background: var(--soft); border-radius: 4px 24px 24px 24px; padding: 16px 22px; }
.chat .acc-panel::before { content: ""; position: absolute; left: -52px; top: 0; width: 42px; height: 42px; border-radius: 50%; background: var(--yellow) url("../images/icons/favicon.svg") center / 70% no-repeat; }
.chat .acc-panel p { margin: 0; }
.typing .acc-panel p { visibility: hidden; }
.typing .acc-panel::after { content: "\2022 \2022 \2022"; position: absolute; left: 22px; top: 12px; font-size: 24px; letter-spacing: 3px; color: var(--navy); }

/* ---------- Locations ---------- */
.map-panel .scene { display: block; width: 100%; height: auto; }
.shop-photo { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius); margin-bottom: 16px; }
.open-pill { display: inline-flex; align-items: center; gap: 10px; border: 2px solid var(--line); border-radius: 99px; padding: 6px 16px; font-weight: 600; color: var(--navy); }
.open-pill::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #c77700; }
.open-pill.is-open::before { background: #14884a; box-shadow: 0 0 10px #38e08a; }

/* ---------- Contact: the ticket writes itself ---------- */
.ticket { position: relative; background: radial-gradient(120% 100% at 100% 0%, #2d349a, var(--night)); color: #fff; border-radius: var(--radius); padding: 26px 28px; box-shadow: 0 20px 50px rgba(11,13,42,.35); }
.ticket h2 { color: #fff; font: 700 36px "Dancing Script", cursive; text-shadow: 0 0 12px var(--neon); margin: 0 0 8px; }
.ticket dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0; border-top: 2px dashed rgba(255,255,255,.35); padding-top: 14px; }
.ticket dt { color: #b9bff5; } .ticket dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.ticket-bar { height: 10px; border-radius: 99px; background: rgba(255,255,255,.16); margin-top: 18px; overflow: hidden; }
.ticket-bar span { display: block; height: 100%; width: 100%; background: var(--yellow); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
.ticket p { margin: 10px 0 0; font-size: 15px; }

/* ---------- Thank you and 404 ---------- */
.see-you { font: 700 clamp(56px, 12vw, 128px) "Dancing Script", cursive; color: var(--navy); text-align: center; margin: 0 auto 8px; text-shadow: 0 0 26px rgba(255,79,123,.55); }
.gap-game { text-align: center; margin-bottom: 32px; }
.gap-game svg { width: 100%; max-width: 640px; height: auto; margin: 0 auto 16px; display: block; background: radial-gradient(100% 100% at 50% 0%, #2b3190, var(--night)); border-radius: var(--radius); }
.gap-game p { margin-left: auto; margin-right: auto; }
.gap-game .new-tooth { transform: translateY(-120px); opacity: 0; transition: transform .9s cubic-bezier(.3,1.5,.5,1), opacity .3s; }
.gap-game.is-filled .new-tooth { transform: none; opacity: 1; }

/* ---------- Motion ---------- */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: no-preference) {
  .banner-art path, .banner-art circle { stroke-dasharray: 1; animation: w-draw 2s ease both, w-flicker 7s 3s infinite; }
  .banner-art > *:nth-child(2) { animation-delay: .5s, 3.3s; } .banner-art > *:nth-child(3) { animation-delay: 1s, 3.7s; }
  .spark { animation: w-twinkle 3s ease-in-out infinite; }
  .spark:nth-of-type(2n) { animation-delay: -1.1s; } .spark:nth-of-type(3n) { animation-delay: -2.2s; }
  .pop { animation: w-pop 1s ease-out forwards; }
  .buddy-face svg { animation: w-bob 3s ease-in-out infinite; }
  .buddy-say { animation: w-in .35s ease both; }
  .card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(43,49,144,.18); }
  .principle:hover { transform: translateY(-8px) rotate(-1deg); }
  .orbit-ring { animation: w-spin 60s linear infinite; }
  .bubbles li { animation: w-float 6s ease-in-out infinite; }
  .bubbles li:nth-child(2) { animation-delay: -1.5s; } .bubbles li:nth-child(3) { animation-delay: -3s; } .bubbles li:nth-child(4) { animation-delay: -4.5s; }
  .rise-w { opacity: 0; transform: translateY(32px); transition: opacity .7s ease, transform .7s ease; }
  .rise-w.is-seen { opacity: 1; transform: none; }

  /* Treatment scenes play once each time they gain the class "play" */
  .play .sweep { animation: s-sweep 3s ease-in-out 2; }
  .play .twinkle { animation: w-twinkle 1.2s ease-in-out 4 both; }
  .play .stain { animation: s-fade 2.8s ease both; }
  .play .dim { animation: s-whiten 3s ease both; }
  .play .pulp { animation: s-fade 1.4s 1s ease both; }
  .play .fillm { animation: s-rise 1.4s 2.2s ease both; }
  .play .tool { animation: s-tool 2.4s ease both; }
  .play .crooked { animation: s-straight 3s ease both; }
  .play .drop1 { animation: s-drop 1s .2s ease both; } .play .drop2 { animation: s-drop 1s 1.2s ease both; } .play .drop3 { animation: s-drop 1.1s 2.2s cubic-bezier(.3,1.5,.5,1) both; }
  .play .calm-gum { animation: s-gum 3s ease both; }
  .play .lift { animation: s-lift 2.8s ease-in-out both; }
  .play .happy { animation: s-jump 1s ease-in-out 3; }

  .train { animation: s-train 7s linear infinite; }
  .wave { animation: s-wave 5s ease-in-out infinite alternate; }
  .wave.two { animation-duration: 7s; animation-direction: alternate-reverse; }
  .pin { animation: w-bob 2s ease-in-out infinite; }
}
.scene .stain, .scene .pulp { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .scene .stain { opacity: 0; } }
@keyframes w-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes w-flicker { 0%, 92%, 96%, 100% { opacity: 1; } 94% { opacity: .5; } 98% { opacity: .75; } }
@keyframes w-twinkle { 0%, 100% { opacity: 0; transform: scale(.2) rotate(0); } 50% { opacity: 1; transform: scale(1.2) rotate(90deg); } }
@keyframes w-pop { to { translate: var(--dx) var(--dy); opacity: 0; rotate: 240deg; } }
@keyframes w-bob { 50% { translate: 0 -7px; } }
@keyframes w-in { from { opacity: 0; transform: translateY(10px) scale(.95); } }
@keyframes w-spin { to { transform: rotate(360deg); } }
@keyframes w-float { 50% { translate: 0 -16px; } }
@keyframes s-sweep { 0%, 100% { transform: translateX(-70px) rotate(-14deg); } 50% { transform: translateX(70px) rotate(14deg); } }
@keyframes s-fade { from { opacity: 1; } to { opacity: 0; } }
@keyframes s-whiten { from { fill: #d9b46a; } to { fill: #fff; } }
@keyframes s-rise { from { transform: scaleY(0); transform-origin: bottom; } to { transform: scaleY(1); transform-origin: bottom; } }
@keyframes s-tool { 0% { transform: translateY(-70px); } 45%, 60% { transform: translateY(8px); } 100% { transform: translateY(-70px); } }
@keyframes s-straight { 0%, 15% { transform: translateY(var(--y, 0)) rotate(var(--r, 0deg)); } 85%, 100% { transform: none; } }
@keyframes s-drop { from { transform: translateY(-150px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes s-gum { from { fill: #d3263f; } to { fill: #f2a0a8; } }
@keyframes s-lift { 0%, 20% { transform: none; } 70% { transform: translateY(-70px) rotate(14deg); opacity: 1; } 100% { transform: translateY(-110px) rotate(24deg); opacity: .15; } }
@keyframes s-jump { 50% { transform: translateY(-22px) rotate(5deg); } }
@keyframes s-train { from { transform: translateX(-320px); } to { transform: translateX(520px); } }
@keyframes s-wave { from { transform: translateX(-30px); } to { transform: translateX(30px); } }

/* A scene variable cannot be set in markup (no inline styles), so each crooked tooth has its own class. */
.scene .c1 { --y: -16px; --r: -13deg; } .scene .c2 { --y: 18px; --r: 15deg; } .scene .c3 { --y: -20px; --r: 9deg; } .scene .c4 { --y: 14px; --r: -16deg; } .scene .c5 { --y: -10px; --r: 12deg; }

/* ---------- Fixes from the first full review ---------- */
.gap-game .t { fill: #fff; stroke: #c5c9ee; stroke-width: 2; }
.orbit-wrap svg { display: none; }
@media (min-width: 1100px) {
  .orbit-wrap svg { display: block; }
  .orbit-wrap .focus-list { width: 100%; max-width: none; height: 100%; margin: 0; padding: 0; }
  .orbit-wrap .focus-list li { margin: 0; padding: 0; border: 0; max-width: none; }
}
@media (min-width: 1000px) {
  [data-gallery-root] .gallery-section:has(.compare) { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }
  [data-gallery-root] .gallery-section:has(.compare) h2 { grid-column: 1 / -1; }
  [data-gallery-root] .compare { margin: 0; max-width: none; }
}
@media (max-width: 767px) { .buddy { left: 8px; bottom: 80px; } .buddy-face { width: 48px; height: 54px; } }

/* Solid colour under every gradient, so text stays readable if the gradient is not painted. */
.page-banner, .night-band, .site-footer, .home .night { background-color: var(--night); }
.ticket { background-color: var(--night); }
.home .chart-tooth:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }
.home .night .section-head p { color: #d5d8ff; }
.home .scroll-cue { min-height: 48px; }
.home .lab-card input[type="range"], .home .reveal input[type="range"] { min-height: 48px; }
