:root {
  --navy: #041c4a;
  --navy-light: #12336f;
  --gold: #c9a35a;
  --ink: #1d2330;
  --muted: #5b6372;
  --bg: #ffffff;
  --bg-alt: #f6f4ef;
  --line: #ddd8cc;
  --serif: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

h1, h2, h3 { font-family: var(--serif); color: var(--navy); line-height: 1.2; font-weight: 700; }
h2 { font-size: 1.9rem; margin: 0 0 24px; }
h3 { font-size: 1.3rem; margin: 0 0 8px; }

a { color: var(--navy-light); }

.wrap { width: min(1080px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 760px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: #fff; padding: 8px 12px; }

/* Topo */
.topbar { background: var(--navy); border-bottom: 3px solid var(--gold); }
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.brand img { border-radius: 8px; }
.brand__text { font-family: var(--serif); font-size: 1.15rem; line-height: 1.2; }
.brand__text small { display: block; font-family: var(--sans); font-size: .8rem; color: #c9d1e3; }
.topnav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.topnav a { color: #fff; text-decoration: none; font-size: .95rem; }
.topnav a:hover { text-decoration: underline; }

/* Botões */
.btn { display: inline-block; padding: 12px 20px; border-radius: 6px; font-weight: 600; text-decoration: none; }
.btn--primary { background: var(--navy); color: #fff; }
.btn--primary:hover { background: var(--navy-light); }
.btn--secondary { border: 1px solid var(--navy); color: var(--navy); }
.btn--secondary:hover { background: var(--bg-alt); }
.btn--sm { padding: 6px 14px; font-size: .9rem; border: 1px solid #fff; color: #fff; }

/* Abertura */
.hero { padding: 64px 0 56px; border-bottom: 1px solid var(--line); }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 16px; }
.lead { font-size: 1.15rem; max-width: 60ch; margin: 0 0 10px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }

/* Seções */
.section { padding: 64px 0; }
.section--alt { background: var(--bg-alt); }

.areas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.area { border-top: 3px solid var(--navy); padding-top: 16px; }
.area p { color: var(--muted); margin: 0 0 12px; }
.area ul { margin: 0; padding-left: 20px; }
.area li + li { margin-top: 4px; }

.steps { margin: 0; padding-left: 22px; }
.steps li + li { margin-top: 10px; }

details { border-bottom: 1px solid var(--line); padding: 14px 0; }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; color: var(--navy); }
details p { margin: 10px 0 0; color: var(--muted); }

.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
address { font-style: normal; margin-bottom: 16px; }
.hours { border-collapse: collapse; width: 100%; max-width: 380px; }
.hours th, .hours td { text-align: left; font-weight: 400; padding: 8px 0; border-bottom: 1px solid var(--line); }
.hours td { text-align: right; }
.note { color: var(--muted); font-size: .92rem; }

/* Páginas de texto */
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); margin-top: 0; }
.prose h2 { font-size: 1.3rem; margin: 2em 0 .5em; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li + li { margin-top: 6px; }

/* Rodapé */
.footer { background: var(--navy); color: #c9d1e3; padding: 40px 0; font-size: .92rem; }
.footer__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.footer p { margin: 0 0 10px; }
.footer strong { color: #fff; }
.footer a { color: #fff; }

a:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

@media (max-width: 800px) {
  .areas, .contact, .footer__grid { grid-template-columns: 1fr; }
  .hero { padding: 44px 0 40px; }
  .section { padding: 48px 0; }
}

/* Efeitos */
html { scroll-behavior: smooth; }

/* Transições de interação */
.btn, .area, summary, .footer a, .hours tr { transition: color .2s ease, background-color .2s ease, border-color .25s ease, transform .2s ease, box-shadow .2s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 16px -8px rgba(4, 28, 74, .5); }
.btn:active { transform: translateY(0); }
.topnav a { text-decoration: none; background: linear-gradient(var(--gold), var(--gold)) left bottom / 0 1px no-repeat; transition: background-size .25s ease; }
.topnav a:hover { text-decoration: none; background-size: 100% 1px; }
.brand img { transition: transform .3s ease; }
.brand:hover img { transform: rotate(-6deg) scale(1.05); }
.area:hover { border-top-color: var(--gold); }
.area li { transition: transform .2s ease; }
.area li:hover { transform: translateX(4px); }
.hours tr:hover { background: rgba(201, 163, 90, .08); }
.footer a { text-decoration-color: transparent; text-underline-offset: 3px; }
.footer a:hover { text-decoration-color: var(--gold); }

/* Linha dourada sob os títulos de seção */
.section h2::after, .prose h1::after {
  content: ""; display: block; width: 48px; height: 2px; margin-top: 12px;
  background: var(--gold); transform-origin: left;
}

.prose h2::after { display: none; }

/* Dúvidas: seta que gira ao abrir */
summary { list-style: none; position: relative; padding-left: 24px; }
summary::-webkit-details-marker { display: none; }
summary::before {
  content: ""; position: absolute; left: 2px; top: .45em; width: 7px; height: 7px;
  border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  transform: rotate(-45deg); transition: transform .25s ease;
}
details[open] summary::before { transform: rotate(45deg); }
summary:hover { color: var(--navy-light); }
details[open] p { animation: abrir .3s ease; }

/* Entrada ao carregar */
.topbar { animation: descer .5s ease both; }
.hero h1, .hero .lead, .hero .actions, .prose > h1, .prose > p:first-of-type { animation: subir .7s ease both; }
.hero h1, .prose > h1 { animation-delay: .15s; }
.hero .lead, .prose > p:first-of-type { animation-delay: .25s; }
.hero .lead + .lead { animation-delay: .35s; }
.hero .actions { animation-delay: .45s; }
.prose > h1::after { animation: linha .6s ease .5s both; }

/* Entrada ao rolar (Chrome/Edge; nos demais tudo aparece sem efeito) */
@supports (animation-timeline: view()) {
  .section h2, .area, .area li, .steps li, details, .contact address, .contact p,
  .hours tr, .footer__grid > div, .prose > h2, .prose > p, .prose > ul, .prose > ol {
    animation: subir linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 45%;
  }
  .section h2::after { animation: linha linear both; animation-timeline: view(); animation-range: entry 20% entry 70%; }
  .area:nth-child(2) { animation-range: entry 10% entry 55%; }
  .area:nth-child(3) { animation-range: entry 20% entry 65%; }
  .area li { animation-name: lado; }
  .steps li { animation-name: lado; }
  .steps li:nth-child(2) { animation-range: entry 5% entry 50%; }
  .steps li:nth-child(3) { animation-range: entry 10% entry 55%; }
  .steps li:nth-child(4) { animation-range: entry 15% entry 60%; }
  .contact > div:last-child .hours tr { animation-name: lado-direita; }
  .footer__grid > div { animation-name: surgir; }
}

@keyframes subir { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes descer { from { opacity: 0; transform: translateY(-100%); } to { opacity: 1; transform: none; } }
@keyframes lado { from { opacity: 0; transform: translateX(-16px); } to { opacity: 1; transform: none; } }
@keyframes lado-direita { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes surgir { from { opacity: 0; } to { opacity: 1; } }
@keyframes linha { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes abrir { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

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