/* ==========================================================================
   Salgado & Dávalos — Abogados Asociados · static rebuild
   Flat, clean reskin matching the live site: teal #14576e + blue #2a83f9,
   Raleway, bright photo hero, borderless sections, light-grey footer.
   ========================================================================== */

:root {
  --teal:      #14576e;
  --teal-2:    #0f4456;
  --blue:      #2a83f9;
  --blue-deep: #1f6fe0;
  --ink:       #20242a;   /* near-black body/headings on light */
  --muted:     #6a6969;   /* secondary text (matches site grey) */
  --paper:     #ffffff;
  --paper-2:   #f3f4f3;   /* light grey band / footer */
  --line:      #e7e9ea;

  --maxw: 1200px;
  --gut: clamp(20px, 5vw, 60px);

  --ff: "Raleway", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: ease;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--ff);
  font-size: 1.0625rem; line-height: 1.7; font-weight: 400;
  color: var(--ink); background: var(--paper);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.section { padding-block: clamp(56px, 7.5vw, 100px); }
.section--alt { background: var(--paper-2); }

/* ---- type --------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 { font-family: var(--ff); line-height: 1.2; font-weight: 600; color: var(--ink); }
.h-xl { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 500; }
.h-lg { font-size: clamp(1.85rem, 3.2vw, 2.5rem); font-weight: 500; }
.h-md { font-size: clamp(1.4rem, 2.2vw, 1.85rem); font-weight: 600; }
.tt { color: var(--teal); }   /* two-tone heading accent word */

.eyebrow { font-size: .9rem; font-weight: 500; letter-spacing: .02em; color: var(--muted); display: block; margin-bottom: .8rem; }
.eyebrow--center { text-align: center; }

.lead { font-size: clamp(1.05rem, 1.35vw, 1.2rem); line-height: 1.6; color: var(--muted); }

.rule { width: 0; height: 0; border: 0; margin: 0; }   /* no decorative rules in the flat look */

/* ---- buttons (flat, modest radius) -------------------------------------- */
.btn {
  --bg: var(--blue); --fg:#fff; --bd: var(--blue);
  display: inline-flex; align-items: center; gap: .5em;
  background: var(--bg); color: var(--fg); border: 1px solid var(--bd);
  padding: .75em 1.6em; font-weight: 600; font-size: .96rem; border-radius: 4px;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.btn:hover { background: var(--blue-deep); border-color: var(--blue-deep); }
.btn--ghost { --bg: transparent; --fg:#fff; --bd: rgba(255,255,255,.8); }
.btn--ghost:hover { background:#fff; color: var(--teal); border-color:#fff; }
.btn--outline-ink { --bg: transparent; --fg: var(--teal); --bd: var(--teal); }
.btn--outline-ink:hover { background: var(--teal); color:#fff; }
.btn--wa { --bg:#25d366; --fg:#fff; --bd:#25d366; }
.btn--wa:hover { background:#1ebe5a; border-color:#1ebe5a; }
.btn svg { width: 1.05em; height: 1.05em; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

/* ============================ HEADER ==================================== */
.site-header { position: sticky; top: 0; z-index: 100; background:#fff; transition: box-shadow .3s var(--ease); }
.site-header.is-stuck { box-shadow: 0 2px 12px rgba(20,87,110,.08); }
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 96px; padding-block: 14px; }
.brand { display: flex; align-items: center; flex: none; }
.brand img { height: 62px; width: auto; }
.brand .brand-fallback { font-weight: 700; font-size: 1.4rem; color: var(--teal); letter-spacing:.02em; }

.nav { display: flex; align-items: center; gap: clamp(.5rem, 1.6vw, 1.6rem); }
.nav > li { position: relative; }
.nav a, .nav .navlink {
  display: inline-flex; align-items: center; gap: .4em;
  padding: .5rem .2rem; font-weight: 600; font-size: 1rem; color: var(--ink);
  transition: color .2s var(--ease);
}
.nav a:hover, .nav .navlink:hover, .nav a.is-active, .nav .navlink.is-active { color: var(--blue); }
.nav a.is-active::after, .nav .has-active::after { display: none; }
.nav .caret { width:.62em; height:.62em; transition: transform .25s var(--ease); }

.dropdown > .submenu {
  position: absolute; top: calc(100% + 10px); left: 50%; transform: translate(-50%,8px);
  min-width: 290px; background:#fff; border: 1px solid var(--line);
  box-shadow: 0 14px 40px rgba(20,87,110,.14); padding: .5rem; border-radius: 6px;
  opacity: 0; visibility: hidden; transition: opacity .2s var(--ease), transform .2s var(--ease), visibility .2s;
}
.dropdown:hover > .submenu, .dropdown:focus-within > .submenu { opacity: 1; visibility: visible; transform: translate(-50%,0); }
.dropdown:hover .caret { transform: rotate(180deg); }
.submenu a { display:block; padding:.55rem .8rem; font-weight:500; font-size:.93rem; color: var(--ink); border-radius:4px; }
.submenu a:hover { background: rgba(42,131,249,.09); color: var(--blue); }

.burger { display:none; width:46px; height:46px; background:transparent; border:1px solid var(--line); border-radius:6px; position:relative; flex:none; }
.burger span, .burger span::before, .burger span::after { content:""; position:absolute; left:50%; top:50%; width:20px; height:2px; background: var(--teal); transform: translate(-50%,-50%); transition:.25s var(--ease); }
.burger span::before { top:-6px; } .burger span::after { top:6px; }
body.nav-open .burger span { background: transparent; }
body.nav-open .burger span::before { top:0; transform: rotate(45deg); }
body.nav-open .burger span::after { top:0; transform: rotate(-45deg); }

/* ============================ HERO ===================================== */
.hero {
  position: relative; color:#fff;
  background: linear-gradient(100deg, rgba(8,30,45,.62) 0%, rgba(8,30,45,.30) 44%, rgba(8,30,45,.05) 100%), url("/assets/img/home-01.jpg");
  background-size: cover; background-position: center;
}
.hero .wrap { padding-top: clamp(150px, 22vw, 250px); padding-bottom: clamp(48px, 7vw, 96px); }
.hero-inner { max-width: 660px; margin-right: auto; }
.hero-kicker { font-size: clamp(1.5rem, 3vw, 2.4rem); font-weight: 300; line-height: 1.1; color:#fff; }
.hero-title { font-size: clamp(2rem, 4.8vw, 3.4rem); font-weight: 300; line-height: 1.12; color:#fff; margin-top: .1rem; }
.hero-sub { margin-top: 1.4rem; max-width: 52ch; color:#eef3f6; font-size: clamp(1rem, 1.3vw, 1.12rem); font-weight: 400; }

/* ---- video band --------------------------------------------------------- */
.video-band { padding-top: clamp(40px,6vw,72px); background: url("/assets/img/home-low-02.jpg") center/cover; }
.video-shell { max-width: 1040px; margin-inline: auto; }
.video-frame { position: relative; aspect-ratio: 16/9; overflow: hidden; background:#0d1620; }
.video-frame iframe { position:absolute; inset:0; width:100%; height:100%; border:0; }

/* ---- section heads ------------------------------------------------------ */
.sec-head { max-width: 66ch; }
.sec-head--center { margin-inline:auto; text-align:center; }

/* ---- featured services (flat: icon + underlined heading + text) --------- */
.svc-grid { display:grid; grid-template-columns: repeat(4,1fr); gap: clamp(1.6rem, 3vw, 2.6rem); margin-top: 2.6rem; }
.svc-card { display:flex; flex-direction:column; }
.svc-card .mark { color: var(--blue); margin-bottom: 1rem; }
.svc-card .mark svg { width: 42px; height: 42px; }
.svc-card h3 { font-size: 1.22rem; font-weight: 700; color: var(--ink); display: inline; }
.svc-card .h-wrap { margin-bottom: .9rem; }
.svc-card .h-wrap a { color: var(--ink); border-bottom: 2px solid var(--ink); padding-bottom: 3px; transition: color .2s var(--ease), border-color .2s var(--ease); }
.svc-card .h-wrap a:hover { color: var(--blue); border-color: var(--blue); }
.svc-card p { color: var(--muted); font-size: .98rem; }

/* ---- práctica global (clean list) -------------------------------------- */
.pg-list { margin-top: 2rem; display:grid; grid-template-columns: repeat(3,1fr); gap: .2rem 2.4rem; }
.pg-list a { display:flex; align-items:flex-start; gap:.7rem; padding:.7rem 0; color: var(--teal); font-weight:500; font-size:1.02rem; border-bottom:1px solid var(--line); transition: color .2s var(--ease); }
.pg-list a:hover { color: var(--blue); }
.pg-list .mk { color: var(--blue); flex:none; margin-top:.15rem; }
.pg-list .mk svg { width:16px; height:16px; }

/* ---- split (about / services intro) ------------------------------------ */
.split { display:grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem,5vw,4rem); align-items:center; }
.split--media-first { direction: rtl; } .split--media-first > * { direction: ltr; }
.media-card { overflow:hidden; }
.media-card img { width:100%; aspect-ratio: 3/2; object-fit: cover; }

/* ---- team (flat: framed photo, centered black name, blue role) ---------- */
.team-grid { display:grid; grid-template-columns: repeat(4,1fr); gap: clamp(1.6rem,3vw,2.4rem); margin-top: 2.6rem; }
.member { text-align:center; }
.member .photo { aspect-ratio: 1/1; overflow:hidden; border:1px solid var(--line); background: var(--paper-2); }
.member .photo img { width:100%; height:100%; object-fit: cover; }
.member .info { padding-top: 1rem; border:0; }
.member .name { font-size: 1.12rem; font-weight: 600; line-height:1.25; color: var(--ink); }
.member .role { font-size: .95rem; color: var(--blue); margin-top:.35rem; }

/* ---- inner page hero (flat teal) --------------------------------------- */
.page-hero { background: var(--teal); color:#fff; }
.page-hero .wrap { padding-block: clamp(48px,6.5vw,82px); }
.crumbs { font-size:.85rem; color:#bcd0da; margin-bottom:1.2rem; display:flex; flex-wrap:wrap; gap:.45em; }
.crumbs a:hover { color:#fff; } .crumbs span.sep { opacity:.5; }
.page-hero h1 { color:#fff; max-width: 24ch; } .page-hero .lead { margin-top: .9rem; max-width: 60ch; color:#dbe6ec; }

/* ---- practice content + aside ------------------------------------------ */
.content-grid { display:grid; grid-template-columns: minmax(0,1fr) 300px; gap: clamp(2rem,5vw,4rem); align-items:start; }
.prose > * + * { margin-top: 1.15rem; }
.prose p { color: #3b434a; }
.prose .pintro { font-size: clamp(1.08rem,1.4vw,1.22rem); line-height:1.55; color: var(--teal); font-weight: 600; }
.prose h3 { font-size: 1.05rem; font-weight: 700; color: var(--ink); margin-top: 1.9rem; text-decoration: underline; text-decoration-color: var(--blue); text-underline-offset: 6px; text-decoration-thickness: 2px; }
.prose strong { color: var(--teal); font-weight: 700; }

.aside { position: sticky; top: 110px; display:flex; flex-direction:column; gap: 1.2rem; }
.aside-banner { overflow:hidden; }
.aside-banner img { width:100%; aspect-ratio: 5/8; object-fit: cover; }
.aside-card { background: var(--paper-2); border-left: 3px solid var(--blue); padding: 1.4rem 1.4rem; }
.aside-card h4 { color: var(--teal); font-size: 1.14rem; font-weight:700; }
.aside-card p { color: var(--muted); font-size:.92rem; margin-top:.45rem; }
.aside-card .btn-row { margin-top: 1rem; flex-direction:column; gap:.55rem; }
.aside-card .btn { width:100%; justify-content:center; }
.aside-links { padding-top: .2rem; }
.aside-links .t { font-size:.85rem; letter-spacing:.02em; color: var(--muted); font-weight:700; margin-bottom:.5rem; }
.aside-links a { display:block; padding:.4rem 0; font-size:.93rem; color: var(--teal); border-bottom:1px solid var(--line); transition: color .2s var(--ease); }
.aside-links a:last-child { border-bottom:0; }
.aside-links a:hover { color: var(--blue); }
.aside-links a.current { color: var(--blue); font-weight:700; }

/* ---- about / services intro -------------------------------------------- */
.about-block + .about-block { margin-top: clamp(3rem,6vw,5rem); }
.svc-intro { max-width: 72ch; } .svc-intro p { color:#3b434a; } .svc-intro p + p { margin-top: 1rem; }

/* ---- contact ------------------------------------------------------------ */
.contact-grid { display:grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem,5vw,3.5rem); align-items:start; }
.form-card { background:#fff; border:1px solid var(--line); padding: clamp(1.4rem,3vw,2.2rem); }
.field { margin-bottom: 1.05rem; }
.field label { display:block; font-size:.85rem; font-weight:600; color: var(--ink); margin-bottom:.4rem; }
.field .req { color: var(--blue); }
.field input, .field textarea { width:100%; font-family: var(--ff); font-size:1rem; color: var(--ink); background:#fff; border:1px solid #d6dcdf; border-radius:4px; padding:.72rem .85rem; transition: border-color .2s; }
.field input:focus, .field textarea:focus { outline:none; border-color: var(--blue); box-shadow: 0 0 0 2px rgba(42,131,249,.14); }
.field textarea { min-height: 130px; resize: vertical; }
.field-2 { display:grid; grid-template-columns:1fr 1fr; gap:.9rem; }
.hp { position:absolute; left:-9999px; opacity:0; height:0; width:0; }
.form-note { font-size:.85rem; color: var(--muted); margin-top:.4rem; }
.form-status { margin-top:1rem; font-size:.92rem; padding:.7rem .9rem; border-radius:4px; display:none; }
.form-status.ok { display:block; background:#e8f6ec; color:#1c7a3e; border:1px solid #bfe6cb; }
.form-status.err { display:block; background:#fdecec; color:#b13a3a; border:1px solid #f3c9c9; }
.contact-info > * + * { margin-top: 1.25rem; }
.info-block { display:flex; gap:.85rem; align-items:flex-start; }
.info-block .ic { width:40px; height:40px; flex:none; border-radius:50%; display:grid; place-items:center; background: rgba(42,131,249,.1); color: var(--blue); }
.info-block .ic svg { width:18px; height:18px; }
.info-block .t { font-size:.78rem; letter-spacing:.04em; color: var(--muted); font-weight:700; }
.info-block .v { color: var(--ink); font-size:1.0rem; margin-top:.1rem; }
.info-block .v a:hover { color: var(--blue); }
.wa-card { margin-top: 1.4rem; }
.map-embed { margin-top: clamp(2.4rem,5vw,3.4rem); overflow:hidden; border:1px solid var(--line); }
.map-embed iframe { display:block; width:100%; height:380px; border:0; }

/* ---- footer (light grey + teal strip) ---------------------------------- */
.site-footer { background: var(--paper-2); color: #4b5258; padding-top: clamp(48px,6vw,72px); }
.footer-grid { display:grid; grid-template-columns: 1.5fr 1fr 1.3fr; gap: clamp(2rem,5vw,4rem); }
.f-col h4 { font-size: 1.45rem; font-weight: 600; color: var(--ink); margin-bottom: 1.1rem; }
.f-about p { font-size:.96rem; color:#4b5258; max-width: 38ch; line-height:1.6; }
.f-social { display:flex; gap:.6rem; margin-top:1.3rem; }
.f-social a { width:40px; height:40px; background:#fff; border:1px solid var(--line); border-radius:50%; display:grid; place-items:center; color: var(--blue); transition:.2s var(--ease); }
.f-social a:hover { color:#fff; background: var(--blue); border-color: var(--blue); }
.f-social svg { width:16px; height:16px; }
.f-col ul li { margin-bottom:.6rem; }
.f-col a { font-size:1rem; color:#4b5258; transition: color .2s var(--ease); }
.f-col a:hover { color: var(--blue); }
.f-contact .row { display:flex; gap:.7rem; align-items:flex-start; font-size:.98rem; margin-bottom:1rem; color:#4b5258; line-height:1.5; }
.f-contact .row .ic { color: var(--blue); flex:none; margin-top:.15rem; } .f-contact .row .ic svg { width:18px; height:18px; }
.f-contact .row a:hover { color: var(--blue); }
.footer-strip { background: var(--teal); color:#fff; text-align:center; padding-block: 1.3rem; margin-top: clamp(2.5rem,5vw,3.5rem); }
.footer-strip .wrap { font-weight: 600; font-size: 1.05rem; }

/* ---- reveal: no animation (flat/static like the original) -------------- */
[data-reveal] { opacity: 1; transform: none; }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 3px; }

/* ---- responsive --------------------------------------------------------- */
@media (max-width:1024px){
  .svc-grid { grid-template-columns: repeat(2,1fr); }
  .team-grid { grid-template-columns: repeat(2,1fr); }
  .pg-list { grid-template-columns: repeat(2,1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; } .f-about { grid-column: 1 / -1; }
}
@media (max-width:900px){
  .split { grid-template-columns: 1fr; } .split--media-first { direction: ltr; }
  .content-grid { grid-template-columns: 1fr; }
  .aside { position: static; flex-direction: row; flex-wrap: wrap; } .aside > * { flex: 1 1 240px; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width:760px){
  .header-bar { min-height: 76px; } .brand img { height: 48px; }
  .burger { display:block; }
  .nav { position: fixed; inset: 76px 0 auto 0; flex-direction: column; align-items: stretch; gap:0; background:#fff; border-bottom:1px solid var(--line); padding:.6rem var(--gut) 1.4rem; box-shadow: 0 14px 40px rgba(20,87,110,.14); transform: translateY(-130%); transition: transform .35s var(--ease); max-height: calc(100vh - 76px); overflow-y:auto; }
  body.nav-open .nav { transform: translateY(0); }
  .nav > li { width:100%; border-bottom:1px solid var(--line); } .nav > li:last-child { border-bottom:0; }
  .nav a, .nav .navlink { padding:.95rem .2rem; width:100%; font-size:1.05rem; }
  .dropdown > .submenu { position:static; transform:none; opacity:1; visibility:visible; box-shadow:none; border:0; padding:0 0 .6rem .4rem; min-width:0; max-height:0; overflow:hidden; transition: max-height .3s var(--ease); }
  .dropdown.open > .submenu { max-height: 760px; } .dropdown.open .caret { transform: rotate(180deg); }
  .submenu a { font-size:.98rem; padding:.5rem .4rem; }
  .svc-grid { grid-template-columns: 1fr 1fr; }
  .pg-list { grid-template-columns: 1fr; }
  .field-2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width:460px){ .svc-grid { grid-template-columns: 1fr; } .team-grid { grid-template-columns: 1fr 1fr; } }

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