/* ==========================================================================
   OptinFlex · Landing
   Estilos propios sobre Bootstrap 5.3.8 y AOS 2.3.4. Prefijo de clases: .of-
   Inter y Phosphor Icons se cargan en su versión web (Google Fonts y jsDelivr).
   ========================================================================== */

/* ---------- Tokens de marca ---------- */
:root {
  --of-plum: #432B3A;          /* Deep Plum, dominante */
  --of-plum-deep: #2E1D28;     /* derivado, solo para el pie */
  --of-plum-hover: #563A4B;
  --of-sage: #5E6E71;          /* Slate Sage */
  --of-sage-light: #9AA7A9;    /* hilos sobre plum */
  --of-gold: #B0956E;          /* Antique Gold, acento: hilos, nodos, reglas */
  --of-gold-ink: #7A6344;      /* dorado para texto sobre claro (AA) */
  --of-gold-light: #C9B493;    /* dorado para texto sobre plum (AA) */
  --of-graphite: #2F3132;      /* texto */
  --of-ivory: #F6F4F0;         /* Soft Ivory */
  --of-white: #FFFFFF;
  --of-muted-on-plum: #CFC8C8; /* texto secundario sobre plum (7,7:1) */
  --of-line: #E2DCD3;
  --of-danger: #A8201A;

  --of-font: "Inter", Arial, sans-serif;
  --of-header-h: 76px;
  --of-radius-img: 20px;
  --of-radius-panel: 24px;
  --of-section-pad: clamp(4.5rem, 3rem + 6vw, 8.5rem);
  --of-bleed: 0px;

  /* Bootstrap */
  --bs-body-font-family: var(--of-font);
  --bs-body-font-size: 1.0625rem;
  --bs-body-line-height: 1.6;
  --bs-body-color: var(--of-graphite);
  --bs-body-bg: var(--of-ivory);
  --bs-emphasis-color: var(--of-graphite);
  --bs-link-color: var(--of-plum);
  --bs-link-color-rgb: 67, 43, 58;
  --bs-link-hover-color: var(--of-plum-hover);
  --bs-link-hover-color-rgb: 86, 58, 75;
  --bs-border-color: var(--of-line);
  --bs-focus-ring-color: rgba(67, 43, 58, .25);

  /* Ajuste de área segura en móviles con notch */
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (max-width: 767.98px) { .container { --bs-gutter-x: 2.5rem; } }
@media (min-width: 992px)  { :root { --of-bleed: calc((100vw - 960px) / 2 + 12px); } }
@media (min-width: 1200px) { :root { --of-bleed: calc((100vw - 1140px) / 2 + 12px); } }
@media (min-width: 1400px) { :root { --of-bleed: calc((100vw - 1320px) / 2 + 12px); } }

html {
  background: var(--of-plum);
  scroll-padding-top: calc(var(--of-header-h) + env(safe-area-inset-top, 0px) + 1rem);
}

body {
  background: var(--of-ivory);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img { max-width: 100%; height: auto; }

/* Contexto de color por sección: los componentes leen estas variables */
.of-section--ivory, .of-modal {
  --of-text: var(--of-graphite);
  --of-text-2: var(--of-sage);
  --of-accent-text: var(--of-gold-ink);
  --of-rule: var(--of-line);
  --of-focus: var(--of-plum);
  --of-node-ring: rgba(176, 149, 110, .55);
}
.of-section--plum, .of-hero, .of-header, .of-footer {
  --of-text: var(--of-ivory);
  --of-text-2: var(--of-muted-on-plum);
  --of-accent-text: var(--of-gold-light);
  --of-rule: rgba(246, 244, 240, .16);
  --of-focus: var(--of-gold-light);
  --of-node-ring: rgba(201, 180, 147, .5);
}

:focus-visible {
  outline: 3px solid var(--of-focus, var(--of-plum));
  outline-offset: 3px;
  border-radius: 4px;
}

.of-skip {
  position: absolute; left: 1rem; top: -100px; z-index: 2000;
  background: var(--of-ivory); color: var(--of-plum);
  padding: .75rem 1rem; border-radius: 10px; font-weight: 600; text-decoration: none;
}
.of-skip:focus { top: calc(env(safe-area-inset-top, 0px) + .75rem); }

/* ---------- Tipografía ---------- */
.of-h1 {
  font-size: clamp(2.5rem, 1.25rem + 3.1vw, 3.75rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -.034em;
  margin: 0 0 1.5rem;
  text-wrap: balance;
}
.of-h2 {
  font-size: clamp(2rem, 1.45rem + 1.7vw, 2.875rem);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -.028em;
  margin: 0 0 1.25rem;
  max-width: 20ch;
  text-wrap: balance;
}
.of-h3 {
  font-size: 1.1875rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.012em;
  margin: 0 0 .375rem;
}
.of-lead {
  font-size: clamp(1.1875rem, 1.1rem + .3vw, 1.3125rem);
  line-height: 1.5;
  color: var(--of-text-2);
  max-width: 36em;
  margin-bottom: 0;
}
.of-note {
  margin: 2rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--of-rule);
  color: var(--of-text-2);
  font-size: .9375rem;
  max-width: 44ch;
}

/* ---------- Botones ---------- */
.of-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px;
  padding: .75rem 1.5rem;
  border: 1.5px solid transparent;
  border-radius: 999px;
  font-family: inherit; font-size: 1rem; font-weight: 600; line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.of-btn--light { background: var(--of-ivory); color: var(--of-plum); }
.of-btn--light:hover { background: var(--of-white); color: var(--of-plum); }
.of-btn--ghost { background: transparent; color: var(--of-ivory); border-color: rgba(246, 244, 240, .45); }
.of-btn--ghost:hover { color: var(--of-ivory); border-color: var(--of-ivory); background: rgba(246, 244, 240, .06); }
.of-btn--plum { background: var(--of-plum); color: var(--of-ivory); }
.of-btn--plum:hover { background: var(--of-plum-hover); color: var(--of-ivory); }
.of-btn:disabled { opacity: .6; cursor: progress; }

/* ---------- Nodo (motivo de marca) ---------- */
.of-node {
  --node: var(--of-gold);
  position: relative;
  display: inline-block;
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--of-node-ring);
}
.of-node::after {
  content: "";
  position: absolute; inset: 5px;
  border-radius: 50%;
  background: var(--node);
}
.of-node--lg { width: 34px; height: 34px; border-color: var(--node); }
.of-node--lg::after { inset: 9px; }

/* Hilos: SVG que dibuja main.js entre nodos */
.of-threads {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 1;
}
.of-thread { fill: none; stroke-width: 2; stroke-linecap: round; }

/* ---------- Cabecera ---------- */
.of-header {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 1030;
  background: var(--of-plum);
  transition: box-shadow .2s ease;
}
.of-header.is-scrolled { box-shadow: 0 1px 0 rgba(246, 244, 240, .08), 0 12px 32px -12px rgba(20, 10, 16, .55); }
.of-nav {
  min-height: var(--of-header-h);
  padding-block: .75rem;
  --bs-navbar-color: rgba(246, 244, 240, .88);
  --bs-navbar-hover-color: var(--of-white);
  --bs-navbar-active-color: var(--of-white);
  --bs-navbar-nav-link-padding-x: .875rem;
  --bs-navbar-toggler-border-color: rgba(246, 244, 240, .35);
  --bs-navbar-toggler-focus-width: 0;
}
.of-brand { padding: 0; margin-right: 2rem; }
.of-brand img { width: 184px; height: auto; display: block; }
.of-nav .nav-link { font-size: .9375rem; font-weight: 500; }
.of-nav__toggle {
  width: 48px; height: 48px;
  display: inline-grid; place-items: center;
  padding: 0;
  border-radius: 12px;
  color: var(--of-ivory);
  font-size: 1.5rem;
}
.of-nav__toggle:focus-visible { outline: 3px solid var(--of-gold-light); outline-offset: 2px; }
.of-nav__cta { margin-left: 1rem; min-height: 44px; padding-block: .625rem; }

@media (max-width: 991.98px) {
  .of-nav .navbar-collapse { padding: 1rem 0 1.25rem; }
  .of-nav__list { border-top: 1px solid rgba(246, 244, 240, .14); margin-top: .75rem; }
  .of-nav__list .nav-link {
    font-size: 1.125rem;
    padding: .875rem 0 !important;
    border-bottom: 1px solid rgba(246, 244, 240, .14);
  }
  .of-nav__cta { margin: 1.25rem 0 0; width: 100%; }
}

/* ---------- Secciones ---------- */
.of-section { position: relative; padding-block: var(--of-section-pad); }
.of-section--ivory { background: var(--of-ivory); color: var(--of-graphite); }
.of-section--plum { background: var(--of-plum); color: var(--of-ivory); }
.of-section--plum a:not(.of-btn) { color: var(--of-ivory); }
.of-intro { margin-bottom: clamp(2.5rem, 2rem + 2vw, 4rem); }

/* Figuras: capturas, ilustraciones */
.of-shot, .of-illus { margin: 0; }
.of-shot img { display: block; width: 100%; border-radius: var(--of-radius-img); }
.of-shot figcaption { margin-top: 1rem; font-size: .9375rem; color: var(--of-text-2); }
.of-shot figcaption .of-h3 { color: var(--of-text); margin-top: .5rem; }
.of-shot figcaption p { margin: 0; max-width: 46ch; }
.of-illus img { display: block; width: 100%; }

/* Listas con nodo */
.of-facts { margin: 2.25rem 0 0; display: grid; gap: 1.5rem; }
.of-facts > div { position: relative; padding-left: 2.25rem; }
.of-facts > div::before,
.of-points li::before {
  content: "";
  position: absolute; left: 0; top: .22em;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1px solid var(--of-node-ring);
  background: radial-gradient(circle, var(--of-gold) 0 4px, transparent 4.5px);
}
.of-facts dt { font-weight: 600; font-size: 1.0625rem; line-height: 1.4; margin-bottom: .2rem; }
.of-facts dd { margin: 0; color: var(--of-text-2); max-width: 46ch; }

.of-points { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; gap: .875rem; }
.of-points li { position: relative; padding-left: 2.25rem; }
.of-points--large { gap: 1.25rem; margin-top: 2.5rem; }
.of-points--large li { font-size: clamp(1.125rem, 1rem + .4vw, 1.3125rem); font-weight: 500; letter-spacing: -.01em; line-height: 1.4; }
.of-points--large li::before { top: .28em; }

/* ---------- 1. Portada ---------- */
.of-hero {
  position: relative;
  background: var(--of-plum);
  color: var(--of-ivory);
  overflow: clip;
  padding-block: clamp(2rem, 1rem + 4vw, 3.5rem) 2.5rem;
}
.of-hero > .container { position: relative; z-index: 2; }
.of-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.of-hero .of-h1 { max-width: 12ch; }
.of-hero__lead { max-width: 30em; }
.of-hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

.of-hero__media { position: relative; margin: 2.75rem calc(var(--bs-gutter-x, 1.5rem) * -.5) 0; }
.of-hero__photo { margin: 0; aspect-ratio: 4 / 3; overflow: hidden; }
.of-hero__photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 44% 50%; }

.of-record {
  position: absolute;
  left: 0; right: 0; margin-inline: auto;
  top: calc(100% - 3rem);
  z-index: 3;
  width: min(300px, calc(100% - var(--bs-gutter-x, 1.5rem)));
  padding: 1rem 1.125rem 1.125rem;
  background: var(--of-white);
  color: var(--of-graphite);
  border-radius: 18px;
  box-shadow: 0 28px 48px -16px rgba(20, 10, 16, .6);
}
.of-record__head { display: flex; align-items: center; gap: .75rem; }
.of-record__check {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--of-gold); color: var(--of-white);
  font-size: 1.125rem;
  box-shadow: 0 0 0 5px #F1EBE2;
}
.of-record__title { margin: 0; font-weight: 600; font-size: 1rem; line-height: 1.25; color: var(--of-plum); }
.of-record__meta { margin: .125rem 0 0; font-size: .8125rem; color: var(--of-sage); }
.of-record__rows { margin: .875rem 0 0; font-size: .8125rem; line-height: 1.4; }
.of-record__rows > div { display: grid; grid-template-columns: 3.75rem 1fr; gap: .5rem; padding-top: .5rem; border-top: 1px solid var(--of-line); }
.of-record__rows > div + div { margin-top: .5rem; }
.of-record__rows dt { font-weight: 400; color: var(--of-sage); }
.of-record__rows dd { margin: 0; font-weight: 500; }

.of-hero__channels {
  list-style: none;
  margin: 11.5rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem;
  position: relative; z-index: 2;
}
.of-hero__channels li {
  display: flex; flex-direction: column; align-items: flex-start; gap: .625rem;
  font-size: .8125rem; line-height: 1.3; font-weight: 500;
  color: var(--of-muted-on-plum);
}
.of-hero__by {
  display: flex; align-items: center; flex-wrap: wrap; gap: .75rem;
  margin: 2.5rem 0 0;
  font-size: .9375rem; color: var(--of-muted-on-plum);
}
.of-hero__by img { width: 132px; height: auto; }

@media (max-width: 419.98px) {
  .of-hero__channels li { font-size: .75rem; }
}
@media (min-width: 576px) {
  .of-hero__channels li { font-size: .875rem; }
}
@media (min-width: 576px) and (max-width: 991.98px) {
  .of-hero__photo { border-radius: 24px; }
}

@media (min-width: 992px) {
  .of-hero { padding-block: 3rem 3rem; }
  .of-hero__grid {
    grid-template-columns: minmax(0, 5.3fr) minmax(0, 6.7fr);
    grid-template-rows: auto auto auto;
    column-gap: clamp(3.5rem, 5vw, 5.5rem);
  }
  .of-hero__text { grid-column: 1; grid-row: 1; padding-top: 2.5rem; }
  .of-hero__channels { grid-column: 1; grid-row: 2; margin-top: 7.5rem; }
  .of-hero__by { grid-column: 1; grid-row: 3; }
  .of-hero__media {
    grid-column: 2; grid-row: 1 / 4;
    margin: 0 calc(var(--of-bleed) * -1) 0 0;
    align-self: stretch;
    min-height: 560px;
  }
  .of-hero__photo { position: absolute; inset: 0; aspect-ratio: auto; border-radius: 28px 0 0 28px; }
  .of-hero__photo img { object-position: 46% 50%; }
  .of-record { left: -3.5rem; right: auto; margin-inline: 0; top: auto; bottom: 6.5rem; width: 300px; }
}

/* Entrada de la portada (una sola vez; solo con movimiento permitido) */
@keyframes of-fade { to { opacity: 1; } }
@keyframes of-rise { to { opacity: 1; transform: none; } }
.of-anim .of-hero .of-node { opacity: 0; }
.of-anim .of-hero .of-record { opacity: 0; transform: translateY(12px); }
/* Red de seguridad: si el JS no llega a ejecutarse, todo aparece a los 2,5 s */
.of-anim .of-hero:not(.is-drawn) .of-node,
.of-anim .of-hero:not(.is-drawn) .of-record { animation: of-rise .01s linear 2.5s forwards; }
.of-anim .of-hero.is-drawn .of-node { animation: of-fade .45s ease forwards; animation-delay: calc(var(--i, 0) * 70ms); }
.of-anim .of-hero.is-drawn .of-record { animation: of-rise .7s cubic-bezier(.2, .7, .2, 1) 1.35s forwards; }

/* ---------- 2. Situación actual ---------- */
.of-sticky { position: sticky; top: calc(var(--of-header-h) + 2.5rem); }
.of-options { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--of-rule); }
.of-option {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--of-rule);
}
.of-option img { width: 132px; height: auto; display: block; }
.of-option p { margin: 0; color: var(--of-text-2); max-width: 50ch; }
@media (max-width: 575.98px) {
  .of-option { grid-template-columns: 84px minmax(0, 1fr); gap: 1.125rem; align-items: start; }
  .of-option img { width: 84px; }
}

.of-verdict {
  display: flex; align-items: flex-start; gap: 1.125rem;
  margin: 2.75rem 0 0;
  font-size: clamp(1.375rem, 1.05rem + 1.1vw, 1.875rem);
  font-weight: 500; line-height: 1.3; letter-spacing: -.02em;
  color: var(--of-plum);
}
.of-verdict > span:last-child { max-width: 30ch; text-wrap: balance; }
.of-verdict .of-node { margin-top: .1em; }

/* ---------- 3. Qué es OptinFlex ---------- */
.of-what { overflow: clip; }
.of-what__glow {
  position: absolute; left: 50%; top: 30%;
  width: min(1200px, 140vw); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(201, 180, 147, .17), rgba(201, 180, 147, .05) 55%, transparent 72%);
  pointer-events: none;
}
.of-what > .container { position: relative; z-index: 1; }
.of-what__head { text-align: center; max-width: 900px; margin: 0 auto clamp(3.5rem, 2.5rem + 3vw, 5.5rem); }
.of-what__title {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: .15em .3em;
  margin: 0 0 1.5rem;
  font-size: clamp(2.5rem, 1.5rem + 3.4vw, 4.25rem);
  font-weight: 600; line-height: 1.05; letter-spacing: -.034em;
  color: var(--of-ivory);
}
.of-what__logo { display: block; width: auto; height: 1.3em; }
.of-what__def {
  margin: 0 auto;
  max-width: 36ch;
  font-size: clamp(1.1875rem, 1.05rem + .55vw, 1.5rem);
  font-weight: 400; line-height: 1.45; letter-spacing: -.01em;
  color: var(--of-muted-on-plum);
  text-wrap: balance;
}
.of-what__def em { font-style: normal; font-weight: 500; color: var(--of-gold-light); }

.of-what__stage { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem 3rem; }
.of-what__shot { position: relative; z-index: 1; margin: 0 0 1rem; }
.of-what__shot img {
  display: block; width: 100%;
  border-radius: var(--of-radius-panel);
  box-shadow: 0 0 0 1px rgba(201, 180, 147, .3), 0 60px 100px -50px rgba(10, 4, 8, .85);
}
.of-fact { position: relative; z-index: 3; display: flex; align-items: flex-start; gap: 1rem; }
.of-fact .of-node { margin-top: .125rem; background: var(--of-plum); }
.of-fact .of-h3 { color: var(--of-ivory); }
.of-fact p { margin: 0; color: var(--of-text-2); max-width: 34ch; }
.of-threads--over { z-index: 2; }
@media (min-width: 768px) {
  .of-what__stage { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .of-what__shot { grid-column: 1 / -1; }
}
@media (min-width: 1200px) {
  .of-what__stage {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2.4fr) minmax(0, 1fr);
    grid-template-rows: 1fr 1fr;
    grid-template-areas: "f1 shot f3" "f2 shot f4";
    column-gap: 4.5rem; row-gap: 0;
    align-items: center;
  }
  .of-what__shot { grid-area: shot; grid-column: auto; margin: 0; }
  .of-fact--1 { grid-area: f1; }
  .of-fact--2 { grid-area: f2; }
  .of-fact--3 { grid-area: f3; }
  .of-fact--4 { grid-area: f4; }
  .of-fact--1, .of-fact--2 { flex-direction: row-reverse; text-align: right; }
  .of-fact--1 p, .of-fact--2 p { margin-left: auto; }
}
.of-what__note {
  display: flex; align-items: flex-start; justify-content: center; gap: .75rem;
  max-width: 760px;
  margin: clamp(3.5rem, 2.5rem + 3vw, 5rem) auto 0;
  padding: 1.125rem 1.5rem;
  border: 1px solid rgba(246, 244, 240, .16);
  border-radius: 16px;
  background: rgba(246, 244, 240, .04);
  color: var(--of-text-2);
  font-size: .9375rem; line-height: 1.5;
}
.of-what__note .ph { font-size: 1.25rem; color: var(--of-gold-light); margin-top: .05rem; }

/* ---------- 4. Tres formas y el delegado ---------- */
.of-ways-wrap { position: relative; margin-top: clamp(2.5rem, 2rem + 2vw, 4rem); }
.of-ways { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr); gap: 3rem; }
.of-way { position: relative; z-index: 2; margin: 0; }
.of-way__img { overflow: hidden; border-radius: var(--of-radius-img); }
.of-way img { display: block; width: 100%; transform: scale(1.001); transition: transform 1.6s cubic-bezier(.2, .7, .2, 1); }
.of-anim .of-way[data-aos]:not(.aos-animate) img { transform: scale(1.09); }
.of-way:hover img { transform: scale(1.035); }
.of-way figcaption { margin-top: 1.25rem; }
.of-way figcaption p { margin: 0 0 1.25rem; color: var(--of-text-2); max-width: 40ch; }

.of-converge { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 1.5rem; margin-top: 3.5rem; }
.of-converge__text {
  margin: 0;
  font-size: clamp(1.25rem, 1rem + .8vw, 1.625rem);
  font-weight: 500; letter-spacing: -.016em; line-height: 1.3;
  max-width: 26ch;
}

.of-ledger {
  width: min(340px, 100%);
  padding: 1.125rem 1.25rem .75rem;
  background: var(--of-white);
  color: var(--of-graphite);
  border-radius: 20px;
  box-shadow: 0 1px 0 rgba(47, 49, 50, .04), 0 32px 64px -32px rgba(67, 43, 58, .5);
  text-align: left;
}
.of-ledger__head { display: flex; align-items: center; gap: .75rem; padding-bottom: .875rem; border-bottom: 1px solid var(--of-line); }
.of-ledger__seal {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--of-plum); color: var(--of-gold-light);
  font-size: 1.25rem;
  transition: transform .5s cubic-bezier(.3, 1.6, .5, 1), box-shadow .5s ease;
}
.of-ledger.is-done .of-ledger__seal { transform: scale(1.08); box-shadow: 0 0 0 7px rgba(176, 149, 110, .22); }
.of-ledger__title { margin: 0; font-weight: 600; font-size: 1rem; line-height: 1.25; color: var(--of-plum); }
.of-ledger__meta { margin: .125rem 0 0; font-size: .8125rem; color: var(--of-sage); }
.of-ledger__rows { list-style: none; margin: .25rem 0 0; padding: 0; }
.of-ledger__row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: .75rem; padding: .625rem 0; font-size: .9375rem; font-weight: 500; }
.of-ledger__row + .of-ledger__row { border-top: 1px dashed var(--of-line); }
.of-ledger__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--node); box-shadow: 0 0 0 4px rgba(176, 149, 110, .16); }
.of-ledger__state {
  width: 24px; height: 24px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--of-gold); color: var(--of-white);
  font-size: .8125rem;
}
.of-ledger.is-armed .of-ledger__row { color: #A19C95; transition: color .4s ease; }
.of-ledger.is-armed .of-ledger__dot { background: var(--of-line); box-shadow: none; transition: background-color .4s ease, box-shadow .4s ease; }
.of-ledger.is-armed .of-ledger__state { transform: scale(0); transition: transform .5s cubic-bezier(.3, 1.7, .5, 1); }
.of-ledger.is-armed .of-ledger__row.is-on { color: var(--of-graphite); }
.of-ledger.is-armed .of-ledger__row.is-on .of-ledger__dot { background: var(--node); box-shadow: 0 0 0 4px rgba(176, 149, 110, .16); }
.of-ledger.is-armed .of-ledger__row.is-on .of-ledger__state { transform: scale(1); }

@media (max-width: 991.98px) {
  .of-ways .of-node, #ways-threads { display: none; }
}
@media (min-width: 576px) and (max-width: 991.98px) {
  .of-ways { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 1.5rem; }
  .of-way--visit { grid-column: 1 / -1; }
  .of-way--event { margin-top: 3rem; }
}
@media (min-width: 992px) {
  .of-ways { grid-template-columns: minmax(0, 6fr) minmax(0, 3fr) minmax(0, 3fr); column-gap: 2rem; align-items: start; }
  .of-way--remote { margin-top: 6rem; }
  .of-way--event { margin-top: 2.5rem; }
  .of-converge { align-items: center; text-align: center; margin-top: 5.5rem; }
}

.of-rep { margin-top: var(--of-section-pad); }
.of-rep .of-h2 { margin-bottom: 2.5rem; }
@media (min-width: 992px) { .of-rep__offset { margin-top: 7rem; } }

/* ---------- 5. Así lo ve el médico ---------- */
.of-steps { list-style: none; counter-reset: paso; margin: 2.75rem 0 0; padding: 0; }
.of-steps li { counter-increment: paso; position: relative; padding: 0 0 2.25rem 4rem; }
.of-steps li:last-child { padding-bottom: 0; }
.of-steps li::before {
  content: counter(paso);
  position: absolute; left: 0; top: -.2rem;
  width: 2.5rem; height: 2.5rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--of-gold-light);
  color: var(--of-plum);
  font-weight: 600; font-size: 1rem;
  box-shadow: 0 0 0 6px rgba(201, 180, 147, .16);
}
.of-steps li:not(:last-child)::after {
  content: "";
  position: absolute; left: 1.25rem; top: 2.85rem; bottom: .35rem;
  width: 2px;
  transform: translateX(-50%);
  background: linear-gradient(var(--of-gold), rgba(176, 149, 110, .2));
  border-radius: 2px;
}
.of-steps p { margin: 0; color: var(--of-text-2); max-width: 44ch; }
.of-shot--phone { max-width: 460px; margin-inline: auto; }

/* ---------- 6. Finalidad y canal ---------- */
.of-intro .of-h2 { max-width: 22ch; }
.of-pref { display: grid; gap: 2.25rem; }
.of-pref__item p { margin: 0; color: var(--of-text-2); }
.of-tags { list-style: none; margin: 1rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.of-tags li {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .375rem .8rem;
  background: var(--of-white);
  border: 1px solid var(--of-line);
  border-radius: 999px;
  font-size: .875rem; font-weight: 500;
}
.of-tags .ph { font-size: 1rem; color: var(--of-sage); }
@media (min-width: 992px) { .of-pref { padding-top: .5rem; } }

/* ---------- 8. Seguridad ---------- */
.of-box {
  position: relative;
  height: 100%;
  margin: 0;
  padding: clamp(1.75rem, 1.25rem + 1.5vw, 2.375rem);
  background: var(--of-white);
  border: 1px solid var(--of-line);
  border-radius: var(--of-radius-panel);
  box-shadow: 0 1px 0 rgba(47, 49, 50, .03), 0 34px 64px -46px rgba(67, 43, 58, .5);
}
.of-box__icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  margin-bottom: 1.375rem;
  border-radius: 16px;
  background: var(--of-plum); color: var(--of-gold-light);
  font-size: 1.625rem;
}
.of-box .of-h3 { margin-bottom: 1.125rem; }
.of-checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: .8125rem; }
.of-checklist li { position: relative; padding-left: 2rem; line-height: 1.5; }
.of-checklist li::before {
  content: "";
  position: absolute; left: 0; top: .18em;
  width: 21px; height: 21px;
  border-radius: 50%;
  background: #F1EBE2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.4l2.9 2.9 6.1-6.3' fill='none' stroke='%237A6344' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.of-box--seal {
  display: flex; flex-direction: column;
  border-color: rgba(176, 149, 110, .6);
  background: linear-gradient(180deg, var(--of-white) 0%, #FBF8F3 100%);
}
.of-box--seal::before {
  content: "";
  position: absolute; left: 2rem; right: 2rem; top: -1px;
  height: 3px; border-radius: 0 0 3px 3px;
  background: var(--of-gold);
}
.of-seal__img { display: grid; place-items: center; margin-bottom: 1.5rem; }
.of-seal__img img { display: block; width: 100%; max-width: 240px; height: auto; }
.of-seal__title { font-weight: 600; margin: 0 0 1rem; line-height: 1.4; }
.of-box--seal dl { display: grid; grid-template-columns: auto 1fr; gap: .375rem 1.25rem; margin: 0; font-size: .9375rem; }
.of-box--seal dt { font-weight: 400; color: var(--of-sage); }
.of-box--seal dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
@media (min-width: 768px) and (max-width: 991.98px) {
  .of-box--seal { flex-direction: row; align-items: center; gap: 2.5rem; }
  .of-seal__img { flex: 0 0 240px; margin: 0; }
}

/* ---------- 9 y 10. Países e integración ---------- */
@media (min-width: 992px) {
  .of-illus--bleed { margin-right: calc(var(--of-bleed) * -1); }
}

/* ---------- 11. Equipos ---------- */
.of-teams { display: grid; gap: 2.5rem; margin-top: 2.5rem; }
.of-teams__img { margin: 0; order: -1; }
.of-teams__img img { display: block; width: 100%; }
.of-teams__list { display: grid; gap: 2rem; }
.of-team p { margin: 0; color: var(--of-text-2); max-width: 44ch; }
.of-team .of-h3 { display: flex; align-items: center; gap: .625rem; }
.of-team .of-h3::before {
  content: "";
  width: 10px; height: 10px; flex: none;
  border-radius: 50%;
  background: var(--node);
  box-shadow: 0 0 0 4px rgba(246, 244, 240, .08);
}
@media (min-width: 1200px) {
  .of-teams { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 0; margin-top: 4rem; margin-bottom: 3rem; }
  .of-teams__img { order: 0; }
  .of-teams__list { position: relative; display: block; }
  .of-team { position: absolute; left: 0; right: 2.5rem; top: var(--y); transform: translateY(-50%); }
  .of-team .of-h3::before { display: none; }
}

/* ---------- 12. Cierre: llamada a la acción ---------- */
.of-cta { position: relative; text-align: center; }
.of-cta__brand img { display: block; width: 340px; max-width: 82%; height: auto; margin: 0 auto; }
.of-cta__ideas {
  list-style: none;
  display: grid; gap: 1.25rem;
  max-width: 1040px;
  margin: clamp(2.5rem, 2rem + 2vw, 3.5rem) auto 0; padding: 0;
  text-align: left;
}
.of-cta__ideas li {
  position: relative; z-index: 2;
  display: flex; align-items: flex-start; gap: 1rem;
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); font-weight: 500; line-height: 1.4; letter-spacing: -.01em;
}
.of-cta__ideas .of-node { order: -1; margin-top: .05rem; background: var(--of-ivory); }
.of-cta__panel {
  --of-text: var(--of-ivory);
  --of-text-2: var(--of-muted-on-plum);
  --of-focus: var(--of-gold-light);
  --of-node-ring: rgba(201, 180, 147, .5);
  position: relative;
  max-width: 900px;
  margin: clamp(3.5rem, 2.5rem + 3vw, 5rem) auto 0;
  padding: clamp(3.25rem, 2.25rem + 3vw, 4.75rem) clamp(1.5rem, 1rem + 3vw, 4rem) clamp(2.75rem, 2rem + 2vw, 3.75rem);
  background: radial-gradient(120% 90% at 50% 0%, rgba(201, 180, 147, .2), rgba(201, 180, 147, 0) 62%), var(--of-plum);
  color: var(--of-ivory);
  border-radius: 32px;
  box-shadow: 0 60px 110px -60px rgba(67, 43, 58, .8);
}
.of-cta__panel > * { position: relative; z-index: 2; }
.of-cta__hub {
  position: absolute; left: 50%; top: 0; z-index: 3;
  transform: translate(-50%, -50%);
  background: var(--of-plum);
  border-color: var(--of-gold-light);
  box-shadow: 0 0 0 8px rgba(201, 180, 147, .16), 0 0 30px rgba(201, 180, 147, .45);
}
.of-cta__title {
  margin: 0 0 1rem;
  font-size: clamp(2.25rem, 1.6rem + 2vw, 3.25rem);
  font-weight: 600; line-height: 1.05; letter-spacing: -.032em;
}
.of-cta__text { margin: 0 auto 2.25rem; max-width: 40ch; color: var(--of-muted-on-plum); font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); }
.of-btn--lg { min-height: 56px; padding: 1rem 2rem; font-size: 1.0625rem; }
.of-btn .ph { font-size: 1.15em; transition: transform .2s ease; }
.of-btn:hover .ph-arrow-right { transform: translateX(3px); }
@media (min-width: 992px) {
  .of-cta__ideas { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3rem; text-align: center; }
  .of-cta__ideas li { flex-direction: column; align-items: center; justify-content: space-between; gap: 1.5rem; }
  .of-cta__ideas li > span:first-child { max-width: 24ch; }
  .of-cta__ideas .of-node { order: 0; }
  .of-cta__panel { margin-top: 7rem; }
}

/* ---------- Ventana del formulario ---------- */
.modal-backdrop { --bs-backdrop-bg: #1E1219; --bs-backdrop-opacity: .72; }
.of-modal .modal-content {
  border: 0;
  border-radius: var(--of-radius-panel);
  background: var(--of-white);
  box-shadow: 0 50px 100px -40px rgba(20, 10, 16, .6);
}
.of-modal .modal-header {
  align-items: center; gap: 1rem;
  padding: 1.25rem clamp(1.25rem, .75rem + 2vw, 2rem) 1rem;
  border-bottom: 1px solid var(--of-line);
}
.of-modal .modal-title {
  margin: 0;
  font-size: clamp(1.5rem, 1.3rem + .6vw, 1.875rem);
  font-weight: 600; line-height: 1.1; letter-spacing: -.028em;
  color: var(--of-plum);
}
.of-modal .btn-close { flex: none; margin: 0 0 0 auto; padding: .75rem; border-radius: 50%; opacity: .75; }
.of-modal .btn-close:focus { box-shadow: 0 0 0 3px rgba(67, 43, 58, .3); opacity: 1; }
.of-modal .modal-body { padding: 1.25rem clamp(1.25rem, .75rem + 2vw, 2rem) 1.5rem; }
@media (max-width: 575.98px) {
  .of-modal .modal-content { border-radius: 0; }
}

.of-form .row { --bs-gutter-y: .875rem; }
.of-form .form-label { font-weight: 500; font-size: .875rem; margin-bottom: .25rem; color: var(--of-graphite); }
.of-optional { font-weight: 400; color: var(--of-sage); }
.of-form .form-control {
  min-height: 44px;
  padding: .5rem .75rem;
  font-size: 1rem;
  color: var(--of-graphite);
  background: var(--of-white);
  border: 1px solid #8A7F73;
  border-radius: 12px;
}
.of-form textarea.form-control { min-height: 84px; resize: vertical; }
.of-form textarea.form-control::placeholder { color: #8A857E; }
.of-form .form-control:focus { border-color: var(--of-plum); box-shadow: 0 0 0 4px rgba(67, 43, 58, .16); outline: none; }
.of-form .form-control.is-invalid { border-color: var(--of-danger); background-image: none; padding-right: .875rem; }
.of-form .form-control.is-invalid:focus { box-shadow: 0 0 0 4px rgba(168, 32, 26, .16); }
.of-help { margin: .375rem 0 0; font-size: .8125rem; color: var(--of-sage); }
.of-error { margin: .25rem 0 0; font-size: .8125rem; font-weight: 500; color: var(--of-danger); }
.of-error:empty { display: none; }

.of-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.of-check { padding-left: 2rem; margin: 0; min-height: 0; }
.of-check .form-check-input {
  width: 1.25rem; height: 1.25rem;
  margin: .125rem 0 0 -2rem;
  border: 1.5px solid #8A7F73;
  border-radius: 5px;
}
.of-check .form-check-input:checked { background-color: var(--of-plum); border-color: var(--of-plum); }
.of-check .form-check-input:focus { box-shadow: 0 0 0 4px rgba(67, 43, 58, .18); border-color: var(--of-plum); }
.of-check .form-check-input.is-invalid { border-color: var(--of-danger); }
.of-field.is-invalid .form-label,
.of-field.is-invalid .of-captcha__label,
.of-check.is-invalid .form-check-label,
.of-check.is-invalid .form-check-label a { color: var(--of-danger); }
.of-check .form-check-label { font-size: .875rem; line-height: 1.45; }

.of-form__foot {
  display: grid; gap: 1rem;
  margin-top: 1.25rem; padding-top: 1.25rem;
  border-top: 1px solid var(--of-line);
}
.of-captcha { display: flex; align-items: center; gap: .625rem; }
.of-captcha__label { margin: 0; font-size: .875rem; font-weight: 500; white-space: nowrap; color: var(--of-graphite); }
.of-captcha__label span { font-weight: 600; font-variant-numeric: tabular-nums; }
.of-form .of-captcha__input { width: 4.25rem; min-height: 40px; padding: .375rem .5rem; text-align: center; font-variant-numeric: tabular-nums; }
.of-form__submit { justify-self: start; }
@media (min-width: 576px) {
  .of-form__foot {
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas: "check check" "captcha submit";
    align-items: center; row-gap: .875rem;
  }
  .of-check { grid-area: check; }
  .of-captcha { grid-area: captcha; }
  .of-form__submit { grid-area: submit; justify-self: end; }
}
@media (min-width: 768px) {
  .of-modal .modal-dialog { max-width: 720px; }
  .of-form__foot { grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "captcha check submit"; gap: 1.5rem; }
}
.of-form__status { margin: .875rem 0 0; font-size: .875rem; }
.of-form__status:empty { display: none; }
.of-form__status.is-error { color: var(--of-danger); font-weight: 500; }
.of-form__status.is-info {
  padding: .875rem 1rem;
  border-radius: 12px;
  background: #F1EBE2;
  color: var(--of-graphite);
}

.of-sent { padding: .5rem 0 .5rem; outline: none; }
.of-sent .of-btn { margin-top: 1.75rem; }
.of-sent .of-node { margin-bottom: 1rem; }
.of-sent p { margin: .25rem 0 0; color: var(--of-sage); max-width: 46ch; }

/* ---------- Pie ---------- */
.of-footer {
  background: var(--of-plum-deep);
  color: var(--of-muted-on-plum);
  padding-block: clamp(3.5rem, 2.5rem + 3vw, 5rem) 2rem;
  font-size: .9375rem;
}
.of-footer a { color: var(--of-ivory); text-underline-offset: 3px; }
.of-footer a:hover { color: var(--of-white); }
.of-footer__brand { display: inline-block; margin-bottom: 1.5rem; }
.of-footer__logo { width: 160px; height: auto; display: block; }
.of-footer__about { max-width: 46ch; margin: 0; }
.of-footer__title { font-size: .9375rem; font-weight: 600; color: var(--of-ivory); margin: 0 0 1rem; letter-spacing: 0; }
.of-footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: .625rem; }
.of-footer__bottom {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem;
  margin-top: 3.5rem; padding-top: 1.5rem;
  border-top: 1px solid rgba(246, 244, 240, .12);
  font-size: .8125rem;
}
.of-footer__bottom p { margin: 0; }

/* ---------- Apariciones (AOS) e hilos animados ---------- */
html:not(.js) [data-aos] { opacity: 1 !important; transform: none !important; }
[data-aos][data-aos="fade-up"]:not(.aos-animate) { transform: translate3d(0, 32px, 0); }
[data-aos][data-aos="zoom-in"]:not(.aos-animate) { transform: scale(.82); }
.of-pulse { filter: drop-shadow(0 0 6px rgba(176, 149, 110, .9)); }
.of-thread-end { stroke: var(--of-plum); stroke-width: 2.5; }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .of-pulse { display: none; }
}
