:root {
  --bg-cream: #faf5ed;
  --bg-warm: #f0e8db;
  --bg-light: #fdfaf3;
  --wood-light: #d4b896;
  --wood-mid: #b8956b;
  --wood-dark: #6f4e37;
  --ember: #c8472b;
  --ember-soft: #e07a4d;
  --steam: #e8d4a0;
  --ink: #2b2018;
  --ink-soft: #5a4a3b;
  --line: #e0d4bc;
  --shadow: 0 1px 2px rgba(43, 32, 24, 0.04), 0 4px 16px rgba(43, 32, 24, 0.06);
  --shadow-lg: 0 4px 12px rgba(43, 32, 24, 0.08), 0 16px 48px rgba(43, 32, 24, 0.10);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; background: var(--bg-cream); color: var(--ink); line-height: 1.6; -webkit-font-smoothing: antialiased; }
section[id], div[id] { scroll-margin-top: 130px; }
h1, h2, h3, h4 { font-family: 'Fraunces', Georgia, serif; color: var(--ink); line-height: 1.1; letter-spacing: -0.02em; }
a { color: var(--ember); text-decoration: none; }
a:hover { color: var(--wood-dark); }
.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* HEADER */
header.site-header { position: sticky; top: 0; z-index: 50; background: rgba(250, 245, 237, 0.92); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.logo { font-family: 'Fraunces', serif; font-weight: 900; font-style: italic; font-size: 26px; letter-spacing: -0.03em; color: var(--ink); display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo .logo-symbol { display: inline-flex; line-height: 0; }
.logo .logo-symbol svg { display: block; }
.logo .logo-symbol path { stroke: var(--ember); fill: none; stroke-linecap: round; stroke-linejoin: round; }
.logo-flame { color: var(--ember); }
.nav-links { display: flex; gap: 22px; font-size: 13px; }
.nav-links a { color: var(--ink-soft); font-weight: 500; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ember); }
.nav-cta { background: var(--ember); color: white !important; padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 13px; }

/* HERO */
.hero { padding: 96px 0 64px; text-align: center; background: radial-gradient(circle at 80% 20%, rgba(200, 71, 43, 0.06), transparent 50%), radial-gradient(circle at 20% 80%, rgba(212, 184, 150, 0.18), transparent 50%); }
.hero-pre { display: inline-block; background: var(--bg-warm); border: 1px solid var(--line); color: var(--wood-dark); padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 20px; }
.hero h1 { font-size: clamp(40px, 6vw, 80px); font-weight: 900; margin-bottom: 16px; }
.hero h1 em { font-style: italic; color: var(--ember); font-weight: 500; }
.hero-sub { font-size: clamp(17px, 2vw, 22px); color: var(--ink-soft); max-width: 740px; margin: 0 auto; font-weight: 400; }

/* HERO PAGE (sub-páginas) */
.hero-page { padding: 64px 0 32px; background: linear-gradient(180deg, var(--bg-warm), var(--bg-cream)); border-bottom: 1px solid var(--line); }
.hero-page .breadcrumb { font-size: 12px; color: var(--wood-dark); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.hero-page .breadcrumb a { color: var(--wood-dark); }
.hero-page h1 { font-size: clamp(36px, 5vw, 60px); font-weight: 900; margin-bottom: 16px; max-width: 880px; }
.hero-page .lead { font-size: 18px; color: var(--ink-soft); max-width: 720px; }

/* TRUST STRIP */
.trust-strip { background: var(--bg-warm); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 32px 0; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: center; }
.trust-item { display: flex; align-items: center; gap: 12px; }
.trust-icon { font-size: 26px; }
.trust-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--wood-dark); font-weight: 700; }
.trust-value { font-family: 'Fraunces', serif; font-size: 15px; font-weight: 600; }

/* QUICKNAV (index) */
.quicknav { padding: 72px 0 80px; }
.quicknav-pre { text-align: center; color: var(--ember); font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 8px; }
.quicknav h2 { text-align: center; font-size: clamp(28px, 3vw, 40px); margin-bottom: 12px; }
.quicknav-sub { text-align: center; color: var(--ink-soft); font-size: 16px; max-width: 580px; margin: 0 auto 48px; }
.quicknav-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.quicknav-card { display: block; background: white; border: 1px solid var(--line); border-radius: 18px; padding: 28px 22px 26px; text-decoration: none; color: var(--ink); transition: all 0.2s; position: relative; min-height: 240px; }
.quicknav-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--ember); color: var(--ink) !important; }
.quicknav-card .num { font-family: 'Fraunces', serif; font-size: 14px; color: var(--ember); font-weight: 700; letter-spacing: 0.08em; margin-bottom: 6px; }
.quicknav-card .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--bg-warm); color: var(--ember); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; margin-bottom: 16px; }
.quicknav-card h3 { font-size: 19px; margin-bottom: 8px; font-weight: 700; }
.quicknav-card p { font-size: 13px; color: var(--ink-soft); line-height: 1.55; margin-bottom: 12px; }
.quicknav-card .meta { font-size: 11px; color: var(--wood-dark); font-weight: 600; padding-top: 12px; border-top: 1px solid var(--line); position: absolute; left: 22px; right: 22px; bottom: 22px; }

/* MINI NAV en sub-páginas */
.mini-nav { background: var(--bg-light); border-bottom: 1px solid var(--line); padding: 16px 0; position: sticky; top: 56px; z-index: 40; }
.mini-nav .container { position: relative; }
.mini-nav-grid { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; scroll-behavior: smooth; }
.mini-nav-grid::-webkit-scrollbar { display: none; }
.mini-nav-grid a { padding: 8px 14px; background: white; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--ink-soft); white-space: nowrap; transition: all 0.15s; flex-shrink: 0; }
.mini-nav-grid a:hover, .mini-nav-grid a:focus { background: var(--bg-warm); border-color: var(--ember); color: var(--ember); outline: none; }

/* SECTIONS */
section.section { padding: 80px 0; border-top: 1px solid var(--line); }
section.section.alt { background: var(--bg-warm); }
section.section.first { border-top: 0; padding-top: 64px; }
.section-pre { color: var(--ember); font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 12px; }
.section-title { font-size: clamp(28px, 3.5vw, 42px); font-weight: 700; margin-bottom: 16px; max-width: 800px; }
.section-sub { font-size: 17px; color: var(--ink-soft); max-width: 720px; margin-bottom: 36px; }

/* CONTENT TYPES */
.content-card { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 28px; box-shadow: var(--shadow); }
.content-card h3 { font-family: 'Fraunces', serif; font-size: 22px; margin-bottom: 12px; }
.content-card p { color: var(--ink-soft); font-size: 15px; line-height: 1.7; margin-bottom: 12px; }
.content-card p:last-child { margin-bottom: 0; }
.content-card strong { color: var(--ink); }
.content-card ul { list-style: none; padding: 0; }
.content-card ul li { padding: 6px 0 6px 22px; position: relative; font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; }
.content-card ul li::before { content: "→"; position: absolute; left: 0; color: var(--ember); font-weight: 700; }
.content-card ul li strong { color: var(--ink); }
.content-card ol { padding-left: 22px; }
.content-card ol li { padding: 4px 0; font-size: 14.5px; color: var(--ink-soft); line-height: 1.6; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.three-col { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.four-col { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }

/* STAT CARDS */
.market-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 32px 0; }
.stat-card { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.stat-card .pre { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--wood-dark); }
.stat-card .num { font-family: 'Fraunces', serif; font-size: 30px; font-weight: 700; color: var(--ember); line-height: 1.1; margin: 6px 0 4px; }
.stat-card .lbl { font-size: 13px; color: var(--ink-soft); }

/* DAFO / SWOT */
.dafo-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.dafo-card { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 24px 28px; border-left: 4px solid; }
.dafo-card.f { border-left-color: #2e7d4f; }
.dafo-card.o { border-left-color: #2e6f9e; }
.dafo-card.d { border-left-color: var(--ember); }
.dafo-card.a { border-left-color: var(--wood-dark); }
.dafo-tag { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px; }
.dafo-card.f .dafo-tag { color: #2e7d4f; }
.dafo-card.o .dafo-tag { color: #2e6f9e; }
.dafo-card.d .dafo-tag { color: var(--ember); }
.dafo-card.a .dafo-tag { color: var(--wood-dark); }
.dafo-card h3 { font-size: 17px; margin-bottom: 12px; }
.dafo-card ul { list-style: none; padding: 0; }
.dafo-card li { padding: 4px 0 4px 18px; position: relative; font-size: 14px; color: var(--ink-soft); line-height: 1.6; }
.dafo-card li::before { content: "•"; position: absolute; left: 0; color: var(--ember); }

/* TABLES */
.table-card { background: white; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.tc-row { display: grid; padding: 14px 22px; border-bottom: 1px solid var(--line); align-items: center; font-size: 13.5px; }
.tc-row:last-child { border-bottom: 0; }
.tc-row.head { background: var(--bg-warm); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--wood-dark); }
.tc-row.us { background: linear-gradient(90deg, rgba(200, 71, 43, 0.05), transparent); }

/* TIMELINE */
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 24px; }
.timeline-step { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; position: relative; }
.timeline-step .phase { font-family: 'Fraunces', serif; font-size: 24px; color: var(--ember); font-weight: 700; line-height: 1; margin-bottom: 4px; }
.timeline-step .label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--wood-dark); font-weight: 700; margin-bottom: 10px; }
.timeline-step ul { list-style: none; padding: 0; }
.timeline-step ul li { padding: 4px 0 4px 16px; position: relative; font-size: 13px; color: var(--ink-soft); line-height: 1.6; }
.timeline-step ul li::before { content: "→"; position: absolute; left: 0; color: var(--ember); font-weight: 700; font-size: 11px; }

/* RISK MATRIX */
.risks-table { background: white; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.risk-row { display: grid; grid-template-columns: 2fr 1fr 1fr 2fr; gap: 16px; padding: 16px 24px; border-bottom: 1px solid var(--line); align-items: start; font-size: 13.5px; }
.risk-row:last-child { border-bottom: 0; }
.risk-row.head { background: var(--bg-warm); font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: var(--wood-dark); }
.risk-tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.risk-tag.high { background: #fde2db; color: var(--ember); }
.risk-tag.medium { background: #fff3cd; color: #8c6d1f; }
.risk-tag.low { background: #d9f0d9; color: #2e7d4f; }

/* PENDING BADGE */
.pending { display: inline-block; background: var(--bg-warm); border: 1px dashed var(--ember); color: var(--ember); padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; margin-left: 8px; text-transform: uppercase; letter-spacing: 0.04em; }
.recommendation { display: inline-block; background: var(--bg-light); border: 1px solid var(--line); color: var(--wood-dark); padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; margin-left: 8px; }

/* PRINCIPLES / OL */
.principles { background: white; border: 1px solid var(--line); border-radius: 20px; padding: 40px; margin-top: 24px; }
.principles h3 { font-family: 'Fraunces', serif; font-size: 24px; margin-bottom: 24px; }
.principles ol { list-style: none; padding: 0; counter-reset: rules; }
.principles li { padding: 14px 0 14px 56px; position: relative; font-size: 15.5px; color: var(--ink-soft); line-height: 1.6; counter-increment: rules; border-bottom: 1px solid var(--line); }
.principles li:last-child { border-bottom: 0; }
.principles li::before { content: counter(rules); position: absolute; left: 0; top: 14px; width: 36px; height: 36px; background: var(--ember); color: white; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-family: 'Fraunces', serif; font-weight: 700; font-size: 16px; }
.principles li strong { color: var(--ink); }

/* ECOSYSTEM ORGANIGRAM */
.ecosystem-org {
  margin: 32px 0 8px;
  padding: 40px 32px 32px;
  background: linear-gradient(180deg, var(--bg-light) 0%, var(--bg-warm) 100%);
  border: 1px solid var(--line);
  border-radius: 24px;
  position: relative;
  overflow: hidden;
}
.ecosystem-org::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(200, 71, 43, 0.06), transparent 55%);
  pointer-events: none;
}
.org-parent {
  position: relative; z-index: 2;
  max-width: 360px; margin: 0 auto;
  background: var(--ink);
  color: white;
  border-radius: 16px;
  padding: 22px 28px;
  text-align: center;
  box-shadow: var(--shadow-lg);
  border: 2px solid var(--wood-dark);
}
.org-parent-pre { font-size: 10px; text-transform: uppercase; letter-spacing: 0.18em; color: var(--ember-soft); font-weight: 700; margin-bottom: 6px; }
.org-parent-name { font-family: 'Fraunces', serif; font-size: 28px; font-weight: 900; letter-spacing: -0.02em; line-height: 1.1; }
.org-parent-sub { font-size: 12px; color: rgba(255,255,255,0.65); margin-top: 6px; }

.org-connector {
  position: relative; z-index: 1;
  width: 2px; height: 36px;
  background: linear-gradient(180deg, var(--wood-dark), var(--line));
  margin: 0 auto;
}

.org-brands {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.org-brand {
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 14px 16px;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 6px;
  min-height: 150px;
}
.org-brand-dot {
  width: 12px; height: 12px;
  border-radius: 50%;
  margin: 0 auto 4px;
  box-shadow: 0 0 0 4px rgba(255,255,255,0.6);
}
.org-brand-name { font-family: 'Fraunces', serif; font-size: 17px; font-weight: 800; color: var(--ink); letter-spacing: -0.01em; }
.org-brand-role { font-size: 11px; color: var(--ink-soft); line-height: 1.4; flex-grow: 1; }
.org-brand-invoice { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; color: var(--wood-dark); margin-top: 4px; padding-top: 8px; border-top: 1px dashed var(--line); }

.brand-rekovital .org-brand-dot { background: #74cc26; }
.brand-rekovital { border-top: 3px solid #74cc26; }
.brand-valkea .org-brand-dot { background: #2c3e50; }
.brand-valkea { border-top: 3px solid #2c3e50; }
.brand-avyra .org-brand-dot { background: #b8956b; }
.brand-avyra { border-top: 3px solid #b8956b; }
.brand-rekorental .org-brand-dot { background: #d97757; }
.brand-rekorental { border-top: 3px solid #d97757; }
.brand-sauneando .org-brand-dot { background: var(--ember); }
.brand-sauneando { border-top: 3px solid var(--ember); }

.org-brand.is-featured {
  background: linear-gradient(180deg, #fff 0%, #fff5ed 100%);
  border: 1.5px solid var(--ember);
  box-shadow: 0 4px 16px rgba(200, 71, 43, 0.18), var(--shadow);
  transform: translateY(-4px);
}
.org-brand.is-featured .org-brand-invoice { color: var(--ember); }
.org-brand-flag {
  position: absolute;
  top: -10px; left: 50%; transform: translateX(-50%);
  background: var(--ember); color: white;
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 999px;
  white-space: nowrap;
}

.org-flow {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 14px;
  background: rgba(200, 71, 43, 0.08);
  border: 1px dashed var(--ember);
  border-radius: 12px;
  padding: 14px 20px;
  margin-top: 8px;
}
.org-flow-arrow {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--ember); color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700;
}
.org-flow-text { font-size: 13px; color: var(--ink); line-height: 1.5; }
.org-flow-text strong { color: var(--ember); }

/* FOOTER */
footer { background: var(--ink); color: rgba(255,255,255,0.7); text-align: center; padding: 48px 24px; font-size: 13px; }
footer .logo { color: white; margin-bottom: 12px; justify-content: center; }
footer .logo-flame { color: var(--ember); }
footer p { margin: 4px 0; }

/* RESPONSIVE */
/* Tablet (768-960) — collapse 3+ col grids before single column */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .trust-grid { grid-template-columns: repeat(2, 1fr); }
  .quicknav-grid { grid-template-columns: repeat(2, 1fr); }
  .three-col, .timeline { grid-template-columns: repeat(2, 1fr); }
  .ecosystem-org { padding: 36px 24px 28px; }
}

/* Mobile (<720) */
@media (max-width: 720px) {
  .container { padding: 0 18px; }
  .hero { padding: 72px 0 48px; }
  .hero-page { padding: 48px 0 28px; }
  section.section { padding: 56px 0; }

  .quicknav-grid { grid-template-columns: 1fr; }
  .quicknav-card { min-height: auto; }
  .quicknav-card .meta { position: static; padding-top: 12px; margin-top: 12px; }

  .market-stats, .four-col { grid-template-columns: repeat(2, 1fr); }
  .two-col, .three-col, .dafo-grid, .timeline { grid-template-columns: 1fr; }

  /* Risk table: hide head, show stacked cards with built-in context */
  .risk-row.head { display: none; }
  .risk-row { grid-template-columns: 1fr; gap: 10px; padding: 18px 20px; }
  .risk-row + .risk-row { border-top: 1px solid var(--line); }

  /* Generic tc-row: stack on mobile */
  .tc-row { grid-template-columns: 1fr !important; gap: 6px; padding: 14px 18px; font-size: 13px; }
  .tc-row.head { display: none; }

  .org-brands { grid-template-columns: repeat(2, 1fr); }
  .org-brand.is-featured { transform: none; grid-column: 1 / -1; }
  .ecosystem-org { padding: 28px 16px 22px; }
  .org-parent { padding: 18px 22px; }
  .org-parent-name { font-size: 24px; }

  .principles { padding: 28px 24px; }
  .principles li { padding-left: 48px; font-size: 14.5px; }
  .principles li::before { width: 30px; height: 30px; font-size: 14px; }

  .content-card { padding: 22px 20px; }
  .content-card h3 { font-size: 19px; }

  footer { padding: 36px 18px; }
}
