/* =============================================================================
   COUNSEL PAGES — PER-FIRM THEME FILE
   -----------------------------------------------------------------------------
   THEME FOR: Welex Lawyers — Marbella (welex.es)
   PALETTE:   Welex's real teal — sampled live from their site
              brand #189883 (teal-600) · darker #10675F · pale #E4F7F3
   ACCENT:    Warm copper #C58E2C — chosen to read against the teal without
              competing, used for CTAs, vertical-bar section heads and underlines.
   FONTS:     Pairing "Contrast" — Fraunces (display) + IBM Plex Sans (UI)
   HERO:      Archetype C "Split" — 50/50 panel (matches design seed)
   ============================================================================ */

:root {
  /* ---- 1. BRAND COLOURS ------------------------------------------------- */
  --brand:        #189883;
  --brand-700:    #10675F;
  --brand-300:    #2BB199;
  --brand-100:    #E4F7F3;

  --accent:       #C58E2C;
  --accent-700:   #A07118;
  --accent-100:   #F6EAD0;

  /* ---- 2. NEUTRALS ----------------------------------------------------- */
  --bg:           #ffffff;
  --bg-alt:       #F2F5F1;
  --surface:      #ffffff;
  --ink:          #212121;
  --ink-soft:     #69727D;
  --line:         #DEE3DF;
  --on-brand:     #F5FAF8;
  --on-brand-soft:#B7D8CF;

  /* ---- 3. TYPOGRAPHY --------------------------------------------------- */
  --font-head: 'Fraunces', 'Playfair Display', Georgia, serif;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --h1: clamp(2.5rem, 5.2vw, 4.25rem);
  --h2: clamp(1.9rem, 3.4vw, 2.85rem);
  --h3: clamp(1.25rem, 1.9vw, 1.6rem);

  /* ---- 4. SHAPE & DEPTH ------------------------------------------------ */
  --radius:      10px;
  --radius-sm:   6px;
  --radius-pill: 999px;
  --shadow-sm:  0 1px 2px rgba(16,103,95,.06), 0 2px 6px rgba(16,103,95,.05);
  --shadow-md:  0 6px 18px rgba(16,103,95,.08), 0 2px 6px rgba(16,103,95,.05);
  --shadow-lg:  0 24px 60px rgba(16,103,95,.18);

  /* ---- 5. LAYOUT ------------------------------------------------------- */
  --container: 1200px;
  --gutter:    clamp(1.1rem, 4vw, 2.5rem);
  --section-y: clamp(3.75rem, 8vw, 7rem);

  /* ---- 6. SEMANTIC MAPPING -------------------------------------------- */
  --btn-bg:        var(--brand);
  --btn-bg-hover:  var(--brand-700);
  --btn-ink:       #ffffff;
  --link:          var(--brand-700);
  --focus:         var(--accent);
}

/* ---- Hero media: subtle Welex-teal gradient on a paper ground ------ */
:root {
  --hero-img: linear-gradient(180deg, rgba(24,152,131,.06), rgba(24,152,131,.12)),
              radial-gradient(900px 480px at 12% 20%, rgba(43,177,153,.22) 0%, rgba(43,177,153,0) 60%),
              linear-gradient(135deg, #ffffff 0%, #F5FAF8 60%, #E4F7F3 100%);
}

/* =====================================================================
   WELEX-SPECIFIC TWEAKS — the design seed's "vertical bar" accent +
   "plain" cards + the bilingual EN/ES hero stripe (the wildcard).
   ===================================================================== */

/* Vertical-bar accent on section heads */
.section-head, .section .container > .section-head {
  position: relative;
  padding-left: 18px;
}
.section-head::before {
  content: "";
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  background: var(--accent);
  border-radius: 1px;
}
.section-head.center { padding-left: 0; }
.section-head.center::before { display: none; }

/* Plain cards (no icons, no shadow lift) per design seed */
.card .card__icon { display: none; }
.card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-sm);
  box-shadow: none;
  padding: 1.6rem 1.4rem;
  transition: border-color 160ms ease;
}
.card:hover {
  border-color: var(--brand-300);
  transform: none;
  box-shadow: none;
}
.card h3 {
  margin-top: 0;
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: -0.005em;
}

/* Plain cards in the process row (numbered): keep the numerals visible */
section[id="why"] .card .card__icon,
section.section--alt .card .card__icon {
  display: inline-block;
  background: var(--brand-100);
  color: var(--brand-700);
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-weight: 600;
  margin-bottom: 14px;
}

/* The bilingual EN/ES hero stripe — the "wildcard" signature move */
.bilingual-stripe {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 22px 24px;
  background: var(--brand-100);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius-sm);
  margin-top: 28px;
  font-family: var(--font-body);
}
.bilingual-stripe > div { font-size: .98rem; line-height: 1.55; color: var(--ink); }
.bilingual-stripe .lang-label {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-700);
  font-weight: 600;
  margin-bottom: 6px;
}
@media (max-width: 720px) {
  .bilingual-stripe { grid-template-columns: 1fr; gap: 16px; padding: 18px; }
}

/* Brand wordmark in the header */
.brand span {
  font-family: var(--font-head);
  font-weight: 500;
  letter-spacing: -0.01em;
}
.brand small {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7em;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-700);
}

/* =====================================================================
   MOBILE OVERFLOW GUARD
   ---------------------------------------------------------------------
   base.css's mobile nav drawer uses `position: fixed; transform:
   translateX(100%)` to slide in from the right — but the transformed
   fixed element still contributes ~320px to document.scrollWidth, which
   produces a horizontal scrollbar on every mobile viewport. Belt and
   braces: hard-pin the drawer offscreen with `right` + clip it from
   layout overflow, AND set overflow-x: clip on the html/body for safety.
   ===================================================================== */
html, body { overflow-x: clip; max-width: 100%; }

@media (max-width: 960px) {
  .nav__links {
    /* Replace base.css transform with a right-offset + visibility gate */
    transform: none;
    right: calc(0px - min(320px, 82vw));
    transition: right .3s ease, visibility 0s linear .3s;
    visibility: hidden;
  }
  .nav__links.open {
    right: 0;
    visibility: visible;
    transition: right .3s ease;
  }
}

/* =====================================================================
   HERO — custom layout for Welex (overrides base.css hero-a defaults)
   ===================================================================== */

/* Push the hero clear of the sticky masthead + preview bar */
.hero { padding-top: 1rem; }
.hero__bg {
  background:
    radial-gradient(900px 480px at 10% 18%, rgba(43,177,153,.20) 0%, rgba(43,177,153,0) 60%),
    radial-gradient(700px 380px at 95% 100%, rgba(197,142,44,.10) 0%, rgba(197,142,44,0) 60%),
    linear-gradient(180deg, #ffffff 0%, #F5FAF8 60%, #E4F7F3 100%);
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.hero__inner .bilingual-stripe { grid-column: 1 / -1; margin-top: 1rem; }

@media (max-width: 880px) {
  .hero__inner { grid-template-columns: 1fr; gap: 2.5rem; }
}

.hero__text .eyebrow {
  color: var(--brand-700);
  letter-spacing: 0.16em;
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
}
.hero h1 {
  color: var(--brand-700);
  font-family: var(--font-head);
  font-weight: 500;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 1rem 0 1.2rem;
  max-width: 18ch;
  text-wrap: balance;
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--brand);
}
.hero .lede {
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.4vw, 1.18rem);
  line-height: 1.6;
  margin: 0 0 1.6rem;
  max-width: 46ch;
}
.hero__cta {
  display: flex; flex-wrap: wrap; gap: .9rem;
  margin: 0 0 1.6rem;
}
.hero__trust {
  display: flex; flex-wrap: wrap; gap: .5rem 1.4rem;
  list-style: none; padding: 0; margin: 0;
  color: var(--ink-soft); font-size: .92rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}
.hero__trust li { display: inline-flex; align-items: center; gap: .5rem; }
.hero__trust svg { width: 1.05em; height: 1.05em; color: var(--brand); flex: 0 0 auto; }

/* Outline button (used in hero for phone CTA) */
.btn--outline {
  background: transparent;
  color: var(--brand-700);
  border: 1.5px solid var(--brand);
}
.btn--outline:hover {
  background: var(--brand-100);
  color: var(--brand-700);
}
.btn--lg { padding: .9rem 1.4rem; font-size: 1.02rem; }

/* ----- Preview card (the right column) ----- */
.hero__preview {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 18px 60px -28px rgba(16,103,95,.25), 0 2px 8px rgba(16,103,95,.05);
}
.hero__preview-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
}
.hero__preview-bar .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: #D5DAD3;
}
.hero__preview-bar .url {
  margin-left: 10px; flex: 1;
  padding: 6px 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px; color: var(--ink-soft);
}
.hero__preview-body { padding: 1.6rem 1.6rem 1.4rem; }
.hero__preview-eyebrow {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 .6rem;
  font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 600; color: var(--brand-700);
}
.hero__preview-eyebrow .bar {
  display: inline-block; width: 22px; height: 1px; background: var(--accent);
}
.hero__preview-stars {
  display: flex; align-items: center; gap: .65rem;
  color: var(--accent);
  font-size: 1.15rem;
  letter-spacing: 2px;
}
.hero__preview-stars span {
  font-family: var(--font-head); font-weight: 500; color: var(--brand-700);
  font-size: 1.75rem; letter-spacing: -0.01em;
}
.hero__preview-count {
  margin: .4rem 0 0; font-size: .88rem; color: var(--ink-soft);
}
.hero__preview-rule {
  border: 0; border-top: 1px solid var(--line);
  margin: 1.1rem 0 1rem;
}
.hero__preview-quote {
  margin: 0;
  font-family: var(--font-head);
  font-style: italic;
  font-size: 1.02rem;
  line-height: 1.5;
  color: var(--ink);
}
.hero__preview-cite {
  margin: .8rem 0 0;
  font-size: .82rem;
  color: var(--ink-soft);
  font-family: ui-monospace, Menlo, monospace;
  letter-spacing: 0.02em;
}

/* ----- Language switcher (fix the EN ES NL stacking) ----- */
.lang { display: inline-flex; align-items: center; gap: 4px; }
.lang a, .lang span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 28px; padding: 0 8px;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--ink-soft);
  background: transparent;
}
.lang a[aria-current="true"] {
  background: var(--brand);
  color: #ffffff;
}
.lang a:hover { background: var(--brand-100); color: var(--brand-700); }
.lang__soon {
  opacity: .45;
  cursor: not-allowed;
}

/* ----- Trust band tweaks (dark teal) ----- */
.trustband {
  background: var(--brand-700);
  color: var(--on-brand);
}
.trustband__inner {
  display: flex; flex-wrap: wrap; gap: 1.4rem 2.4rem;
  padding: 1.1rem clamp(1.1rem, 4vw, 2.5rem);
  justify-content: center;
  font-size: .92rem;
}
.trustband__inner span { display: inline-flex; align-items: center; gap: .55rem; }
.trustband__inner svg { width: 1.05em; height: 1.05em; color: var(--accent); flex: 0 0 auto; }
.trustband__inner strong { color: #ffffff; font-weight: 600; }

/* ----- Masthead polish ----- */
.site-header {
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .nav { padding-block: .9rem; }
.brand__logo { border-radius: 6px; }

/* Single-line footer treatment */
.site-footer { padding-top: 3rem; padding-bottom: 1.5rem; }
.site-footer .footer__grid {
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}
.site-footer .footer__brand { justify-self: center; }
.site-footer .footer__cols {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1.6rem;
  font-size: .9rem;
}
