/* ============================================================
   Ruy May — Manual de Identidad Visual Corporativa
   style.css v1.0 | ServiTecHub
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

/* ── Brand Tokens ─────────────────────────────────────────── */
:root {
  --brand-primary:    #3B8E91;
  --brand-secondary:  #C9E8DA;
  --brand-dark:       #0D1F20;
  --brand-text:       #2D2D2D;
  --brand-white:      #FFFFFF;
  --brand-light-bg:   #F4FAF8;

  --font-headings:    'Poppins', sans-serif;
  --font-body:        'Inter', sans-serif;

  --section-padding:  5rem 2rem;
  --radius:           12px;
  --shadow:           0 4px 24px rgba(59, 142, 145, 0.12);
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--brand-text);
  line-height: 1.7;
  background: var(--brand-white);
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5 { font-family: var(--font-headings); line-height: 1.2; }

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; text-transform: uppercase; letter-spacing: 2px; }
h3 { font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 600; }
h4 { font-size: 1.1rem; font-weight: 600; }
p  { max-width: 720px; margin-bottom: 1rem; }

.section-tag {
  font-family: var(--font-headings);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--brand-primary);
  margin-bottom: 1rem;
  display: block;
}
.bg-dark .section-tag { color: var(--brand-secondary); }
.cover-slide .section-tag { color: var(--brand-secondary); }

/* ── Layout ───────────────────────────────────────────────── */
section {
  min-height: 100vh;
  padding: var(--section-padding);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  border-bottom: 1px solid #E8F3F4;
}

section.align-left {
  align-items: flex-start;
  text-align: left;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
}

/* ── Background Variants ──────────────────────────────────── */
.bg-light {
  background-color: var(--brand-light-bg);
}

.bg-primary {
  background-color: var(--brand-primary);
  color: var(--brand-white);
}
.bg-primary h1, .bg-primary h2, .bg-primary h3, .bg-primary p,
.bg-primary .section-tag { color: var(--brand-white); }
.bg-primary .section-tag { color: var(--brand-secondary); opacity: 0.9; }

.bg-secondary {
  background-color: var(--brand-secondary);
  color: var(--brand-dark);
}

.bg-dark {
  background-color: var(--brand-dark);
  color: var(--brand-white);
}
.bg-dark h1, .bg-dark h2, .bg-dark h3, .bg-dark h4, .bg-dark p { color: var(--brand-white); }
.bg-dark .section-tag { color: var(--brand-secondary); }

/* ── Cover / Portada ──────────────────────────────────────── */
.cover-slide {
  background: linear-gradient(150deg, var(--brand-dark) 0%, #1A4547 50%, var(--brand-primary) 100%);
  color: var(--brand-white);
  position: relative;
  overflow: hidden;
}

.cover-slide::before {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: rgba(201, 232, 218, 0.06);
  top: -150px;
  right: -150px;
  pointer-events: none;
}

.cover-slide::after {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(59, 142, 145, 0.15);
  bottom: -100px;
  left: -100px;
  pointer-events: none;
}

/* Gradient invertido para bookending (sección de cierre) */
.closing-slide {
  background: linear-gradient(330deg, var(--brand-dark) 0%, #1A4547 50%, var(--brand-primary) 100%);
}

.cover-logo {
  max-height: 160px;
  width: auto;
  margin-bottom: 3rem;
  filter: brightness(0) invert(1);
}

.cover-title { color: var(--brand-white); }
.cover-subtitle {
  color: var(--brand-secondary);
  font-family: var(--font-headings);
  font-weight: 300;
  letter-spacing: 5px;
  text-transform: uppercase;
  font-size: clamp(0.75rem, 2vw, 1rem);
  margin-bottom: 2rem;
}

.cover-meta {
  margin-top: 3rem;
  display: flex;
  gap: 3rem;
  justify-content: center;
  flex-wrap: wrap;
}

.cover-meta-item {
  text-align: center;
}

.cover-meta-item .label {
  font-size: 0.7rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--brand-secondary);
  opacity: 0.8;
  display: block;
  margin-bottom: 0.3rem;
}

.cover-meta-item .value {
  font-family: var(--font-headings);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--brand-white);
}

/* ── Archetype Cards ──────────────────────────────────────── */
.archetype-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
  text-align: left;
}

.archetype-card {
  background: var(--brand-white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--brand-primary);
}

.archetype-card .percentage {
  font-size: 3rem;
  font-weight: 800;
  font-family: var(--font-headings);
  color: var(--brand-primary);
  line-height: 1;
}

.archetype-card h4 { margin: 0.5rem 0; }
.archetype-card p  { font-size: 0.9rem; color: #555; margin: 0; }

/* ── Logo Display ─────────────────────────────────────────── */
.logo-showcase {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}

.logo-display {
  background: var(--brand-white);
  border-radius: var(--radius);
  padding: 3rem 4rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.logo-display.dark-bg {
  background: var(--brand-dark);
}

.logo-display.mint-bg {
  background: var(--brand-secondary);
}

.logo-display img {
  max-height: 180px;
  width: auto;
  max-width: 380px;
}

.logo-display .logo-label {
  font-family: var(--font-headings);
  font-size: 0.7rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #888;
  margin-top: 0.5rem;
}

.logo-display.dark-bg .logo-label { color: rgba(255,255,255,0.5); }

/* ── Logo Anatomy ─────────────────────────────────────────── */
.anatomy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
  text-align: left;
}

.anatomy-item {
  background: var(--brand-white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--brand-primary);
}

.anatomy-item .element-tag {
  font-family: var(--font-headings);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--brand-primary);
}

.anatomy-item h4 { font-size: 0.95rem; margin: 0.4rem 0; }
.anatomy-item p  { font-size: 0.85rem; color: #666; margin: 0; }

/* ── Clear Space ──────────────────────────────────────────── */
.clearspace-demo {
  position: relative;
  display: inline-block;
  margin: 3rem auto;
  border: 2px dashed var(--brand-secondary);
  padding: 3rem;
  border-radius: var(--radius);
}

.clearspace-demo img { max-height: 120px; display: block; }

.clearspace-label {
  position: absolute;
  top: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--brand-primary);
  white-space: nowrap;
}

/* ── Logo Variations ──────────────────────────────────────── */
.variations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.variation-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.variation-preview {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.variation-preview img {
  max-height: 140px;
  max-width: 100%;
  width: auto;
}

.variation-preview.white-bg  { background: #FFFFFF; border: 1px solid #E8F3F4; }
.variation-preview.light-bg  { background: var(--brand-light-bg); }
.variation-preview.dark-bg   { background: var(--brand-dark); }
.variation-preview.mint-bg   { background: var(--brand-secondary); }
.variation-preview.teal-bg   { background: var(--brand-primary); }

/* Placeholder para variaciones pendientes (Nano Banana) */
.variation-placeholder {
  height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  border: 2px dashed rgba(59, 142, 145, 0.4);
  border-radius: var(--radius) var(--radius) 0 0;
}

.variation-placeholder .placeholder-icon {
  font-size: 2rem;
  opacity: 0.4;
}

.variation-placeholder .placeholder-text {
  font-family: var(--font-headings);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #999;
  text-align: center;
}

.variation-placeholder.dark-bg {
  background: var(--brand-dark);
  border-color: rgba(201, 232, 218, 0.3);
}
.variation-placeholder.dark-bg .placeholder-text { color: rgba(255,255,255,0.4); }

.variation-placeholder.mint-bg {
  background: var(--brand-secondary);
  border-color: rgba(59, 142, 145, 0.4);
}

.variation-info {
  background: var(--brand-white);
  padding: 1.25rem 1.5rem;
}

.variation-info h4 { font-size: 0.9rem; margin-bottom: 0.25rem; }
.variation-info p  { font-size: 0.8rem; color: #777; margin: 0; }
.variation-info .file-tag {
  font-family: monospace;
  font-size: 0.72rem;
  color: var(--brand-primary);
  background: var(--brand-light-bg);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
  margin-top: 0.5rem;
}

/* ── Color Palette ────────────────────────────────────────── */
.color-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
  text-align: left;
}

.color-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.color-swatch { height: 160px; width: 100%; }

.color-info {
  background: var(--brand-white);
  padding: 1.25rem;
}

.color-info h4 { font-size: 0.95rem; margin-bottom: 0.5rem; }

.color-data {
  font-family: monospace;
  font-size: 0.78rem;
  color: #666;
  margin-bottom: 0.2rem;
}

.color-role {
  display: inline-block;
  font-size: 0.65rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  background: var(--brand-light-bg);
  color: var(--brand-primary);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  margin-bottom: 0.75rem;
}

/* ── Typography Showcase ──────────────────────────────────── */
.type-block {
  background: var(--brand-white);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow);
  text-align: left;
  margin-top: 2rem;
}

.type-block + .type-block { margin-top: 1.5rem; }

.type-family-name {
  font-size: 0.7rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--brand-primary);
  margin-bottom: 1.5rem;
  display: block;
}

.type-sample-h1 { font-family: var(--font-headings); font-size: 3rem; font-weight: 800; color: var(--brand-text); }
.type-sample-h2 { font-family: var(--font-headings); font-size: 2rem; font-weight: 700; color: var(--brand-text); }
.type-sample-h3 { font-family: var(--font-headings); font-size: 1.4rem; font-weight: 600; color: var(--brand-text); }
.type-sample-body { font-family: var(--font-body); font-size: 1rem; font-weight: 400; color: #555; line-height: 1.8; }
.type-sample-small { font-family: var(--font-body); font-size: 0.85rem; color: #888; letter-spacing: 1px; }

.weight-grid {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.weight-item { flex: 1; min-width: 120px; }
.weight-item .weight-name { font-size: 0.65rem; letter-spacing: 2px; text-transform: uppercase; color: #999; }
.weight-item .weight-sample { font-size: 1.5rem; margin-top: 0.25rem; color: var(--brand-text); }

/* ── Dos & Don'ts ─────────────────────────────────────────── */
.rules-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2.5rem;
  text-align: left;
}

@media (max-width: 600px) { .rules-grid { grid-template-columns: 1fr; } }

.do-card, .dont-card {
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.do-card {
  border-left: 5px solid #2DC07A;
  background: #F0FBF5;
}

.dont-card {
  border-left: 5px solid #E55353;
  background: #FEF4F4;
}

.rule-header {
  font-family: var(--font-headings);
  font-size: 0.7rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.do-card .rule-header  { color: #2DC07A; }
.dont-card .rule-header { color: #E55353; }

.rule-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.rule-item::before {
  content: '•';
  color: var(--brand-primary);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.dont-card .rule-item::before { color: #E55353; }
.rule-item p { font-size: 0.88rem; margin: 0; color: #555; }

/* ── Mockups ──────────────────────────────────────────────── */
.mockup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

/* Tarjeta de presentación */
.business-card-mockup {
  background: var(--brand-white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.business-card {
  width: 100%;
  aspect-ratio: 1.75;
  border-radius: 8px;
  background: var(--brand-primary);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.business-card::before {
  content: '';
  position: absolute;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(201, 232, 218, 0.15);
  bottom: -30px;
  right: -30px;
}

.business-card-logo { max-height: 32px; filter: brightness(0) invert(1); }

.business-card-name {
  font-family: var(--font-headings);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand-white);
}

.business-card-title {
  font-size: 0.65rem;
  color: var(--brand-secondary);
  letter-spacing: 1px;
  margin-top: 0.15rem;
}

.business-card-contact {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
}

/* Membrete */
.letterhead-mockup {
  background: var(--brand-white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.letterhead {
  background: var(--brand-white);
  border: 1px solid #eee;
  border-radius: 6px;
  overflow: hidden;
}

.letterhead-header {
  background: var(--brand-primary);
  padding: 1.2rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.letterhead-header img { max-height: 28px; filter: brightness(0) invert(1); }

.letterhead-tagline {
  font-family: var(--font-headings);
  font-size: 0.55rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--brand-secondary);
}

.letterhead-body { padding: 1.5rem; }

.letterhead-line {
  height: 8px;
  border-radius: 4px;
  background: #eee;
  margin-bottom: 0.6rem;
}

.letterhead-line:first-child { width: 60%; background: #ddd; }
.letterhead-line:nth-child(2) { width: 90%; }
.letterhead-line:nth-child(3) { width: 75%; }
.letterhead-line:nth-child(4) { width: 85%; }

.letterhead-accent-line {
  height: 4px;
  background: var(--brand-secondary);
  border-radius: 2px;
  margin-top: 1rem;
}

/* App Card Mockup */
.app-card-mockup {
  background: var(--brand-white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.app-card {
  background: var(--brand-dark);
  border-radius: 10px;
  padding: 1.5rem;
  color: var(--brand-white);
}

.app-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.app-card-icon {
  width: 36px;
  height: 36px;
  background: var(--brand-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.app-card-title { font-family: var(--font-headings); font-size: 0.85rem; font-weight: 600; }
.app-card-subtitle { font-size: 0.65rem; color: var(--brand-secondary); opacity: 0.8; }

.app-card-stat {
  text-align: center;
  padding: 0.75rem;
  background: rgba(59, 142, 145, 0.2);
  border-radius: 8px;
}

.app-card-stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.5rem; margin-bottom: 1rem; }

.app-card-stat-number {
  font-family: var(--font-headings);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--brand-secondary);
  display: block;
}

.app-card-stat-label { font-size: 0.55rem; letter-spacing: 1px; text-transform: uppercase; color: rgba(255,255,255,0.5); }

.app-card-bar-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.app-card-bar-label { font-size: 0.65rem; color: rgba(255,255,255,0.6); width: 70px; text-align: right; flex-shrink: 0; }
.app-card-bar-track { flex: 1; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; overflow: hidden; }
.app-card-bar-fill  { height: 100%; background: var(--brand-primary); border-radius: 3px; }
.app-card-bar-pct  { font-size: 0.6rem; color: rgba(255,255,255,0.5); width: 28px; }

.mockup-label {
  font-family: var(--font-headings);
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #999;
  text-align: center;
  margin-top: 1rem;
}

/* ── Footer / Credits ─────────────────────────────────────── */
.footer-section {
  min-height: auto;
  background: var(--brand-dark);
  color: var(--brand-white);
  padding: 4rem 2rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
  text-align: left;
}

.contact-item { display: flex; flex-direction: column; gap: 0.25rem; }
.contact-item .contact-label {
  font-size: 0.65rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--brand-secondary);
  opacity: 0.8;
}
.contact-item .contact-value { font-size: 0.95rem; color: var(--brand-white); }

.brand-credits {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.brand-credits img { height: 36px; width: auto; opacity: 0.85; }

.brand-credits-text {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  letter-spacing: 1px;
}

/* ── Variation Matrix ────────────────────────────────────── */
.var-matrix {
  display: grid;
  grid-template-columns: 150px 1fr 1fr 200px;
  gap: 2px;
  background: #0D1F20;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(13, 31, 32, 0.3);
  width: 100%;
  margin-top: 2rem;
}

.var-header-skip {
  background: #0D1F20;
}

.var-col-head {
  background: #0D1F20;
  color: var(--brand-secondary);
  text-align: center;
  padding: 1rem 0.75rem;
  font-family: var(--font-headings);
  font-size: 0.65rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.var-row-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 1.25rem 1.25rem;
  background: #122628;
  gap: 0.3rem;
}

.var-row-head strong {
  font-family: var(--font-headings);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brand-secondary);
  display: block;
}

.var-row-head span {
  font-size: 0.62rem;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.4;
}

.var-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
  min-height: 160px;
}

.var-cell img {
  max-height: 100px;
  max-width: 100%;
  object-fit: contain;
}

.var-pending {
  font-family: var(--font-headings);
  font-size: 0.6rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #bbb;
  text-align: center;
}

@media (max-width: 900px) {
  .var-matrix { grid-template-columns: 90px 1fr 1fr 90px; }
  .var-col-head { font-size: 0.5rem; letter-spacing: 1px; padding: 0.75rem 0.25rem; }
  .var-row-head { padding: 0.75rem; }
  .var-row-head strong { font-size: 0.65rem; }
  .var-row-head span { display: none; }
  .var-cell { padding: 1rem 0.5rem; min-height: 100px; }
  .var-cell img { max-height: 65px; }
}

/* ── Print ────────────────────────────────────────────────── */
@media print {
  @page { size: landscape; margin: 0; }
  body { background-color: white !important; }
  section {
    page-break-after: always;
    min-height: 100vh;
    border-bottom: none;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .color-card, .rules-grid > div, .variation-card { page-break-inside: avoid; }
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 768px) {
  section { padding: 4rem 1.25rem; }
  .archetype-grid { grid-template-columns: 1fr; }
  .variations-grid { grid-template-columns: 1fr; }
  .mockup-grid { grid-template-columns: 1fr; }
  .weight-grid { flex-direction: column; }
}
