/* ===========================================================================
   Na Chapada — Design System "Cerrado Cósmico & Quartzito Cristalino"
   Conceito: Revista de Viagens de Luxo com Alma Mística e Natural
   =========================================================================== */

:root {
  /* Cores Oklch Canônicas (Mapeadas para Custom Properties) */
  --primary: oklch(0.68 0.16 210);      /* Azul Turquesa Cristal (#22a3b0) */
  --primary-glow: oklch(0.75 0.12 210);
  --accent: oklch(0.72 0.22 42);        /* Laranja Fogo de Cerrado (#f56b2a) */
  --mineral: oklch(0.85 0.12 90);       /* Dourado Quartzito (#e9c260) */
  --signal: oklch(0.55 0.15 35);        /* Vermelho Terracota */
  
  /* Tons de Areia (Modo Claro) */
  --paper-50: #fdfcf9;                  /* Fundo areia ultra-claro */
  --paper-100: #faf6eb;                 /* Areia de Cristal suave */
  --paper-200: #f0e9d6;                 /* Areia média mineral */
  --paper-300: #e2d7be;                 /* Borda e separadores */
  
  /* Textos (Modo Claro) */
  --ink-900: #1a1816;                   /* Hematita Escura principal */
  --ink-600: #575047;                   /* Hematita Média secundário */
  --ink-300: #9c9181;                   /* Muted */
  
  /* Semânticos Gerais (Claro) */
  --bg: var(--paper-50);
  --surface: #ffffff;
  --surface-2: var(--paper-100);
  --border: var(--paper-300);
  --border-glow: linear-gradient(135deg, var(--primary), var(--mineral));
  --text: var(--ink-900);
  --muted: var(--ink-600);
  --brand: var(--primary);
  
  /* Sombras Premium */
  --shadow: 0 4px 20px rgba(26,24,22,0.03), 0 20px 48px rgba(26,24,22,0.04);
  --shadow-lg: 0 24px 64px rgba(26,24,22,0.08), 0 4px 16px rgba(26,24,22,0.02);
  
  /* Raio e Layout */
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --maxw: 1240px;
  
  /* Tipografia do Novo Visual */
  --font-display: "Syne", sans-serif;
  --font-serif: "Fraunces", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", sans-serif;
}

/* Modo Escuro Cósmico (Céu de Almécegas) */
html[data-theme="dark"] {
  --bg: #0a0907;                       /* Céu estrelado profundo */
  --surface: #171512;                  /* Areia cósmica escura */
  --surface-2: #1e1b17;                /* Areia média mineral escura */
  --border: #2b2720;                   /* Borda mineral */
  
  --ink-900: #f7f5f2;                  /* Marfim principal */
  --ink-600: #bfae99;                  /* Marfim suave */
  --ink-300: #7c7060;                  /* Muted escuro */
  
  --bg-noise: rgba(255, 255, 255, 0.015);
  --bg-glass: rgba(23, 21, 18, 0.7);
  
  --text: var(--ink-900);
  --muted: var(--ink-600);
  --brand: var(--primary);
  
  --shadow: 0 4px 24px rgba(0,0,0,0.4), 0 16px 40px rgba(0,0,0,0.5);
  --shadow-lg: 0 32px 80px rgba(0,0,0,0.7), 0 8px 24px rgba(0,0,0,0.4);
}

/* ---------- Setup Básico ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--font-sans); font-size: 16px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  transition: background .3s cubic-bezier(0.4, 0, 0.2, 1), color .3s cubic-bezier(0.4, 0, 0.2, 1);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: 0; outline: 0; background: none; }

/* Tipografia */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; margin: 0; }
.serif-title { font-family: var(--font-serif); font-style: italic; font-weight: 600; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.kicker { font-family: var(--font-serif); font-style: italic; font-weight: 600; font-size: 14px; color: var(--accent); letter-spacing: 0.05em; display: inline-flex; align-items: center; gap: 8px; }
.kicker::after { content: ""; width: 24px; height: 1px; background: var(--accent); opacity: 0.4; }

/* ---------- Topbar Flutuante Premium ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--surface) 75%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: all 0.3s;
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { transition: transform 0.4s; }
.brand:hover .brand-mark { transform: rotate(15deg) scale(1.05); }
.brand-title { display: flex; flex-direction: column; }
.brand-word { font-family: var(--font-display); font-weight: 800; font-size: 24px; color: var(--text); letter-spacing: -0.03em; line-height: 0.9; text-transform: uppercase; }
.brand-word span { color: var(--primary); }
.brand-sub { font-size: 10px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--muted); opacity: 0.7; margin-top: 2px; }

.nav { display: flex; gap: 6px; }
.nav a {
  padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 14.5px;
  color: var(--muted); transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.active { color: var(--surface); background: var(--text); }

.top-actions { display: flex; align-items: center; gap: 12px; }
.cond-chip {
  display: flex; align-items: center; gap: 10px; padding: 8px 16px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--border); font-size: 13px; color: var(--muted);
  box-shadow: var(--shadow);
}
.cond-chip b { color: var(--text); font-weight: 700; }
.cond-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 10px var(--primary); animation: pulse 2s infinite; }

.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow); transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.icon-btn:hover { background: var(--text); color: var(--surface); transform: scale(1.05); }
.icon-btn:active { transform: scale(0.95); }

/* ---------- Now Ticker Cósmico ---------- */
.now { background: var(--text); color: var(--surface); overflow: hidden; border-bottom: 1px solid var(--border); }
.now-inner { display: flex; align-items: center; height: 42px; }
.now-tag {
  font-family: var(--font-display); font-weight: 800; font-size: 11px; text-transform: uppercase;
  letter-spacing: 0.15em; padding: 0 20px; background: var(--accent); color: #fff;
  align-self: stretch; display: flex; align-items: center; flex-shrink: 0;
}
.now-track-mask { overflow: hidden; flex: 1; position: relative; }
.now-track-mask::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--text) 0%, transparent 8%, transparent 92%, var(--text) 100%);
  pointer-events: none;
}
.now-track { display: inline-flex; gap: 60px; white-space: nowrap; padding-left: 30px; animation: marquee 40s linear infinite; }
.now:hover .now-track { animation-play-state: paused; }
.now-track span { font-size: 13.5px; font-weight: 500; letter-spacing: 0.02em; color: var(--muted); }
.now-track span::before { content: "✦"; margin-right: 60px; color: var(--accent); }

/* ---------- Oráculo do Paralelo 14 (Vibe Matcher) ---------- */
.oracle-box {
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px; margin: 36px 0; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.oracle-box::before {
  content: ""; position: absolute; -100px: top; right: -100px; width: 300px; height: 300px;
  background: radial-gradient(circle, color-mix(in srgb, var(--primary) 12%, transparent), transparent 70%);
  pointer-events: none;
}
.oracle-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 32px; align-items: center; }
.oracle-text h2 { font-size: 32px; margin-bottom: 8px; }
.oracle-text p { color: var(--muted); margin: 0; font-size: 15px; }
.oracle-chips { display: flex; gap: 12px; flex-wrap: wrap; }
.vibe-btn {
  padding: 14px 22px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border);
  color: var(--text); font-weight: 700; font-size: 14px; transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow);
}
.vibe-btn:hover { border-color: var(--primary); transform: translateY(-2px); }
.vibe-btn.active {
  background: var(--text); color: var(--surface); border-color: var(--text);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.vibe-btn.active .vibe-icon { color: var(--mineral); }
.vibe-icon { color: var(--primary); transition: color 0.3s; }

/* ---------- Grid Assimétrico & Editorial ---------- */
.magazine-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; align-items: start; margin-top: 12px; }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 40px 0 20px; }
.sec-head h2 { font-size: 30px; letter-spacing: -0.03em; }
.sec-head h2 span { color: var(--accent); }
.sec-head a { font-weight: 700; font-size: 14px; color: var(--primary); display: inline-flex; align-items: center; gap: 6px; transition: color 0.2s; }
.sec-head a:hover { color: var(--accent); }

/* Hero Assimétrico Principal */
.hero-materia {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); margin-bottom: 32px; transition: transform 0.3s;
}
.hero-materia:hover { transform: translateY(-4px); }
.hero-materia-media { aspect-ratio: 4/3; position: relative; overflow: hidden; }
.hero-materia-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s; }
.hero-materia:hover .hero-materia-media img { transform: scale(1.04); }
.hero-materia-body { padding: 40px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.hero-materia-body h2 { font-size: 38px; line-height: 1.05; }
.hero-materia-body .lide { color: var(--muted); font-size: 16.5px; }

/* Trilha de Cards Fluidos (Asymmetric Rails) */
.rail-container { position: relative; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: 310px; gap: 24px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px 4px 20px;
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }

/* ---------- Cards Premium (Cerrado Style) ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow); transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex; flex-direction: column; position: relative;
}
.card::after {
  content: ""; position: absolute; inset: 0; border-radius: var(--radius-lg);
  border: 1.5px solid transparent; pointer-events: none; transition: border-color 0.3s;
}
.card:hover {
  transform: translateY(-6px) scale(1.01); box-shadow: var(--shadow-lg);
}
.card:hover::after {
  border-image: linear-gradient(135deg, var(--primary), var(--mineral)) 1;
  border-color: initial;
}
.card-media { position: relative; aspect-ratio: 16/11; overflow: hidden; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
.card:hover .card-media img { transform: scale(1.05); }
.card-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-body h3 { font-family: var(--font-display); font-size: 20px; font-weight: 800; line-height: 1.15; letter-spacing: -0.01em; }
.card-desc { color: var(--muted); font-size: 14px; line-height: 1.45; }
.card-meta { margin-top: auto; display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--ink-300); font-weight: 600; padding-top: 10px; border-top: 1px solid var(--border); }

/* Badges e Selos */
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted);
  border: 1px solid var(--border); text-transform: uppercase; letter-spacing: 0.05em;
}
.badge.open { color: oklch(0.65 0.14 140); background: color-mix(in srgb, oklch(0.65 0.14 140) 10%, transparent); border-color: transparent; }
.badge.free { color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: transparent; }
.badge.new { color: #fff; background: var(--accent); border-color: transparent; }
.stars { color: var(--mineral); display: inline-flex; align-items: center; gap: 3px; font-weight: 700; }

/* ---------- Aside de Luxo ---------- */
.aside { display: flex; flex-direction: column; gap: 28px; position: sticky; top: 100px; }
.panel {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px; box-shadow: var(--shadow); position: relative;
}
.panel h4 { font-family: var(--font-display); font-size: 14px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--accent); margin-bottom: 20px; font-weight: 800; }
.mostread-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 16px; }
.mostread-item { display: flex; gap: 16px; align-items: flex-start; }
.mostread-num { font-family: var(--font-display); font-weight: 900; font-size: 32px; color: var(--primary); line-height: 0.8; opacity: 0.35; width: 36px; }
.mostread-title { font-size: 14.5px; font-weight: 700; line-height: 1.3; color: var(--text); transition: color 0.2s; }
.mostread-item:hover .mostread-title { color: var(--primary); }

/* Rádio Chapada Neon Player */
.radio-box {
  background: linear-gradient(135deg, #1f1d19 0%, #0d0c0a 100%); color: #fff;
  border: 1px solid #332d24; border-radius: var(--radius-lg); padding: 24px;
}
.radio-wave { display: flex; align-items: flex-end; gap: 3px; height: 24px; }
.radio-bar { width: 3px; height: 4px; background: var(--primary); border-radius: 99px; transition: height 0.3s; }
.radio-bar.active { animation: dance 1.2s infinite ease-in-out alternate; }
.radio-bar:nth-child(2) { animation-delay: 0.2s; }
.radio-bar:nth-child(3) { animation-delay: 0.4s; }
.radio-bar:nth-child(4) { animation-delay: 0.1s; }
.radio-bar:nth-child(5) { animation-delay: 0.3s; }

@keyframes dance { 0% { height: 4px; } 100% { height: 24px; } }

/* ---------- Telas Editoriais / Fichas ---------- */
.hero-detail {
  position: relative; aspect-ratio: 21/9; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-lg); margin-top: 24px;
}
.hero-detail img { width: 100%; height: 100%; object-fit: cover; }
.hero-detail-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(10,9,7,0.9) 0%, rgba(10,9,7,0.3) 50%, rgba(10,9,7,0) 100%);
  display: flex; align-items: flex-end; padding: 40px;
}
.hero-detail-text { color: #fff; max-width: 800px; }
.hero-detail-text h1 { color: #fff; font-size: clamp(32px, 5vw, 56px); margin: 8px 0; }

.section-title { font-size: 32px; margin: 36px 0 16px; border-left: 4px solid var(--primary); padding-left: 16px; }

/* Grid de Detalhes */
.detail-grid { display: grid; grid-template-columns: 1fr 360px; gap: 36px; margin-top: 36px; align-items: start; }
.info-table { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.info-row { display: flex; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); font-size: 14.5px; }
.info-row:last-child { border-bottom: 0; }
.info-row span { color: var(--muted); }
.info-row b { font-weight: 700; }

/* ---------- Concierge IA Glass ---------- */
.concierge-fab {
  position: fixed; right: 28px; bottom: 28px; z-index: 50; display: flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px; background: var(--text); color: var(--surface);
  font-weight: 700; font-size: 14.5px; box-shadow: var(--shadow-lg); transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.concierge-fab:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.15); }
.concierge-fab .icon-spark { color: var(--mineral); }

.concierge-panel {
  position: fixed; right: 28px; bottom: 28px; z-index: 51; width: 380px; height: 560px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden;
  animation: popUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes popUp { from { transform: scale(0.9) translateY(40px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }

.concierge-header {
  padding: 20px; background: var(--text); color: var(--surface); display: flex;
  justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border);
}
.concierge-header h5 { font-family: var(--font-display); font-size: 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; color: var(--surface); }
.concierge-header .icon-spark { color: var(--mineral); }
.concierge-close { color: var(--surface); opacity: 0.6; font-size: 20px; font-weight: 700; transition: opacity 0.2s; }
.concierge-close:hover { opacity: 1; }

.concierge-body { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; background: var(--bg); }
.chat-msg { max-width: 85%; padding: 12px 16px; border-radius: 18px; font-size: 14px; line-height: 1.45; animation: msgIn 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.chat-msg.bot { background: var(--surface); border: 1px solid var(--border); align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.user { background: var(--primary); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
@keyframes msgIn { from { transform: translateY(10px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.concierge-foot { padding: 16px; border-top: 1px solid var(--border); display: flex; gap: 10px; background: var(--surface); }
.chat-input {
  flex: 1; padding: 12px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-family: inherit; font-size: 14px;
}
.chat-input:focus { outline: 2.5px solid var(--primary); border-color: transparent; }

/* Botões Globais Premium */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 999px;
  font-weight: 700; font-size: 14.5px; transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  background: var(--brand); color: #fff; border: 0; box-shadow: var(--shadow);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); filter: brightness(1.05); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.block { width: 100%; justify-content: center; }

/* ---------- Rodapé Premium ---------- */
.footer { background: var(--surface); border-top: 1px solid var(--border); padding: 60px 0 30px; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.footer-info p { color: var(--muted); font-size: 14.5px; margin-top: 16px; max-width: 300px; }
.footer-col h5 { font-family: var(--font-display); font-size: 13px; text-transform: uppercase; letter-spacing: 0.15em; color: var(--accent); margin-bottom: 20px; font-weight: 800; }
.footer-col a { display: block; padding: 6px 0; font-size: 14.5px; color: var(--muted); transition: color 0.2s; }
.footer-col a:hover { color: var(--primary); }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; color: var(--ink-300); }
.seal-mineral { font-weight: 700; color: var(--primary); display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Map Explore Custom Canvas ---------- */
.map-layout { display: grid; grid-template-columns: 340px 1fr; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; height: 600px; box-shadow: var(--shadow-lg); }
.map-canvas {
  position: relative; background:
    radial-gradient(circle at 20% 30%, color-mix(in srgb,var(--primary) 12%, transparent), transparent 45%),
    radial-gradient(circle at 80% 70%, color-mix(in srgb,var(--accent) 10%, transparent), transparent 45%),
    repeating-linear-gradient(0deg, var(--border) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, var(--border) 0 1px, transparent 1px 40px), var(--surface-2);
}
.map-pin { position: absolute; transform: translate(-50%,-100%); cursor: pointer; transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1); }
.map-pin:hover, .map-pin.active { transform: translate(-50%,-100%) scale(1.3); z-index: 5; }
.map-pin-dot {
  width: 24px; height: 24px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  background: var(--primary); border: 2.5px solid #fff; box-shadow: var(--shadow);
}
.map-pin.active .map-pin-dot { background: var(--accent); }

/* ---------- Outros Ajustes Responsivos ---------- */
@media (max-width: 980px) {
  .magazine-grid, .detail-grid, .oracle-grid, .map-layout { grid-template-columns: 1fr; }
  .aside { position: static; }
  .hero-materia { grid-template-columns: 1fr; }
  .map-layout { height: auto; }
  .map-canvas { height: 400px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav, .cond-chip { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
}
