:root {
  --bg: #07101c;
  --bg-2: #0b1423;
  --ink: #f8f3e7;
  --muted: rgba(248, 243, 231, .72);
  --soft: rgba(248, 243, 231, .50);
  --gold: #f5c86b;
  --gold-2: #ffe2a0;
  --gold-soft: rgba(245, 200, 107, .22);
  --line: rgba(245, 200, 107, .18);
  --line-cool: rgba(161, 197, 225, .13);
  --max: 1180px;
  --font-title: Georgia, "Times New Roman", serif;
  --font-body: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  overflow-x: hidden;
  background: #07101c;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("img/fondo-herencia-segura.svg");
  background-size: cover;
  background-position: center;
  opacity: .88;
  z-index: -4;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 17% 30%, rgba(245, 200, 107, .13), transparent 20rem),
    radial-gradient(circle at 74% 46%, rgba(62, 118, 165, .16), transparent 24rem),
    linear-gradient(180deg, rgba(7, 16, 28, .28), rgba(7, 16, 28, .70));
  z-index: -3;
}

.site-background {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, .032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .032) 1px, transparent 1px);
  background-size: 146px 146px;
  mask-image: radial-gradient(circle at center, black 0, black 56%, transparent 96%);
}

.particle-layer {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .68;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 20;
  background: rgba(7, 16, 28, .87);
  border-bottom: 1px solid rgba(245, 200, 107, .18);
  backdrop-filter: blur(16px);
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 200, 107, .42), transparent);
  opacity: .7;
}

.topbar__inner {
  width: min(var(--max), calc(100% - 48px));
  min-height: 78px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}

.brand__seal-wrap {
  position: relative;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.brand__seal {
  width: 38px;
  height: 38px;
  filter: drop-shadow(0 0 15px rgba(245, 200, 107, .34));
}

.brand__halo {
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(245, 200, 107, .30);
  border-radius: 999px;
  animation: brandHalo 3.8s ease-out infinite;
}

.brand__halo--two {
  animation-delay: 1.65s;
}

.brand__text {
  display: grid;
  gap: 2px;
  line-height: 1.02;
}

.brand__text strong {
  font-size: 1.04rem;
  letter-spacing: -.02em;
}

.brand__text small {
  color: var(--soft);
  font-size: .70rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 78px;
}

.main-nav a {
  color: rgba(248, 243, 231, .82);
  font-size: .94rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: -.01em;
  position: relative;
  transition: color .22s ease, transform .22s ease;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -12px;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  transform: translateX(-50%) scaleX(.42);
  opacity: .56;
  transition: transform .22s ease, opacity .22s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  color: var(--gold-2);
  transform: translateY(-1px);
  outline: none;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  transform: translateX(-50%) scaleX(1);
  opacity: 1;
}

.page-shell {
  min-height: 100vh;
  width: min(var(--max), calc(100% - 48px));
  margin: 0 auto;
  padding: 112px 0 74px;
  display: grid;
  place-items: center;
}

.page-shell--compact {
  padding-top: 76px;
}

.hero {
  width: min(880px, 100%);
  min-height: min(720px, calc(100vh - 126px));
  display: grid;
  place-items: center;
  text-align: center;
  align-content: center;
  position: relative;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  width: min(830px, 88vw);
  height: min(830px, 88vw);
  border-radius: 50%;
  border: 1px solid rgba(245, 200, 107, .045);
  opacity: .64;
  z-index: -1;
  animation: breathe 9s ease-in-out infinite;
}

.hero__visual {
  position: relative;
  width: 188px;
  height: 188px;
  margin: 0 auto 32px;
  display: grid;
  place-items: center;
}

.hero__seal {
  width: 102px;
  height: 102px;
  filter: drop-shadow(0 0 26px rgba(245, 200, 107, .40));
  animation: sealFloat 5.8s ease-in-out infinite;
}

.hero__seal--static {
  width: 98px;
  height: 98px;
  margin-bottom: 20px;
}

.orbital,
.pulse {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.orbital--outer {
  inset: 0;
  border: 1px solid rgba(245, 200, 107, .17);
  animation: orbitSpin 18s linear infinite;
}

.orbital--middle {
  inset: 26px;
  border: 1px solid rgba(151, 197, 225, .20);
  animation: orbitSpinReverse 14s linear infinite;
}

.orbital--inner {
  inset: 54px;
  border: 1px solid rgba(245, 200, 107, .20);
  animation: orbitSpin 10s linear infinite;
}

.orbital--outer::before,
.orbital--middle::before,
.orbital--inner::before {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 18px rgba(245, 200, 107, .74);
}

.orbital--outer::before {
  top: 18px;
  left: 31px;
}

.orbital--middle::before {
  right: 14px;
  top: 43px;
}

.orbital--inner::before {
  bottom: 12px;
  left: 16px;
}

.pulse {
  inset: 34px;
  border: 1px solid rgba(245, 200, 107, .22);
  animation: pulseHalo 4.2s ease-out infinite;
}

.pulse--two {
  animation-delay: 1.9s;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--gold);
  font-size: .76rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .27em;
  text-shadow: 0 0 22px rgba(245, 200, 107, .22);
}

h1 {
  max-width: 690px;
  margin: 0;
  font-family: var(--font-title);
  font-size: clamp(3rem, 6.2vw, 5.2rem);
  line-height: .92;
  letter-spacing: -.058em;
  color: #fff8ed;
  text-wrap: balance;
  text-shadow: 0 22px 66px rgba(0, 0, 0, .40);
}

.hero__lead {
  max-width: 690px;
  margin: 28px auto 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.42vw, 1.17rem);
  line-height: 1.78;
  text-wrap: balance;
}

.owner-line {
  margin-top: 36px;
  display: grid;
  gap: 8px;
  justify-items: center;
}

.owner-line span {
  color: rgba(248, 243, 231, .47);
  font-size: .70rem;
  font-weight: 900;
  letter-spacing: .24em;
  text-transform: uppercase;
}

.owner-line strong {
  font-size: clamp(1.12rem, 1.85vw, 1.48rem);
  line-height: 1.24;
  color: var(--ink);
  letter-spacing: -.035em;
  text-shadow: 0 0 24px rgba(245, 200, 107, .12);
}

.signal-line {
  margin-top: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: rgba(255, 226, 160, .78);
  font-size: .88rem;
  font-weight: 800;
  letter-spacing: -.005em;
  text-shadow: 0 0 18px rgba(245, 200, 107, .12);
}

.signal-mark {
  width: 44px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 200, 107, .72));
  opacity: .78;
  position: relative;
}

.signal-mark::after {
  content: "";
  position: absolute;
  right: -4px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 16px rgba(245, 200, 107, .62);
  transform: translateY(-50%);
  animation: goldSignal 2.6s ease-in-out infinite;
}

.signal-mark--right {
  transform: scaleX(-1);
}

.site-footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 12;
  display: flex;
  justify-content: center;
  padding: 0 18px 22px;
  color: rgba(248, 243, 231, .54);
  font-size: .86rem;
  pointer-events: none;
}

.return-link {
  margin-top: 30px;
  color: var(--gold);
  text-decoration: none;
  font-weight: 800;
}

.return-link:hover,
.return-link:focus-visible {
  color: var(--gold-2);
  outline: none;
}

.not-found-page .hero {
  min-height: auto;
}

@keyframes brandHalo {
  0% {
    opacity: 0;
    transform: scale(.82);
  }
  18% {
    opacity: .78;
  }
  100% {
    opacity: 0;
    transform: scale(1.58);
  }
}

@keyframes pulseHalo {
  0% {
    opacity: .0;
    transform: scale(.72);
  }
  22% {
    opacity: .56;
  }
  100% {
    opacity: 0;
    transform: scale(1.7);
  }
}

@keyframes orbitSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes orbitSpinReverse {
  to {
    transform: rotate(-360deg);
  }
}

@keyframes sealFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-7px) scale(1.016);
  }
}

@keyframes breathe {
  0%, 100% {
    transform: scale(.96);
    opacity: .30;
  }
  50% {
    transform: scale(1.03);
    opacity: .64;
  }
}

@keyframes goldSignal {
  0%, 100% {
    opacity: .62;
    transform: translateY(-50%) scale(.92);
  }
  50% {
    opacity: 1;
    transform: translateY(-50%) scale(1.18);
  }
}

@media (max-width: 980px) {
  .page-shell {
    padding-top: 106px;
  }

  .hero {
    min-height: 650px;
  }

  h1 {
    max-width: 620px;
    font-size: clamp(3rem, 8vw, 5rem);
  }
}

@media (max-width: 780px) {
  .topbar__inner {
    width: min(100% - 30px, var(--max));
    min-height: 74px;
  }

  .brand__text small {
    font-size: .62rem;
    letter-spacing: .14em;
  }

  .main-nav {
    min-height: 74px;
  }

  .main-nav a {
    font-size: .84rem;
  }

  .page-shell {
    width: min(100% - 32px, var(--max));
    padding-top: 104px;
    padding-bottom: 78px;
  }

  .hero {
    min-height: 620px;
  }

  .hero__visual {
    width: 168px;
    height: 168px;
    margin-bottom: 26px;
  }

  .hero__seal {
    width: 90px;
    height: 90px;
  }

  .eyebrow {
    letter-spacing: .20em;
    font-size: .70rem;
  }

  h1 {
    max-width: 560px;
    font-size: clamp(2.85rem, 10vw, 4.45rem);
  }

  .hero__lead {
    max-width: 580px;
    line-height: 1.68;
  }
}

@media (max-width: 560px) {
  .topbar__inner {
    width: min(100% - 24px, var(--max));
    min-height: 68px;
    gap: 12px;
  }

  .brand {
    gap: 10px;
  }

  .brand__seal-wrap {
    width: 44px;
    height: 44px;
  }

  .brand__seal {
    width: 32px;
    height: 32px;
  }

  .brand__text strong {
    font-size: .94rem;
  }

  .brand__text small {
    display: none;
  }

  .main-nav {
    min-height: 68px;
  }

  .main-nav a {
    font-size: .82rem;
  }

  .main-nav a::after {
    bottom: -9px;
  }

  .page-shell {
    width: min(100% - 28px, var(--max));
    padding-top: 94px;
    padding-bottom: 78px;
  }

  .hero {
    min-height: 600px;
  }

  .hero::before {
    width: 112vw;
    height: 112vw;
  }

  .hero__visual {
    width: 138px;
    height: 138px;
    margin-bottom: 24px;
  }

  .hero__seal {
    width: 74px;
    height: 74px;
  }

  .orbital--middle {
    inset: 20px;
  }

  .orbital--inner {
    inset: 40px;
  }

  .pulse {
    inset: 25px;
  }

  .eyebrow {
    margin-bottom: 14px;
    font-size: .66rem;
    letter-spacing: .16em;
  }

  h1 {
    max-width: 360px;
    font-size: clamp(2.75rem, 15vw, 3.95rem);
    line-height: .94;
  }

  .hero__lead {
    margin-top: 24px;
    font-size: .96rem;
    line-height: 1.62;
  }

  .owner-line {
    margin-top: 30px;
  }

  .owner-line span {
    font-size: .64rem;
    letter-spacing: .18em;
  }

  .owner-line strong {
    max-width: 330px;
    font-size: 1.12rem;
  }

  .signal-line {
    max-width: 320px;
    margin-top: 24px;
    gap: 9px;
    font-size: .80rem;
    line-height: 1.35;
  }

  .signal-mark {
    width: 26px;
    flex: 0 0 auto;
  }

  .site-footer {
    padding-bottom: 14px;
    font-size: .76rem;
  }
}

@media (max-width: 380px) {
  .topbar__inner {
    width: min(100% - 18px, var(--max));
  }

  .brand__text strong {
    font-size: .86rem;
  }

  .main-nav a {
    font-size: .78rem;
  }

  h1 {
    font-size: clamp(2.45rem, 14.2vw, 3.15rem);
  }

  .hero__lead {
    font-size: .92rem;
  }

  .signal-mark {
    width: 18px;
  }
}

@media (max-height: 760px) and (min-width: 720px) {
  .page-shell {
    padding-top: 94px;
  }

  .hero {
    min-height: 560px;
  }

  .hero__visual {
    width: 150px;
    height: 150px;
    margin-bottom: 22px;
  }

  .hero__seal {
    width: 82px;
    height: 82px;
  }

  h1 {
    font-size: clamp(3rem, 5.4vw, 4.7rem);
  }

  .hero__lead {
    margin-top: 22px;
  }

  .owner-line {
    margin-top: 28px;
  }
}

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


/* Ajuste fino v6: móvil equilibrado, centrado en pantalla y con footer abajo. */
@media (max-width: 680px) {
  html,
  body {
    min-height: 100dvh;
  }

  body {
    overflow-x: hidden;
  }

  .topbar__inner {
    width: 100%;
    min-height: 64px;
    padding: 0 22px;
    gap: 14px;
  }

  .brand {
    gap: 10px;
  }

  .brand__seal-wrap {
    width: 44px;
    height: 44px;
  }

  .brand__seal {
    width: 32px;
    height: 32px;
  }

  .brand__text strong {
    font-size: .92rem;
    line-height: 1;
  }

  .brand__text small {
    display: none;
  }

  .main-nav {
    min-height: 64px;
    padding-right: 10px;
    flex: 0 0 auto;
  }

  .main-nav a {
    font-size: .80rem;
  }

  .main-nav a::after {
    bottom: -9px;
    transform: translateX(-50%) scaleX(.32);
  }

  .page-shell {
    width: min(100% - 32px, var(--max));
    min-height: 100dvh;
    margin: 0 auto;
    padding: 92px 0 72px;
    display: grid;
    place-items: center;
  }

  .hero {
    width: 100%;
    max-width: 390px;
    min-height: auto;
    margin: 0 auto;
    align-content: center;
    transform: translateY(-8px);
  }

  .hero::before {
    width: min(108vw, 540px);
    height: min(108vw, 540px);
    opacity: .52;
  }

  .hero__visual {
    width: 128px;
    height: 128px;
    margin: 0 auto 22px;
  }

  .hero__seal {
    width: 70px;
    height: 70px;
  }

  .orbital--middle {
    inset: 19px;
  }

  .orbital--inner {
    inset: 38px;
  }

  .pulse {
    inset: 23px;
  }

  .orbital--outer::before,
  .orbital--middle::before,
  .orbital--inner::before {
    width: 7px;
    height: 7px;
  }

  .eyebrow {
    margin-bottom: 12px;
    font-size: .62rem;
    letter-spacing: .17em;
  }

  h1 {
    max-width: 335px;
    font-size: clamp(2.45rem, 12.8vw, 3.30rem);
    line-height: .94;
    letter-spacing: -.047em;
  }

  .hero__lead {
    max-width: 350px;
    margin-top: 22px;
    font-size: .91rem;
    line-height: 1.55;
  }

  .owner-line {
    margin-top: 26px;
    gap: 6px;
  }

  .owner-line span {
    font-size: .58rem;
    letter-spacing: .16em;
  }

  .owner-line strong {
    max-width: 345px;
    font-size: 1.04rem;
    line-height: 1.20;
  }

  .signal-line {
    max-width: 345px;
    margin-top: 18px;
    gap: 8px;
    font-size: .75rem;
    line-height: 1.28;
  }

  .signal-mark {
    width: 22px;
    flex: 0 0 auto;
  }

  .site-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 12;
    display: flex;
    justify-content: center;
    padding: 0 18px max(16px, env(safe-area-inset-bottom));
    color: rgba(248, 243, 231, .54);
    font-size: .72rem;
    pointer-events: none;
  }
}

@media (max-width: 420px) {
  .topbar__inner {
    min-height: 62px;
    padding: 0 20px;
  }

  .brand__seal-wrap {
    width: 42px;
    height: 42px;
  }

  .brand__seal {
    width: 30px;
    height: 30px;
  }

  .brand__text strong {
    font-size: .88rem;
  }

  .main-nav {
    min-height: 62px;
    padding-right: 8px;
  }

  .main-nav a {
    font-size: .78rem;
  }

  .page-shell {
    width: min(100% - 30px, var(--max));
    padding-top: 88px;
    padding-bottom: 70px;
  }

  .hero {
    max-width: 360px;
    transform: translateY(-6px);
  }

  .hero__visual {
    width: 118px;
    height: 118px;
    margin-bottom: 20px;
  }

  .hero__seal {
    width: 64px;
    height: 64px;
  }

  .orbital--middle {
    inset: 17px;
  }

  .orbital--inner {
    inset: 35px;
  }

  .pulse {
    inset: 21px;
  }

  .eyebrow {
    margin-bottom: 11px;
    font-size: .58rem;
    letter-spacing: .155em;
  }

  h1 {
    max-width: 315px;
    font-size: clamp(2.25rem, 12.2vw, 2.95rem);
    line-height: .95;
  }

  .hero__lead {
    max-width: 325px;
    margin-top: 20px;
    font-size: .86rem;
    line-height: 1.50;
  }

  .owner-line {
    margin-top: 23px;
  }

  .owner-line span {
    font-size: .55rem;
    letter-spacing: .145em;
  }

  .owner-line strong {
    max-width: 325px;
    font-size: .98rem;
  }

  .signal-line {
    max-width: 320px;
    margin-top: 16px;
    font-size: .71rem;
  }

  .signal-mark {
    width: 18px;
  }

  .site-footer {
    font-size: .69rem;
    padding-bottom: max(15px, env(safe-area-inset-bottom));
  }
}

@media (max-width: 360px) {
  .topbar__inner {
    min-height: 60px;
    padding: 0 16px;
  }

  .brand__seal-wrap {
    width: 38px;
    height: 38px;
  }

  .brand__seal {
    width: 28px;
    height: 28px;
  }

  .brand__text strong {
    font-size: .82rem;
  }

  .main-nav {
    min-height: 60px;
    padding-right: 4px;
  }

  .main-nav a {
    font-size: .74rem;
  }

  .page-shell {
    width: min(100% - 28px, var(--max));
    padding-top: 82px;
    padding-bottom: 64px;
  }

  .hero__visual {
    width: 108px;
    height: 108px;
    margin-bottom: 16px;
  }

  .hero__seal {
    width: 58px;
    height: 58px;
  }

  .eyebrow {
    margin-bottom: 9px;
    font-size: .53rem;
  }

  h1 {
    max-width: 292px;
    font-size: clamp(2.05rem, 11.7vw, 2.55rem);
  }

  .hero__lead {
    margin-top: 16px;
    font-size: .80rem;
    line-height: 1.42;
  }

  .owner-line {
    margin-top: 18px;
  }

  .owner-line strong {
    font-size: .91rem;
  }

  .signal-line {
    margin-top: 13px;
    font-size: .66rem;
  }

  .signal-mark {
    display: none;
  }
}

@media (max-height: 720px) and (max-width: 680px) {
  .page-shell {
    padding-top: 76px;
    padding-bottom: 58px;
  }

  .hero {
    transform: translateY(-2px);
  }

  .hero__visual {
    width: 104px;
    height: 104px;
    margin-bottom: 14px;
  }

  .hero__seal {
    width: 57px;
    height: 57px;
  }

  .eyebrow {
    margin-bottom: 8px;
  }

  h1 {
    font-size: clamp(2.05rem, 10.4vw, 2.65rem);
  }

  .hero__lead {
    margin-top: 14px;
    font-size: .80rem;
    line-height: 1.38;
  }

  .owner-line {
    margin-top: 17px;
  }

  .signal-line {
    margin-top: 12px;
  }
}
