/* ==========================================================
   TRIBU MAIL — Estilos compartidos
   Brand Guidelines 2025 — Neulis Sans + paleta oficial
   ========================================================== */

/* ---------- Fuente oficial Tribu: Neulis Sans ---------- */
@font-face {
  font-family: 'Neulis Sans';
  src: url('/assets/fonts/NeulisSans-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Neulis Sans';
  src: url('/assets/fonts/NeulisSans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Neulis Sans';
  src: url('/assets/fonts/NeulisSans-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Neulis Sans';
  src: url('/assets/fonts/NeulisSans-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Variables del brand ---------- */
:root {
  /* Paleta oficial Brand Guidelines 2025 */
  --navy: #00263E;            /* Tribu Blue — primario */
  --navy-light: #003858;
  --red: #FA3723;             /* Bright Red — secundario */
  --red-dark: #D02E1E;
  --cream: #F0DDB1;           /* Muted Yellow — terciario */
  --cream-soft: #FAF3E2;
  --gray-text: #4A5560;
  --gray-light: #E8ECEF;
  --gray-bg: #F7F9FA;

  /* Tipografía */
  --font-brand: 'Neulis Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  font-family: var(--font-brand);
  background: var(--gray-bg);
  color: var(--navy);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.65;
  font-weight: 400;
}

a { color: var(--red); }

/* ==========================================================
   Top Navigation Bar
   ========================================================== */
.topnav {
  background: var(--navy);
  color: white;
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(0, 38, 62, 0.15);
}

.topnav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.topnav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: white;
}

.topnav-logo {
  height: 28px;
  width: auto;
}

.topnav-divider {
  width: 1px;
  height: 22px;
  background: rgba(240, 221, 177, 0.25);
}

.topnav-page {
  font-size: 14px;
  color: var(--cream);
  font-weight: 500;
}

.topnav-back {
  font-size: 13px;
  color: rgba(240, 221, 177, 0.7);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 6px;
  border: 1px solid rgba(240, 221, 177, 0.2);
  transition: all 0.2s;
  font-weight: 500;
}

.topnav-back:hover {
  background: rgba(240, 221, 177, 0.1);
  border-color: rgba(240, 221, 177, 0.4);
  color: var(--cream);
}

/* ==========================================================
   Hero Section — con pattern "m" del brand como decoración
   ========================================================== */
.hero {
  background: var(--navy);
  color: white;
  padding: 56px 0 64px;
  position: relative;
  overflow: hidden;
}

/* Pattern "TT" oficial Tribu (outline del logo) — esquina superior derecha del hero, completo */
.hero::before {
  content: '';
  position: absolute;
  top: 36px;
  right: 32px;
  width: 460px;
  height: 277px;
  background-image: url('/assets/pattern-tt-outline.svg');
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.hero-tag {
  display: inline-block;
  background: var(--red);
  color: white;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.hero-title {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.1;
  margin-bottom: 16px;
  color: white;
}

.hero-title .accent { color: var(--cream); }

.hero-subtitle {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.78);
  max-width: 620px;
  line-height: 1.6;
  font-weight: 400;
}

/* Download CTA dentro del hero */
.hero-download {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(240, 221, 177, 0.1);
  border: 1px solid rgba(240, 221, 177, 0.25);
  color: var(--cream);
  padding: 11px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
}

.hero-download:hover {
  background: rgba(240, 221, 177, 0.18);
  border-color: rgba(240, 221, 177, 0.4);
  color: var(--cream);
}

.hero-download svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================
   Contenido principal
   ========================================================== */
.main {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.section {
  margin-bottom: 48px;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-eyebrow .num {
  background: var(--red);
  color: white;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.section h2 {
  font-size: 28px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 14px;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.section h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--navy);
  margin: 24px 0 10px 0;
}

.section p {
  font-size: 15px;
  color: var(--gray-text);
  margin-bottom: 14px;
  line-height: 1.7;
}

.section p strong, .section li strong {
  color: var(--navy);
  font-weight: 500;
}

.section ul, .section ol {
  margin: 12px 0 16px 24px;
  color: var(--gray-text);
}

.section li {
  margin-bottom: 8px;
  line-height: 1.65;
  font-size: 15px;
}

/* ==========================================================
   Cards
   ========================================================== */
.card {
  background: white;
  border: 1px solid var(--gray-light);
  border-radius: 12px;
  padding: 26px;
  margin-bottom: 20px;
  box-shadow: 0 2px 6px rgba(0, 38, 62, 0.04);
}

.card-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin: 20px 0;
}

/* ==========================================================
   Code blocks
   ========================================================== */
code {
  background: var(--gray-bg);
  border: 1px solid var(--gray-light);
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--navy);
  font-weight: 500;
}

/* ==========================================================
   Server data box — con pattern "m" decorativo
   ========================================================== */
.data-box {
  background: var(--navy);
  color: var(--cream);
  border-radius: 10px;
  padding: 24px 26px;
  margin: 18px 0;
  position: relative;
  overflow: hidden;
}

.data-box::before {
  content: '';
  position: absolute;
  top: -10px;
  right: -40px;
  width: 260px;
  height: 156px;
  background-image: url('/assets/pattern-tt-outline.svg');
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.22;
  pointer-events: none;
}

.data-box > * {
  position: relative;
  z-index: 1;
}

.data-box-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--red);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.data-item-label {
  font-size: 11px;
  color: rgba(240, 221, 177, 0.6);
  margin-bottom: 4px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-weight: 500;
}

.data-item-value {
  font-family: var(--font-mono);
  font-size: 14px;
  color: white;
  font-weight: 600;
}

/* ==========================================================
   Tabs (device selector)
   ========================================================== */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 24px 0;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--gray-light);
}

.tab {
  background: white;
  border: 1px solid var(--gray-light);
  color: var(--gray-text);
  padding: 9px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
}

.tab:hover {
  border-color: var(--navy);
  color: var(--navy);
}

.tab.active {
  background: var(--navy);
  color: var(--cream);
  border-color: var(--navy);
  font-weight: 700;
}

.tab svg {
  width: 16px;
  height: 16px;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   Steps
   ========================================================== */
.steps {
  counter-reset: step;
  margin: 18px 0;
}

.step {
  counter-increment: step;
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  position: relative;
}

.step::before {
  content: counter(step);
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: var(--navy);
  color: var(--cream);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.step-content {
  flex: 1;
  padding-top: 4px;
}

.step-title {
  font-weight: 700;
  color: var(--navy);
  font-size: 16px;
  margin-bottom: 6px;
}

.step-detail {
  color: var(--gray-text);
  font-size: 14.5px;
  line-height: 1.65;
}

.step-detail strong { color: var(--navy); font-weight: 500; }

/* ==========================================================
   Alerts
   ========================================================== */
.alert {
  padding: 14px 18px;
  border-radius: 8px;
  margin: 16px 0;
  font-size: 14px;
  line-height: 1.55;
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.alert-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
}

.alert-warning {
  background: #FFF4E6;
  border-left: 4px solid #F59E0B;
  color: #78350F;
}
.alert-warning .alert-icon { color: #F59E0B; }

.alert-info {
  background: #E8F0F7;
  border-left: 4px solid var(--navy);
  color: var(--navy);
}
.alert-info .alert-icon { color: var(--navy); }

.alert-success {
  background: #E8F4EC;
  border-left: 4px solid #2D7D46;
  color: #1A4D2E;
}
.alert-success .alert-icon { color: #2D7D46; }

.alert-danger {
  background: #FFEBE8;
  border-left: 4px solid var(--red);
  color: #7C1D14;
}
.alert-danger .alert-icon { color: var(--red); }

.alert strong { color: inherit; font-weight: 700; }

/* ==========================================================
   Buttons / CTAs
   ========================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-primary {
  background: var(--red);
  color: white;
}

.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

.btn-secondary {
  background: white;
  color: var(--navy);
  border: 1px solid var(--gray-light);
}

.btn-secondary:hover {
  border-color: var(--navy);
}

.btn svg {
  width: 18px;
  height: 18px;
}

/* ==========================================================
   Bottom Support CTA — con pattern "m" sutil
   ========================================================== */
.support-cta {
  background: var(--navy);
  border-radius: 12px;
  padding: 28px;
  text-align: center;
  margin: 40px 0 20px;
  color: white;
  position: relative;
  overflow: hidden;
}

.support-cta::before {
  content: '';
  position: absolute;
  top: -20px;
  right: -50px;
  width: 320px;
  height: 192px;
  background-image: url('/assets/pattern-tt-outline.svg');
  background-repeat: no-repeat;
  background-size: contain;
  opacity: 0.18;
  pointer-events: none;
}

.support-cta > * {
  position: relative;
  z-index: 1;
}

.support-cta h3 {
  color: var(--cream);
  font-size: 18px;
  margin-bottom: 8px;
  font-weight: 700;
}

.support-cta p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 16px;
  font-size: 14px;
}

.support-cta a {
  color: var(--cream);
  font-weight: 600;
  font-family: var(--font-mono);
  text-decoration: none;
}

.support-cta a:hover { text-decoration: underline; }

/* ==========================================================
   Page Footer
   ========================================================== */
.page-footer {
  text-align: center;
  padding: 30px 24px;
  font-size: 12px;
  color: rgba(74, 85, 96, 0.6);
  border-top: 1px solid var(--gray-light);
  font-weight: 400;
}

/* ==========================================================
   Helpers
   ========================================================== */
.icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ==========================================================
   Mobile adjustments
   ========================================================== */
@media (max-width: 600px) {
  .hero { padding: 40px 0 48px; }
  .hero-title { font-size: 28px; }
  .hero::before { width: 280px; height: 169px; right: 16px; top: 20px; opacity: 0.14; }
  .topnav-page { display: none; }
  .topnav-divider { display: none; }
  .main { padding: 32px 20px 60px; }
  .card { padding: 20px; }
  .data-grid { grid-template-columns: 1fr; }
  .data-box::before { width: 180px; height: 108px; }
  .support-cta::before { width: 220px; height: 132px; }
}
