/*
  VOICE   sober and exact. People arrive in a hard moment; the site speaks calmly and plainly.
  IDEA    his office. The firm's sign opens the site, then the cover: one shot that plays by
          itself, from above his desk down to him looking at you, and his signature writing
          itself on the last frame. Nothing else moves.
  TYPE    Lexend Exa, the wide geometric face of the KARSA sign, for titles and figures; the
          titles are made of the sign's brushed steel: lit from above, darker below, with a glint
          that crosses each one as it moves up the screen. Hanken Grotesk, a quiet modern sans,
          for reading, links and facts. No labels above titles, no tags, no underlines.
  FORM    an editorial page, not a template: wide margins, Libertad Matrimonial told by two
          wedding bands in 3D that come apart as you scroll, his record in two large figures that count up, the three ways to divorce as a
          gallery that slides sideways with the scroll, the process as cards that stack, questions
          answered in plain sight. Content sits on soft-lit cards instead of being cut by rules:
          no dividing lines, no plus signs. A call to action is a phrase with an arrow in a circle.
  COLOUR  black for every section, warm white ink, greys for what is secondary.
*/
@font-face {
  font-family: "Lexend Exa";
  src: url("/assets/fonts/lexend-exa-variable.6c9970365f9f.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/assets/fonts/hanken-grotesk-variable.e9201eddf1d4.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #131c30;
  --bg-2: #19243e;
  --bg-3: #1d2a48;
  --bg-4: #24345a;
  --ink: #f3f1ec;
  --ink-2: #d3d8e1;
  --ink-3: #9ca7bb;
  /* A card is lit from its top-left corner, like a page under a desk lamp. */
  --card: linear-gradient(150deg, #1d2a48 0%, #18223b 55%, #162037 100%);
  --card-hover: linear-gradient(150deg, #213053 0%, #1a2642 55%, #18223b 100%);

  --display: "Lexend Exa", "Helvetica Neue", Arial, sans-serif;
  --text: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --meta: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --line: #202e4f;
  /* The same colours as numbers, for the see-through shades over photos and under titles. */
  --bg-rgb: 19 28 48;
  --ink-rgb: 243 241 236;
  --shade-rgb: 8 11 18;
  /* Tones between the background and the cards, for glows, lamps and the dimmed words. */
  --tone-1: #172138;
  --tone-2: #19243f;
  --tone-3: #1b2844;
  --tone-4: #233257;
  --tone-5: #273862;
  --tone-hover: #1a2642;
  --dim: #52699d; /* words not yet lit: 3.1:1 on the page, the minimum for large text */
  /* What can be pressed: the round arrow, the form's button, the chosen answer. */
  --accent: var(--ink);
  --accent-ink: var(--bg);
  --accent-hover: #ffffff;
  --error: #f1d4cf;
  /* The brushed steel of the titles and of the name in the foot. */
  --metal-base: #e6e4df;
  --metal: linear-gradient(180deg, #ffffff 0%, #eceae6 22%, #b9b7b2 46%, #8b8985 58%, #c9c7c2 72%, #f2f0ec 84%, #9a9893 100%);
  --metal-deep: linear-gradient(180deg, #ffffff 0%, #f6f5f1 18%, #dad8d3 34%, #9a9894 46%, #63625f 52%, #b9b7b2 61%, #f3f1ed 74%, #ffffff 83%, #d4d2cd 92%, #a09e99 100%);
  --title-shadow: drop-shadow(0 -1px 0 rgb(255 255 255 / 0.22)) drop-shadow(0 1px 0 rgb(8 11 18 / 0.95)) drop-shadow(0 10px 14px rgb(8 11 18 / 0.8));
  --mark-shadow: drop-shadow(0 -1px 0 rgb(255 255 255 / 0.3)) drop-shadow(0 2px 0 rgb(8 11 18 / 0.95)) drop-shadow(0 0.05em 0.05em rgb(8 11 18 / 0.7));

  --fs-small: 14px;
  --fs-body: clamp(15.5px, 0.25vw + 14.6px, 17px);
  --fs-lead: clamp(17px, 0.4vw + 15.6px, 20px);
  --fs-h3: clamp(17px, 0.45vw + 15.4px, 21px);
  --fs-h2: clamp(23px, 1.45vw + 17.4px, 43px);
  --fs-h1: clamp(26px, 2vw + 18.6px, 55px);
  /* Every figure on the site (the record, the months of each way) is set at this one size. */
  --fs-num: clamp(31px, 1.8vw + 23px, 55px);
  --fs-big: clamp(20px, 0.8vw + 17px, 30px);

  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-5: 40px;
  --s-6: 56px;
  --s-7: 80px;
  --pad: clamp(22px, 5.5vw, 80px);
  --band: clamp(64px, 7vw, 112px);
  --head: 64px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--head) + var(--s-2)); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 var(--fs-body)/1.75 var(--text); font-synthesis: none; font-optical-sizing: auto; overflow-x: clip; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color 0.3s var(--ease); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
p { margin: 0 0 var(--s-2); }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: -0.01em; margin: 0; text-wrap: balance; overflow-wrap: break-word; }
h1 { font-size: var(--fs-h1); line-height: 1.16; }
h2 { font-size: var(--fs-h2); line-height: 1.18; }
h3 { font-size: var(--fs-h3); line-height: 1.3; letter-spacing: -0.005em; }

/*
  Brushed steel, like the letters of the sign: each line lit from above and darker towards its
  foot, a bright edge on top and a dark one below, and a glint that crosses the word as it moves
  up the screen (the script sets --shine from 0 to 1; without it there is no glint).
*/
main h1, main h2, .metal, .logo-word, .ml-name {
  color: var(--metal-base);
  background-image:
    linear-gradient(100deg, rgb(255 255 255 / 0) 0%, rgb(255 255 255 / 0) 43%, rgb(255 255 255 / 0.95) 50%, rgb(255 255 255 / 0) 57%, rgb(255 255 255 / 0) 100%),
    var(--metal);
  background-size: 260% 100%, 100% 1lh;
  background-repeat: no-repeat, repeat-y;
  background-position: calc((1 - var(--shine, 0)) * 100%) 0, 0 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: var(--title-shadow);
}
h1 a, h2 a, h3 a { text-decoration: none; }

.lead { font-size: var(--fs-lead); line-height: 1.65; color: var(--ink-2); max-width: 32em; margin-top: var(--s-3); }
.micro, .note { font: 400 var(--fs-small)/1.6 var(--meta); letter-spacing: 0.02em; color: var(--ink-3); margin: var(--s-3) 0 0; max-width: 40em; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--s-2); top: var(--s-2); z-index: 50; background: var(--ink); color: var(--bg); padding: 12px 18px; }
.wrap { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: var(--pad); }

/* ---------------------------------------------------------------- splash */
/*
  The firm's sign comes on piece by piece on black: the K drawn blade by blade, then KARSA
  letter by letter, CONSULTORÍA JURÍDICA, and a gleam that runs across the
  metal. Nothing starts until the script says the pieces are loaded (html.splash-go), so no part
  of it plays unseen. The wall is the black of the film's first frame, so the cover follows it
  without a seam.
*/
.splash-screen { display: none; }
html.splash .splash-screen {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; overflow: hidden;
  background: #030303; animation: splash-out 0.65s cubic-bezier(0.65, 0, 0.35, 1) 3s forwards; animation-play-state: paused;
}
html.splash-skip .splash-screen { animation: splash-out 0.35s ease forwards; }
html.splash-done .splash-screen { display: none; }
.sp { position: absolute; display: block; height: auto; max-width: none; }
html.splash .sp { animation-play-state: paused; }
html.splash-go .splash-screen, html.splash-go .sp { animation-play-state: running; }
/* The logo's pieces, placed as on the sign: generated from the cut (karsa/logo/css.py). */
.splash-logo { position: relative; width: min(84vw, 1200px, 150svh); aspect-ratio: 1856 / 410; }
.sp-hoja-1 { left: 1.562%; top: 25.122%; width: 2.101%; animation: sp-draw-down 0.6s cubic-bezier(0.65, 0, 0.35, 1) 0.2s both, sp-shine 0.55s ease-in-out 2.25s; }
.sp-hoja-2 { left: 2.101%; top: 3.415%; width: 9.267%; animation: sp-draw 0.6s cubic-bezier(0.65, 0, 0.35, 1) 0.37s both, sp-shine 0.55s ease-in-out 2.25s; }
.sp-hoja-3 { left: 2.047%; top: 69.756%; width: 9.375%; animation: sp-draw 0.6s cubic-bezier(0.65, 0, 0.35, 1) 0.37s both, sp-shine 0.55s ease-in-out 2.25s; }
.sp-hoja-4 { left: 2.909%; top: 13.659%; width: 15.463%; animation: sp-draw 0.6s cubic-bezier(0.65, 0, 0.35, 1) 0.55s both, sp-shine 0.55s ease-in-out 2.25s; }
.sp-hoja-5 { left: 5.442%; top: 47.073%; width: 12.877%; animation: sp-draw 0.6s cubic-bezier(0.65, 0, 0.35, 1) 0.55s both, sp-shine 0.55s ease-in-out 2.25s; }
.sp-k { left: 24.001%; top: 23.659%; width: 11.099%; animation: sp-letter 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.8s both, sp-shine 0.55s ease-in-out 2.335s; }
.sp-a1 { left: 38.494%; top: 22.195%; width: 12.5%; animation: sp-letter 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.93s both, sp-shine 0.55s ease-in-out 2.42s; }
.sp-r { left: 54.604%; top: 20.976%; width: 10.614%; animation: sp-letter 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 1.06s both, sp-shine 0.55s ease-in-out 2.505s; }
.sp-s { left: 69.044%; top: 19.268%; width: 10.506%; animation: sp-letter 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 1.19s both, sp-shine 0.55s ease-in-out 2.59s; }
.sp-a2 { left: 83.268%; top: 23.659%; width: 12.716%; animation: sp-letter 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 1.32s both, sp-shine 0.55s ease-in-out 2.675s; }
/* "Consultoría Jurídica" under KARSA, letter by letter (pieces made by karsa/logo/consultoria.py). */
.sp-cj-1 { left: 24.003%; top: 83.13%; width: 2.963%; animation: sp-small 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 1.6s both; }
.sp-cj-2 { left: 27.761%; top: 83.089%; width: 3.341%; animation: sp-small 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 1.642s both; }
.sp-cj-3 { left: 31.882%; top: 83.171%; width: 3.341%; animation: sp-small 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 1.684s both; }
.sp-cj-4 { left: 36.028%; top: 83.089%; width: 2.802%; animation: sp-small 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 1.726s both; }
.sp-cj-5 { left: 39.594%; top: 83.171%; width: 3.179%; animation: sp-small 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 1.768s both; }
.sp-cj-6 { left: 43.569%; top: 83.171%; width: 2.64%; animation: sp-small 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 1.81s both; }
.sp-cj-7 { left: 47.001%; top: 83.171%; width: 2.532%; animation: sp-small 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 1.852s both; }
.sp-cj-8 { left: 50.338%; top: 83.089%; width: 3.341%; animation: sp-small 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 1.894s both; }
.sp-cj-9 { left: 54.459%; top: 83.171%; width: 2.963%; animation: sp-small 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 1.936s both; }
.sp-cj-10 { left: 58.223%; top: 80.122%; width: 2.371%; animation: sp-small 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 1.978s both; }
.sp-cj-11 { left: 61.375%; top: 83.171%; width: 2.963%; animation: sp-small 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 2.02s both; }
.sp-cj-12 { left: 67.509%; top: 83.171%; width: 2.748%; animation: sp-small 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 2.062s both; }
.sp-cj-13 { left: 71.056%; top: 83.171%; width: 3.179%; animation: sp-small 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 2.104s both; }
.sp-cj-14 { left: 75.031%; top: 83.171%; width: 2.963%; animation: sp-small 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 2.146s both; }
.sp-cj-15 { left: 78.795%; top: 80.122%; width: 2.371%; animation: sp-small 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 2.188s both; }
.sp-cj-16 { left: 81.946%; top: 83.171%; width: 3.233%; animation: sp-small 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 2.23s both; }
.sp-cj-17 { left: 85.93%; top: 83.171%; width: 2.371%; animation: sp-small 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 2.272s both; }
.sp-cj-18 { left: 89.082%; top: 83.13%; width: 2.963%; animation: sp-small 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 2.314s both; }
.sp-cj-19 { left: 92.84%; top: 83.171%; width: 2.963%; animation: sp-small 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) 2.356s both; }
@media (max-aspect-ratio: 4/5) {
  /* On a phone the sign stays as designed, in one line, as wide as the screen allows. */
  .splash-logo { width: 94vw; }
}
@keyframes sig-write { to { clip-path: inset(0 0 0 0); } }
@keyframes splash-out { to { opacity: 0; visibility: hidden; } }
@keyframes sp-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes sp-draw-down { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes sp-letter {
  from { opacity: 0; transform: translateY(16%) scale(1.05); filter: blur(10px); }
  55% { opacity: 1; filter: blur(0) brightness(1.45); }
  to { opacity: 1; transform: none; filter: none; }
}
@keyframes sp-small { from { opacity: 0; transform: translateY(40%); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes sp-line { from { transform: scaleX(0); opacity: 0; } 20% { opacity: 1; } to { transform: scaleX(1); opacity: 1; } }
@keyframes sp-shine { 50% { filter: brightness(1.75); } }
@keyframes fade-in { to { opacity: 1; } }

/* ---------------------------------------------------------------- header */
/*
  The bar's black is a hair short of solid (invisible to the eye): a fully solid bar makes Chrome
  treat the photographs drawn on the graphics card as hidden behind it once they are half scrolled
  past, and it stops showing them.
*/
.site-head { position: sticky; top: 0; z-index: 20; height: var(--head); background: rgb(var(--bg-rgb) / 0.998); transition: transform 0.7s var(--ease); }
/* While the visitor reads downward the header steps aside; it comes back on the way up. */
html.head-away .site-head { transform: translateY(-100%); }
.head-in { height: 100%; max-width: 1320px; margin-inline: auto; padding-inline: var(--pad); display: flex; align-items: center; gap: var(--s-4); }
.logo { display: inline-flex; align-items: baseline; gap: 12px; margin-right: auto; text-decoration: none; white-space: nowrap; }
.logo-word { font: 400 clamp(15px, 0.25vw + 14px, 17px)/1 var(--display); letter-spacing: 0.24em; text-transform: uppercase; }
.logo-sub { font: 400 14px/1 var(--text); letter-spacing: 0.03em; color: var(--ink-3); }
.nav { display: none; align-items: center; gap: var(--s-4); font: 400 14.5px/1 var(--text); letter-spacing: 0.03em; }
.nav a { text-decoration: none; color: var(--ink-2); padding-block: 8px; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); }
.nav-bot { padding: 8px 0; border: 0; background: none; color: var(--ink-2); font: inherit; cursor: pointer; }
.nav-bot:hover { color: var(--ink); }
.btn.head-cta { display: none; width: auto; min-height: 40px; padding: 0; border: 0; background: none; color: var(--ink); font-size: 14.5px; gap: 12px; }
.btn.head-cta:hover { background: none; }

.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; min-height: 44px; font: 400 14.5px/1 var(--text); letter-spacing: 0.04em; color: var(--ink); }
.menu summary::-webkit-details-marker { display: none; }
.menu-icon { position: relative; width: 20px; height: 7px; border-block: 1px solid var(--ink); }
.menu[open] .menu-icon { height: 2px; border-bottom: 0; }
/*
  The menu takes the whole screen: the places of the site in large steel letters, a photograph
  for the one being touched, and the call to action at the foot. It opens downward like a
  curtain and its entries come into focus one after the other.
*/
.menu-panel { position: fixed; inset: var(--head) 0 0 0; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); padding: var(--s-3) var(--pad) max(var(--s-4), env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: var(--s-4); }
/* The menu reads like a magazine's contents: a light name in steel and, under it, what it holds. */
.menu-links { display: flex; flex-direction: column; align-items: stretch; }
.menu-links a, .menu-bot { display: grid; gap: 4px; padding: 9px 0 10px; border: 0; background: none; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer; opacity: var(--o, 1); }
.ml-name { justify-self: start; font: 300 clamp(20px, 5.2vw, 28px)/1.12 var(--display); letter-spacing: 0.035em; transition: transform 0.5s var(--ease); }
.ml-note { font: 400 11.5px/1.4 var(--meta); letter-spacing: 0.05em; color: var(--ink-3); transition: color 0.4s var(--ease); }
@media (hover: hover) { .menu-links a:hover .ml-name, .menu-bot:hover .ml-name { transform: translateX(8px); } .menu-links a:hover .ml-note, .menu-bot:hover .ml-note { color: var(--ink-2); } }
.menu-links a[aria-current="page"] { --o: 0.42; }
.menu-photo { position: relative; flex: 1 1 auto; min-height: 140px; max-height: 32svh; margin: 0; overflow: hidden; background: var(--bg-2); }
.menu-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.08); transition: opacity 0.7s var(--ease), transform 1.4s var(--ease); }
.menu-photo img.on { opacity: 1; transform: none; }
.menu-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-2) var(--s-4); }
html.menu-open { overflow: hidden; }
html.motion .menu[open] .menu-panel { animation: menu-open 0.75s cubic-bezier(0.7, 0, 0.2, 1) both; }
html.motion .menu[open] .menu-links > * { animation: menu-entry 1s var(--ease) both; }
html.motion .menu[open] .menu-links > :nth-child(1) { animation-delay: 0.22s; }
html.motion .menu[open] .menu-links > :nth-child(2) { animation-delay: 0.28s; }
html.motion .menu[open] .menu-links > :nth-child(3) { animation-delay: 0.34s; }
html.motion .menu[open] .menu-links > :nth-child(4) { animation-delay: 0.4s; }
html.motion .menu[open] .menu-links > :nth-child(5) { animation-delay: 0.46s; }
html.motion .menu[open] .menu-links > :nth-child(6) { animation-delay: 0.52s; }
html.motion .menu[open] .menu-links > :nth-child(7) { animation-delay: 0.58s; }
html.motion .menu[open] .menu-photo, html.motion .menu[open] .menu-foot { animation: menu-fade 1s var(--ease) 0.5s both; }
@keyframes menu-open { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes menu-entry {
  from { opacity: 0; transform: translate3d(0, 0.35em, 0); filter: blur(10px) var(--title-shadow); }
  to { opacity: var(--o, 1); transform: none; filter: blur(0px) var(--title-shadow); }
}
@keyframes menu-fade { from { opacity: 0; transform: translate3d(0, 16px, 0); } to { opacity: 1; transform: none; } }
@media (min-width: 1060px) {
  .nav, .btn.head-cta { display: flex; }
  .menu { display: none; }
}

/* Sound, off until asked for: a dot that lights and breathes while the room is heard. */
.sound { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--ink-2); font: 400 14.5px/1 var(--text); letter-spacing: 0.03em; cursor: pointer; }
.sound[hidden] { display: none; }
.sound:hover { color: var(--ink); }
.sound-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bg-4); transition: background 0.4s var(--ease); }
.sound[aria-pressed="true"] { color: var(--ink); }
.sound[aria-pressed="true"] .sound-dot { background: var(--ink); animation: sound-breathe 2.4s ease-in-out infinite; }
@keyframes sound-breathe { 50% { transform: scale(0.55); opacity: 0.6; } }

/*
  The curtain between pages: black, with his signature writing itself across it. Leaving a page it
  rises from the foot; the next page opens with it still drawn, and it lifts away. Only with the
  script and motion; otherwise pages simply change.
*/
.pt { display: none; }
html.motion .pt { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: var(--bg); pointer-events: none; visibility: hidden; transform: translate3d(0, 100%, 0); }
.pt-sig { width: min(58vw, 300px); height: auto; clip-path: inset(-10% 100% -10% 0); }
html.pt-out .pt { visibility: visible; transform: none; transition: transform 0.6s cubic-bezier(0.7, 0, 0.2, 1); pointer-events: auto; }
html.pt-out .pt-sig { clip-path: inset(-10% 0 -10% 0); transition: clip-path 0.65s cubic-bezier(0.45, 0.05, 0.25, 1) 0.2s; }
html.pt-in .pt { visibility: visible; transform: none; }
html.pt-in .pt-sig, html.pt-lift .pt-sig { clip-path: inset(-10% 0 -10% 0); }
html.pt-lift .pt { visibility: visible; transform: translate3d(0, -100%, 0); transition: transform 0.85s cubic-bezier(0.7, 0, 0.2, 1); }

/* --------------------------------------------------------------- buttons */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-1) var(--s-5); margin-top: var(--s-4); }
.btn { transition: color 0.3s var(--ease); display: inline-flex; align-items: center; gap: 16px; min-height: 48px; padding: 0; border: 0; border-radius: 0; background: none; color: var(--ink); font: 400 15px/1.3 var(--text); letter-spacing: 0.03em; text-decoration: none; text-align: left; cursor: pointer; }
.btn-line { color: var(--ink-2); }
.btn-line:hover { color: var(--ink); }
.btn[disabled] { color: var(--ink-3); cursor: not-allowed; }
.link-arrow { display: inline-flex; align-items: center; gap: 14px; min-height: 48px; color: var(--ink); font: 400 15px/1.3 var(--text); letter-spacing: 0.03em; }
/*
  The arrow sits in a small round button. On the main call (WhatsApp) the circle is white, so it
  reads at once as the thing to press; on a plain link it is dark and turns white when touched.
*/
.btn-solid::after, .link-arrow::after {
  content: ""; flex: none; width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='12' viewBox='0 0 16 12'%3E%3Cpath d='M1 6h13M9 1.2 14 6l-5 4.8' fill='none' stroke='%23f3f1ec' stroke-width='1.3'/%3E%3C/svg%3E") center / 15px 12px no-repeat;
  transition: background-color 0.45s var(--ease), transform 0.6s var(--ease);
}
.btn-solid::after { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='12' viewBox='0 0 16 12'%3E%3Cpath d='M1 6h13M9 1.2 14 6l-5 4.8' fill='none' stroke='%23131c30' stroke-width='1.3'/%3E%3C/svg%3E") center / 15px 12px no-repeat; }
.link-arrow:hover::after, .type:hover .link-arrow::after { background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='12' viewBox='0 0 16 12'%3E%3Cpath d='M1 6h13M9 1.2 14 6l-5 4.8' fill='none' stroke='%23131c30' stroke-width='1.3'/%3E%3C/svg%3E") center / 15px 12px no-repeat; transform: translateX(4px); }
.btn-solid:hover::after { transform: translateX(4px); }

/* -------------------------------------------------------------- sections */
main > section { background: var(--bg); }
main > section.band-alt, main > section.proof { background: var(--bg); }
/* ----------------------------------------------------------------- cover */
/*
  The cover is only the film: no words, no header over it. One shot comes down from above the
  desk to the lawyer looking at you; it plays by itself once and holds on him, and then his
  signature writes itself at the bottom right, the way a portrait is signed. The script adds
  html.film and starts the video; without it, or with less motion asked for, the cover is the
  last frame standing still, signed on arrival.
*/
.cover { position: relative; height: 100svh; min-height: 520px; overflow: hidden; background: #050505; }
.film-stage { position: absolute; inset: 0; overflow: hidden; background: #050505; }
.film-still, .film-video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.film-still img, .film-video { width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; }
.film-video { display: none; background: #050505; }
html.film .film-video { display: block; }
html.film .film-still { display: none; }
/* The bottom of the picture melts into the page below it. */
.film-stage::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; height: 26%; background: linear-gradient(to bottom, rgb(var(--bg-rgb) / 0), var(--bg)); pointer-events: none; }
.cover-sig { position: absolute; right: 7vw; bottom: 7svh; z-index: 2; width: min(62vw, 340px); height: auto; filter: drop-shadow(0 2px 10px rgb(var(--shade-rgb))); clip-path: inset(0 100% 0 0); animation: sig-write 1.8s cubic-bezier(0.45, 0.05, 0.25, 1) 0.6s forwards; }
html.splash .cover-sig { animation-delay: 3.85s; }
html.film .cover-sig { animation: none; }
html.film .cover.film-signed .cover-sig { animation: sig-write 1.35s cubic-bezier(0.45, 0.05, 0.25, 1) 0.05s forwards; }
/* While the cover film plays, the page waits for it: nobody scrolls past the presentation. */
html.film-lock, html.film-lock body { overflow: hidden; overscroll-behavior: none; }
@media (min-aspect-ratio: 4/5) {
  .cover-sig { right: 3.5vw; bottom: 4.5svh; width: clamp(240px, 21vw, 380px); }
}
/* Phones get the vertical cut of the film, framed on him with the room's dark above and below. */
@media (max-aspect-ratio: 4/5) {
  .film-still img, .film-video { object-position: 50% 40%; }
  /* On the phone the signature sits right under the desk, on his side. */
  .cover-sig { right: 5vw; bottom: 16svh; width: min(52vw, 300px); }
}

/* ----------------------------------------------------------------- intro */
.intro { padding-block: clamp(56px, 7vw, 104px); }
.intro-in { display: grid; gap: var(--s-3) var(--s-7); }
.intro h1 { max-width: 12em; }
.intro .lead { margin-top: 0; }
.hero-name { margin: var(--s-3) 0 0; font: 400 13.5px/1.4 var(--meta); letter-spacing: 0.04em; color: var(--ink-3); }
.intro .actions { margin-top: var(--s-4); }
.intro .micro { max-width: 30em; }
@media (min-width: 960px) {
  .intro-in { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: start; }
  .intro .intro-text { padding-top: 0.35em; }
}

/* ---------------------------------------------------------------- record */
/* Two large figures in the light serif, under a soft light, and his licences beneath. */
.proof { position: relative; padding-block: clamp(64px, 7vw, 112px); }
.proof::before, .cta-band::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse 60% 46% at 50% 50%, var(--tone-3) 0%, rgb(var(--bg-rgb) / 0) 100%); }
.proof > .wrap, .cta-band > .wrap { position: relative; }
.stats { display: grid; gap: var(--s-5) var(--s-3); max-width: 980px; margin-inline: auto; text-align: center; }
.stats > div { display: flex; flex-direction: column-reverse; align-items: center; gap: 6px; }
.stats dd { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
@media (min-width: 640px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stats dd [data-count] { display: inline-block; font: 300 var(--fs-num)/1.05 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums lining-nums; }
/* "más de" sits small, above the figure, in the reading face. */
.stats dd .plus { display: block; margin-bottom: 0.35em; font: 400 clamp(13.5px, 0.3vw + 12.5px, 16px)/1 var(--meta); letter-spacing: 0.04em; color: var(--ink-3); }
.stats dt { font: 400 clamp(13.5px, 0.3vw + 12.5px, 16px)/1.35 var(--meta); letter-spacing: 0.04em; color: var(--ink-2); }
.stats-note { margin: var(--s-5) auto 0; max-width: 46em; text-align: center; font: 400 var(--fs-small)/1.7 var(--meta); letter-spacing: 0.03em; color: var(--ink-3); text-wrap: balance; }

/* -------------------------------------------------------------- page hero */
.page-hero { padding-block: clamp(56px, 8vw, 120px) clamp(48px, 6vw, 88px); }
.page-hero h1 { max-width: 13em; }
.page-hero .type-meta { margin-top: var(--s-3); }
.page-hero-split { padding-block: clamp(48px, 6vw, 96px); }
.page-hero-tall { min-height: 52svh; display: grid; align-items: center; }
/* The closing line: where the office is and when, in large words that light up as you read. */
.visit { padding-block: clamp(40px, 6vw, 88px) var(--band); }
/* The office sentence stays put a moment while its words light, then the page goes on. */
html.motion .hold { height: 230svh; padding: 0; }
html.motion .hold > .wrap { position: sticky; top: 0; min-height: 100svh; align-content: center; }
.visit .wrap { position: relative; isolation: isolate; display: grid; gap: var(--s-3); }
/* The office itself, behind the address: it comes up out of the dark as the words light. */
.visit-photo { position: absolute; top: 0; bottom: 0; left: 50%; z-index: -1; width: 100vw; margin: 0; overflow: hidden; transform: translateX(-50%); pointer-events: none; }
.visit-photo img { display: block; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.visit-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, var(--bg) 0%, rgb(var(--bg-rgb) / 0.3) 24%, rgb(var(--bg-rgb) / 0.38) 74%, var(--bg) 100%); }
html.motion .hold .visit-photo img { opacity: calc(0.04 + var(--vp, 0) * 0.92); transform: scale(calc(1.12 - var(--vp, 0) * 0.12)); will-change: opacity, transform; }
.photo-line { margin: 0; max-width: 24em; font: 300 var(--fs-big)/1.45 var(--display); letter-spacing: -0.01em; text-wrap: pretty; }
@media (min-width: 960px) { .visit .wrap { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); align-items: end; gap: var(--s-6); } .visit .link-arrow { justify-self: end; } }
.firm-shot { margin: 0; }

/* ----------------------------------------------------------------- bands */
.band { padding-block: var(--band); }
.sec-head { margin-bottom: var(--s-5); max-width: 820px; }
.sec-head h2 { max-width: 13em; }
.sec-head p { font-size: var(--fs-lead); line-height: 1.65; color: var(--ink-2); margin-top: var(--s-3); max-width: 28em; }
.split { display: grid; gap: var(--s-2) var(--s-7); }
.split-media { align-items: center; gap: var(--s-5) var(--s-7); }
.split-aside { padding-top: var(--s-1); }
@media (min-width: 900px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .split > .sec-head, .split > div > .sec-head:only-child { position: sticky; top: calc(var(--head) + var(--s-5)); align-self: start; }
  .split .sec-head h2 { font-size: clamp(26px, 1.2vw + 19px, 40px); }
  .split-media { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .split-media > .sec-head { position: static; }
}
.prose p { color: var(--ink-2); max-width: 36em; }
.prose-lead { font: 300 var(--fs-big)/1.45 var(--display); letter-spacing: -0.01em; color: var(--ink); max-width: 22em; margin-top: var(--s-4); }
.split-aside > .btn { margin-top: var(--s-3); }
.split-aside .link-arrow { margin-top: var(--s-3); }

/* ------------------------------------------------------ the ivory sections */
.statement .sec-head { max-width: none; }
.statement .sec-head h2 { max-width: 12em; }
.statement-line { margin: var(--s-5) 0 var(--s-4) auto; max-width: 24em; font: 300 var(--fs-big)/1.45 var(--display); letter-spacing: -0.01em; text-wrap: pretty; }
.statement .link-arrow { display: flex; width: fit-content; margin-left: auto; }
@media (max-width: 899px) { .statement-line { margin-left: 0; } .statement .link-arrow { margin-left: 0; } }

/* ------------------------------------------------------- a sentence with photos */
/* Small photographs set between the words they stand for; they come into focus on arrival. */
.pill-line { margin: 0; max-width: 18em; font: 300 clamp(26px, 3vw + 15px, 62px)/1.3 var(--display); letter-spacing: -0.02em; color: var(--ink); text-wrap: pretty; }
.pill { display: inline-block; width: 2.5em; height: 0.95em; margin: 0 0.04em; vertical-align: -0.12em; border-radius: 999px; overflow: hidden; background: var(--bg-3); }
.pill img { width: 100%; height: 100%; object-fit: cover; }
.pill-juzgado-familiar img { object-position: 50% 50%; }
.pill-convivencia-familiar img { object-position: 82% 52%; }
.pill-inventario-de-bienes img { object-position: 40% 80%; }
/* While the splash covers the page, the sentence's photographs wait: the sign's pieces come first. */
html.splash:not(.splash-done) :is(.pill, .morph-photo) img { display: none; }
html.motion .pill img { opacity: 0.45; filter: blur(4px); transform: scale(1.3); transition: opacity 0.6s var(--ease), filter 0.6s var(--ease), transform 1.1s var(--ease); }
html.motion .pill.in img { opacity: 1; filter: none; transform: none; }

/* -------------------------------------------------------------- photographs */
/*
  A photograph is a clean rectangle, square-cornered and already in focus, the way the
  reference shows them: nothing opens or blurs. Inside its frame the picture moves a little
  slower than the page (the script sets --py), and its caption sits underneath in small type.
*/
.shot { margin: 0; }
.shot-frame { position: relative; overflow: hidden; aspect-ratio: 4 / 5; background: var(--bg-2); }
.shot-frame img { width: 100%; height: 100%; object-fit: cover; }
.shot figcaption { margin-top: 12px; font: 400 13px/1.4 var(--meta); letter-spacing: 0.03em; color: var(--ink-3); text-align: right; }
html.motion .shot-frame img { transform: translate3d(0, var(--py, 0px), 0) scale(1.12); will-change: transform; }

/* --------------------------------------- the sentence that opens into the photograph */
/*
  A sentence with three small photographs lights up as you scroll; then it fades and its first
  photograph grows out of its place in the sentence: first into a small upright picture with
  soft corners, then until it fills the screen, its corners closing to square (the script sets
  --gx, --gy, --gw, --gh and --gr). The picture darkens and the promise of the incausado divorce
  comes up over its top, out of focus at first. Without motion: the sentence, the photograph, the text.
*/
.morph { padding-block: clamp(56px, 7vw, 112px); }
.morph-text .morph-note { margin: var(--s-5) 0 0; font: 400 13px/1.6 var(--meta); letter-spacing: 0.06em; color: var(--ink-3); }
.morph-photo { position: relative; margin: var(--s-6) auto 0; width: min(100%, 560px); aspect-ratio: 1122 / 1402; overflow: hidden; background: var(--bg-2); }
.morph-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.morph-over { padding-top: var(--s-5); }
.morph-top h2 { max-width: 13em; }
.morph-top > p { margin: var(--s-3) 0 0; max-width: 26em; color: var(--ink-2); font-size: var(--fs-lead); line-height: 1.6; }
.morph-foot { display: grid; justify-items: start; gap: var(--s-2); margin-top: var(--s-4); }
.morph-cap { margin: 0; font: 400 13px/1.5 var(--meta); letter-spacing: 0.04em; color: var(--ink-3); }
html.motion .morph { padding: 0; height: 360svh; }
html.motion .morph-stage { position: sticky; top: 0; height: 100svh; min-height: 600px; overflow: hidden; }
html.motion .morph-text { position: absolute; left: 0; right: 0; top: 0; padding-top: calc(var(--head) + 28px); opacity: var(--mt, 1); transform: translate3d(0, calc((1 - var(--mt, 1)) * -18px), 0); }
html.motion .pill[data-grow] { visibility: hidden; }
html.motion .morph-photo {
  position: absolute; z-index: 1; margin: 0; contain: strict; aspect-ratio: auto;
  left: var(--gx, -999px); top: var(--gy, 0px); width: var(--gw, 0px); height: var(--gh, 0px); border-radius: var(--gr, 999px);
}
/* The growing photograph comes into focus with the sentence's other two, then settles as it opens. */
html.motion .morph-photo img { transform: scale(calc(1.08 - 0.08 * var(--ge, 0))); transition: opacity 0.6s var(--ease), filter 0.6s var(--ease); }
html.motion .morph:not(.pill-in) .morph-photo img { opacity: 0.45; filter: blur(4px); }
html.motion .morph-photo::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(to bottom, rgb(var(--bg-rgb) / 0.82) 0%, rgb(var(--bg-rgb) / 0.42) 34%, rgb(var(--bg-rgb) / 0.28) 60%, rgb(var(--bg-rgb) / 0.8) 100%); opacity: var(--ot, 0); }
html.motion .morph-over { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: space-between; padding-block: calc(var(--head) + 24px) calc(max(28px, 4svh) + var(--fab-room, 0px)); opacity: var(--ot, 0); pointer-events: none; }
html.motion .morph-over.on { pointer-events: auto; }
html.motion .morph-top > p { filter: blur(calc((1 - var(--ot, 0)) * 6px)); }
html.motion .morph .morph-over .steel {
  opacity: 1; transition: none;
  filter: blur(calc((1 - var(--ot, 0)) * 12px)) var(--title-shadow);
}
html.motion .morph-foot { margin-top: 0; }
/* A phone turned sideways is shorter than the stage likes: the stage takes the screen as it is, so nothing sits below it. */
@media (max-height: 520px) {
  html.motion .morph-stage { min-height: 0; }
  html.motion .morph-text { padding-top: calc(var(--head) + 12px); }
  html.motion .morph-over { padding-block: calc(var(--head) + 10px) 14px; }
  html.motion .morph-top > p { margin-top: var(--s-2); font-size: var(--fs-small); }
  html.motion .morph-foot { gap: 4px; }
}
@media (min-width: 960px) {
  html.motion .morph-photo::after { background: linear-gradient(to right, rgb(var(--bg-rgb) / 0.72) 0%, rgb(var(--bg-rgb) / 0.2) 48%, rgb(var(--bg-rgb) / 0) 70%), linear-gradient(to bottom, rgb(var(--bg-rgb) / 0.5) 0%, rgb(var(--bg-rgb) / 0.1) 40%, rgb(var(--bg-rgb) / 0.65) 100%); }
  html.motion .morph-top { max-width: 52%; }
}

/* ----------------------------------------------------------- the three ways */
/* Large rows: the name and who it is for on one side, how long it takes in big figures on the other. */
.ways { display: grid; gap: clamp(28px, 4vw, 48px); margin-top: var(--s-4); }
.way { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name time" "when time"; gap: 6px var(--s-3); align-items: end; text-decoration: none; }
.way-name { grid-area: name; font: 400 var(--fs-h3)/1.3 var(--display); color: var(--ink); transition: transform 0.5s var(--ease); }
.way-when { grid-area: when; font-size: 15px; line-height: 1.5; color: var(--ink-3); max-width: 26em; }
.way-time { grid-area: time; align-self: center; display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.way-time b { font: 300 var(--fs-num)/1.05 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums lining-nums; }
.way-time .way-word { font: 300 clamp(22px, 1.1vw + 18px, 34px)/1.2 var(--display); letter-spacing: -0.01em; color: var(--ink); padding-top: 0.35em; }
.way-time small { margin-top: 6px; font: 400 13px/1.3 var(--meta); letter-spacing: 0.04em; color: var(--ink-3); }
@media (hover: hover) { .way:hover .way-name { transform: translateX(6px); } }
/* Each row arrives dim and comes up to full light, one after the other, like the reference's figures. */
html.motion .ways > li.rv { opacity: 0; transform: none; transition: opacity 0.45s var(--ease); transition-delay: var(--rv-d, 0s); }
html.motion .ways > li.rv.in { opacity: 1; }

/* A photograph across the page, square to the edges, captioned over its foot. */
.wide-shot { position: relative; margin: clamp(48px, 7vw, 104px) 0 0; }
.wide-shot .shot-frame { aspect-ratio: 4 / 5; max-height: 92svh; width: 100%; }
.wide-shot figcaption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; display: grid; gap: 8px; padding: 96px var(--pad) max(26px, 3.5svh); background: linear-gradient(to top, rgb(var(--bg-rgb) / 0.88) 0%, rgb(var(--bg-rgb) / 0.5) 55%, rgb(var(--bg-rgb) / 0) 100%); }
.wide-shot figcaption span { max-width: 22em; font: 300 clamp(20px, 1vw + 16px, 30px)/1.4 var(--display); letter-spacing: -0.01em; color: var(--ink); }
.wide-shot figcaption small { font: 400 13px/1.5 var(--meta); letter-spacing: 0.06em; color: var(--ink-2); }
@media (min-width: 900px) { .wide-shot .shot-frame { aspect-ratio: 16 / 9; } }
html.motion .wide-shot.rv { opacity: 1; transform: none; }
html.motion .wide-shot figcaption > * { opacity: 0; filter: blur(4px); transition: opacity 0.6s var(--ease) 0.15s, filter 0.6s var(--ease) 0.15s; }
html.motion .wide-shot figcaption small { transition-delay: 0.6s; }
html.motion .wide-shot.in figcaption > * { opacity: 1; filter: none; }

/* What waiting costs. */
.inaction .risks { max-width: 1080px; margin-top: var(--s-4); }
@media (min-width: 900px) { .inaction .risks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.inaction-end { margin-top: var(--s-5); }
.inaction { padding-bottom: 0; }

/* -------------------------------------------------------- the process, in layers */
/*
  Each step is a photograph set to one side or the other, moving a little slower than the page
  (the script sets --py), with its caption under it, then the step's name and what happens in it.
*/
.layers { display: grid; gap: clamp(56px, 9vw, 120px); margin-top: var(--s-6); }
.layer-shot { width: 76%; }
.layer:nth-child(even) .layer-shot { margin-left: auto; }
.layer-text { margin-top: var(--s-3); max-width: 30em; }
.layer:nth-child(even) .layer-text { margin-left: auto; }
.layer-text h3 { font-size: clamp(22px, 0.8vw + 18px, 30px); margin-bottom: var(--s-1); }
.layer-text p { margin: 0; color: var(--ink-2); }
@media (min-width: 900px) {
  .layer { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr); gap: var(--s-7); align-items: end; }
  .layer-shot { width: 100%; }
  .layer:nth-child(even) .layer-shot { order: 2; }
  .layer:nth-child(even) .layer-text { margin-left: 0; }
}

/* Questions come into focus as they arrive, like voices. */
html.motion .faq-item.rv { filter: blur(4px); transition: opacity 0.45s var(--ease), transform 0.5s var(--ease), filter 0.45s var(--ease); }
html.motion .faq-item.rv.in { filter: none; }

/* ---------------------------------------------------- the mark in the footer */
/* KARSA, very large, with the photograph of the room showing through the letters. */
/*
  The name at the foot of every page, in the steel of the sign. It arrives out of focus with its
  letters apart and closes into place; then a glint keeps crossing it, and the reflection in the
  metal slides as the page moves past it.
*/
@property --fm-ls { syntax: "<length>"; inherits: true; initial-value: 0px; }
.foot-mark { position: relative; margin-top: clamp(56px, 8vw, 112px); padding-block: 0.1em 0.24em; overflow: hidden; text-align: center; font: 360 19vw/1 var(--display); filter: brightness(1) var(--mark-shadow) drop-shadow(0 0 0.28em rgb(255 255 255 / 0)); }
.foot-mark span {
  --fm-ls: 0.1em;
  position: relative; display: inline-block; padding-left: var(--fm-ls); letter-spacing: var(--fm-ls); text-transform: uppercase; white-space: nowrap;
  background-image: var(--metal-deep);
  background-size: 100% 160%; background-repeat: no-repeat; background-position: 0 calc(50% + var(--mk, 0) * 45%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.foot-mark span::after {
  content: attr(data-word); position: absolute; inset: 0; padding-left: var(--fm-ls);
  background-image: linear-gradient(105deg, rgb(255 255 255 / 0) 34%, rgb(255 255 255 / 0.55) 43%, rgb(255 255 255 / 1) 46.5%, rgb(255 255 255 / 0.55) 49%, rgb(255 255 255 / 0) 51%, rgb(255 255 255 / 0.85) 53%, rgb(255 255 255 / 0) 56%);
  background-size: 300% 100%; background-repeat: no-repeat; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
html.motion .foot-mark span {
  --fm-ls: 0.46em; opacity: 0; filter: blur(16px);
  transition: --fm-ls 1.15s var(--ease), opacity 0.7s var(--ease), filter 1s var(--ease);
}
html.motion .foot-mark.in span {
  --fm-ls: 0.1em; opacity: 1; filter: blur(0px);
}
/*
  Then a mirror catches the light: a double flash crosses the name, the steel lights up as it
  passes and keeps a little of that light; the flash comes back every few seconds, softer.
*/
html.motion .foot-mark {
  filter: brightness(0.55) var(--mark-shadow) drop-shadow(0 0 0.28em rgb(255 255 255 / 0));
}
html.motion .foot-mark.in { animation: fm-on 1.15s cubic-bezier(0.2, 0.7, 0.2, 1) 0.45s both; }
@keyframes fm-on {
  0% { filter: brightness(0.55) var(--mark-shadow) drop-shadow(0 0 0.28em rgb(255 255 255 / 0)); }
  36% { filter: brightness(1.8) var(--mark-shadow) drop-shadow(0 0 0.28em rgb(255 255 255 / 0.45)); }
  100% { filter: brightness(1.08) var(--mark-shadow) drop-shadow(0 0 0.28em rgb(255 255 255 / 0.07)); }
}
html.motion .foot-mark.in span::after { animation: fm-flash 0.95s cubic-bezier(0.45, 0, 0.25, 1) 0.4s both, fm-glint 6.5s ease-in-out 3.2s infinite; }
@keyframes fm-flash { 0% { background-position: 100% 0; } 100% { background-position: 0% 0; } }
@keyframes fm-glint { 0% { background-position: 100% 0; } 30%, 100% { background-position: 0% 0; } }

/* -------------------------------------------------------- divorce types */
/* Each way to divorce is a card: its name, who it is for, what it is, how long it takes. */
.types { display: grid; gap: var(--s-2); }
@media (min-width: 860px) { .types { grid-template-columns: repeat(3, minmax(0, 1fr)); } .types-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.type { display: flex; flex-direction: column; gap: 12px; padding: clamp(26px, 3vw, 44px); background: var(--card); transition: background 0.5s var(--ease); }
.type:hover { background: var(--card-hover); }
.type-photo { margin: calc(-1 * clamp(26px, 3vw, 44px)) calc(-1 * clamp(26px, 3vw, 44px)) 14px; aspect-ratio: 16 / 10; }
.type h3 { font-size: clamp(22px, 0.8vw + 18px, 30px); line-height: 1.2; margin-bottom: 6px; }
.type p { color: var(--ink-2); margin: 0; }
.type .type-when { color: var(--ink); font: 400 var(--fs-lead)/1.4 var(--text); }
.type > p:not(.type-when):not(.type-meta) { flex: 1; }
.type-meta { display: block; align-self: flex-start; margin: 0; font: 400 var(--fs-small)/1.5 var(--meta); letter-spacing: 0.03em; color: var(--ink-3); }
.type .type-meta { color: var(--ink-2); margin-top: 6px; }
.type .link-arrow { align-self: flex-start; margin-top: 8px; }
.gal-dots { display: none; }
.type-rows { display: grid; gap: var(--s-2); }
.type-row { display: grid; gap: var(--s-3) var(--s-7); padding: clamp(28px, 4vw, 56px); background: var(--card); }
.type-row h2 { font-size: clamp(22px, 0.7vw + 18px, 28px); margin-bottom: var(--s-2); }
.type-row p { color: var(--ink-2); }
.type-row .ticks { margin-block: var(--s-3); }
@media (min-width: 900px) { .type-row { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }

/* ---------------------------------------------------------- lists, steps */
/* A list item is marked with a small drawn check, never a dash. */
.ticks { display: grid; gap: 14px; }
.ticks li { position: relative; padding-left: 34px; color: var(--ink-2); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.32em; width: 20px; height: 20px; border-radius: 50%; background: var(--bg-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath d='M1 4.2 3.7 7 9 1' fill='none' stroke='%23f3f1ec' stroke-width='1.3'/%3E%3C/svg%3E") center / 10px 8px no-repeat; }

/* What waiting costs: each consequence on its own dark card, with a small white point. */
.risks { display: grid; gap: 10px; }
.risks li { position: relative; padding: 22px 24px 22px 52px; background: var(--card); color: var(--ink); font-size: var(--fs-lead); line-height: 1.5; }
/*
  Each warning has a small lamp. They light one at a time, in turn: one comes on, goes out, and
  the next comes on, a quiet signal that keeps going while the list is on screen. The card around
  a lamp catches a little of its light.
*/
.risks li::before { content: ""; position: absolute; left: 24px; top: calc(22px + 0.62em); width: 9px; height: 9px; border-radius: 50%; background: var(--tone-5); box-shadow: inset 0 1px 1px rgb(var(--shade-rgb) / 0.6); }
.risks li::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(260px 160px at 28px calc(22px + 0.62em + 4px), rgb(var(--ink-rgb) / 0.07), rgb(var(--ink-rgb) / 0) 70%); opacity: 0; }
html.motion .risks li.in::before { animation: lamp 3.6s ease-in-out infinite; }
html.motion .risks li.in::after { animation: lamp-room 3.6s ease-in-out infinite; }
html.motion .risks li:nth-child(2).in::before, html.motion .risks li:nth-child(2).in::after { animation-delay: 1.2s; }
html.motion .risks li:nth-child(3).in::before, html.motion .risks li:nth-child(3).in::after { animation-delay: 2.4s; }
@keyframes lamp {
  0%, 34%, 100% { background: var(--tone-5); box-shadow: inset 0 1px 1px rgb(var(--shade-rgb) / 0.6); }
  8%, 26% { background: var(--ink); box-shadow: 0 0 0 4px rgb(var(--ink-rgb) / 0.07), 0 0 16px 2px rgb(var(--ink-rgb) / 0.55); }
}
@keyframes lamp-room { 0%, 34%, 100% { opacity: 0; } 8%, 26% { opacity: 1; } }

/* The papers: tiles with a white check, two by two on a wide screen. */
.docs { display: grid; gap: 10px; }
@media (min-width: 620px) { .docs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.docs li { position: relative; display: flex; align-items: center; min-height: 84px; padding: 22px 26px; background: var(--card); color: var(--ink); line-height: 1.5; }

/*
  The process as cards that stack: each one stays near the top while the next slides over it.
  A row of dots on each card fills up to its place in the process, so order reads without numbers.
*/
.steps { display: grid; grid-auto-rows: 1fr; gap: var(--s-2); }
.steps li { position: sticky; top: calc(84px + var(--k, 0) * 14px); display: flex; flex-direction: column; min-height: clamp(210px, 30svh, 280px); padding: clamp(26px, 3vw, 44px); background: linear-gradient(150deg, var(--tone-4) 0%, var(--tone-2) 60%, var(--tone-1) 100%); box-shadow: 0 -14px 24px -14px rgb(var(--shade-rgb) / 0.85); }
.steps li:nth-child(2) { --k: 1; }
.steps li:nth-child(3) { --k: 2; }
.steps li:nth-child(4) { --k: 3; }
.steps li:nth-child(5) { --k: 4; }
.steps li:nth-child(6) { --k: 5; }
.step-dots { display: flex; gap: 7px; margin-bottom: auto; padding-bottom: var(--s-4); }
.step-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--bg-4); }
.step-dots i.on { background: var(--ink); }
.steps h3 { font-size: clamp(22px, 0.8vw + 18px, 30px); line-height: 1.2; margin-bottom: var(--s-2); }
.steps p { color: var(--ink-2); margin: 0; max-width: 32em; font-size: var(--fs-lead); line-height: 1.55; }

.trio { display: grid; gap: var(--s-2); }
.trio > article { padding: clamp(26px, 3vw, 40px); background: var(--card); }
@media (min-width: 860px) { .trio { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.trio h3 { margin-bottom: var(--s-2); }
.trio p { color: var(--ink-2); margin: 0; }

/*
  Our commitment: the record in two figures and the three promises, beside the title (which
  stays put on wide screens while the column passes).
*/
.trust-body { display: grid; }
.trust .stats { max-width: none; margin: 0; gap: var(--s-4) var(--s-4); grid-template-columns: repeat(2, minmax(0, 1fr)); text-align: left; }
.trust .stats > div, .trust .stats dd { align-items: flex-start; }
.trust .stats-note { margin: var(--s-3) 0 var(--s-6); max-width: 40em; text-align: left; text-wrap: pretty; }
.trust .trio { grid-template-columns: 1fr; }
/* The clients' own words: each quote on its card, quietly signed. */
.reviews { display: grid; gap: var(--s-2); }
@media (min-width: 860px) { .reviews { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.review { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; margin: 0; padding: clamp(22px, 2.2vw, 30px); background: var(--card); color: var(--ink); }
.review blockquote { margin: 0; }
.review p { margin: 0; font: 400 clamp(17px, 0.35vw + 15.5px, 20px)/1.45 var(--display); letter-spacing: -0.005em; color: var(--ink); text-wrap: pretty; }
.review figcaption { color: var(--ink-3); font-size: var(--fs-small, 14px); letter-spacing: 0.02em; }
.reviews-note { margin-top: var(--s-3); color: var(--ink-3); }

.facts { display: grid; gap: var(--s-4); }
.facts dt { font: 400 var(--fs-small)/1.4 var(--meta); letter-spacing: 0.04em; color: var(--ink-3); margin-bottom: 8px; }
.facts dd { font: 300 clamp(18px, 0.5vw + 16px, 22px)/1.4 var(--display); overflow-wrap: anywhere; }
.facts dd a { text-decoration: none; }
.facts-grid { gap: var(--s-5); margin-bottom: var(--s-4); }
@media (min-width: 800px) { .facts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* -------------------------------------------------------------------- FAQ */
/*
  Every question is a card with its answer already in sight: the question in the display face,
  the answer underneath in plain words, set off by a short line of light grey type.
*/
.faq { display: grid; gap: 10px; }
.faq-item { position: relative; padding: clamp(26px, 3vw, 40px); background: var(--card); transition: background 0.5s var(--ease); }
.faq-item:hover { background: var(--card-hover); }
.faq-item h3 { font: 500 clamp(18px, 0.4vw + 16.5px, 21px)/1.4 var(--text); letter-spacing: 0; max-width: 22em; }
.faq-item p { margin: var(--s-2) 0 0; color: var(--ink-2); max-width: 40em; }

/* ------------------------------------------------- which divorce fits you */
/* Two questions answered by pressing a card; the chosen one turns white. */
.quiz { display: grid; gap: var(--s-5); }
.quiz-q { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 10px; }
.quiz-q legend { padding: 0; margin-bottom: var(--s-3); font: 400 var(--fs-h3)/1.35 var(--display); color: var(--ink); }
.quiz-q label { position: relative; display: block; cursor: pointer; }
.quiz-q input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.quiz-q span { display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 16px 22px; background: var(--card); font: 400 var(--fs-lead)/1.3 var(--text); color: var(--ink-2); transition: color 0.35s var(--ease), background 0.35s var(--ease); }
.quiz-q span::before { content: ""; flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--bg-4); transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.quiz-q label:hover span { color: var(--ink); background: var(--card-hover); }
.quiz-q input:checked + span { color: var(--accent-ink); background: var(--accent); }
.quiz-q input:checked + span::before { background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath d='M1 4.2 3.7 7 9 1' fill='none' stroke='%23f3f1ec' stroke-width='1.4'/%3E%3C/svg%3E") center / 10px 8px no-repeat; }
.quiz-q input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 4px; }
/* The answer arrives as a lit card. */
.quiz-r { padding: clamp(28px, 3.4vw, 48px); background: radial-gradient(ellipse 90% 80% at 0% 0%, var(--tone-4) 0%, var(--tone-2) 55%, var(--tone-1) 100%); animation: quiz-in 0.7s var(--ease) both; }
.quiz-r h3 { font-size: clamp(22px, 0.8vw + 18px, 30px); line-height: 1.2; }
@keyframes quiz-in { from { opacity: 0; transform: translateY(18px); } }
.quiz-r + .quiz-r { margin-top: 4px; }
.quiz-r h3 { margin-bottom: var(--s-1); }
.quiz-when { color: var(--ink-3); font: 400 var(--fs-small)/1.5 var(--meta); letter-spacing: 0.03em; margin: 0 0 var(--s-3); }
.quiz-r > p:not(.quiz-when):not(.micro) { color: var(--ink-2); margin: 0; }
.quiz-r .actions { margin-top: var(--s-4); }
.quiz > .note { margin: 0; }
@supports selector(:has(*)) {
  .quiz-r { display: none; }
  /* Until the first answer, the empty results box takes no room. */
  .quiz:not(:has(input:checked)) .quiz-results { display: none; }
  .quiz-r + .quiz-r { margin-top: 0; }
  .quiz:has([name="acuerdo"][value="no"]:checked) [data-r="incausado"],
  .quiz:has([name="acuerdo"][value="si"]:checked) [data-r="mutuo-acuerdo"] {
    display: block;
  }
}

/* --------------------------------------------------- Mi Expediente picture */
.tracker { margin: 0; background: var(--card); padding: clamp(28px, 3.4vw, 52px); box-shadow: 0 40px 80px -30px rgb(var(--shade-rgb) / 0.9); }
.tracker-top { display: flex; justify-content: space-between; gap: 12px; font: 400 var(--fs-small)/1.4 var(--meta); color: var(--ink-3); margin-bottom: var(--s-4); }
.tracker-folio { white-space: nowrap; }
.tracker-type { font: 400 var(--fs-h3)/1.3 var(--display); margin: 0 0 var(--s-3); }
.tracker ol { display: grid; gap: 18px; }
.tracker li { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding-left: 30px; font-size: 16px; color: var(--ink-3); }
.tracker .dot { position: absolute; left: 0; top: 0.4em; width: 9px; height: 9px; border-radius: 50%; background: var(--bg-4); }
.tracker .done { color: var(--ink-2); }
.tracker .done .dot { background: var(--ink-3); }
.tracker .now { color: var(--ink); }
.tracker .now .dot { background: var(--ink); }
.tracker .now .dot::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; box-shadow: 0 0 0 1px var(--ink-3); }
.tracker-now { color: var(--ink-3); font: 400 var(--fs-small)/1.4 var(--meta); }
.tracker-now::before { content: "· "; }
.tracker figcaption { font: 400 var(--fs-small)/1.4 var(--meta); color: var(--ink-3); margin-top: var(--s-4); }

/* ---------------------------------------------------------------- contact */
.form { display: grid; gap: var(--s-3); max-width: 640px; }
.form label { display: grid; gap: 6px; font: 400 var(--fs-small)/1.4 var(--meta); color: var(--ink-3); }
.form input:not([type="checkbox"]), .form select, .form textarea { width: 100%; min-height: 54px; padding: 14px 16px; background: var(--bg-2); color: var(--ink); border: 0; border-radius: 0; font: 400 17px/1.4 var(--text); transition: background 0.3s var(--ease); }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; background: var(--bg-3); }
.form textarea { resize: vertical; }
.form .check { display: flex; align-items: center; gap: 14px; }
.form .check input { width: 22px; height: 22px; accent-color: var(--ink); }
.form .btn { justify-self: stretch; }

/* ------------------------------------------------------------------ legal */
.legal { display: grid; gap: var(--s-5); max-width: 820px; }
.legal h2 { font-size: var(--fs-h3); line-height: 1.2; margin-bottom: var(--s-2); }
.legal p { color: var(--ink-2); margin: 0; }

/* -------------------------------------------------------------- CTA band */
/* The closing reads centred, like the last page of a brochure, under a soft light. */
.cta-band { position: relative; }
.cta-band::before { background: radial-gradient(ellipse 60% 46% at 50% 50%, var(--tone-3) 0%, rgb(var(--bg-rgb) / 0) 100%); }
.cta-in { display: grid; justify-items: center; text-align: center; }
.cta-in h2 { font-size: var(--fs-h2); line-height: 1.08; max-width: 12em; }
.cta-in .actions { justify-content: center; }
.cta-in > p:not(.micro) { font-size: var(--fs-lead); line-height: 1.45; max-width: 28em; margin-top: var(--s-3); }

/* ----------------------------------------------------------------- footer */
.site-foot { position: relative; z-index: 1; background: var(--bg); padding-top: clamp(72px, 9vw, 128px); padding-bottom: var(--fab-room, 0px); }
/* on a phone the corner buttons take the bottom right: what has to stay tappable sits above them */
@media (max-width: 860px) { :root { --fab-room: 112px; } }
.foot-grid { display: grid; gap: var(--s-5); }
@media (min-width: 860px) { .foot-grid { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); } }
.foot-brand .logo { flex-wrap: wrap; row-gap: 10px; }
.foot-brand p { color: var(--ink-3); font: 400 var(--fs-small)/1.55 var(--meta); margin-top: var(--s-3); max-width: 22em; }
.foot-title { margin: 0 0 var(--s-2); font: 400 var(--fs-small)/1.4 var(--meta); color: var(--ink-3); }
.foot-list { display: grid; gap: 8px; font-size: 15.5px; }
.foot-list a, .foot-nap a { text-decoration: none; color: var(--ink-2); overflow-wrap: anywhere; }
.foot-list a:hover, .foot-nap a:hover { color: var(--ink); }
.foot-nap p { font-size: 15.5px; color: var(--ink-2); margin: 0 0 8px; }
.foot-legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-1) var(--s-4); margin-top: clamp(64px, 8vw, 112px); padding-block: var(--s-4) var(--s-5); font: 400 var(--fs-small)/1.55 var(--meta); color: var(--ink-3); }
.foot-legal p { margin: 0; max-width: 46em; }
.sample-note { font: 400 var(--fs-small)/1.55 var(--meta); color: var(--ink-3); padding-bottom: var(--s-7); }


/* ------------------------------------------------------------------ motion */
/*
  The page moves only as it is read: titles arrive out of focus and sharpen, blocks rise in as
  they arrive, the large sentences light up word by word with the scroll, the steps' line fills
  on the way down, the case file walks through its stages, and photographs move a little slower
  than the page inside their frames. The script sets html.motion only when the visitor has not
  asked for less motion; without it everything simply stands.
*/

/*
  A title arrives faint and out of focus and sharpens into steel, the way the reference brings
  in its words; the step names do the same.
*/
html.motion .steel {
  opacity: 0;
  filter: blur(5px) var(--title-shadow);
  transition: opacity 0.55s var(--ease), filter 0.65s var(--ease);
}
html.motion .steel.in {
  opacity: 1;
  filter: blur(0px) var(--title-shadow);
}
html.motion .focus { opacity: 0; filter: blur(4px); transition: opacity 0.4s var(--ease), filter 0.45s var(--ease); }
html.motion .focus.in { opacity: 1; filter: blur(0px); }
/*
  Titles letter by letter: the script wraps each letter, which then wears the steel itself (the
  glint keeps crossing the whole title: each letter knows where it sits, --cx, and how wide the
  title is, --tw). The letters come into focus one after the other; the title keeps its shadows.
*/
.st .wd { display: inline-block; white-space: nowrap; }
.st .ch { display: inline-block; }
main h1.st, main h2.st { background: none; }
main .st .ch {
  background-image:
    linear-gradient(100deg, rgb(255 255 255 / 0) 0%, rgb(255 255 255 / 0) 43%, rgb(255 255 255 / 0.95) 50%, rgb(255 255 255 / 0) 57%, rgb(255 255 255 / 0) 100%),
    var(--metal);
  background-size: calc(var(--tw, 10em) * 2.6) 100%, 100% 100%;
  background-repeat: no-repeat;
  background-position: calc(-1 * var(--cx, 0px) - (1 - var(--shine, 0)) * var(--tw, 10em) * 1.6) 0, 0 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
html.motion .steel.st {
  opacity: 1; transition: none;
  filter: var(--title-shadow);
}
html.motion .st .ch { opacity: 0; filter: blur(4px); transform: translate3d(0, 0.12em, 0); transition: opacity 0.4s var(--ease), filter 0.42s var(--ease), transform 0.45s var(--ease); transition-delay: var(--d, 0s); }
html.motion .st.in .ch { opacity: 1; filter: none; transform: none; }
/*
  Photographs drawn by the graphics card when it can: the same picture, moving inside its frame
  with the page, bending a little with the speed of the scroll, magnified softly under the pointer
  and with a fine film grain. The photograph itself stays underneath until the drawing is ready.
*/
.gl-cv { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.gl-on > img { opacity: 0; }
/* A cursor of its own on screens with a mouse: a light dot that inverts what it passes over and grows on what can be pressed. */
.cur { display: none; }
html.has-cur .cur {
  position: fixed; left: 0; top: 0; z-index: 95; display: block; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: #f3f1ec; mix-blend-mode: difference; pointer-events: none; opacity: var(--co, 0);
  transform: translate3d(var(--cxp, -50px), var(--cyp, -50px), 0) scale(var(--cs, 1)); transition: opacity 0.3s var(--ease);
}
html.has-cur, html.has-cur * { cursor: none; }
html.has-cur input, html.has-cur textarea { cursor: text; }
/* Buttons lean toward the pointer when it comes close. */
html.has-cur .mag { transform: translate3d(var(--mgx, 0px), var(--mgy, 0px), 0); transition: transform 0.5s var(--ease), color 0.3s var(--ease); }

/* The three ways to divorce: a gallery that slides sideways while the page scrolls down. */
html.motion .gallery.is-pinned { padding-block: 0; height: var(--gal-h, auto); }
html.motion .gallery.is-pinned > .wrap { position: sticky; top: 0; height: 100svh; min-height: 560px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
html.motion .gallery.is-pinned .sec-head { margin-bottom: var(--s-4); }
html.motion .gallery.is-pinned .types { display: flex; gap: var(--s-2); border: 0; transform: translate3d(var(--gal-x, 0px), 0, 0); will-change: transform; }
html.motion .gallery.is-pinned .type { flex: 0 0 min(84vw, 500px); min-height: min(56svh, 470px); }
html.motion .gallery.is-pinned .type h3 { font-size: clamp(24px, 1vw + 19px, 34px); }
/* Three dots under the cards say which one is in front. */
html.motion .gallery.is-pinned .gal-dots { display: flex; gap: 8px; margin-top: var(--s-4); }
.gal-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--bg-4); transition: background 0.4s var(--ease), width 0.5s var(--ease); }
.gal-dots i.on { width: 26px; border-radius: 4px; background: var(--accent); }
html.motion .rv { opacity: 0; transform: translateY(16px); transition: opacity 0.45s var(--ease), transform 0.5s var(--ease); transition-delay: var(--rv-d, 0s); }
html.motion .rv.in { opacity: 1; transform: none; }
.words .w { transition: color 0.5s var(--ease); }
html.motion .words .w { color: var(--dim); }
html.motion .words .w.on { color: var(--ink); }
html.motion .tracker li, html.motion .tracker .dot { transition: color 0.5s var(--ease), background 0.5s var(--ease); }
html.motion .tracker:not(.in) li { color: var(--ink-3); }
html.motion .tracker:not(.in) .dot { background: var(--bg-3); }
html.motion .tracker:not(.in) .dot::after, html.motion .tracker:not(.in) .tracker-now { opacity: 0; }
html.motion .tracker .dot::after, html.motion .tracker .tracker-now { transition: opacity 0.6s var(--ease) 1s; }
html.motion .tracker.in li:nth-child(1), html.motion .tracker.in li:nth-child(1) .dot { transition-delay: 0.3s; }
html.motion .tracker.in li:nth-child(2), html.motion .tracker.in li:nth-child(2) .dot { transition-delay: 0.6s; }
html.motion .tracker.in li:nth-child(3), html.motion .tracker.in li:nth-child(3) .dot { transition-delay: 0.9s; }

/* ----------------------------------------------------------- assistant */
/*
  The assistant speaks in the page's own voice: solid black, ivory ink, the same two faces.
  On a phone it takes the whole screen and follows the keyboard; on a wide screen it is a
  solid column in the corner. Hidden until its script turns it on.
*/
.bot [hidden], .bot[hidden] { display: none !important; }
.bot-open { display: none; }
.bot-panel { position: fixed; z-index: 60; left: 0; top: var(--bot-top, 0px); width: 100%; height: var(--bot-vh, 100dvh); display: flex; flex-direction: column; background: var(--bg); color: var(--ink); }
.bot-head { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px var(--s-2); padding: 20px var(--s-3) 18px; background: var(--bg-2); }
.bot-title { margin: 0; font: 400 21px/1.2 var(--display); }
.bot-sub { grid-column: 1; margin: 0; font: 400 var(--fs-small)/1.4 var(--meta); color: var(--ink-3); }
.bot-close { grid-column: 2; grid-row: 1 / span 2; min-height: 48px; padding: 0 0 0 var(--s-2); border: 0; background: none; color: var(--ink); font: 400 14.5px/1 var(--text); letter-spacing: 0.03em; cursor: pointer; }
.bot-log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 16px; padding: var(--s-3); outline: none; }
.bot-msg { max-width: 92%; }
.bot-msg p { margin: 0; font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; }
.bot-msg-bot { align-self: flex-start; color: var(--ink); }
.bot-msg-user { align-self: flex-end; max-width: 82%; padding: 12px 16px; background: var(--bg-3); color: var(--ink); }
.bot-msg-note { align-self: stretch; max-width: none; padding: 14px 16px; background: var(--bg-2); }
.bot-msg-note p { font: 400 14px/1.5 var(--meta); color: var(--ink-2); }
.bot-msg-bot + .bot-msg-user, .bot-msg-user + .bot-msg-bot { margin-top: 8px; }
.bot-typing { align-self: flex-start; display: flex; gap: 6px; padding: 10px 0; }
.bot-typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.bot-options { display: flex; flex-direction: column; padding: 0 var(--s-3); }
.bot-options:not(:empty) { padding-bottom: 16px; }
.bot-chip { min-height: 48px; padding: 10px 0; border: 0; border-top: 1px solid var(--line); background: none; color: var(--ink-2); font: 400 16px/1.35 var(--text); text-align: left; cursor: pointer; }
.bot-chip:hover { color: var(--ink); }
.bot-chip[disabled] { color: var(--ink-3); cursor: default; }
.btn.bot-cta { margin: 0 var(--s-3) 16px; width: auto; }
.bot-form { display: flex; margin: 0 var(--s-3); background: var(--bg-3); }
.bot-form:focus-within { box-shadow: inset 0 -2px 0 var(--ink-2); }
.bot-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.bot-form input { flex: 1; height: 52px; padding: 0 16px; border: 0; background: none; color: var(--ink); font: 400 16px/1 var(--text); outline: none; }
.bot-form input::placeholder { color: var(--ink-3); }
.bot-send { padding: 0 18px; border: 0; background: var(--ink); color: var(--bg); font: 400 14.5px/1 var(--text); letter-spacing: 0.03em; cursor: pointer; }
.is-busy .bot-send { background: var(--ink-3); }
.bot-note { margin: 0; padding: 14px var(--s-3) max(16px, env(safe-area-inset-bottom)); font: 400 13px/1.5 var(--meta); color: var(--ink-3); }
.bot-note a { color: var(--ink-2); }
@media (max-width: 719px) {
  .bot-on, .bot-on body { overflow: hidden; }
}
@media (min-width: 720px) {
  .bot-panel { left: auto; top: auto; right: var(--s-3); bottom: var(--s-3); width: 420px; height: min(680px, calc(100dvh - 2 * var(--s-3))); box-shadow: 0 50px 100px -20px rgba(8, 11, 18, 0.9); }
}
@media (prefers-reduced-motion: no-preference) {
  .bot-typing span { animation: bot-dot 1.2s ease-in-out infinite; }
  .bot-typing span:nth-child(2) { animation-delay: 0.15s; }
  .bot-typing span:nth-child(3) { animation-delay: 0.3s; }
}
@keyframes bot-dot { 0%, 100% { background: var(--bg-3); } 40% { background: var(--ink-2); } }


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .cover-sig { clip-path: none; }
}

/*
  (Placed last so its transitions carry the arrival ones too.)
  Cards light while they are touched (or pointed at with a mouse) and go out when let go: a soft
  light rises from where the finger is, and the text brightens a little.
*/
@property --lit { syntax: "<number>"; inherits: false; initial-value: 0; }
/* :is() carries the weight of its heaviest entry, so this wins over every reveal rule of the cards */
html.motion :is(.glow, .glow.rv.in) {
  background: radial-gradient(130% 150% at var(--lx, 50%) var(--ly, 50%), rgb(255 255 255 / calc(0.17 * var(--lit))) 0%, rgb(255 255 255 / calc(0.06 * var(--lit))) 42%, rgb(255 255 255 / 0) 74%), var(--card);
  transition: --lit 1s var(--ease), color 0.8s var(--ease), opacity 0.45s var(--ease) var(--rv-d, 0s), transform 0.5s var(--ease) var(--rv-d, 0s), filter 0.45s var(--ease);
}
html.motion :is(.glow.lit, .glow.lit.rv.in) { --lit: 1; transition: --lit 0.35s var(--ease), color 0.35s var(--ease), opacity 0.45s var(--ease) var(--rv-d, 0s), transform 0.5s var(--ease) var(--rv-d, 0s), filter 0.45s var(--ease); }
html.motion .glow p { transition: color 0.5s var(--ease); }
html.motion .glow.lit p { color: var(--ink); }
/* the documents wait in a softer tone and light one after another */
html.motion .docs li { color: var(--ink-2); }
html.motion .docs li.lit { color: var(--ink); }

/*
  Leaving the screen: what goes up past the top dissolves, going out of focus, fading and rising a
  little. Titles go letter by letter and the lit sentences word by word, so the page seems to
  evaporate as it is read; coming back down, it all returns into focus.
*/
html.motion :is(.photo-line, .proof-line, .statement-line) .w { display: inline-block; }
html.motion .out {
  opacity: calc(1 - var(--xo, 0)) !important;
  filter: blur(calc(var(--xo, 0) * 5px)) !important;
  translate: 0 calc(var(--xo, 0) * -18px);
  transition: none !important;
}
html.motion :is(.shot, .wide-shot).out { filter: blur(calc(var(--xo, 0) * 3px)) !important; scale: calc(1 - var(--xo, 0) * 0.04); }
/* On a touch screen it fades and rises without going out of focus: blurring every letter on every
   frame of the scroll is more than a phone can draw smoothly. */
@media (hover: none), (pointer: coarse) {
  html.motion .out, html.motion :is(.shot, .wide-shot).out { filter: none !important; }
}

/* The form: filled fields, the two questions as cards to choose, one clear button. */
.lead-form { display: grid; gap: var(--s-3); }
.lead-form[hidden] { display: none; }
.lf-row { display: grid; gap: var(--s-3); }
@media (min-width: 620px) { .lf-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.lf-field { display: grid; gap: 10px; }
.lf-field > span, .lf-choice legend { padding: 0; font: 400 var(--fs-small)/1.45 var(--meta); letter-spacing: 0.02em; color: var(--ink-2); }
.lf-field input, .lf-field textarea {
  width: 100%; min-height: 58px; margin: 0; padding: 17px 18px; border: 0; border-radius: 0; background: var(--card); color: var(--ink);
  font: 400 16px/1.4 var(--text); outline: none; -webkit-appearance: none; appearance: none; transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.lf-field textarea { min-height: 116px; resize: vertical; }
.lf-field input:focus, .lf-field textarea:focus { background: var(--card-hover); box-shadow: inset 0 0 0 2px rgb(var(--ink-rgb) / 0.22); }
.lf-choice { display: grid; gap: 12px; min-width: 0; margin: 0; padding: 0; border: 0; }
.lf-opts { display: grid; gap: 10px; }
@media (min-width: 620px) { .lf-opts { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); } }
.lf-opts label { position: relative; display: block; cursor: pointer; }
.lf-opts input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.lf-opts span { display: flex; align-items: center; gap: 14px; min-height: 58px; padding: 14px 18px; background: var(--card); color: var(--ink-2); font: 400 15.5px/1.35 var(--text); transition: color 0.35s var(--ease), background 0.35s var(--ease); }
.lf-opts span::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--bg-4); transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.lf-opts label:hover span { color: var(--ink); background: var(--card-hover); }
.lf-opts input:checked + span { color: var(--bg); background: var(--ink); }
.lf-opts input:checked + span::before { background: var(--bg); box-shadow: inset 0 0 0 5px var(--ink); }
.lf-opts input:focus-visible + span { box-shadow: inset 0 0 0 2px rgb(var(--ink-rgb) / 0.4); }
.lf-consent { display: flex; align-items: flex-start; gap: 12px; color: var(--ink-2); font: 400 var(--fs-small)/1.55 var(--text); cursor: pointer; }
.lf-consent input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); }
.lf-consent a { color: var(--ink); }
.lf-error { margin: 0; color: var(--error); font: 400 var(--fs-small)/1.5 var(--text); }
.lf-go { margin: 0; color: var(--ink-2); font: 400 var(--fs-small)/1.5 var(--text); }
.lf-go[hidden] { display: none; }
.lf-go a { color: var(--ink); text-underline-offset: 3px; }
.lf-send {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; width: 100%; min-height: 62px; padding: 0 22px 0 26px; border: 0; border-radius: 0;
  background: var(--accent); color: var(--accent-ink); font: 500 16px/1 var(--text); letter-spacing: 0.02em; cursor: pointer; transition: background 0.35s var(--ease);
}
.lf-send::after { content: ""; flex: none; width: 18px; height: 14px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='14' viewBox='0 0 18 14'%3E%3Cpath d='M1 7h15M10.5 1.5 16 7l-5.5 5.5' fill='none' stroke='%23131c30' stroke-width='1.5'/%3E%3C/svg%3E") center / contain no-repeat; transition: transform 0.35s var(--ease); }
.lf-send:hover { background: var(--accent-hover); }
.lf-send:hover::after { transform: translateX(4px); }
.lf-send:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.lead-form .micro { margin: 0; }

/*
  Two buttons in the corner, each with its call beside it: the assistant above, WhatsApp below.
  They show once the visitor is reading and step aside over the cover, the closing call, the form
  and the foot, where both are already right there.
*/
.fab { position: fixed; right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom)); z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.fab-row { display: flex; align-items: center; gap: 8px; margin: 0; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; }
.fab-row[hidden] { display: none; }
.fab-cta {
  display: grid; gap: 1px; max-width: 190px; padding: 6px 11px 7px; border-radius: 11px; background: var(--tone-1); color: var(--ink-3);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.07), 0 10px 24px rgb(var(--shade-rgb) / 0.55), 0 1px 4px rgb(var(--shade-rgb) / 0.4);
  font: 400 10.5px/1.35 var(--text); letter-spacing: 0.02em; white-space: nowrap; transition: transform 0.4s var(--ease), background 0.4s var(--ease);
}
.fab-cta b { font: 500 11.5px/1.3 var(--text); color: var(--ink); letter-spacing: 0.005em; }
.fab-btn { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; box-shadow: 0 8px 20px rgb(var(--shade-rgb) / 0.5), 0 1px 4px rgb(var(--shade-rgb) / 0.35); transition: transform 0.4s var(--ease); }
.fab-btn svg { display: block; width: 22px; height: 22px; }
.fab-btn-wa { background: #25d366; }
.fab-btn-bot { background: var(--accent); }
.fab-row:hover .fab-btn { transform: scale(1.06); }
.fab-row:hover .fab-cta { transform: translateX(-3px); background: var(--tone-hover); }
.fab-row:focus-visible { outline: none; }
.fab-row:focus-visible .fab-btn { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink); }
html.motion .fab { opacity: 0; transform: translate3d(0, 16px, 0); pointer-events: none; }
html.motion.wa-on .fab { opacity: 1; transform: none; pointer-events: none; }
/* only the buttons themselves take a tap: the empty space around them never covers the page */
html.motion.wa-on .fab > * { pointer-events: auto; }
html.motion .fab .fab-row { opacity: 0; transform: translate3d(18px, 0, 0); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
html.motion.wa-on .fab .fab-row { opacity: 1; transform: none; }
html.motion.wa-on .fab .fab-row + .fab-row { transition-delay: 0.12s; }
@media (min-width: 960px) { .fab { right: 26px; bottom: 26px; gap: 10px; } .fab-btn { width: 46px; height: 46px; } .fab-btn svg { width: 24px; height: 24px; } .fab-cta { max-width: 220px; padding: 7px 13px 8px; } }

/*
  The reviews reel: the section holds the screen while the reviews pass sideways with the scroll.
  The one in the middle stands sharp with its words lit; those coming and going turn away a little,
  step back and go out of focus.
*/
.reel .gal-dots { display: none; }
html.motion .reel.is-reeling { padding-block: 0; height: var(--reel-h, auto); }
html.motion .reel.is-reeling > .wrap { position: sticky; top: 0; height: 100svh; min-height: 560px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
html.motion .reel.is-reeling .reviews { position: relative; display: flex; align-items: stretch; gap: var(--s-3); transform: translate3d(var(--reel-x, 0px), 0, 0); will-change: transform; backface-visibility: hidden; }
html.motion .reel.is-reeling .review { flex: 0 0 min(60vw, 280px); min-height: 0; box-sizing: border-box; padding: 18px 18px 16px; gap: 12px; }
html.motion .reel.is-reeling .review p { font-size: clamp(14.5px, 0.25vw + 13.6px, 16.5px); line-height: 1.45; }
html.motion .reel.is-reeling .review figcaption { font-size: 12.5px; }
/* on a phone only the review in the middle is on screen: the next one waits fully outside, never as a sliver */
@media (max-width: 700px) { html.motion .reel.is-reeling .reviews { gap: calc(20vw + 12px); } }
html.motion .reel.is-reeling .reviews .review.glow {
  background: var(--card);
  transform: perspective(1100px) translate3d(0, 0, calc(var(--ca, 0) * -110px)) rotateY(calc(var(--cd, 0) * -20deg));
  filter: brightness(calc(1 - var(--ca, 0) * 0.42));
  transition: none;
}
html.motion .reel.is-reeling .reviews .review.glow.lit { transition: none; }
html.motion .reel.is-reeling .review .words .w, html.motion .reel.is-reeling .review .words .w.on { color: var(--ink); }
/* bone cards keep their own paper and ink, whatever the light of the other cards does */
html.motion :is(.review.glow, .review.glow.rv.in) { background: var(--card); }
html.motion .review.glow.lit p, html.motion .review .words .w, html.motion .review .words .w.on { color: var(--ink); }
html.motion .reel.is-reeling .gal-dots { display: flex; gap: 8px; margin-top: var(--s-4); }
html.motion .reel.is-reeling .reviews-note { margin-top: var(--s-3); }

/* --------------------------------------------------------------- the lawyer's own sections */
.own-sign { margin: 0 0 0 auto; max-width: 24em; color: var(--ink-3); font: 400 var(--fs-small)/1.6 var(--meta); letter-spacing: 0.04em; }
@media (max-width: 899px) { .own-sign { margin-left: 0; } }
.own-shot { margin: 0; }
.own-photo .shot-frame img { object-fit: cover; }

/* The note on top while he previews his unpublished changes; never seen by visitors. */
.preview-bar { position: relative; z-index: 30; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 18px; padding: 10px var(--pad); background: var(--accent); color: var(--accent-ink); font: 400 14px/1.4 var(--text); }
.preview-bar p { margin: 0; }
.preview-bar a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

/* Which part of his own photos stays in view (chosen in the panel). */
img.fp-arriba { object-position: 50% 12% !important; }
img.fp-abajo { object-position: 50% 88% !important; }
img.fp-izquierda { object-position: 12% 50% !important; }
img.fp-derecha { object-position: 88% 50% !important; }

/* ------------------------------------------------------------ rendering */
/*
  Each section of the page and the footer is laid out and painted when it comes near the screen,
  not all at once on arrival (the page is long). Nothing changes in how it looks: a section keeps
  its real size once it has been seen, and 900px stands in for it until then.
*/
main > section, body > footer { content-visibility: auto; contain-intrinsic-size: auto 900px; }
