/* ==========================================================================
   Suaza v2 · "Letterhead Editorial" elevation layer
   Loaded AFTER each page's inline <style> so equal-specificity rules win.
   Brand tokens unchanged (green/gold/paper, Playfair + Source Sans 3).
   Direction: a senior counsel's letterhead, digitized. Hairline double-rules,
   engraved texture, drenched green anchor moments, editorial numbering.
   ========================================================================== */

:root {
  --v2-ease: cubic-bezier(0.32, 0.72, 0, 1);
  --v2-hairline: rgba(201, 164, 64, 0.35);
  --v2-paper-dim: rgba(248, 248, 246, 0.78);
}

/* --------------------------------------------------------------------------
   Film grain: one fixed overlay, pointer-events none. Physical paper feel.
   -------------------------------------------------------------------------- */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 4000;
  pointer-events: none;
  opacity: 0.026;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --------------------------------------------------------------------------
   Utility bar: letterhead top strip. Hidden on small screens.
   -------------------------------------------------------------------------- */
.utilbar { background: var(--rsj-green-dark); border-bottom: 1px solid rgba(201,164,64,0.28); }
.utilbar__in { max-width: var(--max); margin: 0 auto; padding: 9px var(--gutter);
  display: flex; align-items: center; gap: 26px; }
.utilbar__item { font-size: 12px; font-weight: 600; letter-spacing: 0.6px; color: rgba(248,248,246,0.82);
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.utilbar__item .udot { width: 4px; height: 4px; border-radius: 50%; background: var(--rsj-gold); flex: none; }
.utilbar__item:last-child { margin-left: auto; }
a.utilbar__item:hover { color: #fff; }
@media (max-width: 760px) { .utilbar { display: none; } }

/* --------------------------------------------------------------------------
   Nav: masthead weight + engraved double rule.
   -------------------------------------------------------------------------- */
.v4nav { border-bottom: 1px solid var(--rsj-border); position: sticky; }
.v4nav::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--v2-hairline) 18%, var(--v2-hairline) 82%, transparent);
  pointer-events: none; }

/* --------------------------------------------------------------------------
   Buttons: button-in-button icon architecture + press physics.
   -------------------------------------------------------------------------- */
.btn { transition: transform 180ms var(--v2-ease), background-color 180ms var(--v2-ease),
  border-color 180ms var(--v2-ease), color 180ms var(--v2-ease), box-shadow 180ms var(--v2-ease); }
.btn:active { transform: scale(0.98); }
.btn--wa svg { box-sizing: content-box; background: rgba(255,255,255,0.16); border-radius: 50%;
  padding: 6px; flex: none;
  transition: transform 260ms var(--v2-ease), background-color 260ms var(--v2-ease); }
@media (hover: hover) and (pointer: fine) {
  .btn--wa:hover svg { transform: translateX(2px) translateY(-1px) scale(1.06); background: rgba(255,255,255,0.24); }
}

/* --------------------------------------------------------------------------
   Reveal upgrade: heavy fade-up with blur resolve (motion.css handles the
   opacity/transform baseline; this adds the cinematic blur).
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  [data-reveal] { filter: blur(7px); transition-property: opacity, transform, filter;
    transition-duration: 600ms; transition-timing-function: var(--v2-ease); }
  [data-reveal].is-revealed { filter: blur(0); }
}

/* --------------------------------------------------------------------------
   Footer: editorial. Oversized engraved wordmark row above the grid.
   -------------------------------------------------------------------------- */
/* Wordmark text lives in CSS content (no DOM text node): purely decorative,
   deliberately near-invisible "engraving", kept out of the a11y tree. */
.ft__word { font-family: var(--rsj-font-display); font-weight: 700;
  font-size: clamp(52px, 9.5vw, 118px); line-height: 0.95; letter-spacing: -2px;
  color: rgba(248,248,246,0.07); white-space: nowrap; overflow: hidden;
  padding-bottom: 26px; margin-bottom: 40px; border-bottom: 1px solid rgba(248,248,246,0.10);
  user-select: none; }
.ft__word::before { content: 'Suaza Jiménez'; }
.ft { position: relative; overflow: hidden; }
.ft::before { content: ''; position: absolute; right: -140px; bottom: -140px; width: 460px; height: 460px;
  border: 1px solid rgba(201,164,64,0.14); border-radius: 50%; pointer-events: none; }

/* ==========================================================================
   INDEX
   ========================================================================== */

/* Hero: drenched green-dark, letterhead framing, paper type. */
body.pg-index .v4hero { background: var(--rsj-green-dark); }
body.pg-index .v4hero::before { background:
  radial-gradient(720px 480px at 82% 8%, rgba(201,164,64,0.10), transparent 65%),
  radial-gradient(640px 420px at 8% 96%, rgba(26,74,58,0.85), transparent 70%); }
/* Type size stays the inline clamp: the 2-line hero wrap is a hard client rule. */
body.pg-index .v4hero h1 { color: var(--rsj-bg); }
body.pg-index .v4hero h1 .mark { color: var(--rsj-gold-bright, #D4B84A); }
body.pg-index .v4hero h1 .mark::after { background: rgba(212,184,74,0.20); }
body.pg-index .v4hero__lead { color: var(--v2-paper-dim); }
body.pg-index .chip { background: transparent; border-color: rgba(212,184,74,0.42); color: var(--rsj-gold-bright); box-shadow: none; }
body.pg-index .tagpill { background: transparent; border: 1px solid rgba(248,248,246,0.28); box-shadow: none; }
body.pg-index .btn--ghost { color: var(--rsj-bg); border-color: rgba(248,248,246,0.4); }
body.pg-index .btn--ghost:hover { border-color: var(--rsj-bg); background: rgba(255,255,255,0.06); }
body.pg-index .herovideo { box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45); }

/* Credential strip: hairline-separated letterhead row under the CTAs. */
.credstrip { display: flex; flex-wrap: wrap; gap: 0; margin-top: 34px;
  border-top: 1px solid rgba(248,248,246,0.16); }
.credstrip span { padding: 14px 26px 0 0; margin-right: 26px; font-size: 13px; font-weight: 600;
  letter-spacing: 1.2px; text-transform: uppercase; color: rgba(248,248,246,0.62);
  border-right: 1px solid rgba(248,248,246,0.14); }
.credstrip span:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
@media (max-width: 979px) { .credstrip { justify-content: center; } .credstrip span { border-right: 0; } }

/* Field follows the drenched hero: gold seam between the two greens. */
body.pg-index .field { border-top: 1px solid rgba(201,164,64,0.30); }

/* Bento bottom row variation: middle card carries a tonal tint. */
body.pg-index .wcards article:nth-of-type(5) { background: linear-gradient(165deg, #F4F6F2, #E9EEE8);
  border-color: rgba(26,74,58,0.16); }

/* Closing: full-bleed drenched band, giant serif (replaces the rounded box). */
body.pg-index .ctawrap { padding: 0; }
body.pg-index .ctawrap .wrap { max-width: none; padding: 0; }
body.pg-index .ctacard { border-radius: 0; max-width: none; margin: 0;
  background: var(--rsj-green-dark); position: relative; overflow: hidden;
  padding: clamp(88px, 11vw, 150px) var(--gutter); }
body.pg-index .ctacard::before { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(760px 460px at 50% 118%, rgba(201,164,64,0.14), transparent 70%); }
body.pg-index .ctacard::after { content: ''; position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  width: min(720px, 76vw); height: 1px; background: linear-gradient(90deg, transparent, var(--v2-hairline), transparent); }
body.pg-index .ctacard__in { max-width: 760px; margin: 0 auto; }
body.pg-index .ctacard h2 { font-size: clamp(38px, 5.4vw, 68px); line-height: 1.06; letter-spacing: -1px; }

/* ==========================================================================
   SERVICIOS: numbered editorial area index (replaces the identical card grid)
   ========================================================================== */
.arealist { position: relative; z-index: 1; border-top: 1px solid rgba(248,248,246,0.18); }
.arearow { display: grid; grid-template-columns: 96px 1fr auto; gap: 10px 30px; align-items: start;
  padding: clamp(28px, 3.6vw, 44px) 6px; border-bottom: 1px solid rgba(248,248,246,0.14);
  position: relative; transition: background-color 260ms var(--v2-ease); }
.arearow__num { font-family: var(--rsj-font-display); font-weight: 400; font-style: italic;
  font-size: clamp(30px, 3.4vw, 44px); line-height: 1; color: var(--rsj-gold-bright, #D4B84A); padding-top: 4px; }
.arearow__body h3 { font-family: var(--rsj-font-display); font-weight: 600;
  font-size: clamp(23px, 2.6vw, 32px); letter-spacing: -0.3px; color: #fff; margin-bottom: 10px; text-wrap: balance; }
.arearow__body > p { color: rgba(255,255,255,0.78); font-size: 15.5px; line-height: 1.6; max-width: 62ch; margin-bottom: 14px; }
.arearow__sub { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.arearow__sub li { border: 1px solid rgba(248,248,246,0.22); border-radius: var(--r-pill);
  padding: 6px 14px; font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,0.85); }
.arearow .arrow-link { align-self: center; color: #fff; border: 1.5px solid rgba(255,255,255,0.34);
  border-radius: var(--r-pill); padding: 12px 22px; white-space: nowrap;
  transition: border-color 200ms var(--v2-ease), background-color 200ms var(--v2-ease); }
.arearow .arrow-link .arr { color: var(--rsj-gold-bright); display: inline-block;
  transition: transform 260ms var(--v2-ease); }
@media (hover: hover) and (pointer: fine) {
  .arearow:hover { background: rgba(255,255,255,0.045); }
  .arearow:hover .arrow-link { border-color: rgba(255,255,255,0.62); background: rgba(255,255,255,0.06); }
  .arearow:hover .arrow-link .arr { transform: translateX(4px); }
}
@media (max-width: 860px) {
  .arearow { grid-template-columns: 1fr; gap: 8px; }
  .arearow__num { font-size: 30px; }
  .arearow .arrow-link { justify-self: start; margin-top: 6px; }
}

/* Proceso numbers: engraved gold instead of pale gray. */
body.pg-servicios .proceso .pstep__num, body.pg-servicios .pnum {
  color: rgba(201,164,64,0.55); }

/* ==========================================================================
   SOBRE + CONTACTO: shell inheritance + focus craft
   ========================================================================== */
body.pg-contacto input:focus-visible, body.pg-contacto select:focus-visible, body.pg-contacto textarea:focus-visible {
  outline: 2px solid var(--rsj-green); outline-offset: 1px;
  box-shadow: 0 0 0 4px rgba(26,74,58,0.12); border-color: var(--rsj-green); }

/* Reduced motion: strip the added blur transition entirely. */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { filter: none; }
}
