/* Instituto Silvia Cavalleri
   Paleta serena (sálvia, marfim e areia), layout estático e responsivo. */

:root {
  --bg: #f3f0ea;
  --bg-dark: #e8e3da;
  --paper: #fbfaf6;
  --sand: #d4cec4;
  --gold: #b08a62;
  --gold-deep: #8f6d4a;
  --accent: #4f7268;
  --accent-dark: #3a574f;
  --navy: #2c3d38;
  --steel: #3a4a45;
  --ink: #262c2a;
  --muted: #5c6863;
  --line: rgba(38, 44, 42, 0.12);
  --shadow: 0 12px 30px rgba(44, 61, 56, 0.08);
  --radius: 18px;
  --header-h: 78px;
  --font-display: "Cormorant Garamond", "Palatino Linotype", Palatino, "Times New Roman", serif;
  --font-body: "Source Sans 3", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  background:
    radial-gradient(1200px 500px at 8% -12%, rgba(79, 114, 104, 0.11), transparent 58%),
    radial-gradient(900px 420px at 100% 0%, rgba(176, 138, 98, 0.10), transparent 55%),
    var(--bg);
  min-height: 100vh;
}

img,
svg {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent-dark);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

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

a:focus-visible,
button:focus-visible,
.nav-toggle:focus-visible + .nav-toggle-label {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -40px;
  z-index: 1000;
  background: var(--navy);
  color: #f7f4ee;
  padding: 0.5rem 0.9rem;
  border-radius: 8px;
}

.skip-link:focus {
  top: 0.7rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header
   ------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(243, 240, 234, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--navy);
  min-width: 0;
}

.logo-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 12px;
  background: linear-gradient(160deg, #4a675f, var(--navy));
  color: #f7f4ee;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 14px rgba(44, 61, 56, 0.28);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.logo-text strong {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.logo-text span {
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

.nav-toggle {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.nav-toggle-label {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  cursor: pointer;
  place-items: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle-label span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.site-nav a {
  display: inline-block;
  text-decoration: none;
  color: var(--steel);
  font-weight: 550;
  font-size: 0.95rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--bg-dark);
  color: var(--navy);
}

.site-nav .nav-cta {
  background: var(--accent);
  color: #f7f4ee !important;
  margin-left: 0.25rem;
}

.site-nav .nav-cta:hover {
  background: var(--accent-dark);
}

/* Hero
   ------------------------------------------------------------------ */
.hero {
  padding: 3.5rem 0 3rem;
  position: relative;
}

.hero-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 880px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3.5rem;
    padding: 1.5rem 0 1rem;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent-dark);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.75rem;
  margin: 0 0 1rem;
}

.eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: var(--gold);
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 0.85rem;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.85rem);
}

h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.45rem);
}

h3 {
  font-size: 1.35rem;
  letter-spacing: -0.01em;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 38rem;
  margin: 0 0 1.6rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.8rem 1.25rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #f7f4ee;
  box-shadow: 0 8px 18px rgba(58, 87, 79, 0.22);
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: #f7f4ee;
}

.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--line);
}

.btn-ghost:hover {
  background: var(--paper);
  color: var(--navy);
}

.hero-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 1.6rem 1.5rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--gold), var(--accent));
}

.hero-art {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

@media (min-width: 880px) {
  .hero-art {
    grid-template-columns: 1fr 1fr;
  }
}

.hero-art > * {
  min-width: 0;
}

.hero-chip.wide {
  grid-column: 1 / -1;
}

.hero-chip {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.95rem 0.9rem;
  font-size: 0.92rem;
}

.hero-chip strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.15rem;
}

.hero-chip span,
.hero-chip a {
  color: var(--muted);
  overflow-wrap: break-word;
}

.logo-text span {
  overflow-wrap: anywhere;
}

@media (min-width: 880px) {
  .logo-text span {
    max-width: none;
    white-space: normal;
  }
}

@media (min-width: 860px) {
  .contact-list.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
}

/* Sections
   ------------------------------------------------------------------ */
.section {
  padding: 3.4rem 0;
}

.section-alt {
  background: rgba(251, 250, 246, 0.72);
  border-block: 1px solid var(--line);
}

.section-head {
  max-width: 40rem;
  margin-bottom: 2rem;
}

.section-head p {
  color: var(--muted);
  margin: 0;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--gold-deep);
  margin: 0.25rem 0 1.5rem;
}

.divider svg {
  width: 22px;
  height: 22px;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  width: 4.5rem;
  background: var(--sand);
}

/* Cards / grid
   ------------------------------------------------------------------ */
.cards {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .cards.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.25rem 1.4rem;
  box-shadow: 0 8px 20px rgba(44, 61, 56, 0.04);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--bg-dark);
  color: var(--accent-dark);
  display: grid;
  place-items: center;
  margin-bottom: 0.9rem;
}

.card h3 {
  margin-bottom: 0.4rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.card .cnae {
  display: inline-block;
  margin-top: 0.85rem;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--gold-deep);
  font-weight: 600;
}

/* About / data box
   ------------------------------------------------------------------ */
.split {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 860px) {
  .split {
    grid-template-columns: 1.05fr 0.95fr;
    align-items: start;
  }
}

.prose p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.prose p:last-child {
  margin-bottom: 0;
}

.data-box {
  background: var(--navy);
  color: #eef3f1;
  border-radius: 24px;
  padding: 1.5rem 1.4rem 1.55rem;
  box-shadow: var(--shadow);
}

.data-box h2,
.data-box h3 {
  color: #f7f4ee;
}

.data-box p,
.data-box li,
.data-box dd {
  color: rgba(238, 243, 241, 0.86);
}

.data-box dl {
  margin: 0;
}

.data-box dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #d4c0a4;
  margin-top: 0.9rem;
}

.data-box dt:first-child {
  margin-top: 0;
}

.data-box dd {
  margin: 0.15rem 0 0;
  font-weight: 550;
  color: #f7f4ee;
}

.data-box a {
  color: #e0c89a;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 1rem 0 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 650;
  background: rgba(176, 138, 98, 0.16);
  color: #e0c89a;
  border: 1px solid rgba(176, 138, 98, 0.28);
}

/* Hours / appointment note
   ------------------------------------------------------------------ */
.hours {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hours li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.hours .closed {
  color: var(--muted);
}

.hours strong {
  font-weight: 650;
}

.note-box {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.1rem 1.15rem;
}

.note-box p {
  margin: 0;
  color: var(--muted);
}

/* Contact
   ------------------------------------------------------------------ */
.contact-list {
  display: grid;
  gap: 0.9rem;
}

.contact-item {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem 1.05rem;
}

.contact-item .card-icon {
  margin: 0;
  flex: 0 0 48px;
}

.contact-item h3 {
  font-size: 1rem;
  margin: 0 0 0.15rem;
  font-family: var(--font-body);
  letter-spacing: 0;
  font-weight: 700;
}

.contact-item p,
.contact-item a {
  margin: 0;
  color: var(--muted);
  text-decoration: none;
  word-break: break-word;
}

.contact-item a:hover {
  color: var(--navy);
  text-decoration: underline;
}

.map-wrap {
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  min-height: 320px;
  background: var(--bg-dark);
}

.map-wrap iframe {
  width: 100%;
  height: 420px;
  border: 0;
  display: block;
}

/* Page hero (inner pages)
   ------------------------------------------------------------------ */
.page-hero {
  padding: 2.6rem 0 1.6rem;
}

.page-hero p {
  color: var(--muted);
  max-width: 40rem;
  margin: 0;
}

/* Legal
   ------------------------------------------------------------------ */
.legal {
  max-width: 46rem;
}

.legal h2 {
  font-size: 1.45rem;
  margin-top: 2rem;
}

.legal p,
.legal li {
  color: var(--muted);
}

.legal ul {
  padding-left: 1.15rem;
}

/* Footer
   ------------------------------------------------------------------ */
.site-footer {
  background: var(--navy);
  color: #eef3f1;
  padding: 3rem 0 1.5rem;
  margin-top: 2rem;
}

.footer-grid {
  display: grid;
  gap: 1.8rem;
}

@media (min-width: 800px) {
  .footer-grid {
    grid-template-columns: 1.3fr 0.8fr 0.9fr;
  }
}

.site-footer h2 {
  color: #f7f4ee;
  font-size: 1.45rem;
  margin-bottom: 0.6rem;
}

.site-footer p,
.site-footer li,
.site-footer address {
  color: rgba(238, 243, 241, 0.82);
  font-style: normal;
}

.site-footer a {
  color: #e0c89a;
  text-decoration: none;
}

.site-footer a:hover {
  color: #f7f4ee;
  text-decoration: underline;
}

.footer-nav,
.footer-legal {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav li,
.footer-legal li {
  margin: 0.3rem 0;
}

.footer-meta {
  margin-top: 2rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(238, 243, 241, 0.12);
  font-size: 0.85rem;
  color: rgba(238, 243, 241, 0.65);
}

/* 404
   ------------------------------------------------------------------ */
.error-page {
  min-height: 55vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 4rem 0;
}

.error-page .code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 12vw, 7rem);
  line-height: 0.9;
  color: var(--accent);
  margin-bottom: 0.6rem;
}

/* Mobile nav
   ------------------------------------------------------------------ */
@media (max-width: 879px) {
  .nav-toggle-label {
    display: grid;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
    padding: 0.5rem 1rem 1rem;
  }

  .nav-toggle:checked ~ .site-nav {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav a {
    display: block;
    border-radius: 12px;
    padding: 0.7rem 0.85rem;
  }

  .site-nav .nav-cta {
    margin: 0.25rem 0 0;
    text-align: center;
  }

  .logo-text span {
    max-width: 160px;
  }
}

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

  .btn {
    transition: none;
  }
}
