/* Camada local do institucional — usa os tokens e componentes do DS aprovado. */

.site-intro {
  max-width: 70ch;
  color: var(--color-muted);
}

/* Alvos de toque: navegação e tema permanecem confortáveis em celular. */
.ds-nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
}

.ds-theme-toggle { min-height: 44px; }

.site-section-lede {
  grid-column: 1 / -1;
  max-width: 70ch;
  margin: 0 0 var(--space-4);
  color: var(--color-muted);
}

.site-event {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(120deg, rgba(29, 8, 12, .96), rgba(73, 17, 27, .88)),
    var(--color-wine);
  color: #fffaf1;
  border-color: rgba(231, 217, 184, .46);
}

.site-event::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: .2;
  background: radial-gradient(circle at 88% 14%, rgba(231, 217, 184, .56), transparent 18rem);
}

.site-event > * { position: relative; z-index: 1; }

.site-event h2,
.site-event h3,
.site-event p { color: inherit; }

.site-event-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr);
  gap: clamp(20px, 4vw, 56px);
  align-items: center;
}

.site-event-poster {
  display: block;
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  border: 1px solid rgba(231, 217, 184, .42);
  background: #16070a;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .28);
}

.site-event-grid > a { display: block; align-self: center; }

.site-event-facts {
  display: grid;
  gap: 0;
  margin: var(--space-5) 0;
  border-top: 1px solid rgba(231, 217, 184, .35);
}

.site-event-fact {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(231, 217, 184, .35);
}

.site-event-fact strong { color: var(--color-ivory); }

.site-event .ds-button-primary {
  background: var(--color-ivory);
  color: #2b1115;
}

.site-event .ds-button-secondary {
  background: transparent;
  border-color: rgba(255, 250, 241, .72);
  color: #fffaf1;
}

.site-link-card {
  display: grid;
  gap: var(--space-3);
  align-content: start;
}

.site-contact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
  grid-column: 1 / -1;
}

.site-contact-card { min-height: 190px; }

.site-note {
  margin: 0;
  padding: 14px 16px;
  border: var(--line);
  border-top: 2px solid var(--color-silver);
  background: rgba(255, 255, 255, .62);
  color: var(--color-muted);
}

.site-quote {
  max-width: 44ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(25px, 3vw, 42px);
  line-height: 1.08;
}

.site-footer {
  grid-template-columns: minmax(230px, 1fr) minmax(200px, .8fr) auto;
  gap: clamp(20px, 4vw, 56px);
  align-items: center;
  padding: clamp(24px, 4vw, 44px) clamp(16px, 4vw, 48px);
  background:
    radial-gradient(circle at 92% 0%, rgba(231, 217, 184, .16), transparent 20rem),
    linear-gradient(115deg, #161313, #28191c 58%, #171717);
  border-top: 1px solid rgba(231, 217, 184, .52);
  color: #f4f2ec;
}

.site-footer-lockup {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.site-footer-lockup img {
  width: 52px;
  height: 52px;
  border: 1px solid rgba(231, 217, 184, .58);
  border-radius: 50%;
  object-fit: cover;
}

.site-footer-lockup strong,
.site-footer-lockup small { display: block; }

.site-footer-lockup strong {
  font-family: var(--font-display);
  font-size: clamp(17px, 1.6vw, 22px);
  font-weight: 500;
  letter-spacing: .02em;
  line-height: 1.05;
}

.site-footer-lockup small {
  margin-top: 5px;
  color: var(--color-ivory);
  font-size: var(--type-micro);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.site-footer-phrase {
  max-width: 24ch;
  margin: 0;
  color: rgba(244, 242, 236, .82);
  font-family: var(--font-display);
  font-size: clamp(18px, 1.7vw, 25px);
  font-style: italic;
  line-height: 1.18;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
}

.site-footer-links a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: 4px 0;
  color: #f4f2ec;
  font-size: var(--type-label);
  font-weight: 700;
  letter-spacing: .06em;
  text-decoration-color: rgba(231, 217, 184, .58);
  text-transform: uppercase;
}

.site-footer-links a:hover { color: var(--color-ivory); }

html[data-theme="dark"] .site-footer { background: #0c0c0d; }

@media (max-width: 900px) {
  .site-event-grid,
  .site-contact-grid { grid-template-columns: 1fr; }

  .site-event-poster { max-height: none; }
  .site-contact-grid { grid-column: 1 / -1; }
  .site-footer { grid-template-columns: 1fr; }
  .site-footer-links { justify-content: flex-start; }
}

@media (max-width: 520px) {
  .site-event-fact { grid-template-columns: 1fr; gap: 2px; }
  .site-event-poster { max-height: none; }
  .ds-topbar { gap: 8px; }
}

/* A composição de celular também atende navegadores internos que simulam uma
   largura desktop, mas têm toque como forma de interação. */
@media (max-width: 720px), (hover: none) and (pointer: coarse) {
  body {
    background:
      radial-gradient(circle at 50% -8%, rgba(231, 217, 184, .12), transparent 18rem),
      linear-gradient(180deg, var(--color-page), var(--color-cloth));
  }

  .ds-hero {
    min-height: auto;
    padding: 38px 20px 42px;
  }

  .ds-hero-copy { gap: 22px; }
  .ds-hero h1 { max-width: 11ch; }
  .ds-lede { font-size: 16px; line-height: 1.55; }

  .ds-identity-chamber {
    padding: 14px;
    background: var(--surface-panel);
  }

  .ds-identity-chamber figure { min-height: 220px; }
  .ds-identity-chamber img { max-height: 190px; }

  .ds-action-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .ds-action-row .ds-button { width: 100%; min-height: 48px; }

  .site-event { padding-top: 44px; padding-bottom: 44px; }
  .site-event-grid { gap: 30px; }
  .site-event-facts { margin: 28px 0; }
  .site-event-fact { grid-template-columns: 1fr; gap: 3px; padding: 14px 0; }
  .site-event-poster { max-height: none; }

  .site-contact-grid { gap: 0; }
  .site-contact-card { min-height: auto; }

  .site-note { padding: 16px 0; background: transparent; border-inline: 0; }

  .site-footer {
    gap: 18px;
    padding: 30px 20px max(30px, env(safe-area-inset-bottom));
  }

  .site-footer-links { gap: 4px 18px; }
}

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

/* Institutional mobile layout: explicit tracks, readable rhythm and compact navigation. */
.site-menu-toggle { display: none; }
.ds-section, .ds-hero { scroll-margin-top: 96px; }
.site-event-grid > a { width: 100%; max-width: 480px; justify-self: center; }
.ds-section-head h2 { text-wrap: balance; }
.ds-grid-12 > * { min-width: 0; }

@media (max-width: 900px) {
  html body,
  html[data-theme="dark"] body {
    background: var(--color-page);
  }

  .ds-topbar {
    position: sticky;
    top: 0;
    grid-template-columns: minmax(0, 1fr) 44px 44px;
    gap: 6px;
    padding: 12px max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left));
    background: var(--color-page);
    border-bottom: var(--line);
    backdrop-filter: none;
  }
  .ds-brand { grid-column: 1; grid-row: 1; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; }
  .ds-brand-mark { width: 38px; height: 38px; }
  .ds-brand strong { display: block; font-size: 12px; line-height: 1.2; letter-spacing: .025em; }
  .ds-brand small { margin-top: 4px; font-size: 8px; letter-spacing: .12em; }
  .ds-theme-toggle { grid-column: 2; grid-row: 1; width: 44px; min-height: 44px; padding: 0; background: transparent; border: 0; }
  .ds-theme-toggle [data-theme-toggle-label] { display: none; }
  .ds-theme-toggle-icon { width: 17px; height: 17px; }
  .site-menu-toggle {
    grid-column: 3;
    grid-row: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    min-height: 44px;
    padding: 10px;
    color: var(--color-ink);
    background: transparent;
    border: var(--line);
    border-radius: 50%;
    cursor: pointer;
  }
  .site-menu-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
  .site-menu-toggle span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .site-menu-toggle[aria-expanded="true"] { background: var(--color-cloth); }
  .ds-topbar .ds-nav {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
    justify-self: stretch;
    gap: 0;
    margin: 10px 0 0;
    padding: 8px 0;
    overflow: visible;
    border-top: var(--line);
  }
  .ds-topbar.site-nav-ready:not(.site-nav-open) .ds-nav { display: none; }
  .ds-topbar .ds-nav a {
    justify-content: space-between;
    min-height: 48px;
    padding: 12px 8px;
    font-size: 13px;
    letter-spacing: .07em;
    border: 0;
  }
  .ds-topbar .ds-nav a + a { border-top: 1px solid rgba(154, 158, 161, .2); }
  .ds-topbar .ds-nav a[aria-current="page"] { color: var(--color-wine); background: var(--color-cloth); }

  .ds-grid-12 { grid-template-columns: minmax(0, 1fr); }
  .ds-grid-12 > * { grid-column: 1 / -1; }
  .ds-section {
    padding: 52px max(22px, env(safe-area-inset-right)) 52px max(22px, env(safe-area-inset-left));
    gap: 0;
  }
  .ds-section-head { display: block; margin: 0 0 30px; }
  .ds-section-head h2 { margin: 0 0 18px; font-size: clamp(32px, 8.5vw, 44px); line-height: 1.08; }
  .ds-section-head p, .site-section-lede { margin: 0; font-size: 16px; line-height: 1.7; }
  .site-section-lede { margin-bottom: 28px; }
  .ds-section > .ds-component,
  .ds-section > .ds-principle,
  html[data-theme="dark"] .ds-section > .ds-component,
  html[data-theme="dark"] .ds-section > .ds-principle {
    display: block;
    width: 100%;
    padding: 28px 0;
    background: transparent;
    border: 0;
    border-top: var(--line);
    box-shadow: none;
  }
  .ds-section > .ds-component:last-child,
  .ds-section > .ds-principle:last-child { border-bottom: 0; padding-bottom: 0; }
  .ds-section > .ds-component .ds-label,
  .ds-section > .ds-principle .ds-label { display: none; }
  .ds-section > .ds-component h2,
  .ds-section > .ds-component h3,
  .ds-section > .ds-principle h3 { margin: 0 0 14px; font-size: clamp(26px, 7vw, 34px); line-height: 1.15; font-weight: 400; }
  .ds-section > .ds-component p,
  .ds-section > .ds-principle p { margin: 0; font-size: 16px; line-height: 1.7; color: var(--color-muted); }
  .ds-section > .ds-component .ds-text-link { display: inline-block; margin-top: 18px; padding-block: 8px; line-height: 1.5; text-underline-offset: 5px; }
  .ds-hero { padding: 42px 22px 48px; gap: 34px; }
  .ds-hero h1 { font-size: clamp(38px, 10vw, 58px); line-height: 1.04; }
  .ds-hero-copy { gap: 22px; }
  .ds-lede { font-size: 16px; line-height: 1.7; }
  .ds-identity-chamber { padding: 16px; }
  .ds-identity-chamber figure { min-height: 0; }
  .ds-identity-chamber img { height: auto; }
  .ds-action-row .ds-button { min-height: 48px; }
  .site-event { padding-block: 48px; }
  .site-event-grid { gap: 32px; }
  .site-event h2 { font-size: clamp(32px, 8.5vw, 44px); line-height: 1.12; text-wrap: balance; }
  .site-event p { line-height: 1.7; }
  .site-event-poster { height: auto; max-height: none; }
  html[data-theme="dark"] .site-event .ds-button-primary { background: var(--color-ivory); color: #2b1115; }
  html[data-theme="dark"] .site-event .ds-button-secondary { background: transparent; color: #fffaf1; }
}
