/* ==========================================================================
   Evento Brasil-China — estilos principais
   Portado de um layout React/Tailwind para CSS puro, mantendo os mesmos
   tokens de design (cores em oklch, tipografia, espaçamentos e breakpoints).
   ========================================================================== */

/* ---- Fontes ------------------------------------------------------------ */
/* Space Grotesk (títulos) e DM Sans (corpo) são carregadas via functions.php */

/* ---- Reset básico -------------------------------------------------------*/
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4 {
  margin: 0;
}

p {
  margin: 0;
}

button {
  font: inherit;
}

/* ---- Tokens de design ---------------------------------------------------*/
:root {
  --radius: 0.75rem;
  --background: oklch(0.915 0.003 348);
  --foreground: oklch(0.22 0.033 218);
  --surface: oklch(0.97 0.006 218);
  --surface-2: oklch(0.94 0.008 218);

  /* --brand é o azul (pt) por padrão; html.lang-zh sobrescreve para o vermelho (zh). */
  --brand: oklch(0.376 0.131 264);
  --brand-foreground: oklch(0.99 0.005 90);

  --muted-foreground: oklch(0.45 0.02 220);
  --border: oklch(0.88 0.012 218);

  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "DM Sans", ui-sans-serif, system-ui, sans-serif;

  --container-max: 72rem; /* max-w-6xl */
  --container-pad: 1.25rem; /* px-5 */
}

html.lang-zh {
  --brand: oklch(0.509 0.195 28);
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  min-height: 100vh;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

/* ---- Alternância de idioma (pt/zh) ------------------------------------ */
/* Ambas as versões são renderizadas no HTML; a classe "lang-zh" em <html>
   (definida por assets/js/lang-switch.js) decide qual fica visível. */
[data-lang-content="zh"] {
  display: none;
}

html.lang-zh [data-lang-content="pt"] {
  display: none;
}

html.lang-zh [data-lang-content="zh"] {
  display: inline;
}

/* ---- Container ------------------------------------------------------- */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ---- Grain background (glow decorativo) ------------------------------ */
.grain-bg {
  background-image: radial-gradient(
    120% 120% at 80% 0%,
    color-mix(in oklab, var(--brand) 12%, transparent),
    transparent 60%
  );
}

.section-border {
  border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
}

.bg-surface-tint {
  background-color: color-mix(in oklab, var(--surface) 40%, transparent);
}

/* ---- Botões ------------------------------------------------------------*/
.btn-brand {
  display: inline-block;
  border-radius: 0.5rem;
  background-color: var(--brand);
  color: var(--brand-foreground);
  padding: 0.5rem 1rem;
  font-weight: 600;
  font-size: 0.875rem;
  transition: opacity 0.15s ease;
}

.btn-brand:hover {
  opacity: 0.9;
}

.btn-brand-lg {
  display: block;
  width: 100%;
  border-radius: 0.75rem;
  background-color: var(--brand);
  color: var(--brand-foreground);
  padding: 1rem 2rem;
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  transition: opacity 0.15s ease;
}

.btn-brand-lg:hover {
  opacity: 0.9;
}

/* ---- Cabeçalho ---------------------------------------------------------*/
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  background-color: #e4e2e3;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding-block: 1rem;
}

.site-logo {
  display: inline-flex;
  flex-shrink: 0;
  min-width: 0;
}

.site-logo img {
  width: auto;
  height: auto;
}

@media (min-width: 640px) {
  .site-logo img {
    height: 4.25rem;
  }
}

.main-nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.main-nav a {
  transition: color 0.15s ease;
}

.main-nav a:hover {
  color: var(--foreground);
}

.header-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.75rem;
}

.header-cta {
  flex-shrink: 0;
}

.lang-switch {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.25rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  padding: 0.25rem;
}

.lang-switch button {
  border: none;
  border-radius: 0.375rem;
  background: transparent;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-switch button[aria-pressed="true"] {
  background-color: var(--brand);
  color: var(--brand-foreground);
}

@media (min-width: 640px) {
  .header-inner {
    display: flex;
    justify-content: space-between;
  }
}

@media (min-width: 768px) {
  .main-nav {
    display: flex;
  }
}

/* ---- Hero --------------------------------------------------------------*/
.hero {
  position: relative;
  overflow: hidden;
}

.hero-img {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.hero-content {
  position: relative;
  padding-block: 5rem;
}

.hero-inner {
  max-width: 36rem;
}

.hero-badge {
  display: inline-flex;
  border-radius: 9999px;
  border: 1px solid var(--brand);
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  color: var(--brand);
}

.hero-title {
  margin-top: 1.5rem;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.05;
  color: var(--brand);
}

.hero-subtitle {
  margin-top: 1.25rem;
  width: 61%;
  font-size: 1rem;
  color: var(--muted-foreground);
}

.hero-countdown {
  margin-top: 2rem;
}

.hero-cta {
  margin-top: 1.5rem;
}

@media (min-width: 640px) {
  .hero-content {
    padding-block: 7rem;
  }

  .hero-title {
    font-size: 3.75rem;
  }

  .hero-subtitle {
    width: auto;
    font-size: 1.125rem;
  }

  .hero-cta {
    max-width: 28rem;
  }
}

/* ---- Countdown -----------------------------------------------------------*/
.countdown {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.countdown-cell {
  min-width: 5.5rem;
  flex: 1 1 0%;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background-color: color-mix(in oklab, var(--surface) 80%, transparent);
  padding: 0.75rem 1rem;
  text-align: center;
  backdrop-filter: blur(4px);
}

.countdown-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-foreground);
}

.countdown-value {
  font-family: var(--font-display);
  font-size: 1.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--foreground);
}

.countdown-value.accent {
  color: var(--brand);
}

@media (min-width: 640px) {
  .countdown-value {
    font-size: 2.25rem;
  }
}

/* ---- Título de seção -----------------------------------------------------*/
.section {
  padding-block: 5rem;
}

.section-title-wrap {
  margin-bottom: 2.5rem;
  max-width: 42rem;
}

.section-kicker {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--brand);
}

.section-title {
  margin-top: 0.75rem;
  font-size: 1.875rem;
  font-weight: 700;
}

@media (min-width: 640px) {
  .section-title {
    font-size: 2.25rem;
  }
}

/* ---- Sobre ---------------------------------------------------------------*/
.about-grid {
  display: grid;
  gap: 2.5rem;
}

.about-text {
  font-size: 1.125rem;
  line-height: 1.75;
  color: var(--muted-foreground);
}

.about-info-list {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.info-card {
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background-color: var(--surface);
  padding: 1.25rem;
}

.info-card-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--brand);
}

.info-card-value {
  margin-top: 0.25rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  }
}

/* ---- Programação -----------------------------------------------------------*/
.program-list {
  display: grid;
  gap: 2.5rem;
}

.program-day {
  border-radius: 1rem;
  border: 1px solid var(--border);
  background-color: var(--surface);
  padding: 1.5rem;
}

.program-day-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.25rem;
}

.program-weekday {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--brand);
}

.program-theme {
  margin-top: 0.25rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.program-date {
  flex-shrink: 0;
  border-radius: 0.5rem;
  background-color: var(--surface-2);
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.session-list {
  margin-top: 1.5rem;
  display: grid;
  gap: 1.5rem;
}

.session {
  display: grid;
  gap: 0.5rem;
}

.session-time {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--brand);
}

.session-title {
  font-size: 1rem;
  font-weight: 600;
}

.session-items {
  margin-top: 0.5rem;
  display: grid;
  gap: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--muted-foreground);
}

.session-items li {
  border-left: 2px solid var(--border);
  padding-left: 0.75rem;
}

.program-moderation,
.program-interpreters {
  font-size: 0.875rem;
  font-style: italic;
  color: var(--muted-foreground);
}

.program-moderation {
  margin-top: 1.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.program-interpreters {
  margin-top: 0.5rem;
}

@media (min-width: 640px) {
  .program-day {
    padding: 2rem;
  }

  .program-theme {
    font-size: 1.5rem;
  }

  .program-day-header {
    display: flex;
    justify-content: space-between;
  }

  .session {
    grid-template-columns: 8.5rem minmax(0, 1fr);
    gap: 1.5rem;
  }
}

/* ---- Palestrantes -----------------------------------------------------------*/
.speakers-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

.speaker-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  background-color: var(--surface-2);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.05);
  transition: box-shadow 0.2s ease;
}

.speaker-card:hover {
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.15);
}

.speaker-avatar {
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
}

.speaker-initials {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--brand);
}

.speaker-photo {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.speaker-info {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  border-radius: 0.75rem;
  background-color: #fff;
  padding: 0.75rem;
  box-shadow: 0 8px 20px rgb(0 0 0 / 0.25);
}

.speaker-name {
  font-family: var(--font-display);
  font-weight: 600;
  color: #171717;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.speaker-role {
  font-size: 0.875rem;
  color: #737373;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.speaker-flag {
  flex-shrink: 0;
  border-radius: 9999px;
  overflow: hidden;
}

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

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

/* ---- Como participar -----------------------------------------------------------*/
.participate-grid {
  display: grid;
  gap: 2rem;
}

.steps-list {
  display: grid;
  gap: 1.25rem;
}

.step-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
}

.step-number {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 9999px;
  background-color: var(--brand);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--brand-foreground);
}

.step-text {
  padding-top: 0.375rem;
  color: var(--muted-foreground);
}

.qr-box {
  justify-self: center;
  border-radius: 1rem;
  border: 1px solid var(--border);
  background-color: var(--background);
  padding: 1.5rem;
  text-align: center;
}

.qr-code-wrap {
  border-radius: 0.75rem;
  background-color: #fff;
  padding: 1rem;
  display: inline-block;
}

.qr-code-wrap svg {
  display: block;
}

.qr-cta {
  margin-top: 1.25rem;
  display: block;
  border-radius: 0.5rem;
  background-color: var(--brand);
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  color: var(--brand-foreground);
  transition: opacity 0.15s ease;
}

.qr-cta:hover {
  opacity: 0.9;
}

@media (min-width: 768px) {
  .participate-grid {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .qr-box {
    justify-self: end;
  }
}

/* ---- Rodapé -----------------------------------------------------------*/
.site-footer {
  border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
}

.footer-grid {
  display: grid;
  gap: 2rem;
  padding-block: 3rem;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand);
}

.footer-subtitle {
  margin-top: 0.5rem;
  max-width: 24rem;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.footer-org-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--brand);
}

.footer-logo-row {
  margin-top: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.footer-logo-badge {
  display: inline-flex;
  align-items: center;
  height: 2.75rem;
  transition: transform 0.15s ease;
}

.footer-logo-badge--lg {
  height: 3.5rem;
}

.footer-logo-badge:hover {
  transform: scale(1.05);
}

.footer-logo-badge img {
  height: auto;
  width: auto;
  max-height: 100%;
  max-width: 100%;
}

.footer-bottom {
  border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  padding-block: 1.25rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}

.footer-credit {
  border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  padding-block: 1.25rem;
}

.footer-credit-label {
  font-size: 0.9375rem;
  font-weight: 500;
  color: #1c3b86;
}

.footer-credit-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.75rem;
}

@media (max-width: 480px) {
  .footer-credit-row {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  .footer-credit-name {
    justify-content: center;
  }

  .footer-credit-links {
    justify-content: center;
    width: 100%;
  }
}

.footer-credit-name {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 400;
  color: #1c3b86;
}

.footer-credit-name-text {
  font-weight: 500;
}

.footer-credit-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1c3b86;
  flex-shrink: 0;
}

.footer-credit-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.125rem;
}

.footer-credit-link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: color 0.15s ease;
}

.footer-credit-link:hover {
  color: var(--brand);
}

html.lang-zh .footer-credit-label,
html.lang-zh .footer-credit-name,
html.lang-zh .footer-credit-badge {
  color: #bc1918;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: auto auto;
  }
}
