/* Barrett Dental: depth, alignment and motion layer (theme v1.2.0, Nov 20, 2026).
   From the home-page audit hand-off, steps 0-13. Styling only: no copy, photos, colours or fonts change.
   Loaded after main.css and the page stylesheet on every page. Motion is transform/opacity only and
   switched off for prefers-reduced-motion. Phase-two items (hero glow/parallax, count-up, story float,
   progress bar) are deliberately NOT included. */

:root {
	--e1: 0 1px 2px rgba(28,47,53,.06), 0 4px 10px -4px rgba(28,47,53,.10);
	--e2: 0 2px 4px rgba(28,47,53,.06), 0 12px 24px -8px rgba(28,47,53,.16), 0 28px 48px -24px rgba(28,47,53,.22);
	--e3: 0 4px 8px rgba(28,47,53,.08), 0 24px 40px -12px rgba(28,47,53,.24), 0 48px 80px -32px rgba(28,47,53,.30);
	--glow: 0 10px 22px -8px rgba(43,157,143,.55);
	--ease: cubic-bezier(.2,.7,.2,1);
	--col-gap: clamp(24px, 3.4vw, 44px);
}

/* body{overflow-x:hidden} turns <body> into a scroll box and breaks position:sticky; clip hides the same overflow. */
html, body { overflow-x: clip; }

/* ===== 1. Buttons: rest depth, hover rise + shine, press ===== */
.btn { position: relative; overflow: hidden; isolation: isolate; }
.btn--primary {
	background: linear-gradient(180deg, #218477 0%, #1d7a6e 55%, #1b6c62 100%);
	box-shadow: inset 0 1px 0 rgba(255,255,255,.28), var(--glow), 0 1px 2px rgba(22,85,78,.25);
}
.btn--dark {
	background: linear-gradient(180deg, #1b6a61 0%, #16554e 100%);
	box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 10px 22px -8px rgba(22,85,78,.55);
}
.btn--white { box-shadow: inset 0 -1px 0 rgba(28,47,53,.06), 0 10px 24px -10px rgba(0,0,0,.35); }
.btn::after {
	content: ""; position: absolute; inset: 0; z-index: -1; transform: translateX(-120%) skewX(-18deg);
	background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent); pointer-events: none;
}
@media (hover: hover) {
	.btn:hover { transform: translateY(-2px); }
	.btn--primary:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 16px 28px -10px rgba(43,157,143,.7), 0 2px 4px rgba(22,85,78,.25); }
	.btn:hover::after { transform: translateX(120%) skewX(-18deg); transition: transform .7s var(--ease); }
}
.btn:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(0,0,0,.18), 0 2px 6px -2px rgba(43,157,143,.5); transition-duration: .06s; }
.call-bar:active { filter: brightness(.92); }

/* ===== 2. Header: sticky glass, shrinks after scrolling (polish.js adds .is-scrolled) ===== */
.site-header {
	position: sticky; top: 0;
	background: rgba(255,255,255,.88); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
	transition: box-shadow .25s ease, background-color .25s ease;
}
.site-header__inner { transition: min-height .25s var(--ease); }
.site-logo .logo-img { transition: width .25s var(--ease); }
.site-header.is-scrolled { box-shadow: var(--e2); background: rgba(255,255,255,.95); }
@media (min-width: 1181px) {
	.site-header.is-scrolled .site-header__inner { min-height: 72px; }
	.site-header.is-scrolled .logo-img { width: clamp(190px, 16vw, 230px); }
}
/* WordPress admin bar (logged-in editors only) sits above the sticky header */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }
html { scroll-padding-top: 96px; }

/* ===== 3. Hero card: glass edge + top elevation ===== */
.home-hero__card {
	border: 1px solid rgba(255,255,255,.75);
	box-shadow: inset 0 1px 0 rgba(255,255,255,.9), var(--e3);
}

/* ===== 4. Steps: raised discs, dashed connector on desktop ===== */
.step-num { box-shadow: 0 0 0 8px rgba(43,157,143,.12), var(--e2); transition: transform .3s var(--ease), box-shadow .3s ease; }
@media (hover: hover) { .home-steps__list li:hover .step-num { transform: translateY(-4px) scale(1.04); } }
@media (min-width: 1024px) {
	.home-steps__list { position: relative; }
	.home-steps__list::before { content: ""; position: absolute; top: 60px; left: 17%; right: 17%; height: 0; border-top: 2px dashed rgba(22,85,78,.28); z-index: 0; }
	.home-steps__list li { position: relative; z-index: 1; }
}

/* ===== 5. Offer: mint panel, white cards that lift ===== */
.home-offer { background: var(--mint); }
.home-offer__item {
	background: #fff; border-radius: var(--radius-card); padding: 28px 26px 30px; box-shadow: var(--e1);
	transition: transform .3s var(--ease), box-shadow .3s ease;
}
@media (hover: hover) { .home-offer__item:hover { transform: translateY(-6px); box-shadow: var(--e3); } }
.home-offer .icon img { transition: transform .35s var(--ease); }
@media (hover: hover) { .home-offer__item:hover .icon img { transform: translateY(-3px) rotate(-3deg) scale(1.05); } }

/* ===== 6. Why: hairline dividers, links on one baseline ===== */
@media (min-width: 861px) { .home-why__grid > * + * { border-left: 1px solid var(--line); } }
.home-why__grid { align-items: stretch; }
.home-why__item { display: flex; flex-direction: column; align-items: center; }
.home-why__item .link-arrow { margin-top: auto; padding-top: 18px; }

/* ===== 7. Testimonials: lift + thumbnail zoom ===== */
.t-card { transition: transform .3s var(--ease), box-shadow .3s ease; }
@media (hover: hover) { .t-card:hover { transform: translateY(-6px); box-shadow: var(--e3); } }
.lite-yt { overflow: hidden; }
.lite-yt picture, .lite-yt img { transition: transform .5s var(--ease); }
@media (hover: hover) { .t-card:hover .lite-yt img { transform: scale(1.04); } }

/* ===== 9. Section edges: rounded, overlapping panels ===== */
.home-steps, .home-testimonials, .home-story, .cta-band {
	border-radius: 36px 36px 0 0; margin-top: -36px; position: relative; z-index: 1;
}
.home-steps, .home-testimonials { box-shadow: 0 -18px 36px -24px rgba(28,47,53,.25); }
.home-story { box-shadow: 0 -18px 36px -24px rgba(28,47,53,.2); } /* keeps its own background: the illustration's light-grey backdrop blends into it */
@media (max-width: 680px) {
	.home-steps, .home-testimonials, .home-story, .cta-band { border-radius: 28px 28px 0 0; margin-top: -28px; }
}

/* ===== 11. Scroll reveals (polish.js adds .js-reveal; nothing hides without JS) ===== */
.js-reveal [data-r] { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js-reveal [data-r].is-in { opacity: 1; transform: none; }

/* ===== 12. Phones: swipe rails with a peek, 44 px targets ===== */
@media (max-width: 680px) {
	.home-testimonials__grid, .home-offer__grid {
		display: grid; grid-auto-flow: column; grid-auto-columns: min(82vw, 330px); grid-template-columns: none; gap: 16px;
		overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
		margin-inline: calc(var(--gutter) * -1); padding: 8px var(--gutter) 28px; scrollbar-width: none;
	}
	.home-testimonials__grid::-webkit-scrollbar, .home-offer__grid::-webkit-scrollbar { display: none; }
	.home-testimonials__grid > *, .home-offer__grid > * { scroll-snap-align: start; width: auto; max-width: none; margin: 0; }
	.home-offer__item p { max-width: none; }
}
.rail-dots { display: none; }
@media (max-width: 680px) {
	.rail-dots { display: flex; justify-content: center; gap: 8px; margin-top: -8px; }
	.rail-dots i { width: 8px; height: 8px; border-radius: 999px; background: rgba(28,47,53,.25); transition: width .25s var(--ease), background-color .25s; }
	.rail-dots i.on { width: 24px; background: var(--teal-ink); }
}
.link-arrow { min-height: 44px; }

/* ===== 13. Contrast, type, focus ===== */
.home-steps .eyebrow, .home-testimonials .eyebrow { color: var(--teal-ink); }
.home-hero__text { font-size: 1.0625rem; line-height: 1.5; }
:focus-visible { outline: 3px solid var(--teal-ink); outline-offset: 3px; box-shadow: 0 0 0 6px rgba(255,255,255,.9); }

/* ===== 0. Alignment: one left edge, one gutter, one heading pattern ===== */
.home-hero__card { margin-left: 0; }
.home-quote { margin-left: 0; }
@media (min-width: 761px) {
	.home-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; align-items: stretch; }
	.home-stats > li { padding: 4px clamp(16px, 2.4vw, 32px); border-left: 1px solid var(--line); }
	.home-stats > li:first-child { padding-left: 0; border-left: 0; }
	.home-stats .stat__label, .home-stats .stat__num--words { max-width: none; }
}
.home-why__grid, .home-offer__grid, .home-testimonials__grid, .home-steps__list { column-gap: var(--col-gap); }
@media (min-width: 1024px) {
	.home-testimonials__grid > *, .home-testimonials .t-card { width: 100%; max-width: none; margin: 0; justify-self: stretch; }
}
.home-offer .eyebrow, .home-offer__title { text-align: center; margin-inline: auto; }
.home-offer__title { max-width: 720px; }
.home-story__media { justify-content: flex-end; }
.home-why__grid, .home-steps__list, .home-offer__grid { margin-top: clamp(40px, 4.5vw, 64px); }
.home-testimonials .eyebrow { margin-bottom: clamp(28px, 3vw, 40px); }

/* Pull quote: closing mark sits right after the last word instead of floating at the box edge */
.quote::after { content: none; }
.quote blockquote p:last-child::after {
	content: "\201D"; font-family: Georgia, "Times New Roman", serif; font-size: 3.2em; line-height: 0; font-weight: 700;
	color: var(--teal); vertical-align: -.42em; margin-left: .06em;
}
@media (max-width: 600px) { .quote blockquote p:last-child::after { content: none; } }

/* ===== 16. Footer: layered top edge, glass intro panel, equal columns ===== */
.site-footer {
	position: relative; z-index: 2; border-radius: 36px 36px 0 0; margin-top: -36px; padding-top: clamp(56px, 6vw, 80px);
	background: radial-gradient(60% 50% at 88% 0%, rgba(60,192,176,.14), rgba(60,192,176,0) 70%), var(--charcoal);
	box-shadow: 0 -18px 40px -24px rgba(0,0,0,.45);
}
.site-footer__seo {
	max-width: none; padding: clamp(20px, 2.6vw, 32px) clamp(20px, 3vw, 44px);
	background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-card);
	box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}
@media (min-width: 1024px) { .site-footer__grid { grid-template-columns: minmax(0, 1.75fr) repeat(3, minmax(0, 1fr)); } }
.site-footer__col li a { display: inline-block; transition: transform .2s var(--ease), color .2s; padding-block: 6px; }
@media (hover: hover) { .site-footer__col li a:hover { transform: translateX(4px); } }
.site-footer__cta { box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 0 0 1px rgba(255,255,255,.18), 0 12px 24px -10px rgba(60,192,176,.55); }
.site-footer__bottom { border-top-color: rgba(255,255,255,.14); }
@media (max-width: 680px) { .site-footer { border-radius: 28px 28px 0 0; margin-top: -28px; } }

/* ===== 17. Site-wide: the same depth language on every page ===== */
/* Panels: grey sections and the legal band get the rounded, overlapping top edge used on the home page */
main .section--gray:not(:first-child), main .legal-band:not(:first-child) {
	border-radius: 36px 36px 0 0; margin-top: -36px; position: relative; z-index: 1;
	box-shadow: 0 -18px 36px -24px rgba(28,47,53,.22);
}
@media (max-width: 680px) {
	main .section--gray:not(:first-child), main .legal-band:not(:first-child) { border-radius: 28px 28px 0 0; margin-top: -28px; }
}
/* Photos framed by the design get soft elevation */
.media-rounded, .team-photo img, .bio__photo img, .contact__map { box-shadow: var(--e2); }
.media-circle { box-shadow: 0 0 0 8px rgba(43,157,143,.12), var(--e2); }
/* Cards: one elevation scale, gentle lift where the card is a link */
.info-card, .form-card { box-shadow: var(--e2); }
.np-card { box-shadow: inset 0 1px 0 rgba(255,255,255,.18), var(--e3); top: 112px; } /* sits below the sticky header */
.post-card { box-shadow: var(--e1); transition: transform .3s var(--ease), box-shadow .3s ease; }
@media (hover: hover) { .post-card:hover { transform: translateY(-6px); box-shadow: var(--e3); } }
.service-item__img { transition: transform .3s var(--ease), box-shadow .3s ease; }
@media (hover: hover) { .service-item--link:hover .service-item__img { transform: translateY(-6px); box-shadow: var(--e3); } }
.service-item { scroll-margin-top: 112px; }
/* Accordions (FAQ, SOLEA, TMJ): rest depth, hover tint, open state lifted */
.accordion details { transition: box-shadow .25s ease, border-color .25s ease; }
@media (hover: hover) { .accordion details:hover { border-color: var(--teal); } }
.accordion details[open] { box-shadow: var(--e2); }
.faq-item { transition: transform .3s var(--ease); }
/* Page heroes: a quiet lift under the header edge, no change to the photo */
.page-hero__inner > * { position: relative; }

/* ===== 14. Reduced motion: everything still works, just still ===== */
@media (prefers-reduced-motion: reduce) {
	.js-reveal [data-r] { opacity: 1 !important; transform: none !important; transition: none !important; }
	.btn::after { display: none; }
	.btn:hover, .t-card:hover, .home-offer__item:hover, .site-footer__col li a:hover, .post-card:hover, .service-item--link:hover .service-item__img,
	.home-steps__list li:hover .step-num, .home-offer__item:hover .icon img, .t-card:hover .lite-yt img { transform: none; }
	.site-header__inner, .site-logo .logo-img { transition: none; }
}
