:root {
  --ink: #102c46;
  --ink-soft: #50697e;
  --brand: #146eb4;
  --brand-strong: #0a3f78;
  --accent: #f47a1f;
  --accent-soft: #fff0e5;
  --paper: #ffffff;
  --surface: #f2f7f9;
  --line: #ccdeec;
  --warm: #f9a825;
  --shadow: 0 24px 60px rgba(10, 63, 120, 0.13);
  --radius: 22px;
  --header-h: 96px;
}

html[data-theme="editorial"] {
  --ink: #102d4b;
  --ink-soft: #526a82;
  --brand: #1b7fca;
  --brand-strong: #082f5c;
  --accent: #ef6c16;
  --accent-soft: #fff0e4;
  --surface: #f3f8fc;
  --line: #caddeb;
  --warm: #ff9d22;
  --shadow: 0 24px 60px rgba(8, 47, 92, 0.14);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Aptos, "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
a { color: inherit; }
svg { display: block; }

.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 1000; top: 8px; left: 8px; padding: 10px 14px; background: var(--paper); border: 2px solid var(--brand); border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  height: var(--header-h);
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(204,221,227,.75);
  backdrop-filter: blur(14px);
}

.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand-logo { display: block; width: 112px; height: 88px; object-fit: contain; }

.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a { padding: 10px 13px; border-radius: 10px; color: var(--ink-soft); font-size: .94rem; font-weight: 650; text-decoration: none; }
.main-nav a:hover, .main-nav a:focus-visible, .main-nav a[aria-current="page"] { color: var(--brand); background: var(--surface); }
.main-nav .nav-contact { margin-left: 7px; padding-inline: 17px; color: white; background: var(--brand-strong); }
.main-nav .nav-contact:hover, .main-nav .nav-contact:focus-visible { color: white; background: var(--brand); }
.nav-toggle { display: none; width: 44px; height: 44px; padding: 10px; border: 0; border-radius: 10px; background: var(--surface); }
.nav-toggle > span:not(.sr-only) { display: block; height: 2px; margin: 5px 0; background: var(--ink); }

.page { min-height: calc(100vh - var(--header-h)); animation: page-in .35s ease both; }
.page[hidden] { display: none; }
@keyframes page-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.hero { min-height: 680px; display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: clamp(36px, 7vw, 90px); padding-block: 86px; }
.eyebrow { margin: 0 0 16px; color: var(--brand); font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.hero h1, .page-intro h1, .profile-heading h1, .purpose-hero h1 { max-width: 760px; margin: 0; font-size: clamp(2.7rem, 6vw, 5.4rem); line-height: .98; letter-spacing: -.055em; }
.hero h1 { max-width: 790px; }
.hero-lead { max-width: 670px; margin: 28px 0 0; color: var(--ink-soft); font-size: clamp(1.08rem, 2vw, 1.32rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 20px; border: 1px solid transparent; border-radius: 12px; font-weight: 750; text-decoration: none; cursor: pointer; transition: transform .2s ease, background .2s ease, border-color .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { color: white; background: var(--brand-strong); }
.button-primary:hover { background: var(--brand); }
.button-secondary { color: var(--ink); border-color: var(--line); background: white; }
.button-secondary:hover { border-color: var(--brand); }

.hero-panel { position: relative; padding: 34px; overflow: hidden; color: white; background: var(--brand-strong); border-radius: 30px; box-shadow: var(--shadow); }
.hero-panel::after { content: ""; position: absolute; inset: auto -80px -100px auto; width: 250px; height: 250px; border: 55px solid rgba(255,255,255,.05); border-radius: 50%; }
.hero-panel-heading { position: relative; z-index: 1; display: grid; margin-bottom: 28px; }
.hero-panel-heading span { color: rgba(255,255,255,.7); font-size: .8rem; font-weight: 750; letter-spacing: .13em; text-transform: uppercase; }
.hero-panel-heading strong { margin-top: 5px; font-size: 1.35rem; }
.area-grid { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.area { display: grid; min-height: 118px; place-items: center; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; background: rgba(255,255,255,.07); }
.area svg { width: 48px; height: 48px; fill: none; stroke: white; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round; }
.area-electric svg { fill: none; }
.area-water { color: #6fd4f2; }
.hero-panel p { position: relative; z-index: 1; margin: 24px 0 0; color: rgba(255,255,255,.78); }

.promise-strip { color: white; background: var(--brand); }
.promise-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.promise-grid > div { padding: 38px 34px; border-left: 1px solid rgba(255,255,255,.18); }
.promise-grid > div:last-child { border-right: 1px solid rgba(255,255,255,.18); }
.promise-grid span { display: block; color: rgba(255,255,255,.58); font-size: .76rem; letter-spacing: .12em; }
.promise-grid strong { display: block; margin-top: 9px; font-size: 1.2rem; }
.promise-grid p { margin: 6px 0 0; color: rgba(255,255,255,.76); }

.page-intro { display: grid; grid-template-columns: 1.25fr .75fr; gap: 60px; align-items: end; padding-block: 80px 48px; }
.page-intro h1 { font-size: clamp(2.7rem, 5vw, 4.7rem); }
.page-intro > p { margin: 0 0 7px; color: var(--ink-soft); font-size: 1.08rem; }

.cards-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 510px; align-items: stretch; gap: 24px; padding-bottom: 92px; }
.flip-card { width: 100%; min-width: 0; height: 100%; outline: none; perspective: 1300px; cursor: pointer; }
.flip-card-inner { position: relative; width: 100%; height: 100%; transition: transform .55s cubic-bezier(.2,.7,.2,1); transform-style: preserve-3d; }
.flip-card.is-flipped .flip-card-inner { transform: rotateY(180deg); }
.card-face { position: absolute; inset: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.card-front { display: grid; place-items: center; background: var(--surface); box-shadow: inset 0 4px 0 var(--accent), 0 14px 35px rgba(10,63,120,.08); transition: border-color .2s ease, box-shadow .2s ease; }
.flip-card:hover .card-front, .flip-card:focus-visible .card-front { border-color: var(--brand); box-shadow: inset 0 4px 0 var(--accent), 0 18px 42px rgba(10,63,120,.14); }
.card-front::before, .card-front::after { content: ""; position: absolute; border-radius: 50%; }
.card-front::before { width: 340px; height: 340px; border: 1px solid color-mix(in srgb, var(--brand) 18%, transparent); }
.card-front::after { width: 230px; height: 230px; background: white; box-shadow: 0 20px 60px rgba(10,63,120,.09); }
.card-front svg { position: relative; z-index: 2; width: 150px; height: 150px; fill: none; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.card-front svg .icon-main { stroke: var(--brand); }
.card-front svg .icon-accent { stroke: var(--accent); }
.card-front svg .icon-fill { fill: color-mix(in srgb, var(--accent) 18%, white); }
.card-back { display: flex; flex-direction: column; padding: 34px; color: white; background: var(--brand-strong); border-color: transparent; transform: rotateY(180deg); }
.card-kicker { margin: 0 0 8px; color: rgba(255,255,255,.58); font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.card-back h2 { margin: 0; font-size: 2rem; letter-spacing: -.03em; }
.card-back > p:not(.card-kicker) { margin: 12px 0 22px; color: rgba(255,255,255,.83); }
.card-detail { display: grid; gap: 4px; padding: 13px 0; border-top: 1px solid rgba(255,255,255,.15); }
.card-detail strong { font-size: .86rem; }
.card-detail span { color: rgba(255,255,255,.72); font-size: .92rem; line-height: 1.45; }
.card-link { align-self: flex-start; margin-top: auto; padding: 9px 0 4px; color: white; font-weight: 800; text-underline-offset: 5px; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }

.profile-layout { padding-block: 82px 100px; }
.profile-heading { display: grid; grid-template-columns: 1.1fr .9fr; align-items: end; gap: 40px; padding-bottom: 52px; border-bottom: 1px solid var(--line); }
.profile-heading .eyebrow { grid-column: 1 / -1; margin-bottom: -20px; }
.profile-heading h1 { font-size: clamp(2.7rem, 5vw, 4.9rem); }
.profile-role { margin: 0 0 8px; color: var(--ink-soft); font-size: 1.25rem; }
.profile-main { display: grid; grid-template-columns: .72fr 1.28fr; gap: 62px; padding-top: 52px; }
.profile-statement { color: var(--ink-soft); font-size: 1.13rem; }
.profile-statement p:first-child { margin-top: 0; color: var(--ink); font-size: 1.35rem; line-height: 1.5; }
.profile-credentials { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.profile-credentials article { padding: 25px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); }
.profile-credentials span { color: var(--brand); font-size: .76rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.profile-credentials h2 { margin: 11px 0 8px; font-size: 1.16rem; line-height: 1.25; }
.profile-credentials p { margin: 0; color: var(--ink-soft); font-size: .94rem; }

.purpose-hero { max-width: 980px; padding-block: 92px 68px; text-align: center; }
.purpose-hero .eyebrow { margin-inline: auto; }
.purpose-hero h1 { margin-inline: auto; font-size: clamp(3rem, 7vw, 6.2rem); }
.purpose-hero > p:last-child { max-width: 780px; margin: 28px auto 0; color: var(--ink-soft); font-size: 1.25rem; }
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-bottom: 90px; }
.principles article { padding: 30px; border-top: 4px solid var(--brand); background: var(--surface); }
.principles span { color: var(--brand); font-size: .77rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.principles h2 { margin: 12px 0 10px; font-size: 1.35rem; line-height: 1.2; }
.principles p { margin: 0; color: var(--ink-soft); }
.audience-band { padding-block: 70px; background: var(--surface); border-block: 1px solid var(--line); }
.audience-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 70px; align-items: center; }
.audience-layout h2 { max-width: 520px; margin: 0; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.05; letter-spacing: -.04em; }
.audience-layout ul { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.audience-layout li { position: relative; padding: 17px 20px 17px 50px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.audience-layout li::before { content: ""; position: absolute; top: 50%; left: 20px; width: 13px; height: 13px; border: 3px solid var(--accent); border-radius: 50%; transform: translateY(-50%); }

.contact-section { padding-block: 90px; }
.contact-card { display: grid; grid-template-columns: 1fr auto; gap: 50px; align-items: center; padding: 48px; color: white; background: var(--brand-strong); border-radius: 26px; box-shadow: var(--shadow); }
.contact-card .eyebrow { color: var(--accent); }
.contact-card h2 { max-width: 720px; margin: 0; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.08; letter-spacing: -.04em; }
.contact-card p:last-child { margin: 16px 0 0; color: rgba(255,255,255,.76); font-size: 1.05rem; }
.contact-email { display: grid; min-width: 0; width: min(100%, 370px); padding: 17px 20px; color: var(--brand-strong); border: 2px solid transparent; border-radius: 14px; background: white; text-decoration: none; box-shadow: 0 12px 30px rgba(0,0,0,.12); transition: transform .2s ease, border-color .2s ease; }
.contact-email:hover, .contact-email:focus-visible { border-color: var(--accent); transform: translateY(-2px); }
.contact-email > span { color: var(--brand); font-size: .78rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.contact-email > strong { min-width: 0; margin-top: 3px; font-size: clamp(.92rem, 1.5vw, 1.08rem); line-height: 1.25; overflow-wrap: anywhere; word-break: break-word; }

.site-footer { padding-block: 26px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; gap: 30px; color: var(--ink-soft); font-size: .9rem; }
.footer-inner > div { display: grid; }
.footer-inner strong { color: var(--ink); }
.footer-inner p { margin: 0; align-self: end; }

.review-launcher { position: fixed; z-index: 70; right: 18px; bottom: 18px; padding: 11px 16px; color: white; border: 0; border-radius: 999px; background: var(--brand-strong); box-shadow: 0 10px 30px rgba(8,42,57,.2); cursor: pointer; }
.review-panel { position: fixed; z-index: 90; top: 0; right: 0; width: min(390px, 100%); height: 100%; padding: 26px; overflow-y: auto; background: white; box-shadow: -20px 0 60px rgba(8,42,57,.18); transform: translateX(105%); transition: transform .35s ease; }
.review-panel.is-open { transform: translateX(0); }
.review-heading { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 21px; border-bottom: 1px solid var(--line); }
.review-heading span { color: var(--brand); font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.review-heading h2 { margin: 2px 0 0; font-size: 1.55rem; }
.review-close { width: 40px; height: 40px; color: var(--ink); border: 1px solid var(--line); border-radius: 50%; background: white; font-size: 1.55rem; cursor: pointer; }
.review-panel fieldset { display: grid; gap: 10px; margin: 26px 0; padding: 0; border: 0; }
.review-panel legend, .email-control > span { margin-bottom: 10px; color: var(--ink); font-size: .86rem; font-weight: 800; }
.theme-choice { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px; text-align: left; border: 1px solid var(--line); border-radius: 12px; background: white; cursor: pointer; }
.theme-choice.is-selected { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 14%, transparent); }
.theme-choice span { display: grid; color: var(--ink-soft); font-size: .88rem; }
.theme-choice strong { color: var(--ink); }
.swatch { width: 34px; height: 34px; border-radius: 9px; }
.swatch-blue { background: linear-gradient(135deg, #0a3f78 50%, #f47a1f 50%); }
.swatch-orange { background: linear-gradient(135deg, #082f5c 50%, #ef6c16 50%); }
.email-control { display: grid; }
.email-control input { min-height: 46px; padding: 10px 12px; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.apply-email { width: 100%; margin-top: 10px; border: 0; }
.review-note { margin: 18px 0 8px; color: var(--ink-soft); font-size: .84rem; }
.reset-prototype { padding: 6px 0; color: var(--brand); border: 0; background: transparent; font-weight: 750; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 24px; max-width: calc(100% - 40px); padding: 11px 16px; color: white; border-radius: 10px; background: var(--brand-strong); opacity: 0; pointer-events: none; transform: translate(-50%, 12px); transition: .25s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 75%, white); outline-offset: 3px; }

@media (max-width: 920px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding-block: 68px; }
  .hero-panel { max-width: 620px; }
  .page-intro, .profile-heading, .profile-main, .audience-layout { grid-template-columns: 1fr; gap: 30px; }
  .profile-heading .eyebrow { margin-bottom: 0; }
  .principles { grid-template-columns: 1fr; }
  .contact-card { grid-template-columns: 1fr; }
  .contact-email { justify-self: start; }
}

@media (max-width: 760px) {
  :root { --header-h: 80px; }
  .shell { width: min(100% - 28px, 1180px); }
  .nav-toggle { display: block; }
  .main-nav { position: absolute; top: calc(100% + 1px); right: 14px; left: 14px; display: grid; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(-8px); transition: .2s ease; }
  .main-nav.is-open { opacity: 1; pointer-events: auto; transform: none; }
  .main-nav .nav-contact { margin: 4px 0 0; text-align: center; }
  .hero { padding-block: 58px; }
  .hero h1 { font-size: clamp(2.65rem, 13vw, 4rem); }
  .promise-grid { grid-template-columns: 1fr; padding-block: 12px; }
  .promise-grid > div { padding: 24px 10px; border: 0; border-bottom: 1px solid rgba(255,255,255,.18); }
  .promise-grid > div:last-child { border-right: 0; border-bottom: 0; }
  .page-intro { padding-block: 58px 38px; }
  .brand-logo { width: 84px; height: 66px; }
  .cards-grid { grid-template-columns: 1fr; grid-auto-rows: 530px; }
  .profile-layout, .purpose-hero { padding-block: 60px; }
  .profile-credentials { grid-template-columns: 1fr; }
  .contact-section { padding-block: 58px; }
  .contact-card { width: min(100% - 28px, 1180px); padding: 30px; }
  .contact-email { width: 100%; }
  .footer-inner { display: grid; }
}

@media (max-width: 420px) {
  .hero-actions .button { width: 100%; }
  .hero-panel { padding: 25px; }
  .area { min-height: 95px; }
  .card-back { padding: 27px; }
  .cards-grid { grid-auto-rows: 550px; }
  .card-front::before { width: 290px; height: 290px; }
  .card-front::after { width: 205px; height: 205px; }
  .card-front svg { width: 136px; height: 136px; }
  .review-launcher { right: 12px; bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* -------------------------------------------------------------------------
   DoBeDo Formación web visual layer.
   ------------------------------------------------------------------------- */
@font-face {
  font-family: "Nunito";
  src: url("./assets/fonts/Nunito-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("./assets/fonts/Nunito-Bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("./assets/fonts/Nunito-Italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root,
html[data-theme="tecnico"],
html[data-theme="editorial"] {
  --ink: #163b49;
  --ink-soft: #536d7b;
  --brand: #146eb4;
  --brand-strong: #0a3f78;
  --accent: #f47a1f;
  --accent-soft: #fff0e5;
  --paper: #ffffff;
  --surface: #edf6fb;
  --line: #c9dfe9;
  --warm: #f9a825;
  --shadow: 0 16px 36px rgba(10, 63, 120, 0.1);
  --exe-green: #2a92a0;
  --exe-soft: #d8f0e9;
}

html[data-theme="editorial"] {
  --brand: #1b6fbd;
  --brand-strong: #0b436f;
  --accent: #ef6c16;
  --surface: #f1f7fb;
  --line: #c9dce9;
}

body {
  color: var(--ink);
  background: #f4f4f4 url("./assets/background.png") center / cover fixed no-repeat;
  font-family: "Nunito", Aptos, "Segoe UI", system-ui, sans-serif;
}

.site-header {
  height: auto;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 4px solid var(--brand);
  backdrop-filter: none;
}

.header-inner {
  min-height: 112px;
  height: auto;
  align-items: center;
  gap: 22px;
}

.brand-logo {
  width: 104px;
  height: 84px;
}

.main-nav {
  align-items: flex-end;
  gap: 5px;
  padding-top: 20px;
}

.main-nav a {
  padding: 11px 16px 10px;
  color: var(--ink);
  border: 1px solid #c2dbe7;
  border-bottom: 0;
  border-radius: 10px 10px 0 0;
  background: #eaf4f9;
  font-size: 0.93rem;
  font-weight: 800;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a[aria-current="page"] {
  color: #ffffff;
  background: var(--brand);
  border-color: var(--brand);
}

.main-nav a[aria-current="page"] {
  box-shadow: inset 0 -4px 0 var(--accent);
}

.main-nav .nav-contact,
.main-nav .nav-contact:hover,
.main-nav .nav-contact:focus-visible {
  margin-left: 8px;
  color: #ffffff;
  background: var(--brand-strong);
  border-color: var(--brand-strong);
  box-shadow: none;
}

.nav-toggle {
  display: none !important;
}

.page {
  min-height: calc(100vh - 116px);
}

.hero,
.page-intro,
.profile-layout,
.purpose-hero {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 8px 25px rgba(22, 59, 73, 0.06);
}

.hero {
  min-height: 0;
  margin-top: 38px;
  padding: 58px;
}

.eyebrow {
  color: var(--brand-strong);
  letter-spacing: 0.12em;
}

.hero h1,
.page-intro h1,
.profile-heading h1,
.purpose-hero h1 {
  color: var(--ink);
  letter-spacing: -0.035em;
}

.hero h1 {
  max-width: 720px;
  font-size: clamp(2.5rem, 5vw, 4.55rem);
  line-height: 1.03;
}

.hero-lead,
.page-intro > p,
.profile-role,
.purpose-hero > p:last-child {
  color: var(--ink-soft);
}

.button {
  border-radius: 9px;
  font-weight: 800;
}

.button-primary {
  background: var(--brand-strong);
}

.button-primary:hover {
  background: var(--brand);
}

.button-secondary {
  color: var(--brand-strong);
  border-color: var(--brand);
  background: #ffffff;
}

.button-secondary:hover {
  color: var(--brand-strong);
  border-color: var(--accent);
  background: var(--accent-soft);
}

.hero-panel {
  padding: 30px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--brand);
  border-radius: 15px;
  box-shadow: none;
}

.hero-panel::after {
  border-color: rgba(20, 110, 180, 0.08);
}

.hero-panel-heading span {
  color: var(--brand-strong);
}

.hero-panel-heading strong {
  color: var(--ink);
}

.area {
  border-color: var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.area svg {
  stroke: var(--brand);
}

.area-water,
.area-weld,
.area-air,
.area-electric {
  color: var(--accent);
}

.area-weld svg,
.area-electric svg {
  stroke: var(--accent);
}

.hero-panel p {
  color: var(--ink-soft);
}

.promise-strip {
  color: var(--ink);
  background: transparent;
}

.promise-grid {
  gap: 14px;
  padding-top: 24px;
}

.promise-grid > div,
.promise-grid > div:last-child {
  padding: 25px 28px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
}

.promise-grid span,
.promise-grid strong {
  color: var(--brand-strong);
}

.promise-grid p {
  color: var(--ink-soft);
}

.page-intro {
  margin-top: 38px;
  padding: 42px 48px;
}

.page-intro h1 {
  font-size: clamp(2.35rem, 4.6vw, 4.15rem);
}

.cards-grid {
  padding-top: 24px;
  padding-bottom: 78px;
}

.flip-card {
  filter: none;
}

.card-face {
  border-color: var(--line);
  border-radius: 15px;
  box-shadow: none;
}

.card-front {
  background: #ffffff;
  box-shadow: inset 0 4px 0 var(--accent), 0 8px 22px rgba(22, 59, 73, 0.07);
}

.flip-card:hover .card-front,
.flip-card:focus-visible .card-front {
  border-color: var(--brand);
  box-shadow: inset 0 4px 0 var(--accent), 0 12px 28px rgba(20, 110, 180, 0.13);
}

.card-front::before {
  border-color: rgba(20, 110, 180, 0.18);
}

.card-front::after {
  background: var(--surface);
  box-shadow: none;
}

.card-front svg .icon-main {
  stroke: var(--brand);
}

.card-front svg .icon-accent {
  stroke: var(--accent);
}

.card-back {
  padding: 30px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-top: 5px solid var(--brand);
}

.card-kicker,
.card-detail strong {
  color: var(--brand-strong);
}

.card-back h2 {
  color: var(--ink);
}

.card-back > p:not(.card-kicker),
.card-detail span {
  color: var(--ink-soft);
}

.card-detail {
  border-top-color: var(--line);
}

.card-link {
  color: var(--brand-strong);
  text-decoration-color: var(--accent);
}

.profile-layout {
  margin-top: 38px;
  padding: 48px;
}

.profile-heading {
  border-bottom-color: var(--line);
}

.profile-statement {
  color: var(--ink-soft);
}

.profile-statement p:first-child {
  color: var(--ink);
}

.profile-credentials article,
.principles article,
.audience-layout li {
  border-color: var(--line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: none;
}

.profile-credentials article {
  border-top: 4px solid var(--brand);
}

.profile-credentials span,
.principles span {
  color: var(--brand-strong);
}

.profile-credentials h2,
.principles h2 {
  color: var(--ink);
}

.profile-credentials p,
.principles p {
  color: var(--ink-soft);
}

.purpose-hero {
  max-width: 1180px;
  margin-top: 38px;
  padding: 52px 58px;
  text-align: left;
}

.purpose-hero .eyebrow {
  margin-inline: 0;
}

.purpose-hero h1 {
  margin-inline: 0;
  font-size: clamp(2.6rem, 5vw, 4.75rem);
}

.principles {
  padding-top: 24px;
  padding-bottom: 54px;
}

.principles article {
  padding: 28px;
  border-top: 4px solid var(--brand);
}

.audience-band {
  padding-block: 24px 70px;
  background: transparent;
  border: 0;
}

.audience-layout {
  padding: 38px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.96);
}

.audience-layout h2 {
  color: var(--ink);
}

.audience-layout li::before {
  border-color: var(--accent);
}

.contact-section {
  padding-block: 68px;
}

.contact-card {
  padding: 42px;
  border-radius: 15px;
  background: var(--brand-strong);
  box-shadow: none;
}

.contact-card .eyebrow {
  color: var(--accent);
}

.contact-email {
  border-radius: 10px;
  box-shadow: none;
}

.site-footer {
  background: rgba(255, 255, 255, 0.9);
}

.review-launcher {
  background: var(--brand-strong);
}

.review-panel {
  border-left: 5px solid var(--brand);
}

.review-heading span,
.reset-prototype {
  color: var(--brand-strong);
}

.theme-choice.is-selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgba(20, 110, 180, 0.14);
}

.toast {
  background: var(--brand-strong);
}

/* The web keeps the tabs visible at every width; on small screens they scroll
   horizontally instead of becoming the course-style side menu. */
@media (max-width: 760px) {
  :root { --header-h: 0px; }

  .header-inner {
    min-height: 0;
    padding-top: 10px;
    flex-wrap: wrap;
    gap: 8px 14px;
  }

  .brand-logo {
    width: 82px;
    height: 66px;
  }

  .main-nav {
    position: static !important;
    order: 3;
    width: calc(100% + 28px);
    margin-inline: -14px;
    padding: 4px 14px 0;
    overflow-x: auto;
    align-items: flex-end;
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .main-nav a {
    flex: 0 0 auto;
    padding-inline: 13px;
    white-space: nowrap;
  }

  .main-nav .nav-contact {
    margin-left: 0;
  }

  .hero,
  .page-intro,
  .profile-layout,
  .purpose-hero {
    margin-top: 24px;
    padding: 30px 24px;
  }

  .promise-grid {
    padding-top: 16px;
  }

  .audience-layout {
    padding: 28px 24px;
  }

  .contact-card {
    padding: 30px 24px;
  }
}

/* Content refinements for the current web copy. */
.hero {
  grid-template-columns: minmax(0, 1fr);
}

.hero-copy {
  max-width: 900px;
  margin-inline: auto;
}

.hero h1 {
  max-width: 820px;
}

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

.card-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.card-front::before {
  z-index: 0;
}

.card-front::after {
  z-index: 1;
}

.card-front svg,
.front-label {
  position: relative;
  z-index: 2;
}

.card-front svg {
  width: 124px;
  height: 124px;
}

/* Iconos de familias: ilustraciones planas originales de DoBeDo. */
.family-icon {
  position: relative;
  z-index: 2;
  display: block;
  width: 148px;
  height: 148px;
  object-fit: contain;
  border-radius: 18px;
}

.front-label {
  color: var(--brand-strong);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.profile-heading {
  grid-template-columns: 1fr;
  align-items: start;
}

.profile-heading .eyebrow {
  grid-column: auto;
  margin-bottom: -8px;
}

.profile-heading h1 {
  max-width: none;
  font-size: clamp(2.15rem, 4.3vw, 4rem);
  line-height: 1.08;
}

.profile-book {
  display: block;
  max-width: 880px;
  margin-inline: auto;
  padding-top: 42px;
}

.profile-book .profile-statement {
  font-size: 1.12rem;
  line-height: 1.78;
}

.profile-book .profile-statement p,
.profile-book .profile-statement p:first-child {
  margin: 0 0 1.2em;
  color: var(--ink-soft);
  font-size: inherit;
  line-height: inherit;
}

.profile-book .profile-statement p:last-child {
  margin-bottom: 0;
  color: var(--ink);
  font-weight: 700;
}

.audience-layout {
  align-items: start;
}

.audience-cards {
  display: grid;
  gap: 14px;
}

.audience-card {
  height: 218px;
  outline: none;
  perspective: 1100px;
  cursor: pointer;
}

.audience-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.5s cubic-bezier(.2, .7, .2, 1);
  transform-style: preserve-3d;
}

.audience-card.is-flipped .audience-card-inner {
  transform: rotateY(180deg);
}

.audience-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  border-radius: 12px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.audience-front {
  background: #ffffff;
}

.audience-front::after {
  content: "";
  position: absolute;
  right: -36px;
  bottom: -56px;
  width: 150px;
  height: 150px;
  border: 22px solid rgba(20, 110, 180, 0.08);
  border-radius: 50%;
}

.audience-number,
.audience-hint,
.audience-back > span {
  position: relative;
  z-index: 1;
  color: var(--brand-strong);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.audience-front h3,
.audience-back h3 {
  position: relative;
  z-index: 1;
  margin: 10px 0;
  color: var(--ink);
  font-size: 1.16rem;
  line-height: 1.25;
}

.audience-hint {
  margin-top: auto;
  color: var(--brand);
  font-size: 0.78rem;
  text-transform: none;
  letter-spacing: 0;
}

.audience-back {
  color: #ffffff;
  background: var(--brand-strong);
  border-color: transparent;
  transform: rotateY(180deg);
}

.audience-back > span {
  color: var(--accent);
}

.audience-back h3 {
  color: #ffffff;
}

.audience-back p {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.94rem;
  line-height: 1.45;
}

.audience-cta {
  align-self: flex-start;
  color: #ffffff;
  font-weight: 800;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 4px;
}

.audience-card:focus-visible .audience-front,
.audience-card:hover .audience-front {
  border-color: var(--brand);
  box-shadow: 0 8px 20px rgba(20, 110, 180, 0.12);
}

@media (max-width: 920px) {
  .promise-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .promise-grid {
    grid-template-columns: 1fr;
  }

  .profile-book {
    padding-top: 30px;
  }

  .audience-card {
    height: 205px;
  }
}

/* Giro robusto: las caras se animan de forma independiente para evitar que
   el navegador conserve la imagen frontal invertida o oculte el reverso. */
.flip-card-inner,
.audience-card-inner {
  transform: none !important;
  transform-style: flat;
}

.flip-card .card-front,
.audience-card .audience-front {
  opacity: 1;
  visibility: visible;
  transform: rotateY(0deg);
  transition: transform .55s cubic-bezier(.2, .7, .2, 1), opacity .18s ease, visibility 0s linear 0s;
}

.flip-card .card-back,
.audience-card .audience-back {
  opacity: 0;
  visibility: hidden;
  transform: rotateY(-180deg);
  transition: transform .55s cubic-bezier(.2, .7, .2, 1), opacity .18s ease, visibility 0s linear .55s;
}

.flip-card.is-flipped .card-front,
.audience-card.is-flipped .audience-front {
  opacity: 0;
  visibility: hidden;
  transform: rotateY(180deg);
  transition: transform .55s cubic-bezier(.2, .7, .2, 1), opacity .18s ease, visibility 0s linear .55s;
}

.flip-card.is-flipped .card-back,
.audience-card.is-flipped .audience-back {
  opacity: 1;
  visibility: visible;
  transform: rotateY(0deg);
  transition: transform .55s cubic-bezier(.2, .7, .2, 1), opacity .18s ease, visibility 0s linear 0s;
}

@media (max-width: 760px) {
  /* En móvil el menú pasa a un desplegable compacto: las pestañas siguen
     existiendo, pero no ocupan media pantalla ni desplazan el contenido. */
  .site-header {
    height: 72px;
  }

  .header-inner {
    min-height: 72px;
    height: 72px;
    padding-top: 0;
    flex-wrap: nowrap;
  }

  .nav-toggle {
    display: block !important;
    flex: 0 0 44px;
    margin-left: auto;
  }

  .main-nav {
    position: absolute !important;
    top: calc(100% + 8px);
    right: 14px;
    left: auto;
    display: grid;
    width: min(250px, calc(100vw - 28px));
    margin: 0;
    padding: 8px;
    overflow: visible;
    align-items: stretch;
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(-8px) !important;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: var(--shadow);
    transition: opacity .2s ease, transform .2s ease;
  }

  .main-nav.is-open {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: none !important;
  }

  .main-nav a {
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    text-align: left;
    white-space: nowrap;
  }

  .main-nav .nav-contact {
    margin: 4px 0 0;
    text-align: center;
  }

  .family-icon {
    width: 132px;
    height: 132px;
  }
}

.profile-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.profile-link {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 214px;
  padding: 11px 15px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.profile-link:hover,
.profile-link:focus-visible {
  border-color: var(--brand);
  box-shadow: 0 7px 18px rgba(20, 110, 180, 0.12);
  transform: translateY(-2px);
}

.profile-link svg {
  flex: 0 0 auto;
  width: 31px;
  height: 31px;
  padding: 6px;
  fill: #ffffff;
  border-radius: 7px;
}

.profile-link-linkedin svg {
  background: #0a66c2;
}

.profile-link-cv svg {
  fill: none;
  stroke: #ffffff;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  background: var(--accent);
}

.profile-link span {
  display: grid;
  gap: 1px;
}

.profile-link strong {
  color: var(--brand-strong);
  font-size: .95rem;
}

.profile-link small {
  color: var(--ink-soft);
  font-size: .78rem;
}

@media (max-width: 760px) {
  .profile-links {
    display: grid;
  }

  .profile-link {
    width: 100%;
  }
}
