/* ============================================================
   KAIZEN INGENIERÍA — Sitio web v1
   Paleta Tiza · Logo Kumiko 09e
   ============================================================ */

:root {
  /* Paleta Tiza */
  --paper: #F5F2E8;
  --paper-2: #EAE5D4;
  --paper-3: #E0DBC8;
  --ash: #9A9080;
  --sepia: #5A5146;
  --graphite: #1F1A14;
  --ink: #0F0A05;
  --red: #BC002D;
  --red-deep: #8F001F;
  --red-bright: #E8304B;
  --red-soft: rgba(188, 0, 45, 0.07);
  --line: rgba(31, 26, 20, 0.12);
  --line-2: rgba(31, 26, 20, 0.06);

  /* Tipografía */
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-wordmark: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'Courier New', monospace;

  /* Contenedores */
  --c-narrow: 780px;
  --c-normal: 1180px;
  --c-wide: 1380px;
  --gutter: 32px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--graphite);
  line-height: 1.55;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: 72px; /* room for preview bar */
}

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font-family: inherit; font-size: inherit; }

/* ============================================================
   Typography
   ============================================================ */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sepia);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--red);
}

.section-marker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--red);
  font-weight: 500;
  text-transform: uppercase;
}

.section-marker::before { content: "§ "; }

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

h1 { font-weight: 300; }
h2 { font-weight: 300; }
h3 { font-weight: 600; }

em, .italic { font-style: italic; }

.mono {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.text-dim { color: var(--sepia); }
.text-red { color: var(--red); }

/* ============================================================
   Layout primitives
   ============================================================ */

.container { width: 100%; max-width: var(--c-normal); margin: 0 auto; padding: 0 var(--gutter); }
.container-wide { max-width: var(--c-wide); }
.container-narrow { max-width: var(--c-narrow); }

section { padding: 96px 0; position: relative; }
section.tight { padding: 64px 0; }

.divider {
  height: 1px;
  background: var(--line);
  border: none;
  margin: 0;
}

.blueprint-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(31,26,20,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(31,26,20,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

/* ============================================================
   Navbar
   ============================================================ */

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(15, 10, 5, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(232, 48, 75, 0.18);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--c-wide);
  margin: 0 auto;
  padding: 14px var(--gutter);
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-logo svg { height: 32px; width: auto; }

.nav-logo-wordmark {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1;
}

.nav-logo-text {
  font-family: var(--font-wordmark);
  font-weight: 500;
  letter-spacing: 3px;
  font-size: 15px;
  color: var(--paper);
  line-height: 1;
}

.nav-logo-text .ai { color: var(--red-bright); }

.nav-logo-tagline {
  font-family: var(--font-wordmark);
  font-weight: 400;
  letter-spacing: 1.6px;
  font-size: 7.5px;
  color: var(--paper-3);
  opacity: 0.75;
  line-height: 1;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.nav-links a {
  padding: 8px 14px;
  font-size: 13px;
  color: var(--paper-3);
  font-weight: 500;
  letter-spacing: 0.005em;
  transition: color 180ms ease;
  position: relative;
}

.nav-links a:hover,
.nav-links a.active { color: var(--paper); }

.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--red-bright);
}

.nav-cta {
  padding: 9px 18px;
  background: var(--red);
  color: var(--paper);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.03em;
  transition: all 180ms ease;
}

.nav-cta:hover {
  background: var(--paper);
  color: var(--ink);
}

.nav-toggle { display: none; }

/* ============================================================
   Hero
   ============================================================ */

.hero {
  position: relative;
  padding: 80px 0 104px;
  overflow: hidden;
}

.hero-inner { position: relative; z-index: 1; }

.hero-ficha {
  position: absolute;
  top: 24px;
  right: var(--gutter);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sepia);
  text-align: right;
  line-height: 1.7;
  z-index: 2;
}
.hero-ficha b { color: var(--red); font-weight: 500; }

.hero-eyebrow { margin-bottom: 40px; }

.hero-mark-group {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.hero-mark-logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-mark-logo svg {
  width: 96px;
  height: 96px;
}

.hero-mark-group .hero-eyebrow { margin-bottom: 0; }

.hero h1 {
  font-size: clamp(44px, 7.5vw, 112px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 300;
  color: var(--ink);
  max-width: 18ch;
}

.hero h1 em {
  font-style: italic;
  font-weight: 300;
  color: var(--ink);
}

.hero h1 .accent {
  font-style: italic;
  font-weight: 400;
  color: var(--red);
  position: relative;
}

.hero-sub {
  margin-top: 32px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--sepia);
  max-width: 580px;
  font-weight: 300;
}

.hero-meta {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}

.hero-meta-cell {
  padding: 24px 24px 24px 0;
  border-right: 1px solid var(--line);
}

.hero-meta-cell:last-child { border-right: none; padding-right: 0; }
.hero-meta-cell:not(:first-child) { padding-left: 24px; }

.hero-meta-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sepia);
  margin-bottom: 8px;
}

.hero-meta-value {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 300;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.hero-meta-value em {
  font-style: italic;
  color: var(--red);
}

.hero-meta-note {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--sepia);
  margin-top: 4px;
  letter-spacing: 0.04em;
}

.hero-cta-row {
  margin-top: 48px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 200ms ease;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--red);
  color: #fff;
}
.btn-primary:hover {
  background: var(--red-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn-link {
  padding: 0;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  background: transparent;
}

.btn-link:hover { color: var(--red); border-color: var(--red); }

.btn-arrow::after {
  content: "→";
  transition: transform 200ms ease;
}

.btn-arrow:hover::after { transform: translateX(4px); }

/* ============================================================
   Service index (legacy — mantengo por si se usa en otras páginas)
   ============================================================ */

.service-index {
  list-style: none;
  border-top: 1px solid var(--ink);
}

.service-item {
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 80px 1fr 1fr 180px;
  gap: 32px;
  padding: 36px 0;
  align-items: start;
  transition: background 250ms ease;
  position: relative;
}

.service-item:hover { background: var(--paper-2); padding-left: 12px; padding-right: 12px; }

.service-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--red);
  padding-top: 6px;
}

.service-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.service-title em { font-style: italic; font-weight: 300; color: var(--red); }

.service-desc {
  font-size: 15px;
  color: var(--sepia);
  line-height: 1.55;
  padding-top: 8px;
}

.service-tags {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 8px;
  margin: 0;
}

.service-tags li {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 400;
  color: var(--red);
  letter-spacing: -0.005em;
  line-height: 1.3;
}

.service-link {
  padding-top: 8px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.service-link::after { content: " →"; color: var(--red); }

/* ============================================================
   Services Explorer — 3-column interactive browser
   ============================================================ */

.svc-explorer {
  display: grid;
  grid-template-columns: 1fr 1fr 1.6fr;
  gap: 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  min-height: 520px;
}

.svc-col {
  padding: 24px 32px 32px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.svc-col:last-child {
  border-right: none;
  background: var(--paper-2);
}

.svc-col-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 24px;
  font-weight: 500;
}

.svc-list,
.svc-sublist {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.svc-list li {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: all 200ms ease;
  position: relative;
}

.svc-list li:last-child { border-bottom: none; }

.svc-list .svc-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--sepia);
  flex-shrink: 0;
  transition: color 200ms ease;
  padding: 0;
}

.svc-list .svc-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.2;
  transition: color 200ms ease;
}

.svc-list li:hover .svc-name {
  color: var(--graphite);
}

.svc-list li:hover .svc-num {
  color: var(--graphite);
}

.svc-list li.active .svc-name {
  color: var(--red);
  font-weight: 500;
}

.svc-list li.active .svc-num {
  color: var(--red);
}

.svc-list li.active::before {
  content: "";
  position: absolute;
  left: -32px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 32px;
  background: var(--red);
}

.svc-sublist li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.01em;
  transition: all 200ms ease;
  position: relative;
  padding-left: 0;
}

.svc-sublist li:last-child { border-bottom: none; }

.svc-sublist li:hover {
  padding-left: 8px;
}

.svc-sublist li.active {
  color: var(--red);
  padding-left: 16px;
}

.svc-sublist li.active::before {
  content: "→";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--red);
  font-family: var(--font-display);
  font-size: 18px;
}

/* Detail panel (column 3) */
.svc-detail {
  animation: svcFadeIn 280ms ease-out;
}

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

.svc-detail-breadcrumb {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sepia);
  margin-bottom: 12px;
}

.svc-detail-breadcrumb b { color: var(--red); font-weight: 500; }

.svc-detail h3 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 16px;
}

.svc-detail h3 em { font-style: italic; color: var(--red); font-weight: 400; }

.svc-detail-lead {
  font-size: 16px;
  line-height: 1.6;
  color: var(--graphite);
  margin-bottom: 24px;
}

.svc-detail-bullets {
  list-style: none;
  margin: 0 0 28px 0;
  padding: 0;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.svc-detail-bullets li {
  padding: 6px 0 6px 20px;
  position: relative;
  font-size: 14px;
  color: var(--graphite);
  line-height: 1.5;
}

.svc-detail-bullets li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--red);
}

.svc-detail-tag {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sepia);
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: var(--paper);
  margin-bottom: 28px;
}

.svc-detail-cta {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.svc-detail-cta a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
  transition: all 180ms ease;
}

.svc-detail-cta a:hover {
  color: var(--red);
  border-color: var(--red);
}

/* Mobile: stack columns vertically with tab-style selectors */
@media (max-width: 900px) {
  .svc-explorer {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .svc-col {
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: 20px 20px 24px;
  }

  .svc-col:last-child {
    border-bottom: none;
  }

  .svc-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0;
  }

  .svc-list li {
    flex: 1;
    min-width: 0;
    padding: 14px 12px;
    border-bottom: none;
    border-right: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .svc-list li:last-child { border-right: none; }

  .svc-list li.active::before {
    left: 0;
    right: 0;
    top: auto;
    bottom: -1px;
    transform: none;
    width: 100%;
    height: 3px;
  }

  .svc-list .svc-name { font-size: 18px; }

  .svc-sublist {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
  }

  .svc-sublist li {
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 2px;
    font-size: 14px;
  }

  .svc-sublist li:last-child { border-bottom: 1px solid var(--line); }

  .svc-sublist li:hover,
  .svc-sublist li.active {
    padding-left: 14px;
    background: var(--ink);
    color: var(--paper);
    border-color: var(--ink);
  }

  .svc-sublist li.active::before { display: none; }

  .svc-detail h3 { font-size: 26px; }
}

/* ============================================================
   Philosophy block
   ============================================================ */

.philosophy {
  background: var(--paper-2);
  padding: 112px 0;
  position: relative;
}

.philosophy-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 80px;
  align-items: start;
}

.philosophy-lead {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.philosophy-lead em {
  font-style: italic;
  color: var(--red);
}

.philosophy-body p {
  font-size: 17px;
  line-height: 1.65;
  color: var(--graphite);
  margin-bottom: 20px;
}

.philosophy-body p:last-child { margin-bottom: 0; }

.philosophy-principles {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--ink);
  padding-top: 32px;
}

.principle {
  padding-right: 32px;
  border-right: 1px solid var(--line);
}

.principle:last-child { border-right: none; padding-right: 0; }
.principle:not(:first-child) { padding-left: 32px; }

.principle-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--red);
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.principle h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 8px;
}

.principle p {
  font-size: 13px;
  color: var(--sepia);
  line-height: 1.55;
}

/* ============================================================
   Projects
   ============================================================ */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
  margin-top: 56px;
}

.project {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.project-image {
  aspect-ratio: 4/3;
  background: var(--paper-3);
  position: relative;
  overflow: hidden;
}

.project-image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sepia);
  background-image:
    linear-gradient(135deg, var(--paper-2) 25%, transparent 25%),
    linear-gradient(225deg, var(--paper-2) 25%, transparent 25%),
    linear-gradient(315deg, var(--paper-2) 25%, transparent 25%),
    linear-gradient(45deg, var(--paper-2) 25%, var(--paper-3) 25%);
  background-size: 32px 32px;
  background-position: 0 0, 16px 0, 16px -16px, 0 16px;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.project-code {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--red);
}

.project-location {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--sepia);
  text-transform: uppercase;
}

.project h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.project-spec {
  display: flex;
  gap: 20px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--sepia);
}

.project-spec b { color: var(--ink); font-weight: 500; }

/* ============================================================
   Transversal services (§ 01.5)
   ============================================================ */

.transversal {
  background: var(--paper-2);
  padding: 96px 0;
  position: relative;
}

.transversal-lead {
  max-width: 720px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--sepia);
  margin-bottom: 56px;
  margin-top: -16px;
}

.transversal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.transversal-card {
  background: var(--paper-2);
  padding: 36px 32px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: background 240ms ease;
}

.transversal-card:hover {
  background: var(--paper);
}

.transversal-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--red);
  margin-bottom: 24px;
  font-weight: 500;
}

.transversal-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 400;
  color: var(--ink);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.transversal-desc {
  font-size: 14px;
  line-height: 1.6;
  color: var(--graphite);
  margin-bottom: 24px;
}

.transversal-points {
  list-style: none;
  margin: 0 0 28px 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  flex: 1;
}

.transversal-points li {
  padding: 5px 0 5px 18px;
  position: relative;
  font-size: 13px;
  color: var(--graphite);
  line-height: 1.5;
}

.transversal-points li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--red);
}

.transversal-tag {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sepia);
  padding: 6px 10px;
  border: 1px solid var(--line);
  background: var(--paper);
}

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

/* ============================================================
   Home — Compliance block (marco normativo)
   ============================================================ */

.compliance-home {
  padding: 96px 0;
  position: relative;
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.compliance-home-head {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  margin-bottom: 56px;
  align-items: end;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--ink);
}

.compliance-home-title {
  font-size: clamp(32px, 4.5vw, 56px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin-top: 16px;
}

.compliance-home-title em {
  font-style: italic;
  color: var(--red);
  font-weight: 400;
}

.compliance-home-lead {
  font-size: 16px;
  line-height: 1.6;
  color: var(--graphite);
}

.compliance-home-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--ink);
}

.compliance-home-card {
  background: var(--paper);
  padding: 32px 28px 24px;
  display: flex;
  flex-direction: column;
  transition: background 240ms ease;
}

.compliance-home-card:hover {
  background: var(--paper-2);
}

.compliance-home-code {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.02em;
  line-height: 1;
  margin-bottom: 14px;
}

.compliance-home-entity {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 12px;
  line-height: 1.3;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.compliance-home-desc {
  font-size: 13px;
  color: var(--graphite);
  line-height: 1.55;
  margin-bottom: 20px;
  flex: 1;
}

.compliance-home-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--sepia);
  padding-top: 14px;
  border-top: 1px solid var(--line);
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .compliance-home-head { grid-template-columns: 1fr; gap: 24px; }
  .compliance-home-grid { grid-template-columns: repeat(2, 1fr); }
}

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

/* ============================================================
   Home — Blog preview (últimas 3 entradas)
   ============================================================ */

.home-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.home-blog-card {
  background: var(--paper);
  padding: 32px 28px 28px;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: background 240ms ease;
  position: relative;
}

.home-blog-card:hover {
  background: var(--paper-2);
}

.home-blog-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 20px;
}

.home-blog-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--sepia);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.home-blog-cat {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--red);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}

.home-blog-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}

.home-blog-excerpt {
  font-size: 14px;
  color: var(--sepia);
  line-height: 1.55;
  flex: 1;
  margin-bottom: 24px;
}

.home-blog-link {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  padding-top: 16px;
  border-top: 1px solid var(--line);
  transition: color 200ms ease;
}

.home-blog-link::after {
  content: " →";
  color: var(--red);
}

.home-blog-card:hover .home-blog-link {
  color: var(--red);
}

.home-blog-cta {
  text-align: center;
  margin-top: 56px;
}

@media (max-width: 900px) {
  .home-blog-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Section heading
   ============================================================ */

.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
  align-items: end;
  margin-bottom: 56px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--ink);
}

.section-head-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--red);
}

.section-head h2 {
  font-size: clamp(32px, 4.5vw, 56px);
  line-height: 1.05;
  font-weight: 300;
  letter-spacing: -0.025em;
  color: var(--ink);
  max-width: 20ch;
}

.section-head h2 em { font-style: italic; color: var(--red); font-weight: 400; }

/* ============================================================
   Footer
   ============================================================ */

.footer {
  background: var(--ink);
  color: var(--paper-2);
  padding: 80px 0 40px;
}

.footer a { color: var(--paper-2); }
.footer a:hover { color: var(--red-bright); }

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 64px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(245,242,232,0.12);
}

.footer-brand .nav-logo-text { color: var(--paper); }
.footer-brand .nav-logo-tagline { color: var(--paper-3); opacity: 0.7; }
.footer-brand .nav-logo svg polygon,
.footer-brand .nav-logo svg line { stroke: var(--paper-2) !important; }

.footer-tagline {
  font-size: 14px;
  line-height: 1.55;
  color: var(--paper-3);
  margin-top: 20px;
  max-width: 320px;
  opacity: 0.7;
}

.footer h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--paper-2);
  font-weight: 500;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer h5::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--red-bright);
  flex-shrink: 0;
}

.footer ul { list-style: none; }

.footer li { margin-bottom: 10px; }

.footer li a {
  font-size: 14px;
  color: var(--paper-2);
  opacity: 0.8;
}

.footer li a:hover { opacity: 1; }

.footer-bottom {
  padding-top: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--paper-3);
  letter-spacing: 0.04em;
  opacity: 0.6;
  flex-wrap: wrap;
  gap: 16px;
}

/* ============================================================
   Service detail page (Diseño, Construcción, Supervisión)
   ============================================================ */

.service-hero {
  padding: 80px 0 64px;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.service-hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: end;
  position: relative;
  z-index: 1;
}

.service-hero-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.service-hero-code {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--red);
}

.service-hero-line { width: 80px; height: 1px; background: var(--ink); }

.service-hero h1 {
  font-size: clamp(48px, 8vw, 96px);
  line-height: 1;
  font-weight: 300;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.service-hero h1 em { font-style: italic; color: var(--red); font-weight: 400; }

.service-hero-desc {
  font-size: 19px;
  line-height: 1.6;
  color: var(--graphite);
  font-weight: 300;
}

.service-hero-desc p { margin-bottom: 16px; }
.service-hero-desc p:last-child { margin-bottom: 0; }

/* Service offerings */
.offerings {
  padding: 80px 0;
}

.offering-row {
  display: grid;
  grid-template-columns: 60px 1fr 2fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.offering-row:first-child { border-top: 1px solid var(--ink); }

.offering-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--red);
  padding-top: 6px;
  letter-spacing: 0.12em;
}

.offering-title {
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.offering-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--sepia);
}

.offering-desc ul {
  list-style: none;
  margin-top: 12px;
}

.offering-desc li {
  padding-left: 20px;
  position: relative;
  margin-bottom: 6px;
  font-size: 14px;
}

.offering-desc li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--red);
}

/* Compliance pillars (DOT / OPAMSS / MARN) */
.compliance {
  background: var(--paper-2);
  padding: 96px 0;
}

.compliance-head {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 48px;
  align-items: end;
}

.compliance-head h2 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.compliance-head h2 em { font-style: italic; color: var(--red); }

.compliance-lead {
  font-size: 17px;
  color: var(--sepia);
  line-height: 1.65;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.pillar {
  padding: 32px 28px;
  background: var(--paper-2);
}

.pillar-code {
  font-family: var(--font-mono);
  font-size: 42px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.03em;
  line-height: 1;
  margin-bottom: 12px;
}

.pillar-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
  line-height: 1.3;
}

.pillar-desc {
  font-size: 13px;
  color: var(--sepia);
  line-height: 1.55;
}

/* AI tools block (only on Diseño) */
.ai-tools {
  padding: 96px 0;
  border-top: 1px solid var(--line);
}

.ai-tools-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center;
}

.ai-tools-title {
  font-size: clamp(28px, 3.6vw, 44px);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 24px;
}

.ai-tools-title em { font-style: italic; color: var(--red); }

.ai-tools-desc p {
  font-size: 16px;
  line-height: 1.65;
  color: var(--graphite);
  margin-bottom: 16px;
}

.ai-tools-desc p:last-child { margin-bottom: 0; }

.ai-tools-list {
  background: var(--paper-2);
  padding: 32px;
  border-left: 3px solid var(--red);
}

.ai-tool-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 16px;
  align-items: start;
}

.ai-tool-item:first-child { padding-top: 0; }
.ai-tool-item:last-child { border-bottom: none; padding-bottom: 0; }

.ai-tool-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--red);
  padding-top: 3px;
}

.ai-tool-name {
  font-weight: 600;
  color: var(--ink);
  font-size: 15px;
  margin-bottom: 2px;
}

.ai-tool-use {
  font-size: 13px;
  color: var(--sepia);
  line-height: 1.5;
}

/* ============================================================
   Blog
   ============================================================ */

.blog-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 64px;
  align-items: start;
}

.blog-main { display: flex; flex-direction: column; gap: 0; }

.blog-post-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
  cursor: pointer;
  transition: all 200ms ease;
}

.blog-post-card:first-child { border-top: 1px solid var(--ink); }

.blog-post-card:hover { background: var(--paper-2); padding-left: 12px; padding-right: 12px; }

.blog-post-date {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--sepia);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.blog-post-cat {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--red);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 6px;
}

.blog-post-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin-bottom: 8px;
}

.blog-post-excerpt {
  font-size: 15px;
  color: var(--sepia);
  line-height: 1.55;
}

.blog-sidebar {
  position: sticky;
  top: 80px;
  padding-left: 32px;
  border-left: 1px solid var(--line);
}

.blog-sidebar h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 16px;
}

.blog-sidebar ul { list-style: none; }

.blog-sidebar li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 14px;
  color: var(--graphite);
  cursor: pointer;
  transition: color 180ms ease;
}

.blog-sidebar li:hover { color: var(--red); }

.blog-sidebar li:last-child { border-bottom: none; }

.blog-sidebar-section { margin-bottom: 40px; }

/* ============================================================
   About
   ============================================================ */

.about-lead {
  padding: 96px 0;
  text-align: left;
}

.about-lead h1 {
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.98;
  font-weight: 300;
  letter-spacing: -0.035em;
  color: var(--ink);
  max-width: 16ch;
}

.about-lead h1 em { font-style: italic; color: var(--red); font-weight: 400; }

.about-manifesto {
  background: var(--ink);
  color: var(--paper);
  padding: 112px 0;
}

.about-manifesto .container { max-width: var(--c-narrow); }

.about-manifesto-eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-2);
  margin-bottom: 32px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.about-manifesto-eyebrow::before {
  content: "";
  width: 20px;
  height: 1px;
  background: var(--red-bright);
  flex-shrink: 0;
}

.about-manifesto-text {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 300;
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: var(--paper);
}

.about-manifesto-text em { font-style: italic; color: var(--red-bright); }

.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
  margin-top: 48px;
}

.team-card {
  border-top: 1px solid var(--ink);
  padding: 32px 0;
}

.team-photo {
  aspect-ratio: 1;
  background: var(--paper-2);
  margin-bottom: 20px;
  max-width: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.team-photo-placeholder {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sepia);
  text-align: center;
  line-height: 1.5;
}

.team-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.team-role {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-top: 4px;
}

.team-contact {
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--sepia);
  line-height: 1.8;
}

.team-contact a { color: var(--sepia); }
.team-contact a:hover { color: var(--red); }

.timeline {
  margin-top: 48px;
  border-top: 1px solid var(--ink);
}

.timeline-row {
  display: grid;
  grid-template-columns: 120px 1fr 2fr;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}

.timeline-year {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 500;
  color: var(--red);
  letter-spacing: 0.04em;
}

.timeline-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}

.timeline-desc {
  font-size: 14px;
  color: var(--sepia);
  line-height: 1.55;
}

/* ============================================================
   CTA section
   ============================================================ */

.cta {
  background: var(--ink);
  color: var(--paper);
  padding: 96px 0;
  text-align: center;
}

.cta h2 {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 300;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--paper);
  max-width: 16ch;
  margin: 0 auto;
}

.cta h2 em { font-style: italic; color: var(--red-bright); }

.cta-sub {
  margin-top: 24px;
  font-size: 17px;
  color: var(--paper-3);
  opacity: 0.8;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.cta-row {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.cta .btn-primary { background: var(--red); color: #fff; }
.cta .btn-ghost { color: var(--paper); border-color: var(--paper); }
.cta .btn-ghost:hover { background: var(--paper); color: var(--ink); }

/* ============================================================
   Preview bar (bottom)
   ============================================================ */

.preview-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  display: flex;
  gap: 4px;
  align-items: center;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  z-index: 100;
  border-top: 2px solid var(--red);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
}

.preview-bar-label {
  padding-right: 12px;
  border-right: 1px solid rgba(245,242,232,0.2);
  margin-right: 8px;
  color: var(--red);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
  flex-shrink: 0;
}

.preview-bar button {
  padding: 8px 14px;
  background: transparent;
  color: var(--paper-3);
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: all 160ms ease;
  flex-shrink: 0;
}

.preview-bar button:hover { color: var(--paper); }

.preview-bar button.active {
  background: var(--red);
  color: #fff;
}

.page-container { display: none; animation: fadeIn 220ms ease-out; }
.page-container.active { display: block; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; flex-direction: column; gap: 4px; padding: 8px; cursor: pointer; }
  .nav-toggle span { width: 22px; height: 2px; background: var(--paper); }

  .hero-meta { grid-template-columns: repeat(2, 1fr); }
  .hero-meta-cell:nth-child(2) { border-right: none; }
  .hero-meta-cell:nth-child(3) { padding-left: 0; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 16px; }
  .hero-meta-cell:nth-child(4) { border-top: 1px solid var(--line); padding-top: 24px; margin-top: 16px; }

  .service-item { grid-template-columns: 60px 1fr; gap: 20px; }
  .service-item .service-desc, .service-item .service-link { grid-column: 1 / -1; padding-left: 80px; }

  .projects-grid, .team-grid { grid-template-columns: 1fr; gap: 32px; }

  .philosophy-grid, .ai-tools-grid, .blog-grid, .service-hero-inner, .compliance-head { grid-template-columns: 1fr; gap: 32px; }

  .philosophy-principles { grid-template-columns: 1fr; }
  .principle { border-right: none; border-bottom: 1px solid var(--line); padding: 20px 0; }
  .principle:last-child { border-bottom: none; }
  .principle:not(:first-child) { padding-left: 0; }

  .pillars { grid-template-columns: 1fr; }

  .section-head { grid-template-columns: 1fr; gap: 16px; }

  .footer-top { grid-template-columns: 1fr; gap: 32px; }

  .blog-post-card { grid-template-columns: 1fr; gap: 12px; }
  .blog-sidebar { padding-left: 0; border-left: none; border-top: 1px solid var(--line); padding-top: 32px; margin-top: 32px; }

  .offering-row { grid-template-columns: 1fr; gap: 12px; }

  .timeline-row { grid-template-columns: 1fr; gap: 8px; }

  section { padding: 64px 0; }
  .hero { padding: 48px 0 64px; }
  .hero-ficha { position: relative; top: auto; right: auto; text-align: left; margin-bottom: 16px; }

  .hero-cta-row .btn { flex: 1; justify-content: center; }
}
