/* ==========================================================================
   iBUILD São Carlos — Apresentação Comercial Exclusiva
   Design System & Luxury Presentation Styles
   ========================================================================== */

:root {
  --bg-primary: #111113;
  --bg-secondary: #17171a;
  --bg-surface: #1e1e23;
  --bg-card: rgba(255, 255, 255, 0.035);
  --bg-card-hover: rgba(255, 255, 255, 0.065);
  --bg-card-active: rgba(200, 169, 110, 0.08);

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-card: rgba(255, 255, 255, 0.05);
  --border-gold: rgba(200, 169, 110, 0.35);
  --border-gold-solid: #C8A96E;

  --gold: #C8A96E;
  --gold-light: #E0C792;
  --gold-dark: #A88647;
  --gold-glow: rgba(200, 169, 110, 0.15);

  --teal: #2A646B;
  --teal-light: #3E8E98;
  --teal-glow: rgba(42, 100, 107, 0.2);

  --text-main: #F5F5F7;
  --text-muted: #A1A1A6;
  --text-dim: #71717A;
  --text-gold: #D4BC8A;

  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --header-height: 68px;
  --footer-height: 56px;
}

[data-theme="light"] {
  --bg-primary: #F8F9FA;
  --bg-secondary: #FFFFFF;
  --bg-surface: #F0F2F5;
  --bg-card: rgba(0, 0, 0, 0.03);
  --bg-card-hover: rgba(0, 0, 0, 0.055);
  --bg-card-active: rgba(200, 169, 110, 0.12);

  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-card: rgba(0, 0, 0, 0.06);
  --border-gold: rgba(168, 134, 71, 0.4);

  --text-main: #1D1D1F;
  --text-muted: #55555A;
  --text-dim: #8E8E93;
  --text-gold: #9E7D47;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
  user-select: none;
}

/* ==========================================================================
   App Container & Header
   ========================================================================== */

.app-wrapper {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  position: relative;
  background: radial-gradient(circle at 50% 10%, rgba(200, 169, 110, 0.04) 0%, rgba(17, 17, 19, 0) 65%);
}

.top-nav {
  height: var(--header-height);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(17, 17, 19, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 50;
  flex-shrink: 0;
}

[data-theme="light"] .top-nav {
  background: rgba(248, 249, 250, 0.82);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
  filter: brightness(1.1);
}

.brand-badge {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(200, 169, 110, 0.1);
  border: 1px solid var(--border-gold);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}

/* Track Switcher */
.track-selector-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 4px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
}

[data-theme="light"] .track-selector-bar {
  background: rgba(0, 0, 0, 0.04);
}

.track-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.25s var(--ease-smooth);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.track-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.track-btn.active {
  background: var(--gold);
  color: #111113;
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(200, 169, 110, 0.3);
}

.track-count {
  font-size: 0.72rem;
  opacity: 0.8;
  padding: 1px 6px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 10px;
}

.track-btn.active .track-count {
  background: rgba(0, 0, 0, 0.25);
  color: #FFF;
}

/* Presenter Tool Controls */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-tool-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
}

.nav-tool-btn:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.15);
}

.nav-tool-btn.active {
  background: var(--bg-card-active);
  border-color: var(--border-gold);
  color: var(--gold);
}

.key-hint {
  font-size: 0.65rem;
  opacity: 0.6;
  background: rgba(255, 255, 255, 0.1);
  padding: 1px 4px;
  border-radius: 4px;
}

/* ==========================================================================
   Main Presentation Viewport
   ========================================================================== */

.slide-viewport {
  flex: 1;
  width: 100%;
  height: calc(100vh - var(--header-height) - var(--footer-height));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 24px 36px;
  overflow: hidden;
}

.slide-stage {
  width: 100%;
  max-width: 1400px;
  height: 100%;
  max-height: 800px;
  aspect-ratio: 16 / 9;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide-card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
  padding: 44px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.98) translateY(12px);
  transition: opacity 0.4s var(--ease-smooth), transform 0.4s var(--ease-smooth);
  overflow: hidden;
  user-select: text;
}

[data-theme="light"] .slide-card {
  background: #FFFFFF;
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.slide-card.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1) translateY(0);
  z-index: 10;
}

/* Slide Header & Metadata */
.slide-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-shrink: 0;
}

.category-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-tag::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--gold);
  border-radius: 50%;
}

.slide-title-group h2 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-main);
  line-height: 1.15;
  margin-bottom: 8px;
}

.slide-title-group p.subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 400;
  line-height: 1.4;
}

/* Slide Content Layouts */
.slide-body {
  flex: 1;
  width: 100%;
  display: grid;
  align-items: center;
  gap: 36px;
  overflow: hidden;
  position: relative;
}

/* Two Columns Layout */
.layout-split {
  grid-template-columns: 1.1fr 0.9fr;
}

.layout-split-reversed {
  grid-template-columns: 0.9fr 1.1fr;
}

/* Three Columns Grid */
.layout-3col {
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

/* Full Hero Layout */
.layout-hero {
  grid-template-columns: 1fr;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
}

/* Content Elements */
.bullet-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bullet-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  padding: 16px 20px;
  border-radius: var(--radius-md);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.bullet-item:hover {
  transform: translateX(4px);
  border-color: var(--border-gold);
}

.bullet-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(200, 169, 110, 0.15);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  margin-top: 2px;
}

.bullet-text h4 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.bullet-text p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Image Displays */
.slide-media-wrap {
  width: 100%;
  height: 100%;
  max-height: 480px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--border-subtle);
  background: #000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  cursor: pointer;
}

.slide-media-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s var(--ease-smooth);
}

.slide-media-wrap:hover img {
  transform: scale(1.03);
}

.media-caption-badge {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(17, 17, 19, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Metric / Stat Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  padding: 24px;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--gold) 0%, transparent 100%);
}

.stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1.1;
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}

.stat-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 4px;
}

.stat-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Comparison Table (Steel Frame vs Alvenaria) */
.comparison-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
}

.comp-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
}

.comp-box.featured {
  border-color: var(--border-gold);
  background: linear-gradient(180deg, rgba(200, 169, 110, 0.07) 0%, rgba(200, 169, 110, 0.02) 100%);
  box-shadow: 0 0 30px rgba(200, 169, 110, 0.1);
}

.comp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.comp-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
}

.comp-tag {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.comp-tag.highlight {
  background: var(--gold);
  color: #111;
}

.comp-tag.muted {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-muted);
}

.comp-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comp-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.comp-item strong {
  color: var(--text-main);
}

.comp-box.featured .comp-item strong {
  color: var(--gold);
}

/* Layer Explorer (8 Camadas) */
.layers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  width: 100%;
}

.layer-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  padding: 16px;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.layer-num {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--gold);
}

.layer-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
}

.layer-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Bottom Navigation & Controls
   ========================================================================== */

.bottom-control-bar {
  height: var(--footer-height);
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: rgba(17, 17, 19, 0.85);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-subtle);
  z-index: 50;
  flex-shrink: 0;
}

[data-theme="light"] .bottom-control-bar {
  background: rgba(248, 249, 250, 0.85);
}

.progress-container {
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.progress-track {
  flex: 1;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

[data-theme="light"] .progress-track {
  background: rgba(0, 0, 0, 0.1);
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--gold);
  border-radius: 2px;
  transition: width 0.3s var(--ease-smooth);
}

.slide-counter {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.slide-counter span.current {
  color: var(--gold);
}

.nav-buttons-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slide-nav-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 18px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.slide-nav-btn:hover:not(:disabled) {
  background: var(--gold);
  color: #111;
  border-color: var(--gold);
  box-shadow: 0 2px 10px rgba(200, 169, 110, 0.3);
}

.slide-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

/* ==========================================================================
   Presenter Notes Drawer (Sidebar)
   ========================================================================== */

.notes-drawer {
  position: fixed;
  top: var(--header-height);
  right: -420px;
  width: 400px;
  height: calc(100vh - var(--header-height) - var(--footer-height));
  background: var(--bg-surface);
  border-left: 1px solid var(--border-gold);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  z-index: 60;
  display: flex;
  flex-direction: column;
  transition: right 0.35s var(--ease-smooth);
  user-select: text;
}

.notes-drawer.open {
  right: 0;
}

.notes-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notes-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 8px;
}

.close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.2rem;
  padding: 4px;
}

.notes-content {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.notes-box {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
}

.notes-box-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 8px;
}

.notes-box ul {
  padding-left: 18px;
  color: var(--text-muted);
}

.notes-box li {
  margin-bottom: 6px;
}

/* ==========================================================================
   Slide Grid Modal (Quick Jump)
   ========================================================================== */

.grid-modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 12, 0.88);
  backdrop-filter: blur(15px);
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 32px 48px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.grid-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.grid-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.grid-cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  overflow-y: auto;
  padding-bottom: 30px;
}

.grid-thumb-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  aspect-ratio: 16 / 9;
  transition: all 0.2s ease;
}

.grid-thumb-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
}

.grid-thumb-card.active {
  border-color: var(--gold);
  background: var(--bg-card-active);
  box-shadow: 0 0 0 2px var(--gold);
}

.grid-thumb-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
}

.grid-thumb-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.3;
}

/* Responsive */
@media (max-width: 1024px) {
  .top-nav {
    padding: 0 16px;
  }
  .track-selector-bar {
    overflow-x: auto;
  }
  .slide-stage {
    max-height: 90%;
  }
  .slide-card {
    padding: 24px 28px;
  }
  .layout-split, .layout-split-reversed {
    grid-template-columns: 1fr;
    overflow-y: auto;
  }
  .slide-title-group h2 {
    font-size: 1.7rem;
  }
}

