:root {
  --paper: #ffffff;
  --ink: #2d2d2d;
  --muted: #5c6770;
  --line: #d7dee4;
  --cream: #f7f9fb;
  --green: #314f6e;
  --green-deep: #d6dce2;
  --clay: #366b79;
  --btn-bg: #314f6e;
  --btn-ink: #ffffff;
  --footer-bg: #366b79;
  --footer-ink: #ffffff;
  --on-green: #ffffff;
  --brief-ink: #192939;
  --rx-scale: 1;
  --rx-weight: 400;
  --rx-leading: 1.55;
  --rx-track: 0em;
  --rx-measure: 66ch;
  --sans: "Quicksand", "Segoe UI", sans-serif;
  --hero: url("https://visiontherapysc.com/wp-content/uploads/2021/10/visiontherapyinstitute-hp-hero-desktop-image.jpg");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: calc(16px * var(--rx-scale)); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: var(--rx-weight);
  line-height: var(--rx-leading);
  letter-spacing: var(--rx-track);
}
a { color: var(--green); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
.skip {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--green);
  color: white;
  padding: 8px 12px;
  z-index: 40;
}
.skip:focus { top: 8px; }

.brief {
  background: var(--green-deep);
  color: var(--brief-ink);
  padding: 10px 28px;
  text-align: center;
}
.brief-kicker {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--clay);
  margin: 0 0 4px;
}
.brief p { margin: 0 auto; max-width: 78ch; }

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 5;
}
.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 28px 0;
}
.mark { display: block; line-height: 0; }
.mark img { height: 84px; width: auto; }
.brand-side { text-align: right; }
.brand-place {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.brand-phone {
  display: block;
  margin-top: 2px;
  color: var(--green);
  font-size: 1.7rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
}
.nav-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 6px 28px 12px;
}
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; }
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 8px 0;
}
.nav a:not(:last-child)::after {
  content: "|";
  margin: 0 14px;
  color: var(--clay);
  font-weight: 400;
}
.nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--btn-bg); }
.nav-cta { white-space: nowrap; }

main { padding: 0; max-width: none; }
main > article { max-width: 1120px; margin: 0 auto; padding: 28px 28px 48px; }
.hero-band {
  margin: -28px -28px 28px;
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  padding: 36px 28px;
  background: #314f6e var(--hero) center / cover no-repeat;
}
.hero-panel {
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  color: var(--ink);
  padding: 28px 32px 24px;
  max-width: 740px;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--clay);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
h1 {
  font-weight: 700;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: calc(0.02em + var(--rx-track));
  text-transform: uppercase;
  margin: 0 0 14px;
  color: var(--ink);
}
h2 {
  font-weight: 600;
  font-size: 1.7rem;
  line-height: 1.25;
  letter-spacing: calc(0.14em + var(--rx-track));
  text-transform: uppercase;
  margin: 0 0 12px;
  color: var(--ink);
}
h3 {
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: var(--rx-track);
  margin: 0 0 6px;
  color: var(--ink);
}
.lede { font-size: 1.125rem; max-width: var(--rx-measure); margin: 0 0 18px; }
.muted { color: var(--muted); }
.small { font-size: 0.95rem; }

.actions, .service-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  text-align: center;
  background: var(--btn-bg);
  color: var(--btn-ink);
  border: 3px solid var(--btn-bg);
  padding: 10px 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  border-radius: 0;
}
.btn.secondary {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}
.btn:hover { filter: brightness(1.08); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--clay);
  outline-offset: 2px;
}

.book-card {
  background: var(--cream);
  border-top: 6px solid var(--clay);
  padding: 22px 22px 18px;
  margin-bottom: 8px;
}
.book-card h2 { font-size: 1.15rem; }
.book-card p { margin: 0 0 14px; max-width: var(--rx-measure); }
.book-card .btn { flex: 1 1 210px; white-space: nowrap; }

.section { padding: 32px 0 0; }
.section-head { max-width: var(--rx-measure); margin-bottom: 18px; }
.section-head p, article > p { max-width: var(--rx-measure); }

.sources {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}
.source {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  min-height: 180px;
  padding: 16px 14px;
  background: var(--btn-bg);
  color: var(--btn-ink);
  border: 3px solid var(--btn-bg);
  text-align: center;
  text-decoration: none;
}
.source:hover { outline: 3px solid var(--clay); }
.source span {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--btn-ink);
}
.source strong { font-size: 1.2rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.source p { margin: 0; color: var(--btn-ink); font-size: 0.95rem; }

.visits, .split, .doctors, .work-list { display: grid; gap: 12px; }
.visits { grid-template-columns: 1fr 1fr; }
.visit, .doctor, .work, .panel {
  background: var(--cream);
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-top: 6px solid var(--clay);
  text-decoration: none;
  color: var(--ink);
  display: block;
}
.visit em, .kicker {
  font-style: normal;
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--clay);
  margin-bottom: 6px;
}
.visit p, .doctor p, .work p, .panel p { color: var(--ink); }
.doctor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.photo-split {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 22px;
  align-items: start;
  margin: 8px 0 22px;
}
.photo-split img,
.location-photo,
.brand-photos img,
.lens-photo,
.gallery img,
.visit.shot img,
.doctor img {
  display: block;
  width: 100%;
  object-fit: cover;
}
.photo-split > img { height: auto; }
.location-photo { height: 200px; margin-top: 8px; }
.awards {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 8px;
}
.awards img { height: 96px; width: auto; }
.visit.shot, .doctor { padding: 0 0 16px; overflow: hidden; }
.visit.shot img { height: 200px; }
.visit.shot em, .visit.shot h3, .visit.shot p,
.doctor h3, .doctor p { margin-left: 18px; margin-right: 18px; }
.visit.shot em, .doctor h3 { margin-top: 14px; }
.doctor img { height: 320px; object-position: center top; }
.brand-photos {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 1.3fr;
  gap: 8px;
  margin-bottom: 8px;
}
.brand-photos > div { display: grid; gap: 8px; }
.brand-photos img { height: 100%; min-height: 140px; }
.lens-photo { height: 220px; margin-bottom: 12px; }
.brand-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid var(--line);
  padding: 16px 18px;
}
.brand-logos img { height: 52px; width: auto; }
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.gallery img { aspect-ratio: 1; }
.footer-logo { height: 72px; width: auto; margin-bottom: 8px; }

table { width: 100%; border-collapse: collapse; background: var(--cream); }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 700;
  background: var(--paper);
}

form { display: grid; gap: 12px; max-width: 640px; }
label { display: grid; gap: 4px; font-size: 0.95rem; font-weight: 600; }
input, select, textarea {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--green);
  border-radius: 0;
  padding: 10px 12px;
  font-weight: 500;
}
.note {
  background: var(--green-deep);
  color: var(--brief-ink);
  border-left: 6px solid var(--clay);
  padding: 12px 14px;
  margin: 0 0 16px;
  max-width: var(--rx-measure);
}
.confirm {
  background: var(--green);
  color: var(--on-green);
  padding: 22px;
  margin-top: 16px;
}
.confirm h2, .confirm p { color: var(--on-green); }
.hours {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
  align-items: start;
}
.air-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quote {
  font-size: 1.45rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: var(--rx-track);
  margin: 0 0 16px;
  max-width: 28ch;
  color: var(--green);
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 18px;
  padding: 36px 28px;
  background: var(--footer-bg);
  color: var(--footer-ink);
}
.site-footer strong {
  display: block;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.site-footer a { color: var(--footer-ink); }
.site-footer p { margin: 8px 0 0; }
.fine { grid-column: 1 / -1; font-size: 0.9rem; color: inherit; max-width: 80ch; }

@media (max-width: 980px) {
  .sources, .visits, .doctor-grid, .hours, .air-grid, .site-footer, .photo-split, .brand-photos {
    grid-template-columns: 1fr;
  }
  .gallery, .offers { grid-template-columns: 1fr 1fr; }
  .sources { grid-template-columns: 1fr 1fr; }
  .nav-bar, .brand-row { flex-wrap: wrap; }
  .hero-band { min-height: 420px; }
}
@media (max-width: 640px) {
  .brand-row, .nav-bar, .site-footer { padding-left: 16px; padding-right: 16px; }
  main > article { padding-left: 16px; padding-right: 16px; }
  .hero-band { margin-left: -16px; margin-right: -16px; padding: 20px 16px; min-height: 0; }
  .hero-panel { padding: 18px; }
  .sources, .visits, .doctor-grid, .offers { grid-template-columns: 1fr; }
  .nav a:not(:last-child)::after { margin: 0 8px; }
  .brand-phone { font-size: 1.35rem; }
  .mark img { height: 64px; }
}

body.racking #office { transition: filter 0.45s ease-in-out; }
#vt-ghost {
  position: absolute;
  inset: 0;
  z-index: 4;
  opacity: 0.55;
  pointer-events: none;
  background: #fff;
}
body.vt-track #office { animation: vt-slip 1.5s ease-in-out 3; }
@keyframes vt-slip {
  0%, 20% { transform: translateX(0); }
  28% { transform: translateX(16px); }
  46% { transform: translateX(-14px); }
  62% { transform: translateX(0); }
  74% { transform: translateX(-18px); }
  88% { transform: translateX(8px); }
  100% { transform: translateX(0); }
}
body.vt-crowd #office {
  letter-spacing: -0.07em;
  word-spacing: -0.18em;
  line-height: 1.05;
}
body.vt-suppress #office {
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 34%, rgba(0, 0, 0, 0.25) 68%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, #000 34%, rgba(0, 0, 0, 0.25) 68%, transparent 100%);
}
body.vt-glare #office { filter: contrast(0.45) brightness(1.45); }
body.proctor-on { padding-bottom: 168px; }
.focus-bar {
  position: fixed;
  z-index: 25;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 12px;
  width: 100%;
  max-height: min(42vh, 280px);
  overflow: auto;
  padding: 16px 22px 18px;
  background: #314f6e;
  color: #ffffff;
  border-top: 6px solid #366b79;
}
.offers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.offer {
  background: var(--cream);
  border: 1px solid var(--line);
  border-top: 6px solid var(--clay);
  padding: 16px 18px 18px;
}
.offer p { max-width: none; }
.record td:first-child { font-weight: 700; color: var(--green); white-space: nowrap; }
.focus-bar[hidden] { display: none; }
.focus-kicker {
  flex: 1 1 100%;
  margin: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #d5e4ea;
}
.focus-line {
  flex: 1 1 100%;
  margin: 0;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.35;
}
.focus-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.focus-actions button, .focus-actions a {
  background: transparent;
  color: #ffffff;
  border: 3px solid #ffffff;
  padding: 8px 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}
.focus-actions .focus-primary { background: #ffffff; color: #314f6e; }
@media (prefers-reduced-motion: reduce) {
  body.racking #office,
  body.vt-track #office,
  body.vt-glare #office {
    animation: none !important;
    transition: none !important;
    filter: none !important;
    transform: none !important;
  }
  body.vt-crowd #office { letter-spacing: inherit; word-spacing: inherit; line-height: inherit; }
  body.vt-suppress #office { -webkit-mask-image: none; mask-image: none; }
}

body.exam-open { overflow: hidden; }
.lane {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: #12161b;
  color: #f4f7f8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 28px 20px 32px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.45;
}
.lane[hidden] { display: none; }
.lane-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  width: min(920px, 100%);
}
.doc-line {
  font-family: var(--sans);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: 0.01em;
  text-align: center;
  text-transform: none;
  max-width: 36ch;
  margin: 0;
  color: #f4f7f8;
}
.lane p { margin: 0; text-align: center; max-width: 46ch; color: #f4f7f8; }
.lane .chart p { color: inherit; max-width: none; }
.chart-housing {
  background: #243848;
  border: 10px solid #366b79;
  padding: 18px;
  width: 100%;
}
.chart {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 18px 16px;
}
.letters {
  margin: 0;
  font-family: var(--sans);
  letter-spacing: 0.14em;
}
.near-lines { margin: 0; text-align: left; }
.phoropter {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c5d4dc;
}
.phoropter strong {
  color: #ffffff;
  font-size: 20px;
  letter-spacing: 0;
  text-transform: none;
}
.answer-row, .flip-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.lane .lens-btn, .lane .quiet-btn {
  min-height: 56px;
  min-width: 120px;
  padding: 10px 16px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: #314f6e;
  color: #ffffff;
  border: 3px solid #314f6e;
  border-radius: 0;
  cursor: pointer;
}
.lane .lens-btn[data-show] { font-size: 28px; min-width: 88px; letter-spacing: 0; }
.lane .lens-btn[aria-pressed="true"] {
  background: #ffffff;
  color: #314f6e;
  border-color: #ffffff;
}
.lane .quiet-btn {
  background: transparent;
  color: #f4f7f8;
  border-color: #f4f7f8;
}
.lane-done { background: #ffffff; color: #2d2d2d; }
.lane-done .doc-line, .lane-done p { color: #2d2d2d; }
.lane-done .quiet-btn { color: #314f6e; border-color: #314f6e; }
.rx-slip {
  background: #ffffff;
  color: #2d2d2d;
  border-top: 6px solid #366b79;
  border-right: 1px solid #d7dee4;
  border-bottom: 1px solid #d7dee4;
  border-left: 1px solid #d7dee4;
  padding: 8px 18px 14px;
  min-width: min(520px, 100%);
}
.rx-slip p {
  color: #2d2d2d;
  text-align: left;
  margin: 6px 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
@media (max-width: 640px) {
  .doc-line { font-size: 18px; }
  .lane .lens-btn[data-show] { min-width: 72px; font-size: 24px; }
}
