
/* ==========================================================================
   TORRE 36 · DISEÑO v0.6
   Reemplazo completo de styles.css
   Enfoque: documental, editorial, técnico y visualmente accesible
   ========================================================================== */

:root{
  --bg:#f4f7f9;
  --surface:#ffffff;
  --surface-soft:#f9fbfc;
  --surface-alt:#eef4f7;
  --surface-dark:#122536;
  --surface-dark-2:#1b3448;

  --text:#18242f;
  --text-2:#334657;
  --muted:#68798a;
  --muted-2:#8b99a6;

  --navy-950:#10202e;
  --navy-900:#163044;
  --navy-800:#20455f;
  --navy-700:#2f6385;
  --navy-600:#447c9e;
  --navy-100:#e6f0f5;
  --navy-050:#f2f7fa;

  --question:#e4a11b;
  --question-dark:#9c6509;
  --question-soft:#fff7e5;
  --question-soft-2:#fffaf0;

  --critical:#b14545;
  --critical-dark:#7f2929;
  --critical-soft:#fff1f1;

  --authority:#95505b;
  --authority-soft:#fcf0f2;

  --project:#4a7ea1;
  --project-soft:#edf5fb;

  --insurance:#a97923;
  --insurance-soft:#fff7e9;

  --control:#41745b;
  --control-soft:#eef7f1;

  --success:#3c7559;
  --success-soft:#edf7f1;

  --border:#d7e0e7;
  --border-strong:#c6d2dc;

  --shadow-xs:0 2px 10px rgba(16,32,46,.05);
  --shadow-sm:0 10px 28px rgba(16,32,46,.07);
  --shadow-md:0 20px 52px rgba(16,32,46,.10);
  --shadow-lg:0 28px 72px rgba(16,32,46,.15);

  --max:1280px;
  --radius-sm:10px;
  --radius-md:16px;
  --radius-lg:24px;
  --radius-xl:34px;

  --ease:cubic-bezier(.2,.8,.2,1);
}

/* Base */
*,
*::before,
*::after{box-sizing:border-box}

html{
  scroll-behavior:smooth;
  scroll-padding-top:96px;
}

body{
  margin:0;
  background:
    linear-gradient(180deg,#f6f9fb 0%,#f3f6f8 45%,#f5f7f9 100%);
  color:var(--text);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:16px;
  line-height:1.72;
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
}

a{color:inherit;text-decoration:none}
img,svg,video{display:block;max-width:100%}
button,input,textarea,select{font:inherit}
::selection{background:#dceaf2;color:var(--navy-950)}

.container{
  width:min(var(--max),calc(100% - 56px));
  margin-inline:auto;
}

/* Typography */
h1,h2,h3,h4{
  margin-top:0;
  color:var(--navy-950);
  font-weight:820;
  letter-spacing:-.028em;
  text-wrap:balance;
}

h1{
  margin-bottom:24px;
  font-size:clamp(3.3rem,6vw,5.8rem);
  line-height:.96;
  letter-spacing:-.052em;
}

h2{
  margin-bottom:14px;
  font-size:clamp(2.05rem,4vw,3.35rem);
  line-height:1.07;
}

h3{
  margin-bottom:10px;
  font-size:1.22rem;
  line-height:1.32;
}

p{
  margin-top:0;
  color:var(--text-2);
}

/* Justificación controlada */
.section-head,
.hero-description,
.case-reading,
.narrative-card,
.hito-section{
  text-align:justify;
  text-justify:inter-word;
}

.section-head h2,
.section-head .eyebrow,
.case-reading h3,
.narrative-card h3{
  text-align:left;
}

.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:9px;
  margin-bottom:14px;
  color:#607386;
  font-size:.76rem;
  font-weight:900;
  letter-spacing:.15em;
  text-transform:uppercase;
}

.eyebrow::before{
  content:"";
  width:24px;
  height:2px;
  border-radius:999px;
  background:currentColor;
  opacity:.68;
}

.eyebrow.light{color:#d4dee6}

/* Header */
.site-header{
  position:sticky;
  top:0;
  z-index:100;
  border-top:5px solid var(--navy-800);
  border-bottom:1px solid rgba(199,211,219,.9);
  background:rgba(255,255,255,.94);
  backdrop-filter:blur(18px);
  -webkit-backdrop-filter:blur(18px);
  box-shadow:0 5px 20px rgba(16,32,46,.04);
}

.header-inner{
  min-height:82px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
}

.brand{
  position:relative;
  padding-left:18px;
  color:var(--navy-900);
  font-size:1rem;
  font-weight:950;
  letter-spacing:.09em;
  white-space:nowrap;
}

.brand::before{
  content:"";
  position:absolute;
  left:0;
  top:50%;
  width:7px;
  height:28px;
  border-radius:999px;
  background:linear-gradient(var(--navy-700),var(--question));
  transform:translateY(-50%);
}

.nav{
  display:flex;
  align-items:center;
  gap:5px;
  padding:5px;
  border:1px solid rgba(210,220,227,.82);
  border-radius:999px;
  background:#f8fafb;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.9);
}

.nav-link,
.nav a{
  position:relative;
  padding:10px 14px;
  border-radius:999px;
  color:#415565;
  font-size:.88rem;
  font-weight:680;
  transition:
    color .2s var(--ease),
    background .2s var(--ease),
    transform .2s var(--ease),
    box-shadow .2s var(--ease);
}

.nav-link:hover,
.nav a:hover{
  color:var(--navy-950);
  background:#fff;
  transform:translateY(-1px);
  box-shadow:0 5px 14px rgba(16,32,46,.07);
}

.btn{
  display:inline-flex;
  min-height:48px;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0 21px;
  border:1px solid transparent;
  border-radius:999px;
  background:linear-gradient(135deg,var(--navy-800),var(--navy-900));
  color:#fff;
  font-weight:820;
  box-shadow:var(--shadow-xs);
  transition:
    transform .2s var(--ease),
    box-shadow .2s var(--ease),
    filter .2s var(--ease);
}

.btn:hover{
  transform:translateY(-2px);
  box-shadow:var(--shadow-sm);
  filter:brightness(1.04);
}

.btn.ghost,
.btn-secondary{
  border-color:var(--border);
  background:#fff;
  color:var(--navy-900);
  box-shadow:none;
}

.btn.ghost:hover,
.btn-secondary:hover{
  border-color:var(--border-strong);
  background:var(--navy-050);
}

/* Hero */
.hero{
  position:relative;
  overflow:hidden;
  padding:92px 0 62px;
  border-bottom:1px solid var(--border);
  background:
    radial-gradient(circle at 85% 16%,rgba(68,124,158,.16),transparent 27%),
    radial-gradient(circle at 13% 92%,rgba(228,161,27,.08),transparent 24%),
    linear-gradient(135deg,#fff 0%,#f4f7f9 58%,#edf3f6 100%);
}

.hero::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:.20;
  background-image:
    linear-gradient(rgba(32,69,95,.045) 1px,transparent 1px),
    linear-gradient(90deg,rgba(32,69,95,.045) 1px,transparent 1px);
  background-size:38px 38px;
  mask-image:linear-gradient(to bottom,rgba(0,0,0,.75),transparent 82%);
}

.hero .container{
  position:relative;
  z-index:2;
}

.hero-grid{
  display:grid;
  grid-template-columns:minmax(0,1.12fr) minmax(380px,.88fr);
  gap:58px;
  align-items:center;
}

.hero-content{
  max-width:none;
}

.hero-lead{
  margin-bottom:16px;
  color:#405565;
  font-size:1.14rem;
  font-weight:630;
}

.hero-description{
  width:100%;
  max-width:none;
  margin-bottom:14px;
  color:#546878;
  font-size:1rem;
}

.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:28px;
}

.hero-question{
  position:relative;
  overflow:hidden;
  padding:34px 35px 34px 39px;
  border:1px solid #efd49f;
  border-left:9px solid var(--question);
  border-radius:var(--radius-xl);
  background:
    linear-gradient(145deg,#fffdf8 0%,var(--question-soft) 100%);
  box-shadow:var(--shadow-md);
}

.hero-question::after{
  content:"?";
  position:absolute;
  right:-12px;
  bottom:-62px;
  color:rgba(228,161,27,.14);
  font-size:15rem;
  font-weight:950;
  line-height:1;
}

.hero-question .eyebrow{
  position:relative;
  z-index:2;
  color:var(--question-dark);
}

.hero-question h2{
  position:relative;
  z-index:2;
  margin:0;
  color:#362812;
  font-size:clamp(1.45rem,2vw,1.85rem);
  line-height:1.36;
  text-align:left;
}

/* Ruta de lectura */
.reading-guide{
  display:grid;
  grid-template-columns:auto repeat(5,1fr);
  gap:10px;
  align-items:stretch;
  margin:22px auto 0;
  padding:10px;
  border:1px solid var(--border);
  border-radius:20px;
  background:rgba(255,255,255,.95);
  box-shadow:var(--shadow-sm);
}

.reading-guide-label{
  display:flex;
  align-items:center;
  padding:0 16px;
  border-right:1px solid var(--border);
  color:var(--muted);
  font-size:.76rem;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
}

.reading-guide a{
  display:flex;
  align-items:center;
  gap:10px;
  padding:11px 13px;
  border-radius:14px;
  transition:background .2s var(--ease),transform .2s var(--ease);
}

.reading-guide a:hover{
  background:var(--navy-050);
  transform:translateY(-1px);
}

.reading-guide b{
  display:grid;
  width:32px;
  height:32px;
  place-items:center;
  border-radius:10px;
  background:var(--navy-100);
  color:var(--navy-800);
  font-size:.72rem;
}

.reading-guide span{
  color:var(--text-2);
  font-size:.84rem;
  font-weight:720;
}

/* Sections */
.section{
  position:relative;
  padding:88px 0;
}

.section.alt{
  background:
    linear-gradient(180deg,#fff 0%,#fbfcfd 100%);
}

.section.dark{
  overflow:hidden;
  background:
    radial-gradient(circle at 91% 13%,rgba(70,124,158,.20),transparent 30%),
    linear-gradient(145deg,var(--surface-dark) 0%,#0f202e 100%);
  color:#fff;
}

.section.dark::before{
  content:"";
  position:absolute;
  inset:0;
  opacity:.12;
  background-image:
    linear-gradient(rgba(255,255,255,.07) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.07) 1px,transparent 1px);
  background-size:42px 42px;
  pointer-events:none;
}

.section.dark>.container{
  position:relative;
  z-index:1;
}

.section-head{
  width:100%;
  max-width:none;
  margin-bottom:38px;
}

.section-head h2{
  max-width:1050px;
}

.section-head p{
  width:100%;
  max-width:none;
  margin-bottom:12px;
  color:var(--muted);
  font-size:1.03rem;
}

.dark .section-head h2{color:#fff}
.dark .section-head p{color:#c8d3dc}

/* Cards */
.narrative-card,
.card,
.case-reading,
.documents-intro-note{
  border:1px solid var(--border);
  background:var(--surface);
  box-shadow:var(--shadow-sm);
}

.narrative-card{
  position:relative;
  overflow:hidden;
  padding:38px 40px;
  border-radius:var(--radius-lg);
}

.narrative-card::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  width:5px;
  height:100%;
  background:linear-gradient(var(--navy-700),var(--project));
}

.narrative-card p{
  width:100%;
  max-width:none;
  color:var(--text-2);
}

.cards{
  display:grid;
  gap:20px;
}

.cards.four{
  grid-template-columns:repeat(4,minmax(0,1fr));
}

.card{
  position:relative;
  overflow:hidden;
  padding:27px;
  border-radius:var(--radius-lg);
  transition:
    transform .22s var(--ease),
    box-shadow .22s var(--ease),
    border-color .22s var(--ease);
}

.card::after{
  content:"";
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  height:4px;
  background:linear-gradient(90deg,var(--navy-700),transparent);
  opacity:0;
  transition:opacity .2s var(--ease);
}

.card:hover{
  transform:translateY(-5px);
  border-color:var(--border-strong);
  box-shadow:var(--shadow-md);
}

.card:hover::after{opacity:1}

.card p{
  margin-bottom:0;
  color:var(--muted);
  text-align:justify;
  text-justify:inter-word;
}

.tag,
.card .tag{
  display:inline-flex;
  width:fit-content;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  background:var(--navy-100);
  color:var(--navy-800);
  font-size:.72rem;
  font-weight:880;
  letter-spacing:.06em;
  text-transform:uppercase;
}

/* Questions */
.question-strip,
.hito-question{
  position:relative;
  overflow:hidden;
  margin-top:30px;
  padding:28px 82px 28px 34px;
  border:1px solid #efd3a0;
  border-left:8px solid var(--question);
  border-radius:18px;
  background:
    linear-gradient(120deg,var(--question-soft-2) 0%,var(--question-soft) 100%);
  color:#3a2a10;
  font-size:clamp(1.05rem,1.35vw,1.24rem);
  font-weight:780;
  line-height:1.48;
  box-shadow:0 10px 28px rgba(156,101,9,.08);
  text-align:left;
}

.question-strip::before,
.hito-question::before{
  content:"PREGUNTA ABIERTA";
  display:block;
  margin-bottom:8px;
  color:var(--question-dark);
  font-size:.69rem;
  font-weight:950;
  letter-spacing:.15em;
}

.question-strip::after,
.hito-question::after{
  content:"?";
  position:absolute;
  right:22px;
  top:50%;
  transform:translateY(-50%);
  color:rgba(228,161,27,.17);
  font-size:7.4rem;
  font-weight:950;
  line-height:1;
}

.accent-card{
  border-color:#edd5a9;
  background:linear-gradient(145deg,#fffdf9,var(--question-soft));
}

/* Infographics */
.section-infographic{
  width:100%;
  margin:38px auto 0;
  padding:18px;
  border:1px solid var(--border);
  border-radius:26px;
  background:
    linear-gradient(180deg,#fff 0%,#fbfcfd 100%);
  box-shadow:var(--shadow-md);
}

.section-infographic img{
  width:100%;
  height:auto;
  border-radius:18px;
}

.section-infographic figcaption{
  width:100%;
  padding:16px 10px 2px;
  color:var(--muted);
  font-size:.9rem;
  text-align:center;
}

.hero-infographic{
  margin-top:48px;
}

.case-reading{
  width:100%;
  max-width:none;
  margin:28px 0 0;
  padding:28px 32px;
  border-radius:18px;
}

.case-reading p{
  width:100%;
  margin:0;
  color:var(--text-2);
}

/* Technical chain */
.technical-chain,
.flow{
  display:grid;
  grid-template-columns:1fr auto 1fr auto 1.25fr;
  gap:14px;
  align-items:stretch;
  margin-top:26px;
}

.technical-stage,
.flow-step{
  position:relative;
  display:flex;
  min-height:138px;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:22px 20px;
  border:1px solid var(--border);
  border-radius:17px;
  background:#fff;
  text-align:center;
  box-shadow:var(--shadow-xs);
}

.technical-stage::before,
.flow-step::before{
  content:"";
  position:absolute;
  top:0;
  width:52px;
  height:4px;
  border-radius:0 0 999px 999px;
  background:var(--project);
}

.technical-stage.focus,
.flow-step.focus{
  border-color:#efcf99;
  background:var(--question-soft);
}

.technical-stage.focus::before,
.flow-step.focus::before{
  background:var(--question);
}

.technical-stage strong,
.flow-step strong{
  color:var(--navy-950);
}

.technical-stage span,
.flow-step span{
  color:var(--muted);
  font-size:.9rem;
}

.technical-arrow,
.arrow{
  align-self:center;
  color:#8ea0ad;
  font-size:1.6rem;
  font-weight:900;
}

/* Video */
.video-section{
  background:
    radial-gradient(circle at 86% 14%,rgba(68,124,158,.11),transparent 27%),
    linear-gradient(180deg,#fff 0%,#f8fafb 100%);
}

.video-layout{
  display:grid;
  grid-template-columns:minmax(0,1.35fr) minmax(310px,.65fr);
  gap:34px;
  align-items:center;
}

.video-frame{
  overflow:hidden;
  aspect-ratio:16/9;
  border:1px solid var(--border);
  border-radius:26px;
  background:#0d1922;
  box-shadow:var(--shadow-lg);
}

.video-frame video{
  width:100%;
  height:100%;
  object-fit:contain;
  background:#0d1922;
}

.video-context{
  padding:30px;
  border:1px solid var(--border);
  border-radius:22px;
  background:#fff;
  box-shadow:var(--shadow-sm);
}

.video-context h3{
  font-size:1.4rem;
}

.video-context p,
.video-context li{
  color:var(--muted);
}

.video-note{
  margin-top:18px;
  padding:16px 20px;
  border-left:5px solid var(--navy-700);
  border-radius:13px;
  background:var(--navy-050);
  color:var(--muted);
  font-size:.9rem;
}

/* Timeline */
.timeline{
  position:relative;
  display:grid;
  gap:16px;
  padding-left:34px;
}

.timeline::before{
  content:"";
  position:absolute;
  left:7px;
  top:18px;
  bottom:18px;
  width:2px;
  background:linear-gradient(
    to bottom,
    var(--authority) 0 15%,
    var(--project) 15% 55%,
    var(--insurance) 55% 70%,
    var(--critical) 70% 83%,
    var(--control) 83% 100%
  );
  opacity:.45;
}

.timeline-item{
  --timeline-color:var(--border-strong);
  position:relative;
  display:grid;
  grid-template-columns:158px minmax(0,1fr);
  gap:24px;
  padding:22px 26px;
  border:1px solid var(--border);
  border-left:6px solid var(--timeline-color);
  border-radius:17px;
  background:#fff;
  box-shadow:var(--shadow-xs);
  transition:
    transform .2s var(--ease),
    box-shadow .2s var(--ease),
    border-color .2s var(--ease);
}

.timeline-item::before{
  content:"";
  position:absolute;
  left:-40px;
  top:28px;
  width:15px;
  height:15px;
  border:4px solid var(--bg);
  border-radius:50%;
  background:var(--timeline-color);
  box-shadow:0 0 0 1px rgba(16,32,46,.10);
}

.timeline-item:hover{
  transform:translateX(6px);
  box-shadow:var(--shadow-sm);
}

.timeline-item.dco{
  --timeline-color:var(--project);
  background:linear-gradient(90deg,var(--project-soft) 0,#fff 18%);
}

.timeline-item.authority{
  --timeline-color:var(--authority);
  background:linear-gradient(90deg,var(--authority-soft) 0,#fff 18%);
}

.timeline-item.insurance{
  --timeline-color:var(--insurance);
  background:linear-gradient(90deg,var(--insurance-soft) 0,#fff 18%);
}

.timeline-item.control{
  --timeline-color:var(--control);
  background:linear-gradient(90deg,var(--control-soft) 0,#fff 18%);
}

.timeline-item.critical{
  --timeline-color:var(--critical);
  border-color:#e8c6c6;
  background:linear-gradient(90deg,var(--critical-soft) 0,#fff 24%);
  box-shadow:0 14px 36px rgba(177,69,69,.09);
}

.timeline-date{
  padding-top:3px;
  color:var(--timeline-color);
  font-size:.8rem;
  font-weight:950;
  letter-spacing:.06em;
  text-transform:uppercase;
}

.timeline-body h3{
  margin:0 0 5px;
}

.timeline-body p{
  margin:0;
  color:var(--muted);
  text-align:justify;
}

.timeline-clickable{
  cursor:pointer;
}

.timeline-link{
  display:inline-flex;
  margin-top:10px;
  padding:6px 10px;
  border-radius:999px;
  background:rgba(255,255,255,.78);
  color:var(--timeline-color);
  font-size:.8rem;
  font-weight:850;
  opacity:.18;
  transform:translateY(3px);
  transition:opacity .2s var(--ease),transform .2s var(--ease);
}

.timeline-clickable:hover .timeline-link,
.timeline-clickable:focus-visible .timeline-link{
  opacity:1;
  transform:none;
}

/* Projects */
.project-grid .card{
  min-height:250px;
  padding-top:64px;
}

.project-grid .card::before{
  content:"";
  position:absolute;
  left:27px;
  top:25px;
  width:28px;
  height:28px;
  border:7px solid var(--project-soft);
  border-radius:50%;
  background:var(--project);
  box-shadow:0 0 0 1px rgba(74,126,161,.12);
}

.project-grid .card:not(:last-child)::before{
  box-shadow:0 0 0 1px rgba(74,126,161,.12),0 0 0 7px rgba(74,126,161,.03);
}

/* Process */
.process-grid{
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:15px;
}

.process-step{
  min-height:182px;
  padding:23px 21px;
  border:1px solid rgba(255,255,255,.13);
  border-radius:17px;
  background:linear-gradient(145deg,rgba(255,255,255,.085),rgba(255,255,255,.035));
}

.process-step b{
  display:grid;
  width:35px;
  height:35px;
  place-items:center;
  margin-bottom:20px;
  border:1px solid rgba(255,255,255,.16);
  border-radius:11px;
  background:rgba(255,255,255,.07);
  color:#b9c9d7;
  font-size:.72rem;
}

.process-step strong{
  display:block;
  margin-bottom:7px;
  color:#fff;
}

.process-step span{
  color:#bdcad4;
  font-size:.88rem;
}

.process-step.focus{
  border-color:#efcf92;
  background:linear-gradient(145deg,#fff9ec,var(--question-soft));
  box-shadow:0 17px 38px rgba(0,0,0,.16);
}

.process-step.focus b{
  border-color:#e7c47d;
  background:#f6dfb2;
  color:#754c09;
}

.process-step.focus strong{color:#382811}
.process-step.focus span{color:#76531b}

.big-statement{
  margin-top:34px;
  padding:29px 34px 31px 38px;
  border:1px solid rgba(255,255,255,.11);
  border-left:7px solid var(--question);
  border-radius:17px;
  background:rgba(255,255,255,.055);
  color:#dfe7ed;
  font-size:clamp(1.1rem,1.6vw,1.36rem);
}

/* Compare routes */
.compare-routes{
  display:grid;
  gap:18px;
  margin-top:34px;
}

.route-row{
  display:grid;
  grid-template-columns:190px repeat(7,minmax(108px,1fr));
  gap:9px;
}

.route-label{
  display:flex;
  align-items:center;
  padding:17px;
  border-radius:14px;
  background:linear-gradient(135deg,var(--navy-800),var(--navy-900));
  color:#fff;
  font-size:.8rem;
  font-weight:900;
  letter-spacing:.05em;
  text-transform:uppercase;
}

.route-cell{
  min-height:104px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:15px;
  border:1px solid var(--border);
  border-radius:14px;
  background:#fff;
  color:var(--navy-950);
  text-align:center;
  font-size:.84rem;
  font-weight:760;
  box-shadow:var(--shadow-xs);
}

.route-cell small{
  margin-top:5px;
  color:var(--muted);
  font-size:.72rem;
  font-weight:560;
}

.route-cell.ok{
  border-color:#bdd9ca;
  background:var(--success-soft);
}

.route-cell.partial{
  border-color:#efd5a8;
  background:var(--insurance-soft);
}

.route-cell.unknown{
  border-color:#ebcc91;
  background:var(--question-soft);
}

/* Documents */
.documents-intro-note{
  display:grid;
  grid-template-columns:220px 1fr;
  gap:20px;
  align-items:center;
  margin-bottom:28px;
  padding:20px 24px;
  border-radius:16px;
}

.documents-intro-note strong{
  color:var(--navy-900);
  font-size:.96rem;
}

.documents-intro-note span{
  color:var(--muted);
  font-size:.9rem;
}

/* Tables */
.table-wrap{
  overflow-x:auto;
  border:1px solid var(--border);
  border-radius:17px;
  background:#fff;
  box-shadow:var(--shadow-xs);
}

table{
  width:100%;
  border-collapse:collapse;
}

th,td{
  padding:15px 17px;
  border-bottom:1px solid var(--border);
  text-align:left;
  vertical-align:top;
}

th{
  background:var(--navy-050);
  color:var(--navy-900);
  font-size:.77rem;
  font-weight:900;
  letter-spacing:.04em;
  text-transform:uppercase;
}

td{
  color:var(--text-2);
  font-size:.92rem;
}

/* Footer */
.footer{
  padding:54px 0;
  background:#0e1b25;
  color:#fff;
}

.footer-grid{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:36px;
}

.footer p{
  max-width:760px;
  margin-top:10px;
  color:#aebbc5;
  font-size:.9rem;
}

.footer-links{
  display:flex;
  flex-wrap:wrap;
  align-content:flex-start;
  justify-content:flex-end;
  gap:13px 20px;
  color:#c5cfd7;
  font-size:.88rem;
}

.footer-links a:hover{color:#fff}

/* Focus / accessibility */
a:focus-visible,
button:focus-visible{
  outline:3px solid rgba(228,161,27,.52);
  outline-offset:3px;
}

/* Responsive */
@media(max-width:1180px){
  .nav{
    gap:2px;
  }

  .nav a{
    padding-inline:10px;
    font-size:.84rem;
  }

  .cards.four{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .process-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .reading-guide{
    grid-template-columns:repeat(3,1fr);
  }

  .reading-guide-label{
    grid-column:1/-1;
    border-right:0;
    border-bottom:1px solid var(--border);
    padding:8px 12px 12px;
  }

  .route-row{
    overflow-x:auto;
    grid-template-columns:170px repeat(7,130px);
  }
}

@media(max-width:940px){
  .container{
    width:min(var(--max),calc(100% - 34px));
  }

  .nav{
    display:none;
  }

  .hero-grid{
    grid-template-columns:1fr;
    gap:34px;
  }

  .hero-question{
    max-width:none;
  }

  .video-layout{
    grid-template-columns:1fr;
  }

  .technical-chain,
  .flow{
    grid-template-columns:1fr;
  }

  .technical-arrow,
  .arrow{
    transform:rotate(90deg);
    text-align:center;
  }

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

  .process-grid{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

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

  .footer-links{
    justify-content:flex-start;
  }

  .documents-intro-note{
    grid-template-columns:1fr;
  }
}

@media(max-width:640px){
  html{scroll-padding-top:78px}
  body{font-size:15px}

  .container{
    width:min(var(--max),calc(100% - 24px));
  }

  .header-inner{
    min-height:72px;
  }

  .site-header .btn.ghost{
    display:none;
  }

  .hero{
    padding:58px 0 50px;
  }

  h1{
    font-size:clamp(2.8rem,15vw,4.25rem);
  }

  .reading-guide{
    grid-template-columns:1fr;
  }

  .reading-guide-label{
    grid-column:auto;
  }

  .section{
    padding:64px 0;
  }

  .cards.four,
  .process-grid{
    grid-template-columns:1fr;
  }

  .narrative-card,
  .case-reading{
    padding:27px 24px;
  }

  .hero-question{
    padding:28px 24px 28px 29px;
  }

  .question-strip,
  .hito-question{
    padding:24px 22px 24px 26px;
  }

  .question-strip::after,
  .hito-question::after{
    display:none;
  }

  .timeline{
    padding-left:20px;
  }

  .timeline::before{
    left:4px;
  }

  .timeline-item{
    padding:18px;
  }

  .timeline-item::before{
    left:-26px;
  }

  .section-infographic{
    padding:10px;
    border-radius:18px;
  }

  .section-infographic img{
    border-radius:12px;
  }
}

@media(prefers-reduced-motion:reduce){
  *,
  *::before,
  *::after{
    scroll-behavior:auto!important;
    transition:none!important;
    animation:none!important;
  }
}

/* ==========================================================================
   TORRE 36 · CIERRE V1 · Biblioteca documental + video integrado
   ========================================================================== */

.hero-purpose h2 strong{color:var(--question-dark)}

.embedded-video{
  margin:38px 0 42px;
  padding:34px;
  border:1px solid var(--border);
  border-radius:28px;
  background:linear-gradient(145deg,#f8fbfd,#eef4f7);
  box-shadow:var(--shadow-sm);
}
.embedded-video .section-head{margin-bottom:26px}
.embedded-video-inner{width:100%}

.damage-video-block{
  margin:34px 0 12px;
  padding:30px;
  border:1px solid var(--border);
  border-radius:24px;
  background:linear-gradient(145deg,#ffffff,#f3f7f9);
  box-shadow:var(--shadow-sm);
}
.section-head.compact{margin-bottom:22px}
.section-head.compact h3{
  font-size:clamp(1.45rem,2.4vw,2rem);
  margin-bottom:8px;
}
.damage-video-frame{
  width:min(100%,980px);
  margin-inline:auto;
}
.video-note code{
  padding:2px 6px;
  border-radius:6px;
  background:rgba(16,32,46,.07);
  color:var(--navy-900);
}

/* Biblioteca */
.documents-library{
  background:
    radial-gradient(circle at 90% 8%,rgba(68,124,158,.10),transparent 25%),
    linear-gradient(180deg,#f9fbfc 0%,#eef4f7 100%);
}
.doc-toolbar{margin:26px 0 16px}
.doc-search{
  display:flex;
  width:100%;
  align-items:center;
  gap:12px;
  padding:0 18px;
  border:1px solid var(--border-strong);
  border-radius:16px;
  background:#fff;
  color:var(--muted);
  box-shadow:var(--shadow-xs);
}
.doc-search:focus-within{
  border-color:var(--navy-600);
  box-shadow:0 0 0 4px rgba(68,124,158,.10);
}
.doc-search input{
  width:100%;
  min-height:54px;
  border:0;
  outline:0;
  background:transparent;
  color:var(--text);
}
.doc-filters{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  margin-bottom:18px;
}
.doc-filter{
  cursor:pointer;
  padding:9px 13px;
  border:1px solid var(--border);
  border-radius:999px;
  background:#fff;
  color:var(--text-2);
  font-size:.82rem;
  font-weight:760;
  transition:.2s var(--ease);
}
.doc-filter:hover{transform:translateY(-1px);border-color:var(--border-strong)}
.doc-filter.active{
  border-color:var(--navy-800);
  background:var(--navy-900);
  color:#fff;
}
.doc-filter .count{
  display:inline-grid;
  min-width:22px;
  height:22px;
  place-items:center;
  margin-left:5px;
  padding-inline:5px;
  border-radius:999px;
  background:rgba(255,255,255,.16);
  font-size:.72rem;
}
.doc-filter:not(.active) .count{background:var(--navy-050);color:var(--navy-800)}
.doc-count-label{
  margin:12px 0 18px;
  color:var(--muted);
  font-size:.86rem;
}
.doc-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:18px;
}
.doc-card{
  display:flex;
  min-height:330px;
  flex-direction:column;
  padding:24px;
  border:1px solid var(--border);
  border-radius:20px;
  background:#fff;
  box-shadow:var(--shadow-xs);
  transition:transform .2s var(--ease),box-shadow .2s var(--ease);
}
.doc-card:hover{transform:translateY(-4px);box-shadow:var(--shadow-md)}
.doc-card-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:10px;
}
.doc-id{
  color:var(--navy-800);
  font-size:.78rem;
  font-weight:950;
  letter-spacing:.06em;
}
.doc-date{color:var(--muted);font-size:.76rem}
.doc-origin{
  margin-bottom:10px;
  color:var(--muted);
  font-size:.78rem;
  font-weight:650;
}
.doc-badge{
  display:inline-flex;
  width:fit-content;
  margin-bottom:14px;
  padding:5px 9px;
  border-radius:999px;
  font-size:.68rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.doc-badge.pub-prioritario{background:var(--success-soft);color:var(--success)}
.doc-badge.pub-anonimizado{background:var(--project-soft);color:var(--project)}
.doc-badge.extracto{background:var(--insurance-soft);color:var(--insurance)}
.doc-badge.pendiente{background:var(--question-soft);color:var(--question-dark)}
.doc-badge.referencia{background:var(--control-soft);color:var(--control)}
.doc-card h3{font-size:1.12rem}
.doc-card p{
  flex:1;
  color:var(--muted);
  font-size:.91rem;
  text-align:left;
}
.doc-actions{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:18px;
}
.doc-btn{
  display:inline-flex;
  min-height:40px;
  align-items:center;
  justify-content:center;
  padding:0 14px;
  border:1px solid var(--border);
  border-radius:999px;
  background:#fff;
  color:var(--navy-900);
  font-size:.8rem;
  font-weight:820;
}
.doc-btn.primary{
  border-color:var(--navy-800);
  background:var(--navy-900);
  color:#fff;
}
.doc-unavailable{
  margin-top:18px;
  padding:10px 12px;
  border-radius:10px;
  background:var(--surface-alt);
  color:var(--muted);
  font-size:.78rem;
  font-weight:700;
}
.doc-empty{
  grid-column:1/-1;
  padding:36px;
  border:1px dashed var(--border-strong);
  border-radius:18px;
  background:#fff;
  color:var(--muted);
  text-align:center;
}

@media(max-width:1050px){
  .doc-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:640px){
  .embedded-video,.damage-video-block{padding:18px;border-radius:18px}
  .doc-grid{grid-template-columns:1fr}
  .doc-card{min-height:0}
}
