/* ══════════════════════════════════════════════════════════════════
   BIONIC LENSES — design system (legacy-docs/DOCUMENTACAO/DESIGN.md)
   Limpo, premium, comercial, humano. Mobile-first via grids fluidos
   e clamp() — sem media queries estruturais.
   ══════════════════════════════════════════════════════════════════ */
:root {
  --bg: #FBFAF8;
  --white: #FFFFFF;
  --ink: #141310;
  --ink-hover: #2E2B27;
  --text: #4A463F;
  --muted: #6F6A62;
  --muted-2: #8A857C;
  --line: #E8E5DF;
  --btn-border: #C9C5BD;
  --blue: oklch(0.52 0.10 250);
  --night: oklch(0.63 0.13 55);
  --sun: #23211E;
  --whatsapp: #128C5A;
  --danger: #A63D2F;
  --ok: #2F7D4F;
  --radius-card: 8px;
  --radius-btn: 4px;
  --radius-img: 6px;
  --container: 1200px;
  --pad-x: 24px;
  --section-y: clamp(56px, 7vw, 96px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--pad-x); }
.section { padding: var(--section-y) 0; }
.section.alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ── Tipografia ── */
h1 { font-size: clamp(38px, 6vw, 64px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
h2 { font-size: clamp(26px, 4vw, 44px); font-weight: 800; letter-spacing: -0.015em; line-height: 1.12; }
.eyebrow {
  font-size: 12px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted); display: block; margin-bottom: 14px;
}
.eyebrow.c-blue { color: var(--blue); }
.eyebrow.c-night { color: var(--night); }
.eyebrow.c-sun { color: var(--ink); }
.lead { font-size: clamp(16px, 2vw, 19px); color: var(--text); max-width: 62ch; }
.small { font-size: 13px; color: var(--muted); }

/* ── Botões (alvos ≥ 44px) ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 15px 30px; border-radius: var(--radius-btn);
  font-weight: 700; font-size: 15px; text-decoration: none; border: 1px solid transparent;
  transition: background .18s, border-color .18s, color .18s;
}
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { background: var(--ink-hover); }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--btn-border); }
.btn.secondary:hover { border-color: var(--ink); }
.btn.light { background: var(--bg); color: var(--ink); }
.btn.light:hover { background: var(--white); }
.btn.sm { min-height: 44px; padding: 11px 20px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.full { width: 100%; }

/* ── Barra de anúncio ── */
.announce {
  background: var(--ink); color: var(--bg); text-align: center;
  font-size: 13px; letter-spacing: 0.06em; padding: 9px var(--pad-x);
}

/* ── Header sticky ── */
.header {
  position: sticky; top: 0; z-index: 60;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header .inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 64px;
}
.logo { font-weight: 800; letter-spacing: 0.08em; font-size: 17px; text-decoration: none; white-space: nowrap; }
.logo span { color: var(--muted-2); font-weight: 600; }
.nav { display: flex; gap: clamp(10px, 2.5vw, 28px); align-items: center; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a {
  text-decoration: none; font-size: 14px; font-weight: 600; color: var(--text);
  padding: 12px 2px; white-space: nowrap;
}
.nav a:hover { color: var(--ink); }
.cart-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  border: 1px solid var(--btn-border); border-radius: var(--radius-btn);
  background: transparent; padding: 8px 16px; font-weight: 700; font-size: 14px;
}
.cart-btn:hover { border-color: var(--ink); }
.cart-badge {
  background: var(--ink); color: var(--bg); border-radius: 99px;
  font-size: 12px; min-width: 20px; height: 20px; display: inline-flex;
  align-items: center; justify-content: center; padding: 0 6px;
}

/* ── Hero ── */
.hero { padding: clamp(48px, 6vw, 88px) 0 var(--section-y); }
.hero-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-caption { margin-top: 18px; font-size: 13px; color: var(--muted); letter-spacing: 0.02em; }
.hero-visual {
  border-radius: var(--radius-img); overflow: hidden; position: relative;
  background: linear-gradient(150deg, #171613 0%, #26241f 55%, #1a1916 100%);
  min-height: clamp(300px, 38vw, 460px);
  display: grid; place-items: center; padding: clamp(20px, 4vw, 48px);
}
.hero-visual .glasses-row { display: grid; gap: clamp(10px, 2vw, 20px); width: min(420px, 88%); }

/* ── Ilustração de produto (placeholder até haver fotografia real) ── */
.product-visual {
  border-radius: var(--radius-img); overflow: hidden;
  background: linear-gradient(160deg, #F4F2ED, #EAE7E0);
  display: grid; place-items: center; aspect-ratio: 4 / 3; padding: 12%;
}
.product-visual.dark { background: linear-gradient(160deg, #201e1b, #2b2924); }
.product-visual img { width: 100%; height: 100%; object-fit: cover; }
.product-visual.has-photo { padding: 0; }

/* ── Grids de cards ── */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 28px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 24px; display: flex; flex-direction: column; gap: 14px;
}
.moment-card { border-top: 2px solid var(--line); padding: 22px 0 0; background: none; border-left: 0; border-right: 0; border-bottom: 0; border-radius: 0; }
.moment-card .idx { font-weight: 800; font-size: 13px; letter-spacing: 0.16em; color: var(--muted-2); }
.moment-card h3 { font-size: 17px; letter-spacing: 0.04em; }
.moment-card .arrow { font-weight: 700; }

.product-card .dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.dot.c-blue { background: var(--blue); }
.dot.c-night { background: var(--night); }
.dot.c-sun { background: var(--sun); }
.dot.c-trio { background: linear-gradient(90deg, var(--blue), var(--night), var(--sun)); }
.product-card .name-row { display: flex; align-items: center; gap: 10px; }
.product-card h3 { font-size: 20px; font-weight: 800; }
.product-card .use { color: var(--text); font-size: 15px; min-height: 3em; }
.price { font-weight: 800; font-size: 20px; }
.price .old { color: var(--muted-2); text-decoration: line-through; font-weight: 600; font-size: 15px; margin-right: 8px; }
.card-ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.stock-note { font-size: 13px; color: var(--danger); font-weight: 600; }

/* ── Detalhe de produto (grid alternado) ── */
.detail-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.detail-grid.flip > .detail-visual { order: 2; }
@media (max-width: 719px) { .detail-grid.flip > .detail-visual { order: 0; } }
.uses-list { list-style: none; display: grid; gap: 10px; margin-top: 20px; }
.uses-list li { display: flex; gap: 12px; align-items: baseline; color: var(--text); }
.uses-list .dash { font-weight: 800; }
.uses-list.c-blue .dash { color: var(--blue); }
.uses-list.c-night .dash { color: var(--night); }
.uses-list.c-sun .dash { color: var(--ink); }
.detail-price-row { display: flex; align-items: center; gap: 18px; margin-top: 24px; flex-wrap: wrap; }

/* ── Comparador ── */
.compare-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-card); background: var(--white); }
.compare { width: 100%; border-collapse: collapse; min-width: 640px; }
.compare th, .compare td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.compare thead th { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare tbody th { font-weight: 700; color: var(--muted); font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.compare .head-cell { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; text-transform: none; letter-spacing: 0; color: var(--ink); }

/* ── Passos ── */
.step { border-top: 2px solid var(--ink); padding-top: 20px; }
.step .num { font-weight: 800; font-size: 13px; letter-spacing: 0.14em; color: var(--muted-2); }
.step h3 { font-size: 18px; margin: 8px 0 6px; }

/* ── Prova social ── */
.review-card { min-height: 150px; justify-content: center; align-items: flex-start; color: var(--muted); border-style: dashed; }
.reviews-note { margin-top: 18px; }

/* ── Banda Trio (momento cinematográfico escuro) ── */
.trio-band {
  background: linear-gradient(135deg, #141310 0%, #1d1b17 60%, #141310 100%);
  color: var(--bg); border-radius: 12px;
  padding: clamp(36px, 5vw, 64px);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(28px, 4vw, 56px); align-items: center;
}
.trio-band .eyebrow { color: var(--muted-2); }
.trio-band h2 { color: var(--bg); }
.trio-band p { color: #C9C5BD; }
.trio-price { font-size: 28px; font-weight: 800; margin-top: 18px; }
.trio-visual { display: grid; gap: 14px; }

/* ── FAQ ── */
.faq { max-width: 780px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center;
  gap: 16px; padding: 20px 2px; font-weight: 700; font-size: 16.5px; min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-weight: 600; font-size: 22px; color: var(--muted-2); transition: transform .18s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 2px 22px; color: var(--text); max-width: 64ch; }

/* ── Footer ── */
.footer { background: var(--white); border-top: 1px solid var(--line); padding: var(--section-y) 0 32px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.footer h4 { font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); margin-bottom: 14px; }
.footer ul { list-style: none; display: grid; gap: 10px; }
.footer a { text-decoration: none; color: var(--text); font-size: 14.5px; }
.footer a:hover { color: var(--ink); }
.footer-bottom {
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: var(--muted); font-size: 13px;
}

/* ── Carrinho lateral ── */
.drawer-overlay {
  position: fixed; inset: 0; background: rgba(20,19,16,.4); z-index: 90;
  opacity: 0; pointer-events: none; transition: opacity .22s;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100vw); z-index: 100;
  background: var(--white); box-shadow: -12px 0 40px rgba(20,19,16,.14);
  transform: translateX(105%); transition: transform .26s ease;
  display: flex; flex-direction: column;
}
body.cart-open .drawer { transform: none; }
body.cart-open .drawer-overlay { opacity: 1; pointer-events: auto; }
.drawer-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 24px; border-bottom: 1px solid var(--line);
}
.drawer-head h3 { font-size: 18px; font-weight: 800; }
.drawer-close { background: none; border: 0; font-size: 26px; line-height: 1; padding: 8px; color: var(--muted); min-width: 44px; min-height: 44px; }
.drawer-items { flex: 1; overflow-y: auto; padding: 12px 24px; display: grid; gap: 0; align-content: start; }
.cart-line { display: grid; grid-template-columns: 44px 1fr auto; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: center; }
.cart-line .thumb { width: 44px; height: 44px; border-radius: 6px; background: linear-gradient(160deg,#F4F2ED,#EAE7E0); display: grid; place-items: center; overflow: hidden; }
.cart-line .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-line h4 { font-size: 14.5px; }
.cart-line .line-price { font-weight: 700; font-size: 14.5px; }
.qty-stepper { display: inline-flex; align-items: center; border: 1px solid var(--btn-border); border-radius: var(--radius-btn); margin-top: 6px; }
.qty-stepper button { width: 34px; height: 34px; background: none; border: 0; font-weight: 700; font-size: 16px; }
.qty-stepper span { min-width: 28px; text-align: center; font-size: 14px; font-weight: 700; }
.cart-remove { background: none; border: 0; color: var(--muted-2); font-size: 12.5px; text-decoration: underline; padding: 6px 0; }
.drawer-foot { border-top: 1px solid var(--line); padding: 20px 24px; display: grid; gap: 12px; }
.subtotal-row { display: flex; justify-content: space-between; font-weight: 800; font-size: 17px; }
.cart-empty { padding: 40px 0; color: var(--muted); text-align: center; }

/* ── Botão WhatsApp ── */
.whatsapp-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 80;
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--whatsapp); color: #fff; text-decoration: none;
  border-radius: 999px; padding: 13px 20px; font-weight: 700; font-size: 14.5px;
  box-shadow: 0 8px 24px rgba(18,140,90,.35);
}
.whatsapp-fab:hover { filter: brightness(1.06); }

/* ── Formulários (checkout / tracking) ── */
.form-grid { display: grid; gap: 16px; }
.form-row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
label.field { display: grid; gap: 6px; font-size: 13.5px; font-weight: 700; color: var(--text); }
input, select, textarea {
  font: inherit; padding: 13px 14px; border: 1px solid var(--btn-border);
  border-radius: var(--radius-btn); background: var(--white); color: var(--ink);
  min-height: 48px; width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
.form-error { color: var(--danger); font-weight: 600; font-size: 14px; }
.notice { border: 1px solid var(--line); background: var(--white); border-radius: var(--radius-card); padding: 16px 18px; font-size: 14.5px; color: var(--text); }
.notice.warn { border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }

/* ── Timeline pública (secção 40 do brief) ── */
.timeline { list-style: none; display: grid; gap: 0; }
.timeline li { display: grid; grid-template-columns: 26px 1fr; gap: 14px; align-items: start; }
.timeline .mark { display: grid; justify-items: center; }
.timeline .dot-t {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--btn-border);
  display: grid; place-items: center; font-size: 12px; background: var(--white); color: var(--white);
}
.timeline .bar { width: 2px; flex: 1; min-height: 26px; background: var(--line); }
.timeline li:last-child .bar { display: none; }
.timeline .label { padding-bottom: 22px; font-weight: 600; color: var(--muted); padding-top: 0; }
.timeline li.done .dot-t { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.timeline li.done .label { color: var(--ink); }
.timeline li.done .bar { background: var(--ink); }
.timeline li.current .dot-t { border-color: var(--ink); background: var(--white); }
.timeline li.current .dot-t::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.timeline li.current .label { color: var(--ink); font-weight: 800; }

.events-list { list-style: none; display: grid; gap: 14px; }
.events-list li { border-left: 2px solid var(--line); padding-left: 14px; }
.events-list .when { font-size: 12.5px; color: var(--muted-2); }

/* ── Páginas utilitárias ── */
.page-narrow { max-width: 720px; margin: 0 auto; }
.page-head { padding: clamp(40px, 5vw, 64px) 0 8px; }
.summary-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-card); padding: 24px; display: grid; gap: 10px; }
.summary-box .row { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.summary-box .row.total { font-weight: 800; font-size: 17px; border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ink); color: var(--bg); padding: 10px 16px; z-index: 200; }
.skip-link:focus { left: 12px; top: 12px; }

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