:root {
  --bg: #f7f5f0;
  --bg-alt: #efece4;
  --surface: #ffffff;
  --ink: #162120;
  --ink-muted: #4a5856;
  --petrol: #005151;
  --petrol-dark: #0e2b29;
  --petrol-soft: #e1eeec;
  --terracotta: #c9762a;
  --terracotta-dark: #a65c1b;
  --border: #dbd6c8;
  --ok-bg: #e0f0e6;
  --ok-ink: #1f7a4d;
  --err-bg: #ffdad6;
  --err-ink: #93000a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 14px;
  --maxw: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--petrol); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--petrol-dark); }
:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 2px; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Banner demo / avisos superiores */
.demo-banner {
  background: #fdf2e6;
  border-bottom: 1px solid #ecc9a4;
  color: #6f3900;
  font-size: 14px;
  padding: 10px 20px;
  text-align: center;
  font-weight: 600;
}
.demo-banner a { color: #6f3900; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--petrol-dark);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 19px;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--petrol-dark);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.nav-desktop {
  display: none;
  align-items: center;
  gap: 22px;
  font-size: 15px;
  font-weight: 500;
}
.nav-desktop a { text-decoration: none; color: var(--ink); }
.nav-desktop a:hover { color: var(--petrol); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.nav-mobile {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 14px 20px 20px;
}
.nav-mobile.is-open { display: block; }
.nav-mobile a {
  display: block;
  padding: 10px 0;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  border-bottom: 1px solid var(--bg-alt);
}

@media (min-width: 900px) {
  .nav-desktop { display: flex; }
  .menu-btn, .nav-mobile { display: none !important; }
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn-primary { background: var(--petrol); color: #fff; }
.btn-primary:hover { background: var(--petrol-dark); color: #fff; }
.btn-accent { background: var(--terracotta); color: #fff; }
.btn-accent:hover { background: var(--terracotta-dark); color: #fff; }
.btn-outline {
  background: transparent;
  border-color: var(--petrol);
  color: var(--petrol);
}
.btn-outline:hover { background: var(--petrol-soft); color: var(--petrol-dark); }
.btn-outline-light {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.55);
  color: #fff;
}
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.btn-sm { min-height: 38px; padding: 7px 14px; font-size: 14px; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #005151 0%, #0b403f 55%, #0e2b29 100%);
  color: #fff;
  padding: 58px 0 64px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.35fr 0.95fr; gap: 44px; }
}
.kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9be0de;
  margin: 0 0 14px;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 4.3vw, 44px);
  line-height: 1.18;
  margin: 0 0 18px;
  font-weight: 600;
}
.hero p.lead {
  font-size: 18px;
  line-height: 1.58;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 26px;
  max-width: 60ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  padding: 24px;
}
.hero-card h2 {
  font-family: var(--serif);
  font-size: 19px;
  margin: 0 0 12px;
  color: #fff;
}
.hero-card ul {
  margin: 0;
  padding-left: 18px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 15px;
}
.hero-card li + li { margin-top: 8px; }

/* Secciones */
section.band { padding: 56px 0; }
section.band-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 66ch; margin-bottom: 30px; }
.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.25;
  margin: 0 0 10px;
  color: var(--petrol-dark);
}
.section-head p { margin: 0; color: var(--ink-muted); font-size: 17px; }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 20px; }
.grid-4 { display: grid; grid-template-columns: 1fr; gap: 18px; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card-tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--petrol);
  background: var(--petrol-soft);
  padding: 4px 9px;
  border-radius: 6px;
  margin-bottom: 12px;
}
.card h3 {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.3;
  margin: 0 0 10px;
  color: var(--petrol-dark);
}
.card p { margin: 0; color: var(--ink-muted); font-size: 15px; }
.card ul { margin: 12px 0 0; padding-left: 18px; color: var(--ink-muted); font-size: 15px; }
.card li + li { margin-top: 6px; }

/* Tabla de mercados asiáticos */
.table-wrap { overflow-x: auto; }
table.market-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 15px;
}
.market-table th, .market-table td {
  text-align: left;
  padding: 14px 16px;
  border-bottom: 1px solid var(--bg-alt);
  vertical-align: top;
}
.market-table th {
  background: var(--bg-alt);
  color: var(--petrol-dark);
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Barra de idiomas en demo */
.lang-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.lang-pill {
  min-height: 38px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.lang-pill.is-active {
  background: var(--petrol);
  border-color: var(--petrol);
  color: #fff;
}

/* Formularios */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 720px) {
  .form-grid-2 { grid-template-columns: repeat(2, 1fr); }
}
label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}
input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #c9c3b2;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}
textarea { min-height: 112px; resize: vertical; }
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 9px;
  font-size: 15px;
  display: none;
}
.form-status.is-ok { display: block; background: var(--ok-bg); color: var(--ok-ink); }
.form-status.is-err { display: block; background: var(--err-bg); color: var(--err-ink); }
.small-note { font-size: 13px; color: var(--ink-muted); margin-top: 10px; }

/* Footer */
.site-footer {
  background: var(--petrol-dark);
  color: rgba(255, 255, 255, 0.82);
  padding: 40px 0;
  font-size: 14px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
@media (min-width: 720px) {
  .footer-inner { flex-direction: row; align-items: center; justify-content: space-between; }
}
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: #fff; text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }

/* Páginas legales */
.prose { max-width: 72ch; padding: 48px 20px; margin: 0 auto; }
.prose h1 { font-family: var(--serif); color: var(--petrol-dark); font-size: 32px; margin-top: 0; }
.prose h2 { font-family: var(--serif); color: var(--petrol-dark); font-size: 22px; margin-top: 28px; }
.todo-mark {
  background: #fdf2e6;
  border: 1px dashed var(--terracotta);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  color: #6f3900;
}
