/* Julián Ricardo Apis · Abogado — hoja de estilos única */

:root {
  --ink: #0f1b2d;
  --ink-2: #13233a;
  --ink-deep: #0b1524;
  --paper: #f6f1e7;
  --paper-2: #efe7d8;
  --card: #fffdf8;
  --copper: #c98a4b;
  --copper-2: #e0ad74;
  --copper-ink: #8a5424;
  --text: #1c2430;
  --muted: #5d6674;
  --line: rgba(15, 27, 45, .12);
  --on-dark: #f6f1e7;
  --on-dark-2: rgba(246, 241, 231, .74);
  --line-dark: rgba(246, 241, 231, .14);
  --wa: #25d366;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 18px 40px -18px rgba(15, 27, 45, .28);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.1; letter-spacing: -.01em; margin: 0; }
h2, h3 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
p { margin: 0; }
.wrap { width: min(1180px, 100% - 40px); margin-inline: auto; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.skip {
  position: absolute; left: -999px; top: 10px; z-index: 100;
  background: var(--copper); color: var(--ink); padding: 10px 16px; border-radius: 10px; font-weight: 600;
}
.skip:focus { left: 16px; }
:focus-visible { outline: 2px solid var(--copper-2); outline-offset: 3px; border-radius: 6px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 15px 24px; border-radius: 999px; border: 1px solid transparent;
  font: 600 1rem/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), background .25s, box-shadow .25s, border-color .25s, color .25s;
}
.btn .wa-ico { width: 20px; height: 20px; fill: currentColor; flex: none; }
.btn-primary { background: var(--copper); color: var(--ink); box-shadow: 0 10px 28px -12px rgba(201, 138, 75, .8); }
.btn-primary:hover { background: var(--copper-2); transform: translateY(-2px); }
.btn-ghost { border-color: rgba(246, 241, 231, .3); color: var(--on-dark); }
.btn-ghost:hover { border-color: var(--copper-2); color: var(--copper-2); }
.btn-sm { padding: 11px 18px; font-size: .92rem; }
.btn-sm .wa-ico { width: 17px; height: 17px; }
.btn-lg { padding: 18px 30px; font-size: 1.08rem; }

/* ---------- Encabezado ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; color: var(--on-dark);
  transition: background .35s, box-shadow .35s;
}
.site-header.is-scrolled, .site-header.menu-open {
  background: rgba(15, 27, 45, .9);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--line-dark);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 42px; height: 42px; color: var(--copper-2); flex: none; }
.mark-text { font-family: var(--serif); font-style: italic; font-size: 19px; fill: var(--on-dark); }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--serif); font-size: 1.22rem; line-height: 1.1; }
.brand-role { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--on-dark-2); margin-top: 3px; }
.menu { display: flex; align-items: center; gap: 30px; }
.menu > a:not(.btn) { text-decoration: none; font-size: .95rem; color: var(--on-dark-2); transition: color .2s; position: relative; }
.menu > a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px;
  background: var(--copper-2); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease);
}
.menu > a:not(.btn):hover { color: var(--on-dark); }
.menu > a:not(.btn):hover::after { transform: scaleX(1); }
.burger {
  display: none; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line-dark);
  background: transparent; color: var(--on-dark); cursor: pointer; position: relative;
}
.burger span {
  position: absolute; left: 13px; right: 13px; height: 1.6px; background: currentColor; border-radius: 2px;
  transition: transform .3s var(--ease), top .3s var(--ease);
}
.burger span:first-child { top: 18px; }
.burger span:last-child { top: 26px; }
.burger[aria-expanded="true"] span:first-child { top: 22px; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { top: 22px; transform: rotate(-45deg); }

/* ---------- Inicio ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: max(700px, 100svh); display: flex; align-items: center;
  color: var(--on-dark);
  background:
    radial-gradient(1100px 680px at 80% 28%, #1e3556 0%, transparent 62%),
    radial-gradient(900px 620px at 6% 100%, #172c48 0%, transparent 60%),
    var(--ink);
}
.hero-topo {
  position: absolute; inset: -6%; width: 112%; height: 112%; max-width: none;
  object-fit: cover; opacity: .5; z-index: -1;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 66% 46%, #000 25%, transparent 80%);
  mask-image: radial-gradient(ellipse 75% 70% at 66% 46%, #000 25%, transparent 80%);
  animation: drift 50s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-3%, 2%, 0) scale(1.05); }
}
.hero-grid {
  display: grid; grid-template-columns: 1.35fr .9fr; gap: 56px; align-items: center;
  padding: 128px 0 96px;
}
.eyebrow, .kicker {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: .76rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
}
.eyebrow { color: var(--copper-2); }
.eyebrow::before, .kicker::before { content: ""; width: 34px; height: 1px; background: currentColor; }
.hero h1 {
  font-size: clamp(3rem, 7.4vw, 6rem); font-weight: 400; letter-spacing: -.025em;
  margin: 22px 0 26px; line-height: 1.02;
}
.hero h1 em { font-style: italic; color: var(--copper-2); font-weight: 400; }
.lead { font-size: clamp(1.12rem, 1.6vw, 1.32rem); color: var(--on-dark-2); max-width: 36ch; }
.lead-2 { margin-top: 14px; color: var(--on-dark); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.creds { display: flex; flex-wrap: wrap; gap: 10px; margin: 42px 0 0; padding: 0; list-style: none; }
.creds li {
  font-size: .82rem; color: var(--on-dark-2); border: 1px solid var(--line-dark);
  padding: 8px 14px; border-radius: 999px; background: rgba(255, 255, 255, .03);
}

.seal { width: min(420px, 100%); justify-self: center; color: var(--copper-2); overflow: visible; }
.seal-ring { transform-box: view-box; transform-origin: 50% 50%; animation: spin 90s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.seal-text { font: 600 15px var(--sans); fill: currentColor; letter-spacing: .2em; }
.seal-core { fill: rgba(255, 255, 255, .035); }
.seal-mono { font-family: var(--serif); font-style: italic; font-size: 118px; fill: var(--on-dark); }
.seal-sub { font: 600 12.5px var(--sans); letter-spacing: .42em; fill: currentColor; }

.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; width: 26px; height: 42px; margin-left: -13px;
  border: 1.5px solid rgba(246, 241, 231, .35); border-radius: 14px;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px;
  border-radius: 2px; background: var(--copper-2); animation: cue 2s var(--ease) infinite;
}
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* Animación de entrada del inicio (sin JavaScript) */
.rise { animation: rise 1s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
.rise.d1 { animation-delay: .1s; }
.rise.d2 { animation-delay: .22s; }
.rise.d3 { animation-delay: .34s; }
.rise.d4 { animation-delay: .46s; }

/* ---------- Secciones ---------- */
.section { padding: clamp(80px, 11vw, 136px) 0; position: relative; }
.kicker { color: var(--copper-ink); }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head h2, .split h2, .profile-text h2, .contact h2 { font-size: clamp(2.2rem, 4.6vw, 3.6rem); margin-top: 18px; letter-spacing: -.02em; }
.section-head p { margin-top: 20px; color: var(--muted); font-size: 1.14rem; max-width: 62ch; }
.big { font-size: clamp(1.12rem, 1.5vw, 1.26rem); }

.icon {
  width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center;
  background: rgba(201, 138, 75, .13); color: var(--copper-ink); margin-bottom: 22px;
}
.icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.icon .wa-ico { fill: currentColor; stroke: none; width: 26px; height: 26px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  position: relative; overflow: hidden; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px 34px;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
}
.card::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 3px;
  background: linear-gradient(90deg, var(--copper), var(--copper-2));
  transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease);
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: rgba(201, 138, 75, .4); }
.card:hover::after { transform: scaleX(1); }
.num { position: absolute; top: 24px; right: 26px; font-family: var(--serif); font-size: 1.05rem; color: rgba(15, 27, 45, .28); }
.card h3 { font-size: 1.5rem; margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 1rem; }

/* ---------- Secciones oscuras ---------- */
.dark { background: var(--ink); color: var(--on-dark); isolation: isolate; overflow: hidden; }
.dark .kicker { color: var(--copper-2); }
.dark p { color: var(--on-dark-2); }
.dark-topo {
  position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: .2; z-index: -1;
  -webkit-mask-image: linear-gradient(100deg, transparent 15%, #000 70%);
  mask-image: linear-gradient(100deg, transparent 15%, #000 70%);
}
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 72px; align-items: center; }
.split .big { margin: 24px 0 34px; max-width: 46ch; }
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.feature {
  border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 28px 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015));
  transition: border-color .3s, transform .35s var(--ease);
}
.feature:hover { border-color: rgba(224, 173, 116, .5); transform: translateY(-3px); }
.feature .icon, .contact .icon { background: rgba(224, 173, 116, .13); color: var(--copper-2); }
.feature h3 { font-size: 1.28rem; margin-bottom: 8px; }
.feature p { font-size: .98rem; }

/* ---------- Sucesiones ---------- */
.suc-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 64px; align-items: start; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: paso; }
.steps li { position: relative; padding: 0 0 36px 80px; counter-increment: paso; }
.steps li::before {
  content: counter(paso, decimal-leading-zero);
  position: absolute; left: 0; top: -6px; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--serif); font-size: 1.08rem;
  background: var(--card); border: 1px solid rgba(201, 138, 75, .55); color: var(--copper-ink);
}
.steps li::after {
  content: ""; position: absolute; left: 27px; top: 54px; bottom: 2px; width: 1px;
  background: linear-gradient(rgba(201, 138, 75, .7), rgba(201, 138, 75, .1));
}
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 1.34rem; margin-bottom: 6px; }
.steps p { color: var(--muted); }

.papers {
  position: sticky; top: 100px; isolation: isolate; overflow: hidden;
  background: var(--ink); color: var(--on-dark); border-radius: 26px; padding: 38px 34px;
  box-shadow: var(--shadow);
}
.papers-topo { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: .14; z-index: -1; }
.papers h3 { font-size: 1.7rem; margin-bottom: 22px; }
.checklist { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 13px; }
.checklist li { position: relative; padding-left: 34px; color: var(--on-dark-2); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .22em; width: 21px; height: 21px; border-radius: 50%;
  background: rgba(224, 173, 116, .16) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e0ad74' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 12.5l4.2 4.2L18.5 8'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.note { font-size: .95rem; color: var(--copper-2); border-top: 1px solid var(--line-dark); padding-top: 18px; margin-bottom: 26px; }

.tips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 72px; }
.tip { background: var(--paper-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 26px 28px; }
.tip strong { display: block; font-family: var(--serif); font-weight: 400; font-style: italic; font-size: 2.4rem; line-height: 1; color: var(--copper); margin-bottom: 14px; }

/* ---------- Cómo trabajo ---------- */
.how { background: var(--paper-2); }
.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.how-item { border-top: 1px solid rgba(15, 27, 45, .2); padding-top: 30px; }
.how-item h3 { font-size: 1.3rem; margin-bottom: 10px; }
.how-item p { color: var(--muted); font-size: 1rem; }

/* ---------- Perfil ---------- */
.profile { display: grid; grid-template-columns: .82fr 1.18fr; gap: 72px; align-items: center; }
.portrait {
  position: relative; isolation: isolate; overflow: hidden; margin: 0;
  aspect-ratio: 4 / 5; border-radius: 240px 240px 26px 26px;
  background: radial-gradient(circle at 50% 35%, #1e3556, var(--ink) 70%);
  display: grid; place-items: center; box-shadow: var(--shadow);
}
.portrait-topo { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; opacity: .35; z-index: -1; }
.portrait::before {
  content: ""; position: absolute; inset: 14px; border-radius: 230px 230px 18px 18px;
  border: 1px solid rgba(224, 173, 116, .35); pointer-events: none;
}
.mono { font-family: var(--serif); font-style: italic; font-size: clamp(5.5rem, 12vw, 9rem); color: var(--copper-2); line-height: 1; }
.portrait figcaption {
  position: absolute; left: 0; right: 0; bottom: 30px; text-align: center;
  font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--on-dark-2);
}
.profile-text .big { margin-top: 22px; color: var(--text); }
.profile-text p + p { margin-top: 14px; }
.profile-text > p:not(.kicker):not(.big) { color: var(--muted); }
.facts { margin: 34px 0 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 190px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: .76rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.facts dd { margin: 0; font-weight: 500; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; }
.contact .big { margin: 22px 0 34px; max-width: 40ch; }
.contact-cards { display: grid; gap: 14px; }
.c-card {
  display: flex; align-items: center; gap: 18px; padding: 20px 22px; text-decoration: none;
  border: 1px solid var(--line-dark); border-radius: var(--radius); background: rgba(255, 255, 255, .04);
  transition: border-color .25s, background .25s, transform .3s var(--ease);
}
.c-card:hover { border-color: rgba(224, 173, 116, .6); background: rgba(255, 255, 255, .07); transform: translateY(-2px); }
.c-card .icon { margin: 0; flex: none; }
.c-card small { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--on-dark-2); }
.c-card span { display: block; font-size: 1.14rem; color: var(--on-dark); margin-top: 2px; }

/* ---------- Pie ---------- */
.site-footer { background: var(--ink-deep); color: rgba(246, 241, 231, .58); font-size: .9rem; padding: 44px 0 110px; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 22px 40px; }
.foot p + p { margin-top: 4px; }
.foot-name { font-family: var(--serif); font-size: 1.15rem; color: var(--on-dark); }
.foot-right { max-width: 420px; }

/* ---------- Botón flotante de WhatsApp ---------- */
.wa-float {
  position: fixed; right: 18px; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 60;
  width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center;
  background: var(--wa); color: #fff; box-shadow: 0 12px 30px -8px rgba(37, 211, 102, .6);
  animation: pop .6s var(--ease) 1.4s both; transition: transform .25s var(--ease);
}
.wa-float svg { width: 31px; height: 31px; fill: currentColor; }
.wa-float:hover { transform: scale(1.07); }
@keyframes pop { from { opacity: 0; transform: translateY(24px) scale(.8); } to { opacity: 1; transform: none; } }
/* Con JavaScript aparece recién cuando ya no se ven los botones de arriba, así no los tapa en el celular */
.js .wa-float {
  animation: none; opacity: 0; visibility: hidden; transform: translateY(24px) scale(.8);
  transition: opacity .45s var(--ease), transform .45s var(--ease), visibility 0s linear .45s;
}
.js.float-on .wa-float { opacity: 1; visibility: visible; transform: none; transition: opacity .45s var(--ease), transform .45s var(--ease), visibility 0s; }
.js.float-on .wa-float:hover { transform: scale(1.07); }

/* ---------- Aparición al bajar (con JavaScript) ---------- */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .1s; }
.js .reveal.d2 { transition-delay: .2s; }
.js .reveal.d3 { transition-delay: .3s; }

/* ---------- Pantallas medianas y celulares ---------- */
@media (max-width: 1020px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .how-grid { grid-template-columns: repeat(2, 1fr); }
  .split, .suc-grid, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .papers { position: relative; top: 0; }
  .profile { grid-template-columns: 1fr; gap: 48px; }
  .portrait { max-width: 400px; width: 100%; margin-inline: auto; }
}
@media (max-width: 900px) {
  .burger { display: inline-flex; }
  .menu {
    position: absolute; top: 76px; left: 0; right: 0; display: none;
    flex-direction: column; align-items: stretch; gap: 0; padding: 6px 20px 22px;
    background: var(--ink); border-bottom: 1px solid var(--line-dark);
    box-shadow: 0 30px 40px -24px rgba(0, 0, 0, .55);
  }
  .menu.is-open { display: flex; }
  .menu > a:not(.btn) { padding: 15px 2px; border-bottom: 1px solid var(--line-dark); font-size: 1.05rem; color: var(--on-dark); }
  .menu > a:not(.btn)::after { display: none; }
  .menu-cta { margin-top: 18px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; padding: 116px 0 104px; }
  .seal { width: min(280px, 72vw); grid-row: 1; justify-self: start; }
}
@media (max-width: 640px) {
  .wrap { width: min(1180px, 100% - 32px); }
  body { font-size: 1rem; }
  .cards, .features, .how-grid, .tips { grid-template-columns: 1fr; }
  .hero h1 { margin: 16px 0 20px; }
  .hero-actions .btn { width: 100%; }
  .creds li { font-size: .78rem; }
  .seal { width: 190px; }
  .brand-role { display: none; }
  .steps li { padding-left: 70px; }
  .steps li::before { width: 48px; height: 48px; }
  .steps li::after { left: 24px; top: 48px; }
  .papers { padding: 30px 24px; }
  .facts div { grid-template-columns: 1fr; gap: 4px; }
  .c-card span { font-size: 1.02rem; }
  .scroll-cue { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; }
}
