:root {
  --c-blue:    #007086;
  --c-sky:     #99D6EA;
  --c-orange:  #DC582A;
  --c-lime:    #D0DF00;
  --c-teal:    #00816D;

  --c-blue-5:    color-mix(in srgb, var(--c-blue)  6%, white);
  --c-sky-15:    color-mix(in srgb, var(--c-sky)   30%, white);
  --c-teal-5:    color-mix(in srgb, var(--c-teal)  6%, white);
  --c-lime-10:   color-mix(in srgb, var(--c-lime) 12%, white);
  --c-orange-8:  color-mix(in srgb, var(--c-orange) 10%, white);

  --ink:        #0c2a31;
  --ink-soft:   #486870;
  --paper:      #f6fbfc;
  --paper-2:    #ffffff;
  --line:       #d8e8ec;

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;

  --shadow-sm: 0 2px 6px rgba(12,42,49,.06);
  --shadow-md: 0 8px 20px rgba(12,42,49,.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Bubbles decorativas — muy sutiles, no compiten con info */
.bubble {
  position: fixed;
  border-radius: 50%;
  background: var(--c-sky);
  opacity: .12;
  pointer-events: none;
  z-index: 0;
  filter: blur(1px);
}
.bubble--a { width: 220px; height: 220px; top: -40px; right: -50px; }
.bubble--b { width: 90px;  height: 90px;  top: 38vh; left: 2vw; opacity: .08; }
.bubble--c { width: 140px; height: 140px; bottom: 6vh; right: 8vw; opacity: .07; }

/* ============ HEADER ============ */
.page-header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
  padding: 28px 48px 22px;
  background: var(--paper-2);
  border-bottom: 1px solid var(--line);
}

.page-header__brand {
  display: flex;
  gap: 20px;
  align-items: center;
}

.logo-slot {
  height: 84px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.logo-slot img {
  height: 84px;
  width: auto;
  display: block;
}

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--c-teal);
}

h1 {
  font-family: 'Yanone Kaffeesatz', sans-serif;
  font-weight: 700;
  font-size: 44px;
  line-height: 1;
  margin: 4px 0 8px;
  color: var(--c-blue);
  letter-spacing: -.005em;
}

.page-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--ink-soft);
  font-size: 13px;
}
.page-header__meta .dot { color: var(--c-sky); }

.page-header__pillars {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pill {
  font-family: 'Yanone Kaffeesatz', sans-serif;
  font-weight: 500;
  font-size: 18px;
  padding: 4px 14px;
  border-radius: 999px;
  color: white;
  letter-spacing: .02em;
}
.pill--blue   { background: var(--c-blue); }
.pill--teal   { background: var(--c-teal); }
.pill--orange { background: var(--c-orange); }

/* ============ MAIN ============ */
.page-main {
  position: relative;
  z-index: 1;
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 48px 60px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.section-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--c-orange);
  margin-bottom: 4px;
}

h2 {
  font-family: 'Yanone Kaffeesatz', sans-serif;
  font-weight: 700;
  font-size: 36px;
  margin: 0 0 12px;
  color: var(--ink);
  line-height: 1.05;
}
h3 {
  font-family: 'Yanone Kaffeesatz', sans-serif;
  font-weight: 700;
  font-size: 28px;
  margin: 0;
  color: var(--c-blue);
  line-height: 1.1;
}
h4 {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 13px;
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--ink-soft);
}

/* ============ INTRO ============ */
.intro {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 32px;
  align-items: start;
}
.intro__copy p {
  color: var(--ink-soft);
  max-width: 60ch;
}
.intro__copy strong { color: var(--ink); }
.intro__note {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--c-lime-10);
  border-left: 3px solid var(--c-lime);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: 13.5px;
}

.intro__legend {
  list-style: none;
  margin: 0;
  padding: 16px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  display: grid;
  gap: 6px;
  box-shadow: var(--shadow-sm);
}
.intro__legend li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-soft);
  font-family: 'JetBrains Mono', monospace;
}
.intro__legend li b { color: var(--ink); font-weight: 600; }
.swatch {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}

/* ============ CARDS ============ */
.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
  padding: 22px 28px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, color-mix(in srgb, var(--c-sky) 8%, white) 0%, white 100%);
}
.card__meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-soft);
}
.card__meta b { color: var(--ink); font-weight: 700; }

.card__foot {
  padding: 18px 28px 22px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--c-sky) 5%, white);
  font-size: 13px;
}
.card__foot--cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.phase {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  margin: 0 4px;
  background: white;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.phase--A { border-color: var(--c-sky);    color: var(--c-blue);   }
.phase--B { border-color: var(--c-blue);   color: var(--c-blue);   }
.phase--C { border-color: var(--c-teal);   color: var(--c-teal);   }
.phase--D { border-color: var(--c-orange); color: var(--c-orange); }
.phase--E { border-color: var(--c-lime);   color: #6a7400;         }
.phase--F { border-color: var(--c-teal);   color: var(--c-teal);   }

/* ============ THUMBNAIL ============ */
.thumb-frame {
  background:
    linear-gradient(180deg, white 0%, color-mix(in srgb, var(--c-sky) 5%, white) 100%);
  padding: 18px;
  display: flex;
  justify-content: center;
}
.thumb-svg {
  width: 100%;
  max-width: 1180px;
  height: auto;
  aspect-ratio: 1600 / 1200;
  display: block;
}

/* ============ SAMPLE ============ */
.sample-frame {
  padding: 22px;
  background:
    radial-gradient(circle at 20% 0%, color-mix(in srgb, var(--c-sky) 14%, white) 0%, white 50%);
  display: flex;
  justify-content: center;
}
.sample-svg {
  width: 100%;
  max-width: 1100px;
  height: auto;
  aspect-ratio: 1100 / 620;
  display: block;
}

.legend-block ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-soft);
}
.legend-block__type li { line-height: 1.7; }

.dot-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  vertical-align: -2px;
  border-radius: 4px;
}
.dot-icon--node     { background: var(--c-blue);   }
.dot-icon--decision { background: var(--c-orange); transform: rotate(45deg) scale(.85); border-radius: 2px; }
.dot-icon--sw       { background: var(--c-teal);   border-radius: 999px; }
.dot-icon--metric   { background: var(--c-lime);   border: 1px dashed #6a7400; }

/* ============ NEXT ============ */
.next {
  background: var(--c-blue);
  color: white;
  padding: 28px 32px;
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  background:
    radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--c-teal) 60%, var(--c-blue)) 0%, var(--c-blue) 60%);
}
.next .section-tag { color: var(--c-lime); }
.next h3 { color: white; margin-bottom: 12px; }
.next ol {
  padding-left: 18px;
  margin: 0 0 14px;
  display: grid;
  gap: 6px;
  color: color-mix(in srgb, white 88%, var(--c-sky));
  font-size: 14px;
}
.next code {
  font-family: 'JetBrains Mono', monospace;
  background: rgba(255,255,255,.14);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12.5px;
}
.next__hint {
  color: var(--c-sky);
  font-size: 13px;
  margin: 0;
  font-style: italic;
}

/* ============ FOOTER ============ */
.page-footer {
  position: relative;
  z-index: 1;
  padding: 18px 48px;
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: .04em;
}

@media (max-width: 900px) {
  .intro, .card__foot--cols { grid-template-columns: 1fr; }
  h1 { font-size: 32px; }
  .page-header, .page-main, .page-footer { padding-left: 22px; padding-right: 22px; }
}
