/* ==========================================================================
   Dr. Marcus Felipe Jardim do Nascimento — Oftalmologia
   Segue o design-system.md (Etapa 1). Tema único, claro, por decisão de projeto.
   Layout: cabeçalho fino + Hero assimétrico (texto 5/12, foto 7/12),
   seções alternando Névoa e Linho, muito respiro vertical.
   ========================================================================== */

:root {
  /* Cores */
  --bg: #F6F4ED;        /* Marfim */
  --surface: #ECE8DC;   /* Linho quente */
  --primary: #26231F;   /* Grafite da marca */
  --ink: #1F1D1A;       /* Tinta */
  --ink-soft: #57524A;  /* Cinza quente */
  --accent: #B3924F;    /* Dourado da marca (só detalhes, nunca texto) */
  --gold-text: #7A5C1E; /* Dourado escuro, legível em texto (5,6:1) */
  --white: #FFFFFF;
  --line: rgba(179, 146, 79, 0.45);

  /* Tipografia */
  --font-display: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* Espaço (base 8 px) */
  --space-1: 4px;  --space-2: 8px;  --space-3: 16px; --space-4: 24px;
  --space-5: 32px; --space-6: 48px; --space-7: 64px; --space-8: 96px; --space-9: 128px;

  --radius: 16px;
  --container: 1120px;
  --gutter: 20px;
  --section-y: 80px;

  color-scheme: light;
}

@media (min-width: 900px) {
  :root { --gutter: 32px; --section-y: 128px; }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--primary); }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 400;
  text-wrap: balance;
  margin: 0;
}

h1 { font-size: clamp(2.25rem, 1.2rem + 3.6vw, 3.5rem); line-height: 1.1; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.5rem); line-height: 1.2; }
h3 { font-size: clamp(1.375rem, 1.2rem + 0.5vw, 1.625rem); line-height: 1.3; font-weight: 600; }

p { margin: 0; }

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -80px;
  background: var(--primary);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 999px;
  z-index: 100;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border-radius: 999px;
  border: 1.5px solid var(--primary);
  font: 600 17px/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}
.btn--primary { background: var(--primary); color: var(--white); }
.btn--primary:hover { background: var(--ink); border-color: var(--ink); }
.btn--ghost { background: transparent; color: var(--primary); }
.btn--ghost:hover { background: var(--surface); }
.btn--sm { min-height: 48px; padding: 0 22px; font-size: 16px; }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 72px;
}
.brand {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--ink);
  line-height: 1.2;
  min-width: 0;
}
.brand__logo { display: block; height: 64px; width: auto; }
.brand__role { font-size: 0.9375rem; color: var(--ink-soft); }

.nav { display: none; }
.nav ul { display: flex; gap: var(--space-5); list-style: none; margin: 0; padding: 0; }
.nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  border-bottom: 2px solid transparent;
}
.nav a:hover { border-bottom-color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: var(--space-3); }
.header-actions .btn { display: none; }

.menu-toggle {
  min-height: 48px;
  min-width: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1.5px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font: 600 16px/1 var(--font-body);
  cursor: pointer;
}

.mobile-nav { border-top: 1px solid var(--line); background: var(--bg); }
.mobile-nav ul { list-style: none; margin: 0; padding: var(--space-3) var(--gutter) var(--space-4); display: grid; gap: var(--space-1); }
.mobile-nav a {
  display: flex;
  align-items: center;
  min-height: 52px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.125rem;
  border-bottom: 1px solid var(--line);
}
.mobile-nav .btn { margin-top: var(--space-3); width: 100%; color: var(--white); border-bottom: 1.5px solid var(--primary); }

@media (min-width: 900px) {
  .nav { display: block; }
  .header-actions .btn { display: inline-flex; }
  .menu-toggle, .mobile-nav { display: none !important; }
}

/* ---------- Hero ---------- */
.hero { padding-block: var(--space-7) var(--space-8); }
.hero__grid {
  display: grid;
  gap: var(--space-6);
  align-items: center;
}
.hero__text { display: grid; gap: var(--space-4); min-width: 0; }
.hero__kicker { color: var(--ink-soft); font-weight: 500; font-size: 1.0625rem; }
.hero__lede { color: var(--ink-soft); font-size: 1.1875rem; max-width: 34em; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); margin-top: var(--space-2); }
.hero__phone { display: inline-flex; align-items: center; min-height: 48px; color: var(--ink); font-weight: 600; white-space: nowrap; }

.hero__facts {
  margin: var(--space-4) 0 0;
  display: grid;
  border-top: 1px solid var(--line);
}
.hero__facts div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: var(--space-3);
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}
.hero__facts dt { color: var(--ink-soft); font-size: 0.9375rem; font-weight: 500; }
.hero__facts dd { margin: 0; color: var(--ink); font-size: 1rem; line-height: 1.5; }

.hero__figure { margin: 0; min-width: 0; }
.hero__figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 72% center;
  border-radius: var(--radius);
}

@media (min-width: 900px) {
  .hero { padding-block: var(--space-8) var(--space-9); }
  .hero__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-7); }
  .hero__figure img { aspect-ratio: 5 / 4; object-position: 74% center; }
}

/* ---------- Sobre mim ---------- */
.about { display: grid; gap: var(--space-6); align-items: center; }
.about__figure { margin: 0; min-width: 0; }
.about__figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 50% 30%;
  border-radius: var(--radius);
}
.about__text { display: grid; gap: var(--space-4); justify-items: start; min-width: 0; max-width: 38rem; }
.about__lead { font-family: var(--font-display); font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); line-height: 1.45; color: var(--ink); }
.about__text p { max-width: 36em; }
.about__block { display: grid; gap: var(--space-2); width: 100%; }
.about__subhead { font-family: var(--font-body); font-size: 1.0625rem; font-weight: 600; color: var(--ink); line-height: 1.4; }
.about__facts { margin: 0; width: 100%; border-top: 1px solid var(--line); }
.about__facts dt { font-variant-numeric: tabular-nums; }
.about__facts div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: var(--space-3);
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}
.about__facts dt { color: var(--ink-soft); font-size: 0.9375rem; font-weight: 500; }
.about__facts dd { margin: 0; font-size: 1rem; line-height: 1.5; }

@media (min-width: 900px) {
  .about { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-8); align-items: start; }
  .about__figure { position: sticky; top: 104px; }
  .about__figure img { aspect-ratio: 4 / 5; object-position: 50% 25%; }
}
@media (max-width: 520px) {
  .about__facts div { grid-template-columns: 1fr; gap: 2px; }
}

/* ---------- Especialidades ---------- */
.spec-head { display: grid; gap: var(--space-6); align-items: center; margin-bottom: var(--space-7); }
.spec-head__text { display: grid; gap: var(--space-4); min-width: 0; max-width: 34rem; }
.spec-head__lead { color: var(--ink-soft); font-size: 1.125rem; }
.spec-head__figure { margin: 0; min-width: 0; }
.spec-head__figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 62% 40%;
  border-radius: var(--radius);
}

.spec-list { border-top: 1px solid var(--line); }
.spec {
  display: grid;
  gap: var(--space-3);
  padding-block: var(--space-6);
  border-bottom: 1px solid var(--line);
}
.spec h3 { font-weight: 400; font-size: clamp(1.75rem, 1.3rem + 1.5vw, 2.25rem); line-height: 1.2; }
.spec__body { display: grid; gap: var(--space-3); min-width: 0; max-width: 40rem; }
.spec__when { color: var(--ink-soft); font-size: 1rem; line-height: 1.55; }
.spec__when strong { color: var(--ink); font-weight: 600; }
.lens-list { margin: var(--space-1) 0; border-top: 1px solid var(--line); }
.lens-list div { display: grid; gap: var(--space-1) var(--space-3); padding-block: 14px; border-bottom: 1px solid var(--line); }
.lens-list dt { font-weight: 600; font-size: 1rem; color: var(--ink); }
.lens-list dd { margin: 0; font-size: 1rem; line-height: 1.55; color: var(--ink-soft); }
.spec-close { display: grid; gap: var(--space-4); justify-items: start; margin-top: var(--space-6); max-width: 38rem; }
.spec-close__text { font-family: var(--font-display); font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); line-height: 1.45; }
.spec-close__text strong { font-weight: 400; }

@media (min-width: 900px) {
  .spec-head { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: var(--space-8); }
  .spec-head__figure img { aspect-ratio: 5 / 4; }
  .spec { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--space-7); }
}
@media (min-width: 640px) {
  .lens-list div { grid-template-columns: 9rem 1fr; }
}
@media (max-width: 520px) {
  .spec-close .btn { width: 100%; }
}

/* ---------- Perguntas frequentes ---------- */
.faq { display: grid; gap: var(--space-6); align-items: start; }
.faq__intro { display: grid; gap: var(--space-3); max-width: 28rem; }
.faq__intro p { color: var(--ink-soft); }
.faq__list { border-top: 1px solid var(--line); min-width: 0; }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: 64px;
  padding-block: var(--space-3);
  font-weight: 600;
  font-size: 1.125rem;
  line-height: 1.4;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+";
  flex: none;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--primary);
  border-radius: 50%;
  color: var(--primary);
  font-size: 1.25rem;
  line-height: 1;
}
.faq__item[open] summary::after { content: "\2212"; background: var(--primary); color: var(--white); }
.faq__answer { display: grid; gap: var(--space-3); padding-bottom: var(--space-4); max-width: 38rem; color: var(--ink); }
.faq__answer a { font-weight: 500; }
@media (min-width: 900px) {
  .faq { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--space-8); }
  .faq__intro { position: sticky; top: 104px; }
}

/* ---------- Depoimentos ---------- */
.quotes { display: grid; gap: var(--space-6); align-items: start; }
.quotes__side { display: grid; gap: var(--space-6); min-width: 0; }
.quote { margin: 0; display: grid; gap: var(--space-3); min-width: 0; }
.quote blockquote { margin: 0; }
.quote blockquote p { font-size: 1.125rem; line-height: 1.65; color: var(--ink); max-width: 36em; }
.quote--lead blockquote p { font-family: var(--font-display); font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.625rem); line-height: 1.5; }
.quote figcaption { display: grid; gap: 2px; font-weight: 600; font-size: 1rem; color: var(--ink); padding-top: var(--space-3); border-top: 1px solid var(--line); max-width: 36em; }
.quote figcaption span { font-weight: 400; font-size: 0.9375rem; color: var(--ink-soft); }
@media (min-width: 900px) {
  .quotes { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-8); }
}

.quotes-group { margin-top: var(--space-8); display: grid; gap: var(--space-5); }
.quotes-group__label { font-family: var(--font-body); font-size: 1.0625rem; font-weight: 600; color: var(--ink); }
.quotes--grid { gap: var(--space-6) var(--space-8); }
@media (min-width: 900px) {
  .quotes--grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}

/* ---------- Contato e agendamento ---------- */
.contact { display: grid; gap: var(--space-7); align-items: start; }
.contact__intro { display: grid; gap: var(--space-4); max-width: 30rem; min-width: 0; }
.contact__intro > p { color: var(--ink-soft); }
.fusex { display: grid; gap: var(--space-3); justify-items: start; margin-top: var(--space-4); padding-top: var(--space-5); border-top: 1px solid var(--line); }
.fusex__title { font-family: var(--font-body); font-size: 1.0625rem; font-weight: 600; }
.places { display: grid; gap: var(--space-5); min-width: 0; }
.places__title { font-family: var(--font-body); font-size: 1.0625rem; font-weight: 600; }
.places__group { display: grid; border-top: 1px solid var(--line); }
.places__city { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; line-height: 1.3; padding-block: var(--space-4) var(--space-1); }
.place { display: grid; gap: var(--space-3); padding-block: var(--space-4); border-top: 1px solid var(--line); min-width: 0; }
.place__info { display: grid; gap: var(--space-1); min-width: 0; }
.place__info h5 { margin: 0; font-family: var(--font-body); font-size: 1.125rem; font-weight: 600; line-height: 1.4; }
.place__info p { color: var(--ink-soft); font-size: 1rem; line-height: 1.55; }
.place__nums { display: grid; gap: 2px; color: var(--ink) !important; }
.place__nums span { white-space: nowrap; }
.place:first-of-type { border-top: 0; }
.place__actions { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-3); }
.place__actions .btn, .fusex .btn { white-space: normal; text-align: center; line-height: 1.25; padding-block: 12px; }
.places__note { color: var(--ink-soft); font-size: 0.9375rem; }
@media (min-width: 900px) {
  .contact { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--space-8); }
  .contact__intro { position: sticky; top: 104px; }
  .place { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--space-5); }
  .place__actions { justify-content: flex-end; }
}
@media (max-width: 520px) {
  .place__actions .btn, .fusex .btn { width: 100%; }
}

.loc-banner { margin: 0 0 var(--space-7); }
.loc-banner img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 28%; border-radius: var(--radius); }
.place__sub { color: var(--ink) !important; font-size: 0.9375rem !important; font-weight: 500; }
@media (min-width: 900px) {
  .loc-banner img { aspect-ratio: 21 / 8; }
}

/* ---------- Seções (esqueleto) ---------- */
.section { padding-block: var(--section-y); }
.section--alt { background: var(--surface); }
.section__head { display: grid; gap: var(--space-3); max-width: 40rem; margin-bottom: var(--space-6); }
.section__head p { color: var(--ink-soft); }

.placeholder {
  max-width: 40rem;
  padding: var(--space-4);
  border: 1.5px dashed var(--accent);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.55;
}
.placeholder strong { color: var(--ink); font-weight: 600; }

/* ---------- Rodapé ---------- */
.site-footer {
  background: var(--primary);
  color: var(--white);
  padding-block: var(--space-7);
}
.site-footer .container { display: grid; gap: var(--space-5); }
.site-footer h2 { color: var(--white); font-size: 1.5rem; font-weight: 600; }
.site-footer p, .site-footer a { color: var(--white); font-size: 1rem; line-height: 1.6; }
.site-footer a { display: inline-flex; align-items: center; min-height: 48px; text-underline-offset: 3px; }
.footer__regs { display: grid; gap: var(--space-1); }
.footer__regs span { opacity: 0.88; }
.footer__note { grid-column: 1 / -1; padding-top: var(--space-4); border-top: 1px solid rgba(255,255,255,0.28); font-size: 0.9375rem; opacity: 0.88; }
@media (min-width: 900px) {
  .site-footer .container { grid-template-columns: 1fr auto; align-items: end; }
}

@media (max-width: 520px) {
  .hero__facts div { grid-template-columns: 1fr; gap: 2px; }
  .hero__actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

.brand__role { display: none; }

/* Identidade Lumenier: títulos em Cormorant (corpo maior para compensar o desenho fino) */
h1, h2, h3, .about__lead, .spec-close__text, .places__city { font-weight: 500; }
h1 { font-size: clamp(2.5rem, 1.3rem + 4vw, 4rem); line-height: 1.05; }
h2 { font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem); }
.hero__kicker { color: var(--gold-text); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
body { font-size: 1rem; line-height: 1.65; }

/* Celular: a foto abre a página, antes do texto e dos registros */
@media (max-width: 899px) {
  .hero { padding-block: var(--space-4) var(--space-7); }
  .hero__grid { gap: var(--space-4); }
  .hero__figure { order: -1; }
  .hero__figure img { aspect-ratio: 4 / 3; object-fit: cover; object-position: 74% center; }
}
