/* The Smile Factory — cohesive inner-page visual system.
   Loaded after app.css and before page-specific styles. */

body {
  background: #fbf8f1;
}

.site-header {
  background: rgba(251, 248, 241, 0.97);
  border-bottom: 1px solid rgba(5, 47, 37, 0.08);
}
.site-header.is-scrolled {
  background: rgba(251, 248, 241, 0.985);
  box-shadow: 0 10px 28px rgba(5, 47, 37, 0.07);
}
.header-inner {
  border-bottom: 0;
}
.brand {
  width: min(260px, 33vw);
}
.primary-nav > a:not(.button) {
  letter-spacing: 0.04em;
}

.page-hero {
  position: relative;
  overflow: hidden;
  max-width: 1240px;
  padding-top: clamp(44px, 7vw, 82px);
  padding-bottom: clamp(70px, 9vw, 118px);
}
.page-hero::after {
  content: "";
  position: absolute;
  width: 430px;
  height: 430px;
  right: -170px;
  top: 26px;
  border: 1px solid rgba(176, 137, 58, 0.13);
  border-radius: 50%;
  pointer-events: none;
}
.page-hero .breadcrumb {
  margin-bottom: 34px;
}
.page-hero > .eyebrow,
.page-hero-copy > .eyebrow {
  margin-bottom: 22px;
}
.page-hero h1 {
  max-width: 12ch;
  font-size: clamp(4rem, 7vw, 6.7rem);
  line-height: 0.95;
}
.page-hero .page-lede {
  margin-top: 28px;
  max-width: 610px;
  color: #52675f;
  font-size: 0.96rem;
  line-height: 1.85;
}
.page-hero > .button,
.page-hero-copy > .button {
  margin-top: 30px;
}

.page-hero--visual {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.76fr);
  gap: clamp(42px, 7vw, 92px);
  align-items: center;
}
.page-hero--visual::after {
  display: none;
}
.page-hero-copy {
  position: relative;
  z-index: 1;
}
.page-hero-media {
  position: relative;
  min-width: 0;
}
.page-hero-media::before {
  content: "";
  position: absolute;
  inset: 24px -24px -24px 24px;
  border: 1px solid rgba(176, 137, 58, 0.22);
  pointer-events: none;
}
.page-hero-media img {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  max-height: 610px;
  object-fit: cover;
  border: 1px solid rgba(5, 47, 37, 0.1);
  box-shadow: 14px 18px 0 rgba(5, 47, 37, 0.045);
}
.page-hero-media--landscape img {
  aspect-ratio: 900 / 620;
}
.eyebrow-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-right: 10px;
  color: #b0893a;
  border: 1px solid rgba(176, 137, 58, 0.35);
  vertical-align: middle;
}
.eyebrow-icon svg {
  width: 15px;
  height: 15px;
}

.section-heading h2,
.approach-section h2,
.simple-invitation h2,
.location-section h2 {
  max-width: 13ch;
}
.section-description {
  color: #52675f;
}

.category-section {
  max-width: 1180px;
  border-top: 1px solid rgba(5, 47, 37, 0.1);
}
.category-section .section-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
  gap: 70px;
  align-items: end;
  margin-bottom: 36px;
}
.category-section .section-heading > p {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin: 0;
  align-self: end;
}
.category-grid {
  gap: 0 54px;
}
.category-treatment {
  padding: 34px 0 38px;
  border-top: 1px solid rgba(5, 47, 37, 0.11);
}
.category-treatment .eyebrow {
  color: var(--emerald-secondary);
}
.category-treatment h3 {
  font-size: clamp(2.25rem, 3.7vw, 3.15rem);
  margin: 15px 0 13px;
}
.category-treatment > p {
  max-width: 390px;
  color: #5a6a63;
  line-height: 1.85;
}
.category-treatment .text-link {
  margin-top: 20px;
}
.category-grid--icons {
  counter-reset: none;
}
.category-treatment--icon {
  position: relative;
  padding-left: 62px;
}
.service-icon {
  position: absolute;
  left: 0;
  top: 36px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  color: #073b31;
  background: rgba(205, 165, 87, 0.08);
  border: 1px solid rgba(176, 137, 58, 0.34);
}
.service-icon svg {
  width: 22px;
  height: 22px;
}

.service-story {
  background: #eef1e9;
  border-block: 1px solid rgba(5, 47, 37, 0.08);
}
.service-story-grid,
.about-story-grid,
.contact-visual-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(320px, 0.78fr);
  gap: clamp(46px, 7vw, 90px);
  align-items: center;
}
.service-story-copy h2,
.about-story-copy h2,
.contact-visual-copy h2 {
  max-width: 12ch;
}
.service-story-copy > p:not(.eyebrow),
.about-story-copy > p:not(.eyebrow) {
  max-width: 540px;
  color: #52675f;
  line-height: 1.85;
}
.service-story-visual,
.about-story-visual,
.contact-visual-art {
  position: relative;
}
.service-story-visual img,
.about-story-visual img,
.contact-visual-art img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(5, 47, 37, 0.1);
  box-shadow: 12px 14px 0 rgba(5, 47, 37, 0.045);
}
.service-story-visual img {
  max-height: 470px;
  object-fit: cover;
  object-position: center;
}
.service-story-points,
.care-list,
.doctor-page-cues,
.profile-cues {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  margin-top: 28px;
}
.service-story-points span,
.care-list span,
.doctor-page-cues span,
.profile-cues span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  color: #36564c;
  font-size: 0.78rem;
  line-height: 1.35;
}
.service-story-points svg,
.care-list svg,
.doctor-page-cues svg,
.profile-cues svg {
  width: 18px;
  height: 18px;
  color: #b0893a;
  flex: 0 0 auto;
}

.simple-invitation {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #e8eee8, #f5f1e7);
  border-block: 1px solid rgba(5, 47, 37, 0.08);
}
.simple-invitation::after {
  content: "";
  position: absolute;
  right: -150px;
  top: -210px;
  width: 440px;
  height: 440px;
  border: 1px solid rgba(176, 137, 58, 0.18);
  border-radius: 50%;
}
.simple-invitation .container {
  position: relative;
  z-index: 1;
}

.doctors-directory {
  max-width: 1180px;
  padding-bottom: clamp(70px, 9vw, 120px);
}
.doctors-directory .clinician-spread {
  gap: 34px;
  padding: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.doctors-directory .clinician--2 {
  padding-top: 0;
}
.doctors-directory .clinician-photo {
  aspect-ratio: 4 / 5;
  background: #e5ece6;
  border: 1px solid rgba(5, 47, 37, 0.11);
  box-shadow: 10px 12px 0 rgba(5, 47, 37, 0.05);
}
.doctors-directory .clinician-photo picture,
.doctors-directory .clinician-photo .portrait {
  height: 100%;
}
.doctors-directory .clinician-photo .portrait {
  object-fit: cover;
}
.doctor-page-cues {
  margin-top: 30px;
}

.profile-page {
  max-width: 1160px;
  gap: clamp(55px, 8vw, 110px);
  padding-top: clamp(50px, 7vw, 90px);
  padding-bottom: clamp(80px, 9vw, 130px);
}
.profile-copy h1 {
  max-width: 10ch;
}
.profile-copy > p:not(.eyebrow, .profile-role) {
  max-width: 470px;
}
.profile-photo {
  background: #e6ece6;
  border: 1px solid rgba(5, 47, 37, 0.11);
  box-shadow: 14px 16px 0 rgba(5, 47, 37, 0.05);
}
.profile-cues {
  margin-top: 24px;
}

.approach-section {
  background: #f1f0e7;
  border-block: 1px solid rgba(5, 47, 37, 0.08);
}
.approach-section .principles {
  margin-top: 52px;
}
.approach-section .principles article {
  border-top-color: rgba(176, 137, 58, 0.55);
}

.about-story {
  background: #fbf8f1;
}
.about-story-grid {
  grid-template-columns: minmax(320px, 0.82fr) minmax(0, 0.92fr);
}
.about-story-visual {
  order: 0;
}
.about-story-copy {
  order: 1;
}

.location-section {
  max-width: 1160px;
  padding-block: clamp(70px, 9vw, 120px);
}
.location-section > div:last-child {
  padding: 32px;
  background: #e9eee8;
  border: 1px solid rgba(5, 47, 37, 0.1);
}
.location-section h3 {
  font-size: 2rem;
}
.location-section p {
  color: #52675f;
}
.location-section address {
  margin-top: 20px;
  font-style: normal;
  color: var(--emerald);
  line-height: 1.9;
}
.location-section address span {
  display: block;
}
.location-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  margin-top: 24px;
}
.location-actions .text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.location-actions .text-link svg {
  width: 17px;
  height: 17px;
}
.location-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.location-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #b0893a;
  border: 1px solid rgba(176, 137, 58, 0.42);
}
.location-mark svg {
  width: 22px;
  height: 22px;
}
.location-title-row h3,
.location-title-row p {
  margin: 0;
}
.location-title-row p {
  margin-top: 3px;
  font-size: 0.76rem;
}

.contact-visual-strip {
  background: #042f26;
  color: #fbf8f1;
}
.contact-visual-grid {
  grid-template-columns: minmax(0, 0.78fr) minmax(340px, 0.92fr);
}
.contact-visual-copy .eyebrow,
.contact-visual-copy h2,
.contact-visual-copy .care-list span {
  color: #fbf8f1;
}
.contact-visual-copy .care-list svg {
  color: #cda557;
}
.contact-visual-art img {
  border-color: rgba(251, 248, 241, 0.12);
  box-shadow: 12px 14px 0 rgba(0, 0, 0, 0.12);
}

.prose {
  max-width: 780px;
}
.prose h2 {
  max-width: 15ch;
}

.appointment-section {
  background: #e7eee7;
  border-top: 1px solid rgba(5, 47, 37, 0.08);
}
.appointment-layout--contact {
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  align-items: stretch;
  gap: clamp(48px, 7vw, 88px);
}
.appointment-layout--contact .appointment-intro {
  align-self: center;
}
.appointment-layout--contact .appointment-intro h2 {
  max-width: 9ch;
}
.quick-contact--cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 30px;
}
.quick-contact-card {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(251, 248, 241, 0.74);
  border: 1px solid rgba(5, 47, 37, 0.12);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}
.quick-contact-card:hover,
.quick-contact-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(176, 137, 58, 0.65);
  background: #fbf8f1;
}
.quick-contact-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #b0893a;
  border: 1px solid rgba(176, 137, 58, 0.45);
}
.quick-contact-icon svg {
  width: 19px;
  height: 19px;
}
.quick-contact-card small,
.quick-contact-card strong {
  display: block;
}
.quick-contact-card small {
  color: #65736d;
  font-size: 0.65rem;
  margin-bottom: 3px;
}
.quick-contact-card strong {
  color: var(--emerald);
  font-size: 0.78rem;
  font-weight: 600;
}
.appointment-contact-panel {
  padding: clamp(34px, 5vw, 54px);
  background: #06382d;
  color: #fbf8f1;
  position: relative;
  overflow: hidden;
}
.appointment-contact-panel::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -110px;
  top: -120px;
  border: 1px solid rgba(205, 165, 87, 0.38);
  border-radius: 50%;
}
.appointment-contact-panel .eyebrow,
.appointment-contact-panel h3,
.appointment-contact-panel .text-link {
  color: #fbf8f1;
}
.appointment-contact-panel h3 {
  font-size: clamp(2.7rem, 4vw, 3.7rem);
  margin-top: 18px;
}
.appointment-contact-panel address {
  margin-top: 26px;
  font-style: normal;
  color: #d8e3dd;
  line-height: 1.85;
  font-size: 0.86rem;
}
.appointment-contact-panel address span {
  display: block;
}
.appointment-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin-top: 26px;
}
.appointment-contact-panel .text-link {
  border-color: rgba(251, 248, 241, 0.3);
}
.appointment-contact-note {
  margin-top: 28px;
  max-width: 430px;
  color: #c8d5ce;
  font-size: 0.72rem;
  line-height: 1.8;
}

.site-footer {
  background: #042b22;
}
.footer-location > p:not(.small) {
  line-height: 1.85;
}
.footer-location .small a {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
}

@media (max-width: 900px) {
  .page-hero::after {
    width: 320px;
    height: 320px;
    right: -190px;
  }
  .page-hero--visual {
    grid-template-columns: 1fr;
    gap: 42px;
  }
  .page-hero--visual .page-hero-copy {
    max-width: 760px;
  }
  .page-hero-media {
    width: min(100%, 610px);
  }
  .category-section .section-heading {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .category-section .section-heading > p {
    grid-column: auto;
    grid-row: auto;
    max-width: 560px;
  }
  .service-story-grid,
  .about-story-grid,
  .contact-visual-grid {
    grid-template-columns: 1fr;
  }
  .about-story-visual {
    order: 1;
  }
  .about-story-copy {
    order: 0;
  }
  .service-story-visual,
  .about-story-visual,
  .contact-visual-art {
    width: min(100%, 620px);
  }
  .appointment-layout--contact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .page-hero {
    padding-top: 32px;
    padding-bottom: 68px;
  }
  .page-hero h1 {
    font-size: clamp(3.3rem, 13vw, 4.35rem);
  }
  .page-hero--visual {
    gap: 30px;
  }
  .page-hero-media {
    width: min(92%, 420px);
    margin-inline: auto;
  }
  .page-hero-media::before {
    inset: 14px -14px -14px 14px;
  }
  .page-hero-media img {
    max-height: 460px;
  }
  .category-grid,
  .doctors-directory .clinician-spread {
    grid-template-columns: 1fr;
  }
  .category-treatment--icon {
    padding-left: 54px;
  }
  .service-icon {
    width: 38px;
    height: 38px;
    top: 34px;
  }
  .service-icon svg {
    width: 19px;
    height: 19px;
  }
  .service-story-grid,
  .about-story-grid,
  .contact-visual-grid {
    gap: 30px;
  }
  .service-story-points,
  .care-list,
  .doctor-page-cues,
  .profile-cues {
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
  }
  .doctors-directory .clinician-spread {
    gap: 36px;
  }
  .quick-contact--cards {
    grid-template-columns: 1fr;
  }
  .appointment-contact-panel {
    padding: 30px 24px;
  }
  .location-section {
    grid-template-columns: 1fr;
  }
  .footer-top {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand,
  .footer-location {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .quick-contact-card {
    transition: none;
  }
}

/* UI/UX audit corrections: denser service browsing and trust-first profiles. */
.category-section .section-heading {
  margin-bottom: 24px;
}
.category-grid {
  column-gap: 42px;
}
.category-treatment {
  padding-block: 25px 29px;
}
.category-treatment h3 {
  margin-block: 12px 10px;
  font-size: clamp(2.1rem, 3.25vw, 2.75rem);
}
.category-treatment > p {
  line-height: 1.68;
}
.category-treatment .text-link {
  margin-top: 16px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.service-icon {
  top: 27px;
}

.profile-page {
  grid-template-areas:
    "profile-heading profile-photo"
    "profile-details profile-photo";
  grid-template-rows: auto 1fr;
  column-gap: clamp(55px, 8vw, 110px);
  row-gap: 0;
}
.profile-copy {
  display: contents;
}
.profile-heading {
  grid-area: profile-heading;
}
.profile-details {
  grid-area: profile-details;
}
.profile-photo {
  grid-area: profile-photo;
}
.profile-details > p {
  max-width: 470px;
  margin-top: 28px;
  color: #52675f;
  font-size: 0.86rem;
  line-height: 1.82;
}
.profile-details .hero-actions {
  margin-top: 30px;
}
.clinician-caption h3 a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.clinician-photo .portrait,
.profile-photo .portrait {
  filter: saturate(0.92) contrast(1.015);
}
.footer-location .small a {
  min-height: 44px;
}

@media (max-width: 900px) {
  body {
    padding-bottom: 0;
  }
  html.mobile-dock-visible body {
    padding-bottom: 62px;
  }
  html.menu-open .contact-dock {
    display: none !important;
  }
  .contact-dock {
    padding-block: 5px calc(5px + env(safe-area-inset-bottom));
  }
  .contact-dock a {
    min-height: 44px;
  }
}

@media (max-width: 700px) {
  .category-section .section-heading {
    margin-bottom: 16px;
  }
  .category-treatment {
    padding-block: 22px 24px;
  }
  .category-treatment--icon {
    padding-left: 52px;
  }
  .category-treatment h3 {
    margin-block: 10px 8px;
    font-size: 2.08rem;
  }
  .category-treatment > p {
    line-height: 1.62;
  }
  .service-icon {
    top: 23px;
  }

  .profile-page {
    grid-template-areas:
      "profile-heading"
      "profile-photo"
      "profile-details";
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .profile-heading .breadcrumb {
    margin-bottom: 24px;
  }
  .profile-heading .profile-role {
    margin-top: 14px;
  }
  .profile-photo {
    width: min(100%, 430px);
  }
  .profile-details > p {
    margin-top: 0;
  }
  .profile-details .profile-cues {
    margin-top: 20px;
  }
  .profile-details .hero-actions {
    margin-top: 24px;
  }
}
