/* Looking Good Optical
   Palette: cool exam-room white and deep ink, with a tortoiseshell accent taken from frames.
   Type: Libre Franklin (headings, UI, eye chart) and Source Serif 4 (body). Both self-hosted, SIL OFL. */

@font-face {
  font-family: "Libre Franklin";
  src: url("libre-franklin-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("source-serif-4-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #F5F7F6;
  --white: #FFFFFF;
  --tint: #EDF2F1;
  --mist: #E2EAEA;
  --line: #D2DBDD;
  --ink: #15212F;
  --ink-soft: #4A5668;
  --tort: #7A3E1D;
  --tort-soft: #F3E7DC;
  --amber: #D89B35;
  --open: #2F7D4F;
  --shut: #A3432F;

  --sans: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --wrap: 1180px;
  --gutter: clamp(20px, 4vw, 40px);
  --section: clamp(72px, 10vw, 128px);
  --r-img: 22px;
  --r-card: 18px;
  --header-h: 72px;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 0.4vw + 1rem, 1.1875rem);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--tort); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--ink); }
a[href^="tel:"] { white-space: nowrap; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--sans); color: var(--ink); margin: 0 0 0.5em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 5.4vw + 0.6rem, 4.6rem); font-weight: 800; line-height: 1.02; letter-spacing: -0.03em; max-width: 13ch; }
h2 { font-size: clamp(2rem, 2.6vw + 1rem, 3.1rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.025em; }
h3 { font-size: clamp(1.3rem, 0.8vw + 1rem, 1.6rem); font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
p { margin: 0 0 1em; max-width: 60ch; text-wrap: pretty; }
.small { font-size: 0.95rem; color: var(--ink-soft); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 820px; }

.skip { position: absolute; left: -9999px; top: 8px; z-index: 200; background: var(--ink); color: var(--white); padding: 10px 16px; border-radius: 8px; font-family: var(--sans); }
.skip:focus { left: 8px; }

/* Prototype review aids */
.proto-banner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 14px;
  padding: 10px var(--gutter); background: #FFF3CF; border-bottom: 1px solid #EBD38D;
  font-family: var(--sans); font-size: 0.9rem; text-align: center;
}
.proto-banner p { margin: 0; max-width: none; }
.proto-toggle {
  font: inherit; font-weight: 600; color: var(--ink); background: transparent; cursor: pointer;
  border: 1.5px solid var(--ink); border-radius: 999px; padding: 3px 14px;
}
mark.confirm { background: #FFE17D; color: inherit; padding: 0 0.15em; border-radius: 3px; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
body.clean .proto-banner { display: none; }
body.clean mark.confirm { background: none; padding: 0; }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px; border-radius: 999px;
  font-family: var(--sans); font-size: 1rem; font-weight: 700; letter-spacing: 0.005em;
  text-decoration: none; white-space: nowrap;
  color: var(--white); background: var(--ink); border: 2px solid var(--ink);
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn:hover { color: var(--white); background: var(--tort); border-color: var(--tort); }
.btn-ghost { color: var(--ink); background: transparent; }
.btn-ghost:hover { color: var(--white); background: var(--ink); border-color: var(--ink); }
.btn-small { min-height: 42px; padding: 0 18px; font-size: 0.95rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.text-link { font-family: var(--sans); font-weight: 700; font-size: 1rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(245, 247, 246, 0.92);
  -webkit-backdrop-filter: saturate(1.4) blur(12px); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 10px 30px -24px rgba(21, 33, 47, 0.6); }
.header-inner { display: flex; align-items: center; gap: 28px; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-family: var(--sans); font-weight: 800; font-size: 1.12rem; letter-spacing: -0.01em; }
.brand:hover { color: var(--ink); }
.brand-mark { fill: none; stroke: var(--tort); stroke-width: 3.5; flex: none; }
.site-nav { display: flex; align-items: center; gap: 26px; margin-left: auto; font-family: var(--sans); font-size: 0.98rem; font-weight: 500; }
.site-nav a { color: var(--ink); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { border-bottom-color: var(--amber); }
.site-nav .nav-call { display: none; }

.nav-toggle {
  display: none; margin-left: auto; width: 46px; height: 46px; border-radius: 12px;
  border: 1.5px solid var(--line); background: var(--white); cursor: pointer; position: relative;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  position: absolute; left: 50%; width: 20px; height: 2px; margin-left: -10px; background: var(--ink); border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle-bars { top: 50%; margin-top: -1px; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; left: 0; margin-left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-open .nav-toggle-bars { background: transparent; }
.nav-open .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* Hero */
.hero { padding: clamp(32px, 5vw, 72px) 0 clamp(16px, 3vw, 40px); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.lede { font-size: clamp(1.15rem, 0.5vw + 1.05rem, 1.35rem); color: var(--ink-soft); max-width: 40ch; margin-top: 8px; }
.hero-meta { margin: 14px 0 0; font-family: var(--sans); font-size: 0.95rem; color: var(--ink-soft); }
.hero-visual { position: relative; padding: 0 0 48px 48px; }
.photo.hero-photo { aspect-ratio: 4 / 5; }

/* Open / closed status (filled in by main.js) */
.status { display: inline-flex; align-items: center; gap: 10px; margin: 22px 0 0; font-family: var(--sans); font-weight: 600; font-size: 0.98rem; }
.status[hidden] { display: none; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ink-soft); box-shadow: 0 0 0 4px rgba(74, 86, 104, 0.15); }
.status.is-open .status-dot { background: var(--open); box-shadow: 0 0 0 4px rgba(47, 125, 79, 0.18); }
.status.is-closed .status-dot { background: var(--shut); box-shadow: 0 0 0 4px rgba(163, 67, 47, 0.16); }

/* The eye chart: the page's one bold element */
.chart {
  position: absolute; left: 0; bottom: 0; width: min(310px, 62%);
  container-type: inline-size;
  padding: 26px 20px 20px; background: var(--white); color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 1px 0 var(--line), 0 30px 60px -30px rgba(21, 33, 47, 0.55);
  font-family: var(--sans); font-weight: 800; text-align: center;
}
.chart-row { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; line-height: 1; margin-bottom: 0.42em; }
.chart-row span { grid-column: 2; letter-spacing: 0.26em; margin-right: -0.26em; white-space: nowrap; }
.chart-row small { grid-column: 3; justify-self: end; font-weight: 500; font-size: 10px; letter-spacing: 0; color: var(--ink-soft); }
.r1 { font-size: 64px; } .r2 { font-size: 38px; } .r3 { font-size: 26px; }
.r4 { font-size: 18px; } .r5 { font-size: 13px; } .r6 { font-size: 10px; }
@container (min-width: 1px) {
  .r1 { font-size: 24cqi; } .r2 { font-size: 14cqi; } .r3 { font-size: 9.6cqi; }
  .r4 { font-size: 6.6cqi; } .r5 { font-size: 4.9cqi; } .r6 { font-size: 3.7cqi; }
  .chart-row small { font-size: max(9px, 3.2cqi); }
}
.duochrome { display: flex; margin-top: 14px; border-radius: 4px; overflow: hidden; font-size: 15px; }
.duochrome span { flex: 1; padding: 5px 0; color: #111; }
.duochrome .red { background: #C8423A; }
.duochrome .green { background: #3F8F5B; }

/* One orchestrated moment: the chart comes into focus on load */
.chart-row, .duochrome { animation: focus-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.r1 { animation-delay: 0.10s; } .r2 { animation-delay: 0.18s; } .r3 { animation-delay: 0.26s; }
.r4 { animation-delay: 0.34s; } .r5 { animation-delay: 0.42s; } .r6 { animation-delay: 0.50s; }
.duochrome { animation-delay: 0.58s; }
@keyframes focus-in { from { opacity: 0; filter: blur(8px); } to { opacity: 1; filter: blur(0); } }

/* Photos */
.photo {
  position: relative; margin: 0; overflow: hidden; border-radius: var(--r-img);
  aspect-ratio: 4 / 3; background: var(--mist);
}
.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo.missing img { visibility: hidden; }
.photo.missing { background: repeating-linear-gradient(135deg, var(--mist) 0 14px, #D8E2E3 14px 28px); }
body:not(.clean) .photo.missing::after {
  content: attr(data-note); position: absolute; inset: 0; display: grid; place-items: center; padding: 24px;
  font-family: var(--sans); font-size: 0.9rem; text-align: center; color: var(--ink-soft);
}

/* Sections */
.section { padding: var(--section) 0; }
.section-tint { background: var(--tint); }
.section-mist { background: var(--mist); }
.section-head { max-width: 640px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head p { font-size: 1.2rem; color: var(--ink-soft); }

/* Services: alternating rows */
.services { display: grid; gap: clamp(56px, 8vw, 104px); }
.service { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.service:nth-child(even) .photo { order: 2; }
.service-text h3 { font-size: clamp(1.6rem, 1.4vw + 1.1rem, 2.2rem); font-weight: 800; letter-spacing: -0.02em; }

/* Visit steps: a real sequence, so it is numbered */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px solid var(--ink); padding-top: 22px; }
.steps li::before {
  content: counter(step); display: block; margin-bottom: 14px;
  font-family: var(--sans); font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--tort);
}
.steps h3 { font-size: 1.3rem; }
.steps p { font-size: 1.02rem; color: var(--ink-soft); margin: 0; }

/* Frames */
.section-dark { background: var(--ink); color: #DCE3E8; }
.section-dark h2 { color: var(--white); }
.section-dark a { color: var(--amber); }
.section-dark mark.confirm { color: var(--ink); }
.frames-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 6vw, 88px); align-items: center; }
.brands { list-style: none; margin: 28px 0 32px; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; }
.brands li { font-family: var(--sans); font-weight: 700; font-size: clamp(1.2rem, 1vw + 1rem, 1.55rem); color: var(--white); letter-spacing: -0.01em; }
.brands li:first-child { color: var(--amber); }
.mosaic { display: grid; grid-template-columns: 1.25fr 1fr; grid-template-rows: 1fr 1fr; gap: 14px; }
.mosaic .photo { aspect-ratio: auto; min-height: 150px; }
.mosaic .photo.mosaic-tall { grid-row: 1 / 3; aspect-ratio: 3 / 4; }
.section-dark .photo { background: #22304A; }
.section-dark .photo.missing { background: repeating-linear-gradient(135deg, #22304A 0 14px, #1D2A40 14px 28px); }
.section-dark .photo.missing::after { color: #AFBCC7; }

/* Insurance */
.insurance-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.plans { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.plans li {
  font-family: var(--sans); font-weight: 700; font-size: 1.05rem;
  padding: 12px 20px; border-radius: 999px; background: var(--white); border: 1px solid var(--line);
}

/* About */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: center; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.faq-head { position: sticky; top: calc(var(--header-h) + 24px); }
.faq-head p { color: var(--ink-soft); }
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 22px 52px 22px 0; font-family: var(--sans); font-weight: 700; font-size: 1.12rem; line-height: 1.35;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 14px; margin-top: -9px;
  border-right: 2.5px solid var(--tort); border-bottom: 2.5px solid var(--tort);
  transform: rotate(45deg); transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -3px; }
.faq summary:hover { color: var(--tort); }
.faq details p { margin: 0 0 24px; color: var(--ink-soft); }

/* Visit */
.visit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
address { font-style: normal; font-size: 1.15rem; margin-bottom: 20px; }
.contact-list { margin: 0; display: grid; gap: 6px; font-family: var(--sans); }
.contact-list div { display: flex; gap: 12px; }
.contact-list dt { min-width: 56px; color: var(--ink-soft); }
.contact-list dd { margin: 0; font-weight: 600; }
.hours-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); padding: clamp(24px, 3vw, 36px); }
.hours-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; margin-bottom: 8px; }
.hours-head h3 { margin: 0; }
.hours-head .status { margin: 0; font-size: 0.92rem; }
.hours { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 1rem; }
.hours th, .hours td { padding: 12px 0; border-bottom: 1px solid var(--tint); text-align: left; font-weight: 500; }
.hours td { text-align: right; }
.hours tr.closed { color: var(--ink-soft); }
.hours tr.today th, .hours tr.today td { font-weight: 800; }
.hours tr.today th::after { content: "Today"; margin-left: 10px; padding: 2px 8px; border-radius: 999px; background: var(--tort-soft); color: var(--tort); font-size: 0.75rem; font-weight: 700; vertical-align: 2px; }
.hours-card .small { margin: 16px 0 0; }

/* Footer */
.site-footer { background: var(--ink); color: #B9C5CF; padding: 56px 0 48px; font-family: var(--sans); font-size: 0.97rem; }
.site-footer p { margin: 0 0 10px; }
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--amber); }
.footer-brand { color: var(--white); font-weight: 800; font-size: 1.15rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1.2fr; gap: 32px; }
.social { display: flex; gap: 20px; }
.site-footer .small { color: #8E9BA8; }

/* Mobile quick-action bar */
.mobile-bar { display: none; }

/* Tablet and down */
@media (max-width: 860px) {
  :root { --header-h: 64px; }
  .header-call, .site-nav { display: none; }
  .nav-toggle { display: block; }
  .nav-toggle[hidden] { display: none; }
  .nav-open .site-nav {
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    padding: 8px var(--gutter) 20px; background: var(--paper);
    border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px -28px rgba(21, 33, 47, 0.55);
    font-size: 1.15rem; animation: menu-in 0.18s ease-out;
  }
  .nav-open .site-nav a { padding: 14px 0; border-bottom: 1px solid var(--tint); }
  .nav-open .site-nav .nav-call { display: block; font-weight: 700; color: var(--tort); border-bottom: 0; }
  @keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

  .hero-grid, .service, .frames-grid, .insurance-grid, .about-grid, .visit-grid, .faq-grid { grid-template-columns: minmax(0, 1fr); }
  .faq-head { position: static; }
  .service:nth-child(even) .photo { order: 0; }
  .hero-visual { padding: 0 0 56px 0; max-width: 560px; width: 100%; margin: 0 auto; }
  .photo.hero-photo { aspect-ratio: 4 / 3; width: calc(100% - 24px); }
  .chart { left: auto; right: 0; width: min(230px, 62%); padding: 20px 14px 14px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr; gap: 20px; }

  .mobile-bar {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(245, 247, 246, 0.94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
  }
  .mobile-bar a {
    display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; border-radius: 999px;
    font-family: var(--sans); font-weight: 700; font-size: 1.02rem; text-decoration: none;
    color: var(--white); background: var(--ink);
  }
  .mobile-bar a + a { color: var(--ink); background: var(--white); border: 1.5px solid var(--ink); }
  .mobile-bar svg { fill: currentColor; }
  body { padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px)); }
}

/* Phones */
@media (max-width: 520px) {
  .cta-row .btn { flex: 1 1 100%; }
  .steps { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .steps li { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 12px; padding: 20px 0; border-top-width: 1px; }
  .steps li::before { grid-row: 1 / 3; margin: 0; font-size: 2rem; }
  .steps h3 { margin-bottom: 4px; }
  .mosaic { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hours tr.today th::after { margin-left: 6px; }
  .brand span { font-size: 1.02rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Error page */
.error-page { min-height: 100vh; display: grid; place-items: center; padding: var(--section) 0; }
.error-page .chart { position: static; transform: none; width: 240px; margin: 0 0 36px; }
