/* Smith Orthotics — premium custom lab. Navy + one warm cork accent. */
:root {
  --navy: #13233a;
  --navy-2: #1c3150;
  --ink: #142236;
  --ink-soft: #4a586a;
  --bg: #ffffff;
  --bg-soft: #f4f6f9;
  --line: #e1e6ed;
  --accent: #8b5a2b;          /* cork / tan — passes AA on white */
  --accent-dark: #6f4620;
  --accent-light: #e3ad74;    /* accent on navy backgrounds */
  --accent-soft: #f7eee4;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1160px;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(19,35,58,.06), 0 8px 24px rgba(19,35,58,.06);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.125rem/1.7 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.45em;
  color: var(--navy);
  text-wrap: balance;
}
h1 { font-size: clamp(2.5rem, 6.4vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: 1.3rem; font-family: var(--sans); font-weight: 600; letter-spacing: -0.01em; line-height: 1.3; }
p { margin: 0 0 1em; }
.lede { font-size: clamp(1.15rem, 1.8vw, 1.35rem); color: var(--ink-soft); max-width: 38em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
@media (min-width: 760px) { .wrap { padding: 0 36px; } }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--navy); color: #fff; padding: 10px 14px; z-index: 50; border-radius: 6px; }

.eyebrow {
  font: 600 0.8rem/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.2em;
}

/* Placeholders: obvious on purpose, search the code for "[" to find them */
.ph-text {
  background: #fff3c4; color: #5a4600;
  border: 1px dashed #b89b2c; border-radius: 4px;
  padding: 0 .35em;
  font: 500 0.88em/1.5 ui-monospace, "SFMono-Regular", Menlo, monospace;
}
.on-dark .ph-text { background: rgba(255,243,196,.14); color: #ffe9a3; }

.photo {
  position: relative;
  background:
    repeating-linear-gradient(135deg, rgba(19,35,58,.035) 0 12px, transparent 12px 24px),
    linear-gradient(160deg, #e9edf3, #dde3eb);
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  display: grid; place-items: center;
  text-align: center;
  color: var(--ink-soft);
  font: 500 0.78rem/1.5 var(--sans);
  letter-spacing: .12em; text-transform: uppercase;
  padding: 24px;
  overflow: hidden;
}
.photo strong { display: block; margin-top: 6px; font-size: 0.95rem; letter-spacing: 0; text-transform: none; color: var(--navy); font-weight: 600; }
.photo.tall { aspect-ratio: 4 / 5; }
.photo.wide { aspect-ratio: 16 / 9; }
.photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* Buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font: 600 1rem/1 var(--sans);
  padding: 17px 26px;
  border-radius: 999px;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
  cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); color: #fff; }
.btn-outline { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: var(--accent-soft); color: var(--navy); }
.btn-ghost-light { border-color: rgba(255,255,255,.5); color: #fff; }
.btn-ghost-light:hover { background: rgba(255,255,255,.1); color: #fff; border-color: #fff; }
.btn-sm { padding: 11px 18px; font-size: .92rem; }
@media (max-width: 480px) { .btns .btn { flex: 1 1 100%; } }

.text-link { font-weight: 600; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.text-link::after { content: "→"; transition: transform .2s; }
.text-link:hover::after { transform: translateX(3px); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); }
.brand-mark { width: 38px; height: 38px; flex: none; }
.brand-name { display: block; font: 600 1.3rem/1 var(--serif); letter-spacing: -0.01em; }
.brand-place { display: block; font: 500 .68rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin-top: 5px; }

.menu-btn {
  display: none;
  font: 600 .95rem/1 var(--sans); color: var(--navy);
  background: none; border: 1.5px solid var(--line); border-radius: 999px;
  padding: 10px 16px; cursor: pointer; align-items: center; gap: 8px;
}
.menu-btn .bars { width: 16px; height: 10px; position: relative; }
.menu-btn .bars::before, .menu-btn .bars::after { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 2px; transition: transform .2s, top .2s; }
.menu-btn .bars::before { top: 0; } .menu-btn .bars::after { top: 8px; }
.menu-btn[aria-expanded="true"] .bars::before { top: 4px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .bars::after { top: 4px; transform: rotate(-45deg); }

.site-nav { display: flex; align-items: center; gap: 4px; }
.site-nav a:not(.btn) { white-space: nowrap;
  color: var(--ink); text-decoration: none; font-weight: 500; font-size: .96rem;
  padding: 10px 12px; border-radius: 8px;
}
.site-nav a:not(.btn):hover { background: var(--bg-soft); color: var(--navy); }
.site-nav a[aria-current="page"] { color: var(--accent); }
.site-nav .btn { margin-left: 10px; }

@media (max-width: 1020px) {
  .js .menu-btn { display: inline-flex; }
  .js .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 20px 20px;
    box-shadow: 0 16px 30px rgba(19,35,58,.08);
    display: none;
  }
  .js .site-nav.open { display: flex; }
  .js .site-nav a:not(.btn) { white-space: nowrap; padding: 14px 4px; border-bottom: 1px solid var(--line); border-radius: 0; font-size: 1.05rem; }
  .js .site-nav .btn { margin: 16px 0 0; }
  html:not(.js) .header-row { flex-wrap: wrap; padding: 10px 0; }
  html:not(.js) .site-nav { flex-wrap: wrap; }
}

/* Sections */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 46rem; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { color: var(--ink-soft); font-size: 1.15rem; }

.on-dark { background: var(--navy); color: #d9e1ec; }
.on-dark h2, .on-dark h3 { color: #fff; }
.on-dark .eyebrow { color: var(--accent-light); }
.on-dark a:not(.btn) { color: var(--accent-light); }

/* Hero */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(64px, 9vw, 112px); overflow: hidden; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1.15fr 1fr; gap: 64px; } }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero .photo { box-shadow: var(--shadow); }

.page-hero { padding: clamp(56px, 8vw, 104px) 0 clamp(48px, 6vw, 80px); background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2.3rem, 5.4vw, 3.9rem); max-width: 16em; }

/* Trust strip */
.trust { background: var(--navy); color: #fff; }
.trust ul { list-style: none; margin: 0; padding: 22px 0; display: grid; gap: 14px; }
@media (min-width: 760px) { .trust ul { grid-template-columns: repeat(3, 1fr); padding: 26px 0; } }
.trust li { display: flex; align-items: center; gap: 12px; font-weight: 500; font-size: 1.02rem; }
@media (min-width: 760px) { .trust li { justify-content: center; } .trust li + li { border-left: 1px solid rgba(255,255,255,.15); } }
.trust svg { width: 22px; height: 22px; color: var(--accent-light); flex: none; }

/* Cards */
.cards { display: grid; gap: 20px; }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .cards.cols-3 { grid-template-columns: repeat(3, 1fr); } .cards.cols-4 { grid-template-columns: repeat(4, 1fr); } }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 26px 26px;
  transition: border-color .25s, box-shadow .25s, transform .25s;
}
.card:hover { border-color: #cfd7e2; box-shadow: var(--shadow); }
.card p { color: var(--ink-soft); margin: 0; font-size: 1.02rem; }
.card h3 { margin-bottom: .4em; }
.icon {
  width: 46px; height: 46px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; margin-bottom: 20px;
}
.icon svg { width: 24px; height: 24px; }
.section-soft .card { border-color: transparent; }

/* Split layouts */
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 72px; } .split.reverse > :first-child { order: 2; } }
.prose { max-width: 38em; }
.prose p { color: var(--ink-soft); }
.checklist { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.checklist li { position: relative; padding-left: 34px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .32em; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b5a2b' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.checklist strong { color: var(--navy); }

/* Methods (plaster + digital) */
.methods { display: grid; gap: 24px; }
@media (min-width: 860px) { .methods { grid-template-columns: 1fr 1fr; } }
.method { background: #fff; border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); overflow: hidden; display: flex; flex-direction: column; }
.method .photo { border-radius: 0; aspect-ratio: 16 / 9; }
.method-body { padding: 30px 28px 32px; }
.method .tag { display: inline-block; font: 600 .75rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.method h3 { font-family: var(--serif); font-weight: 600; font-size: 1.7rem; color: var(--navy); }
.method p { color: var(--ink-soft); }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; counter-reset: step; }
@media (min-width: 700px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { counter-increment: step; background: #fff; border-radius: var(--radius); padding: 28px 24px; border: 1px solid var(--line); position: relative; }
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block; font: 600 2.4rem/1 var(--serif); color: var(--accent); margin-bottom: 18px;
}
.steps p { color: var(--ink-soft); font-size: 1rem; margin: 0; }

/* CTA band */
.band { padding: clamp(64px, 9vw, 104px) 0; }
.band-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .band-grid { grid-template-columns: 1.4fr 1fr; } .band-grid .btns { justify-content: flex-end; margin-top: 0; } }
.band p { font-size: 1.15rem; max-width: 36em; }

/* Contact strip */
.contact-strip { display: grid; gap: 24px; }
@media (min-width: 820px) { .contact-strip { grid-template-columns: repeat(3, 1fr); } }
.contact-item { padding: 26px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); }
.contact-item .label { font: 600 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 12px; }
.contact-item .value { font: 600 1.25rem/1.4 var(--serif); color: var(--navy); }
.contact-item .value a { color: var(--navy); text-decoration: none; }
.contact-item .value a:hover { color: var(--accent); }

/* Comparison table */
.table-wrap { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.compare { width: 100%; border-collapse: collapse; font-size: 1.02rem; }
.compare th, .compare td { padding: 18px 20px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.compare tr:last-child th, .compare tr:last-child td { border-bottom: 0; }
.compare thead th { background: var(--navy); color: #fff; font-weight: 600; font-size: .95rem; }
.compare thead th:nth-child(2) { background: var(--accent); }
.compare tbody th { color: var(--navy); font-weight: 600; width: 22%; }
.compare td:nth-child(2) { color: var(--ink); font-weight: 500; background: #fcf8f3; }
.compare td:nth-child(3) { color: var(--ink-soft); }
@media (max-width: 680px) {
  .compare thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare tr { display: block; border-bottom: 1px solid var(--line); padding: 18px 18px 6px; }
  .compare tr:last-child { border-bottom: 0; }
  .compare th, .compare td { display: block; padding: 0 0 12px; border: 0; width: auto; background: none !important; }
  .compare tbody th { font-size: 1.1rem; }
  .compare td::before { content: attr(data-label); display: block; font: 600 .72rem/1.6 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
  .compare td:nth-child(2)::before { color: var(--accent); }
  .compare td:nth-child(3)::before { color: var(--ink-soft); }
}

.note {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--accent-soft); border-radius: var(--radius);
  padding: 20px 22px; color: var(--ink); font-weight: 500; margin-top: 40px;
}
.note svg { width: 22px; height: 22px; color: var(--accent); flex: none; margin-top: 3px; }

.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 9px 18px; font-weight: 500; font-size: .98rem; }

/* Info grid (practitioner terms) */
.info-grid { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 760px) { .info-grid { grid-template-columns: 1fr 1fr; } }
.info-grid > div { background: #fff; padding: 28px 26px; }
.info-grid h3 { margin-bottom: .35em; }
.info-grid p { margin: 0; color: var(--ink-soft); }

/* FAQ */
.faq { max-width: 52rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: 26px 0; font: 600 1.18rem/1.4 var(--sans); color: var(--navy);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 30px; height: 30px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b5a2b' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M12 6v12M6 12h12'/%3E%3C/svg%3E") center / 14px no-repeat;
  transition: transform .25s;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--accent); }
.faq .answer { padding: 0 0 26px; color: var(--ink-soft); max-width: 44rem; }
.faq .answer p:last-child { margin: 0; }

/* Forms */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: clamp(24px, 4vw, 44px); box-shadow: var(--shadow); }
.form-grid { display: grid; gap: 20px; }
@media (min-width: 700px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .full { grid-column: 1 / -1; } }
.field label, .field legend { display: block; font-weight: 600; font-size: .95rem; color: var(--navy); margin-bottom: 8px; padding: 0; }
.field .hint { display: block; font-weight: 400; color: var(--ink-soft); font-size: .88rem; margin-top: 2px; }
.req { color: var(--accent); }
.field input[type="text"], .field input[type="email"], .field input[type="tel"], .field select, .field textarea {
  width: 100%; font: 400 1rem/1.5 var(--sans); color: var(--ink);
  padding: 14px 16px; border: 1.5px solid #cdd5df; border-radius: 10px; background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(139,90,43,.15); }
fieldset.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: inline-block; padding: 12px 20px; border: 1.5px solid #cdd5df; border-radius: 999px; font-weight: 500; font-size: .98rem; transition: all .2s; }
.choice input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.choice input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; }
.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; margin-top: 8px; }
.form-foot .small { font-size: .9rem; color: var(--ink-soft); margin: 0; flex: 1 1 260px; }
.form-status { margin-top: 18px; padding: 16px 18px; border-radius: 10px; font-weight: 500; }
.form-status:empty { display: none; }
.form-status.ok { background: #e7f4ec; color: #1e5b36; }
.form-status.warn { background: #fff4dc; color: #6b4a00; }

/* Footer */
.site-footer { background: #0e1b2d; color: #b9c4d3; padding: 72px 0 32px; font-size: .98rem; }
.site-footer a { color: #e3e9f1; text-decoration: none; }
.site-footer a:hover { color: var(--accent-light); }
.footer-grid { display: grid; gap: 36px; }
@media (min-width: 820px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.site-footer .brand { color: #fff; margin-bottom: 16px; }
.site-footer .brand-place { color: #9aa8bb; }
.site-footer h2 { font: 600 .78rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: #fff; margin: 0 0 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-base { border-top: 1px solid rgba(255,255,255,.1); margin-top: 56px; padding-top: 24px; font-size: .88rem; color: #8a98ac; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

/* Subtle scroll reveal (only when JS is on and motion is OK) */
.reveal-on .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal-on .reveal.in { opacity: 1; transform: none; }
.reveal-on .reveal.d1 { transition-delay: .08s; } .reveal-on .reveal.d2 { transition-delay: .16s; } .reveal-on .reveal.d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
