/* ADP, dentist in Birmingham. Site styles, built on the Sitebound base kit (base.css). */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand palette: the two inks of a dental chart, blue-black and red, on cool paper */
  --primary:      #2a2c5c;
  --primary-mid:  #4b4e86;
  --primary-dark: #1d1e43;
  --accent:       #c93a26;
  --accent-mid:   #a92f1e;

  /* Neutrals */
  --bg:        #f3f4f1;
  --surface:   #ffffff;
  --border:    #cfd1db;
  --text:      #20223a;
  --text-soft: #50536e;
  --text-muted:#696c84;
  --tint:      #dfe1ef;
  --grid:      #eceef5;
  --ink-line:  #4a4d80;

  /* Typography */
  --font-display: 'IBM Plex Sans', system-ui, sans-serif;
  --font-body:    'IBM Plex Serif', Georgia, serif;

  /* Spacing */
  --section-pad: clamp(60px, 8vw, 120px);
  --container:   1200px;
  --radius:      6px;
  --radius-lg:   14px;

  /* base.css hooks */
  --color-bg: var(--bg);
  --color-surface: var(--surface);
  --color-text: var(--text);
  --color-muted: var(--text-soft);
  --color-accent: var(--accent);
  --color-accent-text: #ffffff;
  --color-line: var(--border);
  --focus: var(--primary);

  /* The tooth, drawn once and reused as a mark across the site */
  --tooth-outline: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-19 -28 38 56'%3E%3Cpath d='M-16 -12C-16 -22 -10 -25 -5 -22C-2 -20 2 -20 5 -22C10 -25 16 -22 16 -12C16 -2 13 4 12 12C11 19 10 24 7 24C4 24 3 16 0 12C-3 16 -4 24 -7 24C-10 24 -11 19 -12 12C-13 4 -16 -2 -16 -12Z' fill='none' stroke='%234b4e86' stroke-width='2.6' stroke-linejoin='round'/%3E%3C/svg%3E");
  --tooth-filled: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-19 -28 38 56'%3E%3Cpath d='M-16 -12C-16 -22 -10 -25 -5 -22C-2 -20 2 -20 5 -22C10 -25 16 -22 16 -12C16 -2 13 4 12 12C11 19 10 24 7 24C4 24 3 16 0 12C-3 16 -4 24 -7 24C-10 24 -11 19 -12 12C-13 4 -16 -2 -16 -12Z' fill='%23dfe1ef' stroke='%232a2c5c' stroke-width='2.6' stroke-linejoin='round'/%3E%3C/svg%3E");
  --tooth-strip-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-30 -28 60 56'%3E%3Cpath d='M-16 -12C-16 -22 -10 -25 -5 -22C-2 -20 2 -20 5 -22C10 -25 16 -22 16 -12C16 -2 13 4 12 12C11 19 10 24 7 24C4 24 3 16 0 12C-3 16 -4 24 -7 24C-10 24 -11 19 -12 12C-13 4 -16 -2 -16 -12Z' fill='none' stroke='%236a6da3' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E");
  --tooth-strip: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-30 -28 60 56'%3E%3Cpath d='M-16 -12C-16 -22 -10 -25 -5 -22C-2 -20 2 -20 5 -22C10 -25 16 -22 16 -12C16 -2 13 4 12 12C11 19 10 24 7 24C4 24 3 16 0 12C-3 16 -4 24 -7 24C-10 24 -11 19 -12 12C-13 4 -16 -2 -16 -12Z' fill='none' stroke='%23a9acc4' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
html { scroll-padding-top: 5.5rem; }
body {
  font-family: var(--font-body);
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--primary);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.15rem, 1.5rem + 2.7vw, 3.6rem); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.3; }

a { color: var(--primary); transition: color 0.2s; }
a:hover { color: var(--accent); }

p + p { margin-top: var(--space-s); }

.lead {
  font-size: var(--step-1);
  line-height: 1.6;
  max-width: 34em;
}
.muted { color: var(--text-soft); }

/* Email addresses only ever break at the @ */
a.email,
a.email[href^="mailto:"] {
  display: inline-block;
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 2rem);
}

.section {
  padding-block: var(--section-pad);
  border-top: 1px solid var(--border);
}

/* ---------- Buttons ---------- */
.btn {
  font-family: var(--font-display);
  font-weight: 600;
  border-radius: var(--radius);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.btn:hover { background: var(--accent-mid); color: #ffffff; }
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover { background: var(--primary); color: #ffffff; }
.btn-light { background: #ffffff; color: var(--primary); }
.btn-light:hover { background: var(--tint); color: var(--primary); }
.btn-outline-light { background: transparent; color: #ffffff; border-color: #ffffff; }
.btn-outline-light:hover { background: #ffffff; color: var(--primary); }

.text-link {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--primary);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}
.text-link:hover { color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  min-height: 4.25rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--primary);
  font-family: var(--font-display);
}
.brand:hover { color: var(--primary); }
.brand-mark {
  width: 1.35rem;
  height: 2rem;
  background: var(--tooth-filled) center / contain no-repeat;
}
.brand-name { font-weight: 600; font-size: 1.4rem; letter-spacing: 0.05em; line-height: 1.2; }
.brand-sub {
  font-size: var(--step--1);
  color: var(--text-soft);
  border-left: 1px solid var(--border);
  padding-left: 0.6rem;
  line-height: 1.3;
}

@media (max-width: 359px) {
  .brand-sub { display: none; }
}

.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step--1);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.menu-toggle:hover { border-color: var(--primary); }
.menu-bars,
.menu-bars::before,
.menu-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s, background 0.2s;
}
.menu-bars { position: relative; }
.menu-bars::before, .menu-bars::after { content: ''; position: absolute; left: 0; }
.menu-bars::before { top: -6px; }
.menu-bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bars::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav ul { list-style: none; }
.site-nav a {
  display: block;
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
}
.site-nav a[aria-current="page"] { font-weight: 600; }

/* Mobile menu panel, shown only once the button adds .is-open */
.site-header .site-nav.is-open {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.site-header .site-nav.is-open a {
  padding: 0.95rem clamp(1rem, 5vw, 2rem);
  border-top: 1px solid var(--border);
}
.site-header .site-nav.is-open a[aria-current="page"] {
  color: var(--accent);
  box-shadow: inset 3px 0 0 var(--accent);
}

@media (min-width: 768px) {
  .menu-toggle { display: none; }
  .site-header .site-nav {
    display: block;
    position: static;
    background: none;
    border: 0;
  }
  .site-nav ul { display: flex; gap: clamp(1rem, 2.4vw, 2.25rem); }
  .site-nav a {
    padding-block: 0.4rem;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s, color 0.2s;
  }
  .site-nav a:hover { border-bottom-color: var(--primary); color: var(--primary); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--accent); }
}

/* ---------- Home hero ---------- */
.hero { padding-block: clamp(2rem, 5vw, 4.5rem) var(--section-pad); }
.hero-grid,
.page-hero-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero-copy .lead,
.page-hero .lead { margin-top: var(--space-m); }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-l);
}

/* The chart panel: squared paper, like a clinical record */
.chart-panel {
  max-width: 40rem;
  padding: clamp(0.75rem, 3vw, 1.75rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background-color: var(--surface);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: -1px -1px;
}
.arch { width: 100%; height: auto; overflow: visible; }
.arch .tooth {
  fill: var(--tint);
  stroke: var(--primary);
  stroke-width: 2;
  stroke-linejoin: round;
}
.arch-base { stroke: var(--border); stroke-width: 1.5; }
.arch-mid { stroke: var(--border); stroke-width: 1.5; }
.arch-side { font-family: var(--font-display); font-weight: 600; fill: var(--text-muted); }
.arch-name { font-family: var(--font-display); font-weight: 600; fill: var(--primary); letter-spacing: 0.06em; }
.arch-sub { font-family: var(--font-body); fill: var(--text-soft); }
.arch-sign {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 1;
}

/* Entrance: the chart fills in, tooth by tooth, then is signed off in red.
   Only runs with scripts on and for people who have not asked for less motion. */
@media (prefers-reduced-motion: no-preference) {
  .js .arch--live .tooth {
    animation: chart-fill 0.4s ease-out backwards;
    animation-delay: calc(0.3s + var(--i) * 0.1s);
  }
  .js .arch--live .arch-sign { animation: sign 0.4s ease-out 2s backwards; }
}
@keyframes chart-fill { from { fill: var(--surface); stroke: var(--border); } }
@keyframes sign { from { stroke-dashoffset: 1; } }

/* ---------- Inner page heroes ---------- */
.page-hero { padding-block: clamp(2rem, 5vw, 4.5rem) var(--section-pad); }

/* ---------- Photos, framed like a chart attachment ---------- */
.photo {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--tint);
}
.photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 55vh;
  object-fit: cover;
}
.photo::before {
  content: '';
  position: absolute;
  inset: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 8px;
  pointer-events: none;
}
.photo::after {
  content: '';
  position: absolute;
  left: 1.5rem;
  bottom: 1.5rem;
  width: 2.5rem;
  height: 3rem;
  border-radius: var(--radius);
  background: var(--surface) var(--tooth-filled) center / 1.2rem no-repeat;
  pointer-events: none;
}

/* ---------- Split sections: heading column, ruled divider, ledger column ---------- */
.split { display: grid; gap: var(--space-l); }
.split-head > * + * { margin-top: var(--space-s); }
.split-head .photo { margin-top: var(--space-l); }

.section-intro { display: grid; gap: var(--space-s); margin-bottom: var(--space-xl); }

/* ---------- Ledger rows: information set out like a well-made table ---------- */
.ledger { border-top: 2px solid var(--primary); }
.ledger-row {
  display: grid;
  gap: 0.35rem;
  padding-block: var(--space-m);
  border-bottom: 1px solid var(--border);
}
.ledger-row dd,
.ledger-row p { color: var(--text); }
.ledger-row .text-link { justify-self: start; margin-top: 0.25rem; }
.ledger-term {
  position: relative;
  padding-left: 1.9rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-0);
  color: var(--primary);
  line-height: 1.4;
}
.ledger-term::before,
.ledger-term::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 1.1rem;
  height: 1.45rem;
  background: var(--tooth-outline) center / contain no-repeat;
}
.ledger-term::after {
  background-image: var(--tooth-filled);
  transition: opacity 0.3s ease-out;
}

.ledger--plain .ledger-term { padding-left: 0; }
.ledger--plain .ledger-term::before,
.ledger--plain .ledger-term::after { content: none; }

.cell-label {
  display: block;
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--text-soft);
  margin-top: 0.5rem;
}
.ledger-head { display: none; }

/* ---------- Fee questions table ---------- */
.table-wrap { max-width: 100%; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  border-top: 2px solid var(--primary);
}
.data-table th,
.data-table td {
  text-align: left;
  vertical-align: top;
  padding: var(--space-m) var(--space-s) var(--space-m) 0;
  border-bottom: 1px solid var(--border);
}
.data-table thead th {
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--text-soft);
  padding-block: var(--space-xs);
}
.data-table tbody th { width: 46%; }
.data-table thead th:first-child { padding-left: 1.9rem; }
.data-table td:last-child { padding-right: 0; }

/* ---------- Panels ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 4vw, 2.25rem);
}
.panel-title { font-size: var(--step-2); margin-bottom: var(--space-s); }
.panel .ledger { margin-top: var(--space-s); }
.panel .ledger-row:last-child { border-bottom: 0; padding-bottom: 0; }

/* ---------- Ink band ---------- */
.section--ink {
  background: var(--primary);
  color: #ffffff;
  border-top: 0;
}
.section--ink h2,
.section--ink .ledger-term { color: #ffffff; }
.section--ink p { color: #e6e7f2; }
.section--ink .ledger-row dd,
.section--ink .ledger-row p { color: #ffffff; }
.section--ink a:not(.btn) { color: #ffffff; }
.section--ink a:not(.btn):hover { color: var(--tint); }
.section--ink .ledger { border-top-color: #ffffff; }
.section--ink .ledger-row { border-bottom-color: var(--ink-line); }
.section--ink :focus-visible { outline-color: #ffffff; }

/* ---------- Forms ---------- */
.form-panel h2 { font-size: var(--step-2); }
.form-grid { display: grid; gap: var(--space-m); margin-top: var(--space-m); }
label {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--primary);
}
label .optional { font-weight: 400; color: var(--text-soft); }
input:not([type="checkbox"]):not([type="radio"]),
textarea {
  font-family: var(--font-display);
  background: var(--bg);
  border-color: var(--border);
  transition: border-color 0.2s, background 0.2s;
}
input:not([type="checkbox"]):not([type="radio"]):hover,
textarea:hover { border-color: var(--primary-mid); }
input:not([type="checkbox"]):not([type="radio"]):focus,
textarea:focus { border-color: var(--primary); background: var(--surface); }
.form-actions { margin-top: var(--space-xs); }
.form-thanks h2 { font-size: var(--step-2); margin-bottom: var(--space-s); }
.form-thanks:focus { outline: none; }
[hidden] { display: none !important; }

/* ---------- Prose (privacy) ---------- */
.prose h2 { font-size: var(--step-1); margin-top: var(--space-l); }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul { margin-top: var(--space-2xs); }
.prose ul { padding-left: 1.25rem; }
.prose li + li { margin-top: 0.35rem; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-display);
  font-size: var(--step--1);
}
.chart-strip {
  height: 2.25rem;
  margin-top: var(--space-xl);
  background: var(--tooth-strip) left center / auto 100% repeat-x;
}
.footer-grid {
  display: grid;
  gap: var(--space-l);
  padding-block: var(--space-xl);
}
.footer-grid .footer-name {
  font-size: var(--step-2);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--primary);
  line-height: 1.2;
}
.footer-grid p { color: var(--text-soft); }
.footer-grid p + p { margin-top: 0.35rem; }
.footer-grid .footer-title {
  font-size: var(--step-0);
  font-weight: 600;
  color: var(--primary);
  margin-bottom: var(--space-2xs);
}
.footer-links { list-style: none; display: grid; gap: 0.35rem; }
.footer-links a,
.footer-contact a { color: var(--text); text-decoration: none; }
.footer-links a:hover,
.footer-contact a:hover { color: var(--accent); text-decoration: underline; }
.footer-contact p + p { margin-top: 0.35rem; }
.footer-base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-2xs) var(--space-l);
  padding-block: var(--space-m);
  border-top: 1px solid var(--border);
  color: var(--text-soft);
}
.footer-base a { color: var(--text-soft); }
.footer-base a:hover { color: var(--accent); }

/* Full chart on the team page: both arches, crowns meeting at the midline */
.arch--full { max-height: 32rem; }
.arch--full > use {
  fill: var(--tint);
  stroke: var(--primary);
  stroke-width: 2;
  stroke-linejoin: round;
}

.page-hero-grid--top { align-items: start; }
.contact-ledger { margin-top: var(--space-l); }
.data-table .ledger-term { display: block; }
.ledger--three .ledger-row > p + p { margin-top: 0; }
.form-note { margin-top: var(--space-m); }

.row-wide > p + p { margin-top: var(--space-s); }
.section--ink {
  background-image: var(--tooth-strip-light);
  background-repeat: repeat-x;
  background-position: center top;
  background-size: auto 1.75rem;
  padding-top: calc(var(--section-pad) + 1.75rem);
}
.chart-strip { background-position: center; }
.table-wrap { overflow-x: auto; }

/* ---------- Phones: tighter rhythm, stacked fee questions, full-width buttons ---------- */
@media (max-width: 767.98px) {
  :root { --section-pad: clamp(2.75rem, 12vw, 3.75rem); }
  .hero, .page-hero { padding-block: 1.5rem 2.75rem; }
  .hero-actions { flex-direction: column; align-items: stretch; margin-top: var(--space-m); }
  .hero-actions .btn { width: 100%; text-align: center; justify-content: center; }
  .section-intro { margin-bottom: var(--space-m); }
  .split-head .photo { margin-top: var(--space-m); }
  .ledger-row { padding-block: 1.15rem; }
  .ledger-row .text-link { margin-top: 0.1rem; }
  .cell-label { margin-top: 0.75rem; }
  .ledger--three .ledger-row > p:first-of-type .cell-label,
  .row-wide .cell-label { margin-top: 0.1rem; }
  .footer-grid { gap: var(--space-m); padding-block: var(--space-l); }
  .footer-links { gap: 0; }
  .footer-links a { display: inline-block; padding-block: 0.35rem; }
  .footer-base { gap: 0.5rem; }

  /* Fee questions: each question and its answer read as one block */
  .data-table, .data-table tbody, .data-table tr,
  .data-table th, .data-table td { display: block; width: 100%; }
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .data-table tr { padding-block: 1.15rem; border-bottom: 1px solid var(--border); }
  .data-table th, .data-table td { padding: 0; border: 0; }
  .data-table tbody th { width: 100%; }
  .data-table td { padding-left: 1.9rem; margin-top: 0.35rem; }
}

/* ---------- Tablet ---------- */
@media (min-width: 768px) {
  .row-wide { grid-column: 2; }
  .ledger-row { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: var(--space-l); }
  .ledger--three .ledger-row > p { grid-column: 2; }
  .panel .ledger-row,
  .contact-ledger .ledger-row { grid-template-columns: minmax(0, 6.5rem) minmax(0, 1fr); }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .field--full { grid-column: 1 / -1; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1.3fr; }
}

/* ---------- Desktop ---------- */
@media (min-width: 1024px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
  .page-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .chart-panel { max-width: none; }

  .split {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 0;
  }
  .split-head {
    padding-right: var(--space-xl);
    border-right: 1px solid var(--border);
  }
  .split-body { padding-left: var(--space-xl); }
  .section--ink .split-head { border-right-color: var(--ink-line); }

  .section-intro {
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: 0;
    align-items: end;
  }
  .section-intro > :first-child { padding-right: var(--space-xl); }
  .section-intro > :last-child { padding-left: var(--space-xl); border-left: 1px solid var(--border); }

  .ledger-head {
    display: grid;
    grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-l);
    padding-block: var(--space-xs);
    border-bottom: 1px solid var(--border);
    font-family: var(--font-display);
    font-size: var(--step--1);
    font-weight: 500;
    color: var(--text-soft);
  }
  .ledger--three .ledger-row { grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) minmax(0, 1fr); }
  .ledger--three .ledger-row > p { grid-column: auto; }
  .ledger--three .cell-label { display: none; }
  .row-wide { grid-column: 2 / -1; }
}

/* ---------- Phones: menu links stay hidden until the button opens them.
   Kept last so no earlier header, nav or scroll rule can show them. ---------- */
@media (max-width: 767.98px) {
  .site-header .site-nav:not(.is-open) { display: none; }
}
