/* ==========================================================================
   EMS Chile S.A. — Due diligence legal y territorial para minería
   Design tokens derived from the approved screening.emschile.com mockup
   ========================================================================== */

:root {
  /* Color */
  --petrol:        #0A2A43;
  --petrol-mid:     #123655;
  --petrol-deep:    #071D30;
  --navy-shadow:    #182530;
  --gold:           #C2A878;
  --gold-light:     #DCC79C;
  --cream:          #FBF9F4;
  --beige:          #F4F0E6;
  --slate:          #4B5A64;
  --amber:          #C2914A;
  --terracotta:     #A8623B;
  --red-earth:      #A6493B;
  --sage:           #5C8A6B;
  --ink:            #1C2521;
  --line:           rgba(10, 42, 67, 0.12);

  /* Type */
  --display: 'Fraunces', serif;
  --body:    'IBM Plex Sans', sans-serif;
  --mono:    'IBM Plex Mono', monospace;

  /* Layout */
  --maxw: 1160px;
  --radius: 3px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--petrol);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 500; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; color: var(--ink); }
a { color: var(--petrol); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--petrol);
  display: inline-block;
  padding: 0.35em 0.7em;
  border-radius: var(--radius);
}

.mono-tag {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  color: var(--slate);
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.5rem;
}

img, svg { max-width: 100%; display: block; }

/* ---------------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  text-decoration: none;
}
.brand-mark {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.28rem;
  color: var(--petrol);
  letter-spacing: 0.01em;
}
.brand-mark em {
  font-style: normal;
  color: var(--gold);
}
.brand-sub {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  display: none;
}
@media (min-width: 640px) { .brand-sub { display: inline; } }

nav.main-nav {
  display: none;
  gap: 1.9rem;
}
@media (min-width: 900px) { nav.main-nav { display: flex; } }
nav.main-nav a {
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--petrol);
  position: relative;
  padding: 0.25rem 0;
}
nav.main-nav a.active,
nav.main-nav a:hover { color: var(--terracotta); }
nav.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--gold);
}

.nav-cta {
  background: var(--petrol);
  color: var(--cream) !important;
  padding: 0.55em 1.1em;
  border-radius: var(--radius);
  font-size: 0.86rem !important;
}
.nav-cta:hover { background: var(--petrol-mid); }

.lang-switch {
  font-family: var(--mono) !important;
  font-size: 0.76rem !important;
  border: 1px solid var(--line);
  padding: 0.4em 0.75em !important;
  border-radius: var(--radius);
  color: var(--slate) !important;
  letter-spacing: 0.04em;
}
.lang-switch:hover { border-color: var(--gold); color: var(--terracotta) !important; }
.mobile-nav .lang-switch { border: none; border-top: 1px solid var(--line); }

.menu-toggle {
  display: inline-flex;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.5em 0.7em;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--petrol);
  cursor: pointer;
}
@media (min-width: 900px) { .menu-toggle { display: none; } }

.mobile-nav {
  display: none;
  flex-direction: column;
  border-top: 1px solid var(--line);
  background: var(--cream);
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 0.9rem 1.5rem;
  text-decoration: none;
  color: var(--petrol);
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

/* ----------------------------------------------------------- topo motif */
.topo-field {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.topo-field svg { width: 100%; height: 100%; }

/* -------------------------------------------------------------- hero */
.hero {
  position: relative;
  background: var(--petrol);
  color: var(--cream);
  overflow: hidden;
  padding: 5.5rem 0 4.5rem;
}
.hero .wrap { position: relative; z-index: 2; }
.hero-kicker {
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 1.1rem;
}
.hero h1 { color: var(--cream); max-width: 15ch; }
.hero .lede {
  color: #D8DEE2;
  max-width: 52ch;
  font-size: 1.08rem;
  margin-top: 1.1rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.85em 1.4em;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: var(--body);
}
.btn-gold { background: var(--gold); color: var(--petrol-deep); }
.btn-gold:hover { background: var(--gold-light); }
.btn-outline { border-color: rgba(251,249,244,0.4); color: var(--cream); }
.btn-outline:hover { border-color: var(--cream); }
.btn-petrol { background: var(--petrol); color: var(--cream); }
.btn-petrol:hover { background: var(--petrol-mid); }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3.2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(251,249,244,0.18);
  max-width: 640px;
}
.hero-stats .num {
  font-family: var(--mono);
  font-size: 1.5rem;
  color: var(--gold);
  display: block;
}
.hero-stats .lbl {
  font-size: 0.8rem;
  color: #C7D0D6;
}

/* ------------------------------------------------------------ sections */
section { padding: 4.5rem 0; }
.section-tight { padding: 3rem 0; }
.section-beige { background: var(--beige); }
.section-petrol { background: var(--petrol); color: var(--cream); }
.section-petrol h2, .section-petrol h3 { color: var(--cream); }
.section-petrol .eyebrow { background: var(--gold); color: var(--petrol-deep); }

.section-head { max-width: 62ch; margin-bottom: 2.6rem; }
.section-head .eyebrow { margin-bottom: 1rem; }

/* ----------------------------------------------------------------- grid */
.grid-4 { display: grid; gap: 1.1rem; grid-template-columns: repeat(4, 1fr); }
.grid-3 { display: grid; gap: 1.3rem; grid-template-columns: repeat(3, 1fr); }
.grid-2 { display: grid; gap: 1.6rem; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem;
}
.section-beige .card { background: var(--cream); }
.section-petrol .card { background: rgba(251,249,244,0.06); border-color: rgba(251,249,244,0.16); }

.card .mono-tag { display: block; margin-bottom: 0.6rem; }
.section-petrol .card .mono-tag { color: var(--gold-light); }

/* ----------------------------------------------------------- value props */
.value-card {
  border-top: 3px solid var(--gold);
  padding-top: 1.2rem;
}
.value-card h3 { margin-bottom: 0.4rem; }
.value-card p { color: var(--slate); font-size: 0.95rem; margin-bottom: 0; }

/* --------------------------------------------------------------- semaforo */
.semaforo-row {
  display: flex;
  gap: 0.9rem;
  flex-wrap: wrap;
  margin: 1.6rem 0;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.6em 1em;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.85rem;
  background: var(--cream);
  border: 1px solid var(--line);
}
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-green { background: var(--sage); }
.dot-amber { background: var(--amber); }
.dot-red { background: var(--red-earth); }

/* ------------------------------------------------------------------ table */
table.pricing {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  font-size: 0.94rem;
}
table.pricing th, table.pricing td {
  text-align: left;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
}
table.pricing th {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
  background: var(--petrol);
}
table.pricing tr:nth-child(even) td { background: var(--beige); }
table.pricing td:last-child, table.pricing th:last-child { font-family: var(--mono); }

/* ------------------------------------------------------------------ steps */
.steps { counter-reset: step; }
.step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 1rem;
  padding: 1.3rem 0;
  border-bottom: 1px solid var(--line);
}
.step:last-child { border-bottom: none; }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  font-family: var(--mono);
  color: var(--gold);
  background: var(--petrol);
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
}

/* ------------------------------------------------------------------ quote */
blockquote {
  font-family: var(--display);
  font-size: 1.5rem;
  color: var(--petrol);
  border-left: 3px solid var(--gold);
  padding-left: 1.3rem;
  margin: 1.6rem 0;
  max-width: 46ch;
}

/* ------------------------------------------------------------------- CTA */
.cta-band {
  background: var(--navy-shadow);
  color: var(--cream);
  text-align: center;
  padding: 4rem 0;
}
.cta-band h2 { color: var(--cream); max-width: 26ch; margin: 0 auto 1rem; }
.cta-band p { color: #C7D0D6; max-width: 48ch; margin: 0 auto 1.8rem; }
.cta-band .hero-actions { justify-content: center; }

/* ---------------------------------------------------------------- footer */
footer.site-footer {
  background: var(--petrol-deep);
  color: #A9B6BE;
  padding: 3rem 0 2rem;
  font-size: 0.88rem;
}
footer.site-footer .foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
@media (max-width: 700px) { footer.site-footer .foot-grid { grid-template-columns: 1fr; } }
footer.site-footer h4 {
  color: var(--gold-light);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}
footer.site-footer a { color: #C7D0D6; text-decoration: none; }
footer.site-footer a:hover { color: var(--gold-light); }
footer.site-footer .foot-brand { color: var(--cream); font-family: var(--display); font-size: 1.2rem; margin-bottom: 0.6rem; }
footer.site-footer .foot-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-top: 1.4rem;
  font-size: 0.78rem;
  color: #7C8A93;
}
footer.site-footer ul { list-style: none; margin: 0; padding: 0; }
footer.site-footer li { margin-bottom: 0.55rem; }

/* --------------------------------------------------------------- utility */
.mt-0 { margin-top: 0; }
.text-slate { color: var(--slate); }
.center { text-align: center; }
.page-hero {
  background: var(--petrol);
  color: var(--cream);
  padding: 3.6rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.page-hero .wrap { position: relative; z-index: 2; }
.page-hero h1 { color: var(--cream); max-width: 20ch; }
.page-hero p { color: #D8DEE2; max-width: 56ch; }

.two-col {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }

.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li {
  padding-left: 1.6rem;
  position: relative;
  margin-bottom: 0.7rem;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.5em;
  width: 8px; height: 8px;
  background: var(--gold);
}
