/* ============================================================
   O Eyecare — 2026 UI Renewal design system
   Editorial / warm-cream theme (Warby Parker · Gentle Monster inspired).
   Tokens (type / color / effects) aligned to the authentic delivery at
   design/_delivery/tokens/*.css — NOT reverse-engineered from JSX.
   Self-contained: this file does NOT depend on bootstrap or the
   legacy /assets stylesheets. Load it on its own clean layout.
   ============================================================ */

/* ---------- Design tokens ---------- */
:root {
  /* Color tokens — authentic delivery values (_delivery/tokens/colors.css).
     Hex resolved from that file's semantic aliases so the render matches the
     design, which pulls these same values via the _ds_bundle. */
  /* surfaces */
  --surface-page: #f4f2ec;   /* paper-300 */
  --surface-cream: #ece9e1;  /* paper-400 */
  --surface-card: #ffffff;   /* paper-100 */
  --paper-300: #f4f2ec;
  --paper-400: #ece9e1;

  /* ink / text */
  --ink-900: #14100c;
  --text-primary: #14100c;   /* ink-900 */
  --text-secondary: #3a3128; /* ink-700 */
  --text-muted: #6b645a;     /* ink-500 */

  /* accents */
  --gold-500: #a08c6a;       /* muted taupe/gold — eyebrows, dividers */
  --clay-500: #bf6a45;

  /* borders / links */
  --border-subtle: #ddd9cf;  /* paper-500 */
  --link: #bf6a45;           /* clay-500 */
  --link-hover: #a8552f;     /* clay-600 */

  /* type — authentic delivery tokens (_delivery/tokens/typography.css).
     Editorial grotesque: Archivo (display) · Hanken Grotesk (body) · Space Grotesk (labels).
     Noto Sans KR retained as Korean fallback (delivery families are Latin-only). */
  --font-display: "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Hanken Grotesk", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-label: "Space Grotesk", "Noto Sans KR", ui-monospace, "SFMono-Regular", monospace;

  /* radii / rhythm / motion */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 100px;  /* design token; consumed by .oe-mis-pill etc. */
  /* --section-y (home section rhythm) moved to oeyecare-home-2026.css — it is used only by the home page. */
  --maxw: 1240px;     /* design HTML uses 1240 (token --container-max 1280 is unused by the mockups) */
  /* motion + shadows — authentic delivery values (_delivery/tokens/effects.css) */
  --dur: 240ms;
  --dur-fast: 160ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-card: 0 20px 50px rgba(20,16,12,0.08);
  --shadow-lg: 0 40px 100px rgba(20,16,12,0.16);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--surface-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; }
a { color: var(--link); text-decoration: none; transition: color var(--dur) var(--ease-out); }
a:hover { color: var(--link-hover); }

.oe-wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 40px;
  width: 100%;
}

/* ---------- Buttons ---------- */
.oe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-label);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1;
  padding: 15px 26px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.oe-btn:hover { transform: translateY(-1px); }
.oe-btn--sm { padding: 11px 18px; font-size: 12px; }
.oe-btn--lg { padding: 18px 34px; font-size: 14px; }
.oe-btn--full { width: 100%; }

.oe-btn--primary { background: var(--ink-900); color: #fff; border-color: var(--ink-900); }
.oe-btn--primary:hover { background: #241a10; color: #fff; }

.oe-btn--inverse { background: #fff; color: var(--ink-900); border-color: #fff; }
.oe-btn--inverse:hover { background: var(--paper-300); color: var(--ink-900); }

.oe-btn--accent { background: var(--clay-500); color: #fff; border-color: var(--clay-500); }
.oe-btn--accent:hover { background: var(--link-hover); color: #fff; }

.oe-btn--outline { background: transparent; color: var(--ink-900); border-color: var(--ink-900); }
.oe-btn--outline:hover { background: var(--ink-900); color: #fff; }

.oe-btn--outline-inverse { background: transparent; color: #fff; border-color: rgba(255,255,255,.65); }
.oe-btn--outline-inverse:hover { background: rgba(255,255,255,.14); color: #fff; }

/* ---------- Section heading ---------- */
.oe-eyebrow {
  font-family: var(--font-label);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin: 0 0 16px;
}
.oe-heading {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: -.01em;
  color: var(--text-primary);
  margin: 0;
}
.oe-heading--d2 { font-size: 42px; line-height: 1.08; }
.oe-heading--d3 { font-size: 34px; line-height: 1.12; }
.oe-heading em { font-style: italic; }
.oe-lede {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 18px 0 0;
}
.oe-section-heading--center { text-align: center; }
.oe-section-heading--center .oe-lede { max-width: 640px; margin-left: auto; margin-right: auto; }

/* ---------- Read-more link ---------- */
.oe-readmore {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-label);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--clay-500);
}
.oe-readmore svg { transition: transform var(--dur) var(--ease-out); }
.oe-readmore:hover { color: var(--link-hover); }
.oe-readmore:hover svg { transform: translateX(3px); }

/* ============================================================
   Header
   ============================================================ */
.oe-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 22px 0 14px;
  background: transparent;
  transition: background var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.oe-header__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.oe-header.is-solid {
  background: rgba(246,241,233,.92);
  backdrop-filter: saturate(140%) blur(10px);
  box-shadow: 0 1px 0 var(--border-subtle);
}

/* brand — authentic logo image, swapped white<->ink by header state */
.oe-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; flex-shrink: 0; }
/* height-locked, width follows aspect (404x56). max-width:none defeats the base
   img{max-width:100%} so flex compression can never squish the lockup. */
.oe-brand__logo { height: 26px; width: auto; max-width: none; display: block; }
.oe-brand__logo--ink { display: none; }
.oe-header.is-solid .oe-brand__logo--white { display: none; }
.oe-header.is-solid .oe-brand__logo--ink { display: block; }
.oe-brand__tag {
  font-family: var(--font-label);
  font-size: 10.5px;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: rgba(255,255,255,.72);
}
.oe-header.is-solid .oe-brand__tag { color: var(--text-muted); }

/* nav */
.oe-nav { display: flex; gap: 26px; align-items: center; }
.oe-nav__item { position: relative; }
.oe-nav__link {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
  font-size: 13px;
  color: #fff;
  opacity: .82;
  cursor: pointer;
  background: none;
  border: none;
  white-space: nowrap;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.oe-header.is-solid .oe-nav__link { color: var(--ink-900); }
.oe-nav__link:hover { opacity: 1; color: #fff; text-shadow: 0 0 14px rgba(255,255,255,.55); }
.oe-header.is-solid .oe-nav__link:hover { color: var(--ink-900); text-shadow: none; }
.oe-nav__link svg { transition: transform var(--dur-fast) var(--ease-out); }
.oe-nav__item.is-open .oe-nav__link svg { transform: rotate(180deg); }

/* dropdown parent: clickable label link + separate caret toggle button.
   The label navigates (e.g. Myopia Management -> /ourservice/myopia); the caret
   toggles the panel on click, and hover reveals it via the rules below. */
.oe-nav__item--dd { display: flex; align-items: center; gap: 3px; }
.oe-nav__caret {
  display: flex;
  align-items: center;
  padding: 4px 2px;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  opacity: .82;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.oe-nav__caret:hover { opacity: 1; }
.oe-header.is-solid .oe-nav__caret { color: var(--ink-900); }
.oe-nav__caret svg { transition: transform var(--dur-fast) var(--ease-out); }
.oe-nav__item.is-open .oe-nav__caret svg { transform: rotate(180deg); }

.oe-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-top: 14px;
  z-index: 60;
  display: none;
}
.oe-nav__item.is-open .oe-dropdown,
.oe-nav__item:hover .oe-dropdown { display: block; }
.oe-dropdown__panel {
  min-width: 220px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.oe-dropdown__link {
  display: block;
  padding: 12px 18px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-900);
  white-space: nowrap;
}
.oe-dropdown__link + .oe-dropdown__link { border-top: 1px solid var(--border-subtle); }
.oe-dropdown__link:hover { background: var(--paper-300); color: var(--ink-900); }

/* header right cluster */
.oe-header__right { display: flex; align-items: center; gap: 26px; }
.oe-header__phone {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}
.oe-header.is-solid .oe-header__phone { color: var(--ink-900); }
.oe-header__phone:hover { color: #fff; text-shadow: 0 0 14px rgba(255,255,255,.55); }
.oe-header.is-solid .oe-header__phone:hover { color: var(--ink-900); text-shadow: none; }

/* book button — outline-inverse is white-on-transparent for the hero state;
   swap to ink outline once the header solidifies, or it disappears on the
   light background. */
.oe-header.is-solid .oe-header__book {
  color: var(--ink-900);
  border-color: var(--ink-900);
}
.oe-header.is-solid .oe-header__book:hover {
  background: var(--ink-900);
  color: #fff;
}

/* language switch */
.oe-lang { position: relative; }
.oe-lang__toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 13px;
  color: #fff;
  padding: 0;
}
.oe-header.is-solid .oe-lang__toggle { color: var(--ink-900); }
.oe-lang__toggle svg { transition: transform var(--dur-fast) var(--ease-out); }
.oe-lang.is-open .oe-lang__toggle svg { transform: rotate(180deg); }
.oe-lang__menu {
  position: absolute;
  top: 100%;
  right: 0;
  padding-top: 12px;
  z-index: 60;
  display: none;
}
.oe-lang.is-open .oe-lang__menu { display: block; }
.oe-lang__panel {
  min-width: 130px;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.oe-lang__opt {
  display: block;
  padding: 11px 15px;
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--ink-900);
  white-space: nowrap;
}
.oe-lang__opt:hover, .oe-lang__opt.is-active { background: var(--paper-300); color: var(--ink-900); }

/* mobile header pieces (hidden on desktop) */
.oe-header__burger,
.oe-mobile-only { display: none; }

/* ============================================================
   Myopia service cards (shared: home + myopia page)
   ============================================================ */
.oe-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 26px;
}
.oe-service-card {
  background: #ece9e1;
  border: 1px solid #ece9e1;
  border-radius: var(--radius-md);
  padding: 30px 26px 34px;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  text-decoration: none;
  color: inherit;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.oe-service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.oe-service-card__index {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 300;
  color: var(--clay-500);
  margin-bottom: 18px;
}
.oe-service-card__title {
  font-family: var(--font-label);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--text-primary);
  margin: 0 0 6px;
}
.oe-service-card__audience {
  font-family: var(--font-label);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin: 0 0 16px;
}
.oe-service-card__desc {
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}
/* read-more link pinned to the card bottom (home + myopia service cards) */
.oe-service-card .oe-readmore { margin-top: auto; padding-top: 18px; }
.oe-center { text-align: center; }
.oe-mt48 { margin-top: 48px; }

/* Reviews — the bare .oe-review is SHARED with appointment/review.jsp, so it
   stays here. The home-only review pieces live in oeyecare-home-2026.css. */
.oe-review { border-top: 1px solid var(--border-subtle); padding-top: 26px; }

/* ============================================================
   Footer
   ============================================================ */
.oe-footer { background: var(--paper-300); color: var(--text-primary); }
.oe-footer__ctaband { border-bottom: 1px solid var(--border-subtle); }
.oe-footer__cta {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 44px 40px;
}
.oe-footer__cta-text { font-family: var(--font-body); font-size: 18px; color: var(--text-muted); }
.oe-footer__cta-text a { color: var(--ink-900); font-weight: 600; white-space: nowrap; }

.oe-footer__cols {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1.3fr;
  gap: 40px;
  padding: 64px 40px;
}
.oe-footer__label {
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--gold-500);
  margin-bottom: 18px;
}
.oe-footer__stack { display: flex; flex-direction: column; gap: 12px; }
.oe-footer__stack a, .oe-footer__stack span {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-muted);
}
.oe-footer__social { display: flex; gap: 16px; }
.oe-footer__social a { color: var(--text-muted); }
.oe-footer__social a:hover { color: var(--ink-900); }
.oe-footer__office { margin-bottom: 16px; font-family: var(--font-body); font-size: 14px; line-height: 1.55; color: var(--text-muted); }
.oe-footer__office strong { display: block; color: var(--ink-900); font-weight: 600; }

.oe-footer__bottom { border-top: 1px solid var(--border-subtle); }
.oe-footer__bottom-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--text-muted);
}
.oe-footer__bottom-nav { display: flex; flex-wrap: wrap; gap: 22px; }
.oe-footer__bottom-nav a { color: var(--text-muted); }
.oe-footer__bottom-nav a:hover { color: var(--ink-900); }

/* ============================================================
   Mobile drawer (shared)
   ============================================================ */
.oe-drawer {
  position: fixed; inset: 0; z-index: 80; background: #fff;
  transform: translateX(-100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform var(--dur-fast) var(--ease-out), visibility 0s linear var(--dur-fast);
}
.oe-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition: transform var(--dur-fast) var(--ease-out), visibility 0s linear 0s;
}
@media (prefers-reduced-motion: reduce) {
  .oe-drawer, .oe-drawer.is-open { transition: visibility 0s linear; }
}
.oe-drawer__panel { position: absolute; inset: 0; background: #fff; padding: 72px 28px 28px; display: flex; flex-direction: column; gap: 4px; }
.oe-drawer__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.oe-drawer__brand-logo { height: 22px; width: auto; max-width: none; display: block; }
.oe-drawer__close { background: none; border: none; cursor: pointer; padding: 6px; color: var(--ink-900); display: flex; }
.oe-drawer__link {
  padding: 14px 0;
  border-top: 1px solid var(--border-subtle);
  font-family: var(--font-body);
  font-size: 16px;
  color: var(--ink-900);
}
.oe-drawer__link:first-of-type { border-top: none; }
.oe-drawer__link--sub {
  padding-left: 16px;
  font-size: 15px;
  color: var(--text-secondary);
}

/* ============================================================
   Responsive — mobile ( <= 760px )
   ============================================================ */
@media (max-width: 760px) {
  .oe-wrap { padding: 0 20px; }

  /* eyebrow label: PC bumped to 14px, keep original 12px on mobile */
  .oe-eyebrow { font-size: 12px; }

  /* header: hamburger | brand | language */
  .oe-header { padding: 20px 0 14px; }
  .oe-header__inner { padding: 0 20px; }
  .oe-nav, .oe-header__phone, .oe-header__book { display: none; }
  .oe-header__burger {
    display: flex;
    background: none; border: none; cursor: pointer; padding: 4px; color: #fff;
  }
  .oe-header.is-solid .oe-header__burger { color: var(--ink-900); }
  .oe-header__right { gap: 14px; }
  .oe-brand__logo { height: 22px; }

  /* horizontal swipe carousel — shared .oe-card-grid (home + myopia). The
     home-only services/locations/reviews carousels live in oeyecare-home-2026.css. */
  .oe-card-grid {
    display: flex;
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 16px;
    padding-bottom: 10px;
    scrollbar-width: none;
  }
  .oe-card-grid::-webkit-scrollbar { display: none; }
  .oe-card-grid > * {
    flex: 0 0 300px;
    width: 300px;
    max-width: 82vw;
    scroll-snap-align: start;
  }

  /* footer */
  .oe-footer__cta { flex-direction: column; align-items: flex-start; gap: 20px; }
  .oe-footer__cols { grid-template-columns: 1fr 1fr; gap: 28px; padding: 48px 20px; }
  .oe-footer__bottom-inner { padding: 22px 20px; }
}

/* mobile hero quick-link pills: hidden by default (desktop); shown in the
   mobile media query above. Declared at top level so the class exists
   before the breakpoint overrides it. */

@media (max-width: 480px) {
  .oe-footer__cols { grid-template-columns: 1fr; }
}

/* ------------------------------------------------------------
   Back-to-top button — floating, all pages. JS toggles .is-visible
   once the page is scrolled down; click smooth-scrolls to top.
   ------------------------------------------------------------ */
.oe-to-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  z-index: 900;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--ink-900);
  color: #fff;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease, background .2s ease;
  box-shadow: 0 8px 22px rgba(8, 44, 70, .28);
}
.oe-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.oe-to-top:hover { background: var(--clay-500, #bf6a45); }
.oe-to-top:focus-visible { outline: 2px solid var(--clay-500, #bf6a45); outline-offset: 3px; }
@media (max-width: 760px) {
  .oe-to-top { right: 16px; bottom: 16px; width: 42px; height: 42px; }
}
@media (prefers-reduced-motion: reduce) {
  .oe-to-top { transition: opacity .25s ease, visibility .25s ease; transform: none; }
}
