/* Reference-inspired patient cards: one link per card, with a visible focus state. */
.patient-action-band { --action-surface: #e5f0e9; padding: 92px 0 72px; background: var(--action-surface); }
.patient-action-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.patient-action-card { position: relative; display: flex; flex-direction: column; min-height: 250px; padding: 74px 26px 78px; border: 1px solid #d6e4da; border-radius: 26px 26px 64px 26px; color: var(--ink); background: var(--white); text-decoration: none; transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
.patient-action-icon { position: absolute; top: -42px; left: 26px; width: 84px; height: 84px; display: grid; place-items: center; border: 7px solid var(--action-surface); border-radius: 50%; color: var(--white); background: var(--forest); }
.patient-action-icon .icon { width: 32px; height: 32px; }
.patient-action-card h2 { margin: 0 0 12px; font-family: var(--font-display); font-size: clamp(1.2rem, 1.55vw, 1.5rem); font-weight: 650; line-height: 1.25; letter-spacing: -.025em; }
.patient-action-card p { margin: 0; color: var(--ink-soft); font-size: .96rem; line-height: 1.65; }
.action-card-cta { position: absolute; right: -2px; bottom: -2px; display: inline-flex; align-items: center; justify-content: center; gap: 0; width: 64px; height: 64px; padding: 0 12px; border: 8px solid var(--action-surface); border-radius: 999px; color: var(--white); background: var(--forest); transition: width 220ms ease, gap 220ms ease, background var(--transition); }
.action-cta-label { max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; font-weight: 700; font-size: .9rem; transition: max-width 220ms ease, opacity 150ms ease; }
.action-card-cta .icon { flex: 0 0 24px; }
.patient-action-card:is(:hover, :focus-visible) { color: var(--ink); border-color: var(--sage); transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.patient-action-card:is(:hover, :focus-visible) .action-card-cta, .care-category-card:is(:hover, :focus-visible) .action-card-cta { width: 166px; gap: 10px; background: var(--forest-deep); }
.patient-action-card:is(:hover, :focus-visible) .action-cta-label, .care-category-card:is(:hover, :focus-visible) .action-cta-label { max-width: 96px; opacity: 1; }
.patient-action-card:active, .care-category-card:active { transform: translateY(-1px); }

.smile-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(36px, 5vw, 80px); }
.smile-image { overflow: hidden; border-radius: 24px 240px 240px 24px; background: var(--mint); }
.smile-image img { width: 100%; height: 480px; object-fit: cover; object-position: center; }
.smile-copy h2 { margin: 0 0 24px; font-family: var(--font-display); font-size: clamp(2.02rem, 3.26vw, 3.04rem); line-height: 1.1; letter-spacing: -.025em; }
.smile-copy h2 em { display: block; color: var(--forest); font-style: normal; }
.smile-copy p { margin: 0 0 18px; color: var(--ink-soft); }
.smile-lead { font-size: 1.06rem; }
.smile-notes { display: flex; flex-wrap: wrap; gap: 12px 20px; margin: 24px 0 28px; }
.smile-notes span { display: inline-flex; align-items: center; gap: 7px; color: var(--forest); font-size: .88rem; font-weight: 600; }
.smile-notes .icon { width: 20px; height: 20px; }

.services-hero { padding: 44px 0; background: var(--forest-deep); color: var(--white); }
.services-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 64px; }
.services-hero .eyebrow { color: #b5d8c0; }
.services-hero h1 { margin: 0 0 20px; max-width: 840px; font-family: var(--font-display); font-size: clamp(2.16rem, 3.17vw, 2.86rem); line-height: 1.1; letter-spacing: -.025em; }
.services-hero p { max-width: 64ch; margin: 0 0 28px; color: rgba(255,255,255,.86); font-size: 1.06rem; }
.services-call { color: var(--white); border-color: rgba(255,255,255,.5); }
.services-call:hover { color: var(--white); border-color: var(--white); background: rgba(255,255,255,.08); }
.services-hero-image { position: relative; }
.services-hero-image > img { width: 100%; height: 310px; object-fit: cover; border-radius: 140px 24px 24px 24px; }
.services-hero-note { position: absolute; left: -20px; bottom: 24px; padding: 20px 24px; border-radius: 16px; color: var(--forest-deep); background: var(--cream); font-family: var(--font-display); font-size: 1.15rem; font-weight: 700; line-height: 1.3; box-shadow: 0 8px 24px rgba(18, 50, 42, .1); }
.care-categories-section { --action-surface: #edf5ef; background: var(--action-surface); scroll-margin-top: 100px; }
.care-category-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.care-category-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding-bottom: 50px; border: 1px solid #d4e1d8; border-radius: 24px 24px 64px 24px; background: var(--white); color: var(--ink); text-decoration: none; transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
.care-category-card:is(:hover, :focus-visible) { color: var(--ink); border-color: var(--sage); transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.care-category-image { position: relative; border-radius: 23px 23px 0 0; }
.care-category-image > img { width: 100%; height: 180px; object-fit: cover; border-radius: inherit; }
.category-icon { position: absolute; bottom: -25px; right: 24px; width: 56px; height: 56px; display: grid; place-items: center; border-radius: 50%; border: 5px solid var(--white); background: var(--forest); color: var(--white); }
.category-icon .icon { width: 25px; height: 25px; }
.care-category-body { padding: 26px 26px 16px; }
.category-kicker { display: block; margin: 0 0 8px; color: #547560; font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .065em; }
.care-category-body h3 { margin: 0 0 10px; font-size: 1.25rem; line-height: 1.3; }
.care-category-body p { max-width: 46ch; margin: 0; color: var(--ink-soft); font-size: .95rem; line-height: 1.65; }
.treatment-finder { background: var(--cream); scroll-margin-top: 100px; }
.service-search { width: 100%; max-width: 440px; }
.service-search label { display: block; margin-bottom: 9px; color: var(--ink); font-size: .9rem; font-weight: 600; }
.service-search-field { display: flex; align-items: center; gap: 12px; padding-inline: 16px; border: 1px solid #c7d9cc; border-radius: 999px; background: var(--white); color: var(--forest); }
.service-search-field:focus-within { outline: 3px solid var(--gold); outline-offset: 3px; }
.service-search-field input { min-width: 0; width: 100%; min-height: 50px; padding: 10px 0; border: 0; border-radius: 999px; color: var(--ink); background: transparent; font: inherit; font-size: .91rem; }
.service-search-field input:focus-visible { outline: 0; }
.service-result-count { margin: 0 0 20px; color: var(--ink-soft); font-size: .9rem; }
.treatment-directory { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.directory-card.treatment-link { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; min-height: 86px; padding: 18px; border-radius: 16px; }
.treatment-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--forest); background: var(--mint-soft); border-radius: 12px; }
.treatment-icon .icon { width: 24px; height: 24px; }
.directory-card.treatment-link h3 { margin: 0 0 4px; font-family: var(--font-display); font-size: 1rem; line-height: 1.3; }
.directory-card.treatment-link small { font-size: .68rem; line-height: 1.35; letter-spacing: .03em; }
.service-empty { padding: 40px 28px; border: 1px solid #cfdfd3; border-radius: 18px; background: var(--white); text-align: center; }
.service-empty h3 { margin-top: 0; }
.service-empty p { color: var(--ink-soft); }

/* Each state is a separate photo; labels and controls remain real HTML. */
.smile-gallery { padding-bottom: 32px; }
.smile-gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.smile-gallery-grid[data-visible-count="1"] { grid-template-columns: minmax(0, 1fr); max-width: 680px; margin-inline: auto; }
.smile-gallery-grid[data-visible-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 1040px; margin-inline: auto; }
.smile-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.smile-filters .filter-button { flex: 0 0 auto; white-space: nowrap; }
.smile-gallery-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; margin-top: 24px; }
.smile-gallery-footer p { margin: 0; color: var(--ink-soft); font-size: .86rem; }
.smile-service-link, .smile-care-link { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; color: var(--forest); font-size: .85rem; font-weight: 600; text-decoration: none; }
.smile-service-link { flex: 0 0 auto; padding-inline: 10px; border-radius: 999px; background: var(--white); }
.smile-service-link .icon, .smile-care-link .icon { width: 20px; height: 20px; flex: 0 0 auto; transition: transform var(--transition); }
.smile-service-link:is(:hover, :focus-visible) { color: var(--white); background: var(--forest); }
.smile-service-link:is(:hover, :focus-visible) .icon, .smile-care-link:is(:hover, :focus-visible) .icon { transform: translateX(3px); }
.smile-service-link:active, .smile-care-link:active { transform: translateY(1px); }
.smile-service-link:focus-visible, .smile-care-link:focus-visible { outline: 3px solid var(--forest); outline-offset: 3px; }
.smile-care-link:hover { color: var(--forest-deep); }
.smile-example { min-width: 0; margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 24px; background: var(--mint-soft); }
.compare-frame { --reveal: 50%; --before-left: 1; --before-right: 0; position: relative; overflow: hidden; aspect-ratio: 1.65; border-radius: 15px; background: var(--mint); isolation: isolate; }
.compare-layer { position: absolute; inset: 0; overflow: hidden; }
.compare-layer > img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
/* At rest the line is in the middle: before photo left of it, after photo right of it. Moving the
   line toward "After" fades the before half into the after photo (whole after photo at the right
   end); moving it toward "Before" fades the after half into the before photo (whole before photo
   at the left end). The before photo sits on top, masked with one strength left of the line
   (--before-left) and one right of it (--before-right), both set by main.js. */
.compare-before {
  -webkit-mask-image: linear-gradient(90deg, rgb(0 0 0 / var(--before-left)) var(--reveal), rgb(0 0 0 / var(--before-right)) var(--reveal));
  mask-image: linear-gradient(90deg, rgb(0 0 0 / var(--before-left)) var(--reveal), rgb(0 0 0 / var(--before-right)) var(--reveal));
}
/* Mirror both bonding states so the chipped corner is visible at the resting split. */
.compare-frame-bonding .compare-layer > img { transform: scaleX(-1); }
.compare-label { position: absolute; top: 12px; padding: 5px 10px; border-radius: 999px; color: var(--white); background: var(--forest-deep); font-size: .72rem; font-weight: 600; line-height: 1.5; pointer-events: none; }
.compare-label-before { left: 12px; }
.compare-label-after { right: 12px; }
.compare-divider { position: absolute; top: 0; bottom: 0; left: var(--reveal); width: 3px; transform: translateX(-50%); background: var(--white); pointer-events: none; box-shadow: 0 0 6px rgba(13,53,41,.2); }
.compare-handle { position: absolute; bottom: 12px; left: clamp(24px, var(--reveal), calc(100% - 24px)); display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 3px solid var(--white); border-radius: 50%; transform: translateX(-50%); color: var(--white); background: var(--forest); box-shadow: var(--shadow-sm); pointer-events: none; }
.compare-handle .icon { width: 20px; height: 20px; flex-shrink: 0; }
.compare-handle .icon:first-child { transform: rotate(90deg); margin-right: -4px; }
.compare-handle .icon:last-child { transform: rotate(-90deg); margin-left: -4px; }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.compare-frame:focus-within { outline: 3px solid var(--forest); outline-offset: 4px; }
.compare-frame:is(:hover, :focus-within) .compare-handle { background: var(--forest-deep); }
.compare-frame:active .compare-handle { box-shadow: 0 0 0 5px rgba(255,255,255,.28); }
.smile-example figcaption { padding: 20px 10px 10px; }
.smile-caption-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.smile-category-label { color: var(--forest); font-size: .73rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.smile-example h3 { margin: 7px 0 0; font-size: 1.16rem; line-height: 1.35; }
.detail-smile-preview { margin-bottom: 40px; }
.detail-smile-preview > h2 { margin: 0 0 12px; font-family: var(--font-display); font-size: clamp(1.52rem, 2.02vw, 1.94rem); line-height: 1.2; }
.detail-smile-preview .comparison-help { margin: 0 0 20px; color: var(--ink-soft); font-size: .9rem; }
.detail-smile-preview .smile-example { width: 100%; max-width: none; }
.detail-smile-preview .compare-frame { aspect-ratio: 2.1; }
.detail-smile-preview .compare-frame-contained { width: 100%; aspect-ratio: 1.8; max-height: 460px; }
.compare-frame-contained .compare-layer > img { object-fit: contain; }

@media (hover: none) {
  .action-card-cta { width: 166px; gap: 10px; }
  .action-cta-label { max-width: 96px; opacity: 1; }
}

@media (max-width: 1120px) {
  .patient-action-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 68px 28px; }
  .smile-split { gap: 36px; }
  .smile-image img { height: 440px; }
  .services-hero-grid { gap: 36px; }
  .services-hero-image > img { height: 300px; }
  .smile-gallery-grid { gap: 20px; }
  .care-category-grid, .treatment-directory { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .smile-split, .services-hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .smile-image img { height: 350px; }
  .smile-copy h2 { font-size: 2.35rem; }
  .services-hero { padding-block: 32px; }
  .services-hero h1 { font-size: clamp(1.93rem, 4.75vw, 2.33rem); }
  .services-hero-image > img { height: 240px; border-top-left-radius: 110px; }
  .smile-gallery-grid, .smile-gallery-grid[data-visible-count] { grid-template-columns: 1fr; }
  .smile-filters { flex-wrap: nowrap; overflow-x: auto; padding: 4px 3px 12px; scrollbar-width: thin; overscroll-behavior-x: contain; }
  .smile-example { max-width: 580px; width: 100%; margin-inline: auto; }
  .services-hero-note { left: 16px; bottom: 16px; font-size: 1.2rem; padding: 16px 20px; }
  .service-search { max-width: none; margin-top: 24px; }
  .action-card-cta { width: 166px; gap: 10px; }
  .action-cta-label { max-width: 96px; opacity: 1; }
}

@media (max-width: 599px) {
  .patient-action-band { padding-block: 80px 48px; }
  .patient-action-grid, .care-category-grid, .treatment-directory { grid-template-columns: 1fr; }
  .patient-action-card { min-height: 240px; padding-top: 62px; }
  .patient-action-card h2 { font-size: 1.4rem; }
  .smile-image { border-radius: 20px 150px 150px 20px; }
  .smile-image img { height: 310px; }
  .smile-notes { gap: 12px 16px; }
  .care-category-grid { gap: 24px; }
  .care-category-image > img { height: 175px; }
  .care-category-body { padding-inline: 24px; }
  .directory-card.treatment-link { padding: 16px; gap: 12px; }
  .service-search-field { padding-inline: 12px; gap: 8px; }
  .service-search-field input { font-size: .85rem; }
}
