/* ============================================================
   LegallyJuan — Mendez Babani Law
   Static rebuild by BHI Software. Faithful to the live site.
   High-contrast black + gold, conversion-first. No build step.
   ============================================================ */

:root {
  /* Brand colors */
  --black:    #000000;  /* hero / header base */
  --ink:      #0F110F;  /* near-black section background */
  --ink-2:    #17191a;  /* lifted panels / cards */
  --gold:     #FFCC00;  /* accent — CTA bars, X-marks, buttons, logo bar */
  --gold-deep:#E6B800;  /* gold hover */
  --white:    #FFFFFF;  /* primary text */
  --muted:    #B9BcBe;  /* secondary text */
  --line:     rgba(255,255,255,0.12);

  --gold-rgb: 255, 204, 0;

  /* Type — match the live site's Helvetica/Arial bold look.
     Futura (brand font) sits in the Drive folder and can be self-hosted
     once a webfont license is confirmed — see README. */
  --font: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, "Segoe UI", sans-serif;

  /* Layout */
  --maxw: 1200px;
  --gutter: clamp(1.25rem, 4vw, 3.25rem);
  --radius: 4px;
  --header-h: 96px;

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.6s;
  --dur-fast: 0.22s;
  --rise: 22px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--white);
  background: var(--black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-deep); }
::selection { background: rgba(var(--gold-rgb), 0.3); color: var(--white); }

h1, h2, h3 {
  margin: 0 0 0.5em;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
p { margin: 0 0 1em; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; position: relative; }
.section--ink { background: var(--ink); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--black);
  border-bottom: 3px solid var(--gold);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: var(--header-h); padding-top: 0.6rem; padding-bottom: 0.6rem;
}
.nav__brand { display: block; flex: 0 0 auto; }
.nav__logo { width: 190px; height: auto; }
.nav__menu { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.2rem); }
.nav__links {
  display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.1rem);
  list-style: none; margin: 0; padding: 0;
}
.nav__links a {
  color: var(--white); font-weight: 700; font-size: 0.95rem;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.nav__links a:hover { color: var(--gold); }

/* Language toggle (EN | ES) — net-new, mirrored under /es/ */
.lang-toggle {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 700; font-size: 0.9rem; letter-spacing: 0.04em;
  border: 1px solid var(--gold); border-radius: var(--radius); overflow: hidden;
}
.lang-toggle a {
  color: var(--white); padding: 0.35rem 0.6rem; line-height: 1;
}
.lang-toggle a[aria-current="true"] { background: var(--gold); color: var(--black); }
.lang-toggle a:hover { color: var(--gold); }
.lang-toggle a[aria-current="true"]:hover { color: var(--black); }

.nav__links a[aria-current="page"] {
  color: var(--gold);
  text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px;
}

/* Mobile nav toggle */
.nav__toggle {
  display: none; flex-direction: column; gap: 5px; width: 44px; height: 40px;
  padding: 9px 8px; background: transparent; border: 1px solid var(--line);
  border-radius: var(--radius); cursor: pointer;
}
.nav__toggle span { display: block; height: 2px; background: var(--white); transition: var(--dur-fast); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  background: var(--black); padding: clamp(2rem, 5vw, 3.5rem) 0 0;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("assets/bg-hero.webp") center/cover no-repeat;
  filter: grayscale(0.35) brightness(0.55);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(0,0,0,0.82) 0%, rgba(0,0,0,0.55) 55%, rgba(0,0,0,0.42) 100%);
}
.hero__grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center; min-height: 460px;
}
.hero__copy { padding-bottom: 1.5rem; }
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 800; letter-spacing: -0.015em; line-height: 0.98;
  text-transform: uppercase; margin-bottom: 1.4rem;
}
.hero__awards {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.6rem;
}
.hero__awards-text { font-weight: 700; font-size: 1.05rem; line-height: 1.2; }
.hero__badges { display: flex; gap: 0.75rem; align-items: center; }
.hero__badges img { height: 74px; width: auto; }
.hero__points { list-style: none; margin: 0; padding: 0; }
.hero__points li {
  display: flex; align-items: center; gap: 0.7rem;
  font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 800; text-transform: uppercase;
  letter-spacing: -0.01em; margin-bottom: 0.25rem;
}
.hero__points .x { color: var(--gold); font-weight: 800; }
.hero__media { align-self: end; justify-self: center; }
.hero__media img { width: min(100%, 460px); filter: drop-shadow(0 24px 40px rgba(0,0,0,0.5)); }

/* Full-width gold CTA bar */
.cta-bar {
  display: block; background: var(--gold); color: var(--black);
  text-align: center; font-weight: 800; text-transform: uppercase;
  letter-spacing: -0.01em; line-height: 1.1;
  font-size: clamp(1.4rem, 4.2vw, 2.6rem);
  padding: clamp(0.8rem, 2vw, 1.25rem) 1rem;
}
.cta-bar:hover { background: var(--gold-deep); color: var(--black); }

/* ============================================================
   Reviews carousel
   ============================================================ */
.reviews {
  position: relative; isolation: isolate;
  background: #050505; padding: clamp(3.5rem, 7vw, 5.5rem) 0;
}
.reviews::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("assets/bg-reviews.webp") center/cover no-repeat;
}
.reviews::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,0.82), rgba(0,0,0,0.78));
}
.carousel { position: relative; overflow: hidden; }
.carousel__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: 100%;
  gap: 1.25rem; will-change: transform;
}
.review-card {
  background: rgba(20,20,20,0.72); border: 1px solid var(--line);
  border-radius: 6px; padding: 1.6rem 1.5rem; backdrop-filter: blur(2px);
}
.review-card__name { color: var(--gold); font-weight: 700; font-size: 0.95rem; margin-bottom: 0.7rem; }
.review-card__text { color: var(--white); font-size: 0.98rem; line-height: 1.55; margin: 0; }
.carousel__dots { display: flex; justify-content: center; gap: 0.55rem; margin-top: 1.6rem; }
.carousel__dot {
  width: 11px; height: 11px; border-radius: 50%; border: 0; padding: 0; cursor: pointer;
  background: rgba(255,255,255,0.35); transition: var(--dur-fast);
}
.carousel__dot.is-active { background: var(--white); }

/* ============================================================
   Bio — "Let Juan Fight For You"
   ============================================================ */
.bio { background: var(--black); }
.bio__grid {
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}
.bio__photo img { width: 100%; border-radius: 4px; }
.bio h2 {
  font-size: clamp(1.9rem, 4.5vw, 3rem); text-transform: uppercase; margin-bottom: 1.2rem;
}
.bio__text p { color: var(--muted); }
.bio__sign { color: var(--white); font-weight: 700; margin-top: 1.4rem; }
.bio__sign span { display: block; color: var(--muted); font-weight: 400; font-size: 0.92rem; }

/* ============================================================
   Services — three gold buttons
   ============================================================ */
.services { background: var(--ink); text-align: center; }
.services h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.3rem); text-transform: uppercase;
  letter-spacing: 0.02em; margin-bottom: 2rem;
}
.services__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem;
  max-width: 980px; margin: 0 auto;
}
.service-btn {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background: var(--gold); color: var(--black);
  font-weight: 800; text-transform: uppercase; letter-spacing: 0.01em;
  font-size: clamp(1rem, 2vw, 1.35rem);
  min-height: 92px; padding: 1rem; border-radius: var(--radius);
  transition: transform var(--dur-fast), background var(--dur-fast);
}
.service-btn:hover { background: var(--gold-deep); color: var(--black); transform: translateY(-3px); }

/* ============================================================
   Keyword marquee
   ============================================================ */
.marquee { background: var(--black); padding: 1.6rem 0; overflow: hidden; }
.marquee__row { display: flex; overflow: hidden; user-select: none; }
.marquee__row + .marquee__row { margin-top: 0.6rem; }
.marquee__group {
  display: flex; flex-shrink: 0; gap: 0; white-space: nowrap;
  animation: marquee 42s linear infinite;
}
.marquee__row--rev .marquee__group { animation-direction: reverse; }
.marquee__group span {
  color: var(--muted); font-weight: 600; font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  padding: 0 0.85rem;
}
.marquee__group span::after { content: "|"; color: rgba(var(--gold-rgb),0.55); margin-left: 0.85rem; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ============================================================
   Featured testimonial
   ============================================================ */
.featured {
  position: relative; isolation: isolate; text-align: center;
  padding: clamp(4rem, 9vw, 7rem) 0;
}
.featured::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background: url("assets/bg-featured.webp") center/cover no-repeat;
}
.featured::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(0,0,0,0.74), rgba(0,0,0,0.8));
}
.featured h2 {
  font-size: clamp(1.7rem, 4vw, 2.6rem); font-style: italic; text-decoration: underline;
  text-underline-offset: 6px; text-decoration-thickness: 2px; margin-bottom: 1.6rem;
}
.featured__quote {
  max-width: 880px; margin: 0 auto 1.4rem; font-size: clamp(1rem, 1.7vw, 1.18rem);
  line-height: 1.65; color: var(--white);
}
.featured__cite { color: var(--gold); font-weight: 700; font-size: 0.95rem; }

/* ============================================================
   Instagram feed
   ============================================================ */
.ig { background: var(--black); text-align: center; padding: clamp(3rem, 6vw, 4.5rem) 0; }
.ig h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.3rem); text-transform: uppercase; margin-bottom: 0.4rem;
}
.ig__handle { display: inline-block; margin-bottom: 2rem; font-weight: 700; letter-spacing: 0.05em; }
.ig__grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.75rem;
}
.ig__tile {
  position: relative; aspect-ratio: 4/5; overflow: hidden; border-radius: 4px;
  background: var(--ink-2); display: block;
}
.ig__tile img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur); }
.ig__tile:hover img { transform: scale(1.05); }
.ig__tile::after {
  content: "▶"; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.85); font-size: 1.6rem; opacity: 0.9; pointer-events: none;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--black); border-top: 3px solid var(--gold); padding: clamp(2.5rem, 5vw, 3.5rem) 0 2rem; }
.footer__grid {
  display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 2rem; align-items: start;
}
.footer__brand { font-size: 0.95rem; line-height: 1.5; }
.footer__brand strong { font-size: 1.1rem; }
.footer__brand span { color: var(--muted); display: block; }
.footer__call { text-align: center; }
.footer__call-label { font-weight: 800; text-transform: uppercase; font-size: 1.3rem; margin-bottom: 0.2rem; }
.footer__phone { display: inline-block; color: var(--gold); font-weight: 800; font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
.footer__es { color: var(--muted); font-weight: 700; margin-top: 0.6rem; }
.footer__disclaimer-link { display: inline-block; margin-top: 0.8rem; font-weight: 700; letter-spacing: 0.05em; }
.footer__social { text-align: right; }
.footer__ig {
  display: inline-flex; align-items: center; gap: 0.5rem; color: var(--gold); font-weight: 700;
}
.footer__ig svg { width: 22px; height: 22px; fill: currentColor; }
.footer__built { color: var(--muted); font-size: 0.85rem; margin-top: 1.4rem; }
.legal-disclaimer { background: var(--ink-2); border-top: 1px solid var(--line); padding: 1.25rem 0 1.5rem; }
.legal-disclaimer p { color: var(--muted); font-size: 0.8rem; line-height: 1.6; margin: 0.3rem 0; text-align: center; }

/* ============================================================
   Inner pages — practice areas
   ============================================================ */
.btn-gold {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  background: var(--gold); color: var(--black); font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.02em; font-size: 0.95rem; padding: 1rem 1.6rem; border-radius: var(--radius);
  transition: transform var(--dur-fast), background var(--dur-fast); border: 0; cursor: pointer;
}
.btn-gold:hover { background: var(--gold-deep); color: var(--black); transform: translateY(-2px); }

.page-hero { background: var(--black); padding: clamp(2.5rem, 7vw, 5.5rem) 0 clamp(3rem, 8vw, 6rem); }
.page-hero__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: start;
}
.page-hero__eyebrow { color: var(--white); font-weight: 700; font-size: clamp(1.6rem, 3.5vw, 2.4rem); line-height: 1.1; margin-bottom: 0.2rem; }
.page-hero__topic {
  display: block; color: var(--gold); font-weight: 800; text-transform: uppercase;
  font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.02; letter-spacing: -0.01em; margin-bottom: 1.5rem;
}
.page-hero__lede { color: var(--white); font-size: 1.05rem; font-weight: 600; margin-bottom: 0.4rem; }
.page-hero__lede + .page-hero__lede { margin-bottom: 1.5rem; }
.page-hero__cta { margin-top: 1.5rem; width: 100%; max-width: 420px; min-height: 64px; font-size: 1.05rem; }
.page-hero__body p { color: var(--muted); }
.page-hero__body p:first-child { margin-top: 0.4rem; }

/* Contact page */
.contact { background: var(--black); text-align: center; padding: clamp(3rem, 7vw, 5.5rem) 0; }
.contact h1 { font-size: clamp(1.8rem, 4.5vw, 3rem); text-transform: uppercase; margin-bottom: 2.5rem; }
.contact h1 .gold { color: var(--gold); text-decoration: underline; text-underline-offset: 8px; text-decoration-thickness: 2px; }
.contact__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.25rem; margin-bottom: 3rem; }
.contact__actions .btn-gold { min-width: 230px; min-height: 56px; }
.contact__info { margin: 0 auto 2.5rem; max-width: 760px; }
.contact__info h2 { color: var(--gold); text-transform: uppercase; font-size: clamp(1.3rem, 3vw, 2rem); margin-bottom: 0.4rem; }
.contact__info p { color: var(--white); font-weight: 700; margin-bottom: 0.3rem; }
.contact__info .muted { color: var(--muted); font-weight: 400; }
.contact__form {
  max-width: 520px; margin: 0 auto; background: var(--ink-2); border: 1px solid var(--line);
  border-radius: 8px; padding: clamp(1.5rem, 4vw, 2.25rem); text-align: left;
}
.contact__form h3 { text-align: center; text-transform: uppercase; font-size: 1.3rem; margin-bottom: 0.3rem; }
.contact__form .sub { text-align: center; color: var(--muted); font-size: 0.9rem; margin-bottom: 1.4rem; }
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.35rem; }
.field input {
  width: 100%; padding: 0.8rem 0.9rem; background: var(--black); color: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius); font: inherit; font-size: 1rem;
}
.field input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.contact__form .btn-gold { width: 100%; min-height: 56px; margin-top: 0.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  :root { --header-h: 76px; }
  .nav__toggle { display: flex; }
  .nav__menu {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 1.25rem;
    background: var(--black); border-bottom: 3px solid var(--gold);
    padding: 1.5rem var(--gutter); transform: translateY(-12px); opacity: 0;
    pointer-events: none; transition: var(--dur-fast);
  }
  .nav__menu.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .nav__logo { width: 158px; }

  .hero__grid { grid-template-columns: 1fr; min-height: 0; text-align: left; }
  .hero__media { order: -1; justify-self: center; }
  .hero__media img { width: min(72%, 320px); }

  .carousel__track { grid-auto-columns: 100%; }
  .bio__grid { grid-template-columns: 1fr; }
  .bio__photo { max-width: 380px; }
  .services__grid { grid-template-columns: 1fr; }
  .ig__grid { grid-template-columns: repeat(3, 1fr); }
  .footer__grid { grid-template-columns: 1fr; text-align: center; }
  .footer__brand, .footer__social { text-align: center; }

  .page-hero__grid { grid-template-columns: 1fr; }
  .page-hero__cta { max-width: none; }
}

@media (max-width: 520px) {
  .ig__grid { grid-template-columns: repeat(2, 1fr); }
  .hero__badges img { height: 60px; }
}

/* ============================================================
   Scroll-reveal (additive; fail-open if JS never runs)
   ============================================================ */
.js-anim .reveal { opacity: 0; transform: translateY(var(--rise)); }
.js-anim .reveal.is-in {
  opacity: 1; transform: none;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; }
  html { scroll-behavior: auto; }
  .marquee__group { animation: none; }
  .js-anim .reveal { opacity: 1; transform: none; }
}
