/*
Theme Name: Davisville Endodontics
Theme URI: https://davisvilleendo.com/
Author: Dragonnier Inc.
Author URI: https://dragonnier.com/
Description: Editable custom WordPress theme converted from the Davisville Endodontics static site.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: davisville-endo
*/

:root {
  --ink: #17323b;
  --ink-soft: #526970;
  --navy: #103d4a;
  --teal: #207c7b;
  --teal-dark: #176160;
  --sage: #dcebe7;
  --mist: #f1f6f4;
  --cream: #fbfaf6;
  /* --logo-bg: #faf9f5; */
  --logo-bg: #fff;
  --white: #fff;
  --line: #dce6e3;
  --gold: #7b6030;
  --shadow: 0 18px 60px rgba(20, 59, 68, .11);
  --radius: 22px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.custom-logo { display: block; width: 178px; max-height: 66px; object-fit: contain; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { z-index: 100000; top: 5px; left: 5px; display: block; width: auto; height: auto; padding: 15px 23px 14px; clip: auto; background: var(--white); color: var(--ink); font-weight: 700; }
.admin-edit-note { padding: 12px 20px; background: #fff4cc; color: #493c00; text-align: center; }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--cream); font-family: var(--sans); line-height: 1.65; overflow-wrap: break-word; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--white); outline-offset: 3px; box-shadow: 0 0 0 6px var(--ink); }
main, [id] { scroll-margin-top: 110px; }
h1, h2, h3 { margin: 0 0 .65em; font-family: var(--serif); font-weight: 400; line-height: 1.08; letter-spacing: -.025em; }
h1 { font-size: clamp(3rem, 7vw, 6.4rem); }
h2 { font-size: clamp(2.2rem, 4vw, 4rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1.2rem; }
.container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.narrow { width: min(780px, calc(100% - 40px)); margin-inline: auto; }
.eyebrow { margin-bottom: 18px; color: var(--teal-dark); font-size: .75rem; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
.lead { max-width: 700px; color: var(--ink-soft); font-size: clamp(1.08rem, 2vw, 1.28rem); }
.muted { color: var(--ink-soft); }
.spaced-note { margin-top: 24px; }
.skip-link { position: fixed; z-index: 1000; top: -100px; left: 20px; padding: 12px 18px; border-radius: 6px; background: var(--white); color: var(--ink); font-weight: 800; }
.skip-link:focus { top: 10px; }

.topbar { padding: 8px 0; color: #dceceb; background: var(--navy); font-size: .78rem; }
.topbar .container, .nav-inner, .nav-links, .top-actions, .hero-actions, .quick-links, .footer-grid, .footer-bottom { display: flex; align-items: center; }
.topbar .container { justify-content: space-between; gap: 20px; }
.top-actions { gap: 24px; }
.topbar a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.site-header { position: sticky; z-index: 100; top: 0; border-bottom: 1px solid rgba(23, 50, 59, .08); background: var(--logo-bg); }
.nav-inner { min-height: 82px; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-logo { display: block; width: 178px; height: 66px; object-fit: contain; }
.brand-mark { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid var(--teal); border-radius: 50%; color: var(--teal-dark); font-family: var(--serif); font-size: 1.55rem; }
.brand-text { line-height: 1.15; }
.brand-text strong { display: block; font-family: var(--serif); font-size: 1.16rem; font-weight: 400; }
.brand-text span { color: var(--ink-soft); font-size: .67rem; letter-spacing: .13em; text-transform: uppercase; }
.nav-links { gap: 27px; list-style-type: none; }
.nav-links a { padding: 10px 2px 7px; border-bottom: 3px solid transparent; color: var(--ink-soft); font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }
.nav-links a:hover, .nav-links a:focus-visible, .nav-links a[aria-current="page"] { border-bottom-color: var(--teal-dark); color: var(--teal-dark); }
.menu-button { display: none; min-width: 48px; min-height: 48px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); color: var(--ink); font-size: 1rem; font-weight: 700; cursor: pointer; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 0 22px; border: 1px solid var(--teal); border-radius: 100px; background: var(--teal); color: var(--white); font-size: .78rem; font-weight: 750; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; transition: .2s ease; }
.button:hover, .button:focus-visible { border-color: var(--teal-dark); background: var(--teal-dark); transform: translateY(-2px); }
.button-outline { background: transparent; color: var(--teal-dark); }
.button-light { border-color: var(--white); background: var(--white); color: var(--navy); }
.button-outline:hover, .button-outline:focus-visible { color: var(--white); }
.button-light:hover, .button-light:focus-visible { border-color: var(--white); background: var(--white); color: var(--navy); }

.hero { position: relative; overflow: hidden; min-height: 690px; padding: 115px 0 95px; background: linear-gradient(90deg, rgba(251,250,246,.99) 0%, rgba(251,250,246,.94) 48%, rgba(251,250,246,.1) 75%), url("assets/images/toronto-downtown-hero.png") center/cover; }
.hero::after { position: absolute; right: -90px; bottom: -150px; width: 420px; height: 420px; border: 1px solid rgba(255,255,255,.6); border-radius: 50%; content: ""; }
.hero-content { position: relative; z-index: 1; max-width: 720px; }
.hero h1 span { color: var(--teal); font-style: italic; }
.hero-actions { flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.trust-row { padding: 20px 0; border-block: 1px solid var(--line); background: var(--white); }
.quick-links { justify-content: space-between; gap: 20px; }
.quick-item { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); font-size: .82rem; font-weight: 650; }
.quick-icon { display: grid; width: 35px; height: 35px; place-items: center; border-radius: 50%; background: var(--sage); color: var(--teal-dark); }

.section { padding: 40px 0; }
.section-soft { background: var(--mist); }
.section-dark { color: var(--white); background: var(--navy); }
.section-dark .eyebrow, .section-dark .muted, .section-dark .lead { color: #bfd4d3; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 48px; }
.section-head p { max-width: 520px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(42px, 7vw, 100px); align-items: center; }
.image-frame { position: relative; }
.image-frame img { width: 100%; min-height: 440px; border-radius: var(--radius); object-fit: cover; box-shadow: var(--shadow); }
.image-frame::before { position: absolute; z-index: -1; top: -18px; left: -18px; width: 44%; height: 46%; border-radius: var(--radius); background: var(--sage); content: ""; }
.fact-card { position: absolute; right: -25px; bottom: -28px; width: 210px; padding: 24px; border-radius: 16px; background: var(--navy); color: var(--white); box-shadow: var(--shadow); }
.fact-card strong { display: block; margin-bottom: 4px; font-family: var(--serif); font-size: 2.2rem; font-weight: 400; }
.check-list { padding: 0; list-style: none; }
.check-list li { position: relative; margin: 13px 0; padding-left: 28px; }
.check-list li::before { position: absolute; left: 0; color: var(--teal-dark); content: "\2713"; font-weight: 800; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { padding: 32px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); transition: .25s ease; }
.card:hover, .card:focus-within { transform: translateY(-5px); box-shadow: var(--shadow); }
.card-number { color: var(--gold); font-family: var(--serif); font-size: 2.1rem; }
.card a { color: var(--teal-dark); font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.doctors-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.doctor-card { overflow: hidden; border-radius: var(--radius); background: var(--white); box-shadow: 0 8px 30px rgba(20, 59, 68, .07); }
.doctor-card img { width: 100%; aspect-ratio: 4/4.7; object-fit: cover; object-position: top; }
.doctor-info { padding: 24px; }
.doctor-info h3 { margin-bottom: 6px; font-size: 1.25rem; }
.doctor-info p { margin: 0; color: var(--ink-soft); font-size: .82rem; }
.quote { padding: 70px; border-radius: var(--radius); color: var(--white); background: var(--teal-dark); }
.quote p { max-width: 890px; font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 3.5rem); line-height: 1.2; }
.cta { padding: 80px 0; color: var(--white); background: var(--teal-dark); }
.cta .container { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.cta h2 { max-width: 680px; margin-bottom: 0; }

.page-hero { padding: 100px 0 80px; background: var(--mist); text-align: center; }
.page-hero h1 { font-size: clamp(3rem, 6vw, 5.4rem); }
.page-hero .lead { margin-inline: auto; }
.doctor-profile { display: grid; grid-template-columns: minmax(260px, .7fr) 1.3fr; gap: clamp(35px, 7vw, 95px); align-items: start; padding: 70px 0; border-bottom: 1px solid var(--line); }
.doctor-profile img { width: 100%; max-height: 450px; border-radius: var(--radius); object-fit: cover; object-position: top; box-shadow: var(--shadow); }
.credentials { color: var(--teal-dark); font-size: .78rem; font-weight: 750; letter-spacing: .09em; text-transform: uppercase; }
.treatment-row { display: grid; grid-template-columns: .65fr 1.35fr; gap: 60px; padding: 55px 0; border-bottom: 1px solid var(--line); }
.treatment-row:last-child { border-bottom: 0; }
.treatment-row .number { color: var(--gold); font-family: var(--serif); font-size: 4rem; line-height: 1; }
.symptom-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.symptom { padding: 24px 16px; border: 1px solid var(--line); border-radius: 15px; background: var(--white); text-align: center; font-weight: 700; }
.steps { counter-reset: steps; }
.step { position: relative; padding: 0 0 48px 72px; border-left: 1px solid var(--line); }
.step::before { position: absolute; top: 0; left: -23px; display: grid; width: 45px; height: 45px; place-items: center; border-radius: 50%; background: var(--teal); color: var(--white); content: counter(steps); counter-increment: steps; font-weight: 800; }
.step:last-child { padding-bottom: 0; border-color: transparent; }
.details { margin-top: 15px; border-top: 1px solid var(--line); }
.details details { padding: 20px 0; border-bottom: 1px solid var(--line); }
.details summary { min-height: 44px; padding: 6px 4px; cursor: pointer; font-family: var(--serif); font-size: 1.25rem; }
.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 60px; }
.contact-panel { padding: 38px; border-radius: var(--radius); background: var(--navy); color: var(--white); }
.contact-panel a { color: var(--white); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.contact-line { padding: 22px 0; border-bottom: 1px solid rgba(255,255,255,.15); }
.contact-line:last-child { border: 0; }
.contact-line span { display: block; color: #b7d1d0; font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field-full { grid-column: 1 / -1; }
label { display: block; margin-bottom: 6px; font-size: .78rem; font-weight: 750; }
input, select, textarea { width: 100%; min-height: 48px; padding: 14px 15px; border: 1px solid #9caeaa; border-radius: 10px; background: var(--white); color: var(--ink); font: inherit; }
textarea { min-height: 135px; resize: vertical; }
.form-note { margin-top: 14px; color: var(--ink-soft); font-size: .75rem; }
.form-status { min-height: 1.65em; margin-top: 14px; color: var(--teal-dark); font-weight: 700; }
.map { width: 100%; min-height: 420px; border: 0; filter: saturate(.75); }

.footer { padding: 70px 0 22px; color: #d8e6e5; background: #0b2d37; }
.footer-grid { align-items: start; justify-content: space-between; gap: 55px; }
.footer-brand { max-width: 310px; }
.footer h3 { margin-bottom: 14px; color: var(--white); font-family: var(--sans); font-size: .75rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.footer a { display: block; width: fit-content; margin: 8px 0; color: #d8e6e5; font-size: .86rem; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.footer .brand-logo { width: 210px; height: auto; padding: 8px; border-radius: 5px; background: var(--white); mix-blend-mode: normal; }
.footer-bottom { justify-content: space-between; margin-top: 55px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); color: #9ab5b5; font-size: .72rem; }

@media (max-width: 980px) {
  .nav-links { display: none; position: absolute; top: 82px; right: 0; left: 0; gap: 20px; padding: 16px 20px 22px; border-bottom: 1px solid var(--line); background: var(--logo-bg); box-shadow: 0 18px 30px rgba(20, 59, 68, .12); }
  .nav-links.open { display: grid; }
  .nav-links a { min-height: 48px; padding: 13px 8px 9px; }
  .menu-button { display: block; }
  .nav-inner > .button { display: none; }
  .doctors-grid { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: 1fr 1fr; }
  .quick-links { display: grid; grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .container, .narrow { width: min(100% - 30px, 1160px); }
  .topbar .container { justify-content: center; }
  .topbar .container > span, .top-actions a:first-child { display: none; }
  .hero { min-height: auto; padding: 85px 0; background: linear-gradient(90deg, rgba(251,250,246,.98), rgba(251,250,246,.84)), url("assets/images/toronto-downtown-hero.png") center/cover; }
  .section { padding: 75px 0; }
  .split, .doctor-profile, .treatment-row { grid-template-columns: 1fr; }
  .cards, .doctors-grid, .symptom-grid, .form-grid, .quick-links { grid-template-columns: 1fr; }
  .section-head, .cta .container, .footer-grid, .footer-bottom { display: block; }
  .section-head > *, .cta h2 { margin-bottom: 25px; }
  .fact-card { position: relative; right: auto; bottom: auto; width: 100%; margin-top: 14px; }
  .quote { padding: 35px 25px; }
  .footer-grid > div { margin-bottom: 30px; }
  .field-full { grid-column: auto; }
  .brand-logo { width: 150px; height: 58px; }
  .nav-inner { min-height: 74px; }
  .nav-links { top: 74px; }
  .image-frame img { min-height: 280px; }
  .image-frame::before { left: 0; }
  .map { min-height: 330px; }
}

@media (max-width: 380px) {
  h1 { font-size: 2.65rem; }
  h2 { font-size: 2rem; }
  .container, .narrow { width: min(100% - 24px, 1160px); }
  .contact-panel, .card { padding: 26px 20px; }
  .hero-actions .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  .button:hover, .button:focus-visible, .card:hover, .card:focus-within { transform: none; }
}

@media (forced-colors: active) {
  :focus-visible { outline: 3px solid Highlight; }
  .button, .menu-button, .card, .symptom, input, select, textarea { border: 1px solid ButtonText; }
  .nav-links a[aria-current="page"] { border-bottom-color: LinkText; }
}
