/* ============================================================
   The Litigants LLP — Stylesheet
   Primary palette derived from the firm's seal (#760d0d)
   ============================================================ */

:root {
  /* Brand maroon (sampled from logo) and derived shades */
  --maroon-900: #3f0606;
  --maroon-800: #5a0909;
  --maroon-700: #760d0d;   /* logo colour: primary */
  --maroon-600: #8d1414;
  --maroon-500: #a52222;
  --maroon-100: #f3e3e3;
  --maroon-50:  #faf1f1;

  /* Neutrals: warm ivory + charcoal */
  --ivory:      #fbf8f3;
  --ivory-2:    #f4eee5;
  --sand:       #e7dfd2;
  --ink:        #1d1b19;
  --ink-2:      #3d3935;
  --muted:      #6b645d;
  --line:       #e3dcd1;
  --white:      #ffffff;
  --surface:    #ffffff;                      /* cards, forms, panels */
  --header-bg:  rgba(251, 248, 243, .92);
  --placeholder: #b3aa9d;
  --accent: var(--maroon-700);               /* the brand red as text; lighter in the dark theme */
  --accent-hover: var(--maroon-900);         /* hovered links: darker in light, brighter in dark */
  --glow-rgb: 118, 13, 13;                   /* hover glows and focus rings */
  color-scheme: light;

  --font-heading: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-logo:    Arial, "Helvetica Neue", Helvetica, sans-serif;  /* matches the lettering on the seal */
  --font-sans:    "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --radius: 16px;      /* cards, panels, map */
  --radius-sm: 10px;   /* buttons, inputs */
  --shadow-sm: 0 1px 2px rgba(29, 27, 25, .06), 0 2px 8px rgba(29, 27, 25, .05);
  --shadow-md: 0 8px 24px rgba(63, 6, 6, .10);
  --container: 1180px;
  --header-h: 80px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--ivory); }

html, body { overflow-x: hidden; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: clamp(15px, 0.5vw + 13.5px, 16px);
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--ink); margin: 0 0 .5em; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; }
p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 24px);
}

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--maroon-700); color: #fff; padding: 8px 14px; z-index: 1000; border-radius: var(--radius-sm);
}
.skip-link:focus { left: 8px; }

/* ---------- Typography helpers ---------- */
.eyebrow {
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 28px; height: 1px;
  background: var(--maroon-700);
  vertical-align: middle;
  margin-right: 12px;
}

.section__title {
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -.025em;
  margin-bottom: 18px;
}
.section__lead { font-size: clamp(16.5px, 1.3vw, 19px); color: var(--muted); max-width: 640px; margin: 0 auto; }
.section__head { text-align: center; max-width: 760px; margin: 0 auto clamp(32px, 5vw, 56px); }
.section__head--left { text-align: left; margin-left: 0; }
.section__head--left .section__lead { margin-left: 0; }
.section__head .eyebrow::before { display: none; }
.section__head--left .eyebrow::before { display: inline-block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 22px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .02em;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .12s ease;
  white-space: nowrap; position: relative;
}
/* Hover is a quiet colour change; the only movement is a slight press on click */
.btn:active { transform: scale(.985); }
.btn--lg { padding: 15px 28px; font-size: 16px; }
.btn--block { width: 100%; }
.btn--primary { background: var(--maroon-700); color: #fff; }
.btn--primary:hover { background: var(--maroon-800); color: #fff; }
.btn--ghost { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn--ghost:hover { background: var(--maroon-50); color: var(--accent-hover); }
/* Light buttons sit on maroon in both themes, so their colours are fixed rather than themed */
.btn--light { background: #fff; color: #760d0d; }
.btn--light:hover { background: #f4eee5; color: #3f0606; }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn--outline-light:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--maroon-900);
  color: rgba(255,255,255,.85);
  font-size: 13.5px;
  letter-spacing: .02em;
}
.topbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 38px; gap: 16px; flex-wrap: wrap; padding-top: 6px; padding-bottom: 6px;
}
.topbar__contacts { display: flex; gap: 22px; }
.topbar a { color: rgba(255,255,255,.85); }
.topbar a:hover { color: #fff; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .25s ease, transform .35s cubic-bezier(.4, 0, .2, 1);
}
.header.is-scrolled { box-shadow: var(--shadow-sm); }
.header.is-hidden { transform: translateY(-100%); }
.header__inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: var(--header-h);
}
.brand { display: flex; align-items: center; gap: 14px; color: var(--ink); flex-shrink: 0; }
.brand__logo { width: 52px; height: 52px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name {
  font-family: var(--font-logo); font-size: 20px; font-weight: 700; color: var(--accent);
  letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
}
.brand__suffix { font-family: var(--font-logo); font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); margin-top: 5px; }

.nav { display: flex; align-items: center; gap: 28px; }
.nav__list { display: flex; gap: 28px; }
.nav__list a {
  font-weight: 500; font-size: 15.5px; color: var(--ink-2);
  padding: 6px 0; position: relative; white-space: nowrap;
}
.nav__list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--maroon-700); transform: scaleX(0); transform-origin: left;
  transition: transform .25s ease;
}
.nav__list a:hover::after, .nav__list a.is-active::after { transform: scaleX(1); }
.nav__list a.is-active { color: var(--accent); }

.nav__contact { display: none; }

.nav__cta--icon { gap: 8px; }
.nav__cta--icon svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.nav-toggle {
  display: none; background: none; border: 0; padding: 8px; cursor: pointer;
  flex-direction: column; gap: 5px;
}
.nav-toggle span { display: block; width: 26px; height: 2px; background: var(--maroon-700); transition: transform .25s, opacity .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(var(--glow-rgb), .08), transparent 55%),
    linear-gradient(180deg, var(--ivory) 0%, var(--ivory-2) 100%);
  border-bottom: 1px solid var(--line);
}
.hero__watermark {
  position: absolute; right: -160px; bottom: -220px; width: 720px; opacity: .05; pointer-events: none;
  animation: spinSlow 160s linear infinite;
}
.hero__inner {
  display: grid; grid-template-columns: 1fr; align-items: center;
  min-height: min(calc(100vh - var(--header-h) - 38px), 720px);
  padding-top: 88px; padding-bottom: 88px;
}
.hero__content { max-width: 760px; }
.hero__title {
  font-size: clamp(34px, 4.6vw, 58px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 22px;
}
.hero__lead { font-size: clamp(16px, 1.2vw, 18px); color: var(--muted); max-width: 600px; margin-bottom: 34px; font-weight: 400; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 104px) 0; }
.section--tint { background: var(--ivory-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* About */
/* About: a full-bleed split. Deep maroon panel on the left, numbered points on ivory on the right.
   --about-gutter lines the text up with the rest of the site's container on wide screens. */
.about {
  --about-gutter: max(clamp(18px, 4vw, 24px), calc((100vw - var(--container)) / 2 + 24px));
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--ivory);
}
.about__panel {
  position: relative; overflow: hidden; isolation: isolate; color: #fff;
  padding: clamp(64px, 8vw, 116px) clamp(32px, 5vw, 80px) clamp(64px, 8vw, 116px) var(--about-gutter);
  background: linear-gradient(155deg, #4f0b0b 0%, #430808 45%, #2f0505 100%);   /* deep oxblood: the logo maroon is too bright over an area this large */
}
.about__seal {                                      /* the firm's seal, faint, tucked into the corner */
  position: absolute; z-index: -1; left: -120px; bottom: -160px; width: 520px; aspect-ratio: 1880 / 1889;
  background: #fff; opacity: .05; pointer-events: none;
  -webkit-mask: url("../assets/litigants-logo.png") center / contain no-repeat;
          mask: url("../assets/litigants-logo.png") center / contain no-repeat;
}
.about__panel-inner { max-width: 560px; }
.about__panel .eyebrow { color: rgba(255, 255, 255, .78); }
.about__panel .eyebrow::before { background: rgba(255, 255, 255, .6); }
.about__panel .reveal.is-visible .eyebrow::before { width: 28px; }
.about__panel .section__title { color: #fff; margin-bottom: 22px; }
.about__lead { margin: 0 0 30px; font-size: clamp(15.5px, 1.2vw, 17px); line-height: 1.75; color: rgba(255, 255, 255, .84); }
.about__quote { margin: 0 0 36px; padding-left: 20px; border-left: 2px solid rgba(255, 255, 255, .45); }
.about__quote p { margin: 0; font-family: var(--font-heading); font-size: clamp(16px, 1.3vw, 18px); font-weight: 500; font-style: italic; line-height: 1.55; color: #fff; }

.about__points { padding: clamp(56px, 7vw, 104px) var(--about-gutter) clamp(56px, 7vw, 104px) clamp(32px, 5vw, 80px); display: flex; flex-direction: column; justify-content: center; }
.about__list { margin: 0; padding: 0; list-style: none; counter-reset: none; }
.point { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px 20px; padding: 26px 0; border-top: 1px solid var(--line); }
.point:first-child { border-top: 0; padding-top: 0; }
.point__num { font-family: var(--font-heading); font-size: 30px; font-weight: 600; line-height: 1.1; letter-spacing: -.03em; color: var(--accent); font-variant-numeric: tabular-nums; }
.point h3 { font-size: 19px; margin: 2px 0 8px; letter-spacing: -.015em; }
.point p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--muted); max-width: 520px; }
.about__creds { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; padding-top: 26px; border-top: 1px solid var(--line); }
.about__creds li { padding: 6px 13px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--accent); background: var(--maroon-50); border: 1px solid var(--maroon-100); }

.checklist { margin-top: 26px; display: grid; gap: 12px; }
.checklist li { padding-left: 32px; position: relative; font-weight: 500; color: var(--ink); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--maroon-700) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 12px 12px no-repeat;
}

/* Practice cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  --mx: 50%; --my: 50%;            /* pointer position, set from js/main.js */
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  background: linear-gradient(160deg, var(--surface) 0%, var(--ivory) 100%);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 28px 26px; min-height: 100%;
}

/* Hover: the card stays still and a soft light follows the pointer */
.card::before {                     /* glow */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(340px circle at var(--mx) var(--my), rgba(var(--glow-rgb), .10), transparent 65%);
  opacity: 0; transition: opacity .45s ease;
}
.card::after {                      /* border that lights up near the pointer */
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  border-radius: inherit; padding: 1.5px;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(var(--glow-rgb), .85), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
          mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .45s ease;
}
.card:hover::before, .card:hover::after { opacity: 1; }
.card > * { position: relative; z-index: 1; }

.card__index {
  position: absolute; top: 14px; right: 20px;
  font-family: var(--font-heading); font-weight: 700; font-size: 64px; line-height: 1; letter-spacing: -.04em;
  color: rgba(var(--glow-rgb), .07);
  -webkit-text-stroke: 1.5px rgba(var(--glow-rgb), 0);
  transition: color .5s ease, -webkit-text-stroke-color .5s ease;
}
.card:hover .card__index { color: rgba(var(--glow-rgb), 0); -webkit-text-stroke-color: rgba(var(--glow-rgb), .38); }

.card__icon {
  width: 52px; height: 52px; border-radius: 14px; background: var(--maroon-700);
  display: grid; place-items: center; margin-bottom: 22px;
  box-shadow: 0 8px 18px -6px rgba(var(--glow-rgb), .45);
}
.card__icon svg { width: 26px; height: 26px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.card h3 { font-size: 20px; margin-bottom: 8px; color: var(--ink); transition: color .4s ease; }
.card:hover h3 { color: var(--accent); }
.card p { margin: 0 0 22px; color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.card__link {
  margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding-bottom: 3px;
  font-size: 13.5px; font-weight: 600; letter-spacing: .02em; color: var(--accent);
  background: linear-gradient(currentColor, currentColor) left bottom / 0 1.5px no-repeat;
  transition: background-size .5s cubic-bezier(.2, .7, .2, 1), color .3s ease;
}
.card:hover .card__link { background-size: 100% 1.5px; }
.card__link:hover { color: var(--accent-hover); }
.card__link svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Further practice areas */
.more-areas { margin-top: clamp(56px, 7vw, 96px); }
.more-areas__head { max-width: 640px; margin-bottom: 8px; }
.more-areas__head h3 { font-size: clamp(21px, 2vw, 27px); margin-bottom: 8px; }
.more-areas__head p { color: var(--muted); margin: 0; }
.area-list {
  display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(32px, 5vw, 72px);
  border-top: 1px solid var(--line); margin-top: 24px;
}
.area {
  display: grid; grid-template-columns: 34px 40px 1fr 32px; align-items: center; column-gap: 14px;
  padding: 18px 0; border-bottom: 1px solid var(--line); position: relative;
  transition: padding-left .3s cubic-bezier(.2, .7, .2, 1);
}
.area::before {
  content: ""; position: absolute; left: -16px; top: 12px; bottom: 12px; width: 3px; border-radius: 3px;
  background: var(--maroon-700); transform: scaleY(0); transition: transform .3s cubic-bezier(.2, .7, .2, 1);
}
.area:hover { padding-left: 6px; }
.area:hover::before { transform: scaleY(1); }
.area__num { font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--accent); opacity: .7; }
.area__icon {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--maroon-100); background: var(--surface);
  display: grid; place-items: center; transition: background .3s ease, border-color .3s ease, transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.area__icon svg { width: 19px; height: 19px; fill: none; stroke: var(--maroon-700); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s ease; }
.area:hover .area__icon { background: var(--maroon-700); border-color: var(--accent); transform: scale(1.06); }
.area:hover .area__icon svg { stroke: #fff; }
.area__body { display: block; min-width: 0; }
.area__title { display: block; font-family: var(--font-heading); font-size: 15.5px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.area__desc { display: block; font-size: 13.5px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.area__go {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--accent);
  opacity: 0; transform: translateX(-6px); transition: opacity .3s ease, transform .3s ease, background .3s ease;
}
.area__go svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.area:hover .area__go { opacity: 1; transform: none; }
.area__go:hover { background: var(--maroon-50); }
.footer__more { font-weight: 600; }

/* Sectors */
.sectors { background: var(--ivory); overflow: hidden; }
.sectors__head { text-align: center; max-width: 720px; margin: 0 auto clamp(32px, 5vw, 52px); }
.sectors__head .eyebrow::before { display: none; }
.sectors__head .section__title { margin-bottom: 14px; }
.sectors__lead { color: var(--muted); margin: 0 auto; max-width: 560px; }
.sectors__cta { text-align: center; margin-top: clamp(28px, 4vw, 44px); }

/* Infinite horizontal scroller */
.marquee-group { display: grid; gap: 16px; }
.marquee {
  --gap: 16px;
  overflow-x: auto; scrollbar-width: none;         /* fallback: swipeable row */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
}
.marquee::-webkit-scrollbar { display: none; }
.marquee__track { display: flex; gap: var(--gap); width: max-content; padding: 6px var(--gap); }
.marquee.is-ready { overflow: hidden; }
.marquee.is-ready .marquee__track { padding-left: 0; padding-right: 0; animation: marquee var(--marquee-duration, 60s) linear infinite; will-change: transform; }
.marquee--reverse.is-ready .marquee__track { animation-direction: reverse; }
.marquee:hover .marquee__track, .marquee:focus-within .marquee__track { animation-play-state: paused; }
/* The track holds two identical halves; one half plus half a gap is exactly one loop */
@keyframes marquee { to { transform: translateX(calc(-50% - var(--gap) / 2)); } }

.sector {
  flex: 0 0 auto; width: 300px; display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  transition: background .3s ease, border-color .3s ease;
}
.sector:hover { background: var(--maroon-50); border-color: var(--maroon-100); }
.sector__icon {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--maroon-50); border: 1px solid var(--maroon-100); transition: background .3s ease, border-color .3s ease;
}
.sector__icon svg { width: 22px; height: 22px; fill: none; stroke: var(--maroon-700); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: stroke .3s ease; }
.sector:hover .sector__icon { background: var(--maroon-700); border-color: var(--accent); }
.sector:hover .sector__icon svg { stroke: #fff; }
.sector__body { display: block; min-width: 0; }
.sector__name { display: block; font-family: var(--font-heading); font-weight: 600; font-size: 15.5px; color: var(--ink); line-height: 1.3; letter-spacing: -.01em; }
.sector__desc { display: block; font-size: 13px; color: var(--muted); line-height: 1.5; margin-top: 3px; }

/* Team */
.team { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.member {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 3vw, 36px); display: flex; flex-direction: column; gap: 18px;
}
.member__head { display: flex; align-items: center; gap: 18px; }
.member__avatar {
  flex: 0 0 auto; width: 76px; height: 76px; border-radius: 50%;
  background: linear-gradient(145deg, var(--maroon-600), var(--maroon-900));
  color: #fff; font-family: var(--font-heading); font-size: 24px; font-weight: 600;
  display: grid; place-items: center; letter-spacing: .04em;
  box-shadow: 0 6px 16px rgba(63, 6, 6, .25);
  transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s ease;
}
.member { transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease; }
.member:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--maroon-100); }
.member:hover .member__avatar { transform: scale(1.06) rotate(-3deg); box-shadow: 0 10px 22px rgba(63, 6, 6, .35); }
.member__name { font-size: clamp(20px, 1.7vw, 24px); margin-bottom: 2px; }
.member__role { color: var(--accent); font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; margin: 0; }
.member__body p { font-size: 15px; color: var(--ink-2); }
.member__body p:last-of-type { margin-bottom: 0; }
.member__creds { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line); display: grid; gap: 6px; }
.member__creds li { font-size: 14.5px; color: var(--muted); padding-left: 16px; position: relative; }
.member__creds li::before { content: "\2014"; position: absolute; left: 0; color: var(--accent); }

/* CTA band */
.cta-band {
  background:
    radial-gradient(ellipse at 10% 50%, rgba(255,255,255,.08), transparent 50%),
    linear-gradient(120deg, var(--maroon-800), var(--maroon-700) 45%, var(--maroon-600) 70%, var(--maroon-800));
  background-size: 100% 100%, 220% 220%;
  color: #fff; padding: 72px 0;
  animation: gradientDrift 14s ease-in-out infinite alternate;
}
.cta-band__inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.cta-band h2 { color: #fff; font-size: clamp(24px, 2.8vw, 34px); margin-bottom: 8px; }
.cta-band p { margin: 0; opacity: .9; font-size: 16px; max-width: 560px; }
.cta-band__actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Contact */
.contact__grid {
  display: grid; grid-template-columns: 1fr 1fr; grid-template-areas: "info form" "map form";
  column-gap: 64px; row-gap: 8px; align-items: start;
}
.contact__info { grid-area: info; }
.contact__map { grid-area: map; }
.contact__form-wrap { grid-area: form; }
.contact__list { display: grid; gap: 22px; margin: 0 0 24px; }
.contact__list dt { font-size: 12.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 4px; }
.contact__list dd { margin: 0; font-size: 16px; color: var(--ink); }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.map iframe { width: 100%; height: 300px; border: 0; display: block; }

.form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 40px; box-shadow: var(--shadow-md); position: relative;
}
.form__title { font-size: 23px; margin-bottom: 6px; }
.form__note { font-size: 14px; color: var(--muted); margin-bottom: 26px; }
.form__row { margin-bottom: 18px; }
.form__row--2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  padding: 12px 14px; border: 1px solid var(--sand); border-radius: var(--radius-sm); background: var(--ivory);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.form textarea { resize: vertical; min-height: 120px; }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--accent); background: var(--surface);
  box-shadow: 0 0 0 3px rgba(var(--glow-rgb), .12);
}
.form input.is-invalid, .form textarea.is-invalid { border-color: #b3261e; }
.form__status { margin: 14px 0 0; font-size: 14.5px; min-height: 1.4em; color: var(--accent); font-weight: 500; }

/* Mobile quick-action bar */

/* Footer */
.footer { background: var(--maroon-900); color: rgba(255,255,255,.78); padding-top: 72px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 48px; }
.footer__brand { display: flex; gap: 18px; align-items: flex-start; }
.footer__logo { width: 72px; height: 72px; filter: brightness(0) invert(1); opacity: .9; }
.footer__name { font-family: var(--font-logo); font-size: 19px; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin: 0 0 6px; font-weight: 700; white-space: nowrap; }
.footer__tag { margin: 0; font-style: italic; font-family: var(--font-heading); font-size: 15px; font-weight: 400; }
.footer h4 { color: #fff; font-family: var(--font-sans); font-size: 13px; letter-spacing: .16em; text-transform: uppercase; margin-bottom: 16px; }
.footer__col ul { display: grid; gap: 8px; }
.footer a { color: rgba(255,255,255,.78); }
.footer a:hover { color: #fff; }
.footer address { font-style: normal; line-height: 1.8; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding-top: 24px; padding-bottom: 28px;
  font-size: 13.5px; color: rgba(255,255,255,.6);
}
.footer__bottom p { margin: 0 0 6px; }



/* ---------- Verify a notarial certificate ---------- */
.verify { background: var(--ivory); }
.verify__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.verify__intro p { font-size: 16px; }
.verify-form { display: grid; gap: 16px; text-align: left; }
.verify-form--card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 3vw, 36px); box-shadow: var(--shadow-md); }
.verify-form h3 { font-size: 22px; margin: 0; }
.verify-form label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.verify-form input {
  width: 100%; font: inherit; font-size: 16px; font-weight: 400; color: var(--ink); letter-spacing: .04em; text-transform: uppercase;
  padding: 13px 14px; border: 1px solid var(--sand); border-radius: var(--radius-sm); background: var(--ivory);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.verify-form input::placeholder { color: var(--placeholder); letter-spacing: .04em; }
.verify-form input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px rgba(var(--glow-rgb), .12); }
.verify-form__note { margin: 0; font-size: 13.5px; color: var(--muted); text-align: center; }

.verify-page {
  flex: 1; display: grid; align-items: start;
  background: radial-gradient(ellipse at 50% 0%, rgba(var(--glow-rgb), .07), transparent 60%), linear-gradient(180deg, var(--ivory) 0%, var(--ivory-2) 100%);
}
.verify-page__inner { padding-top: clamp(36px, 6vw, 72px); padding-bottom: clamp(48px, 7vw, 96px); }
.verify-card {
  --tone: var(--maroon-700); --tone-bg: var(--maroon-50);
  max-width: 760px; margin: 0 auto; text-align: center; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: clamp(26px, 4vw, 48px); box-shadow: var(--shadow-md);
  animation: heroIn .8s cubic-bezier(.2, .7, .2, 1) both;
}
.verify-card--ok { --tone: #1f7a4d; --tone-bg: #e7f4ed; }
.verify-card--warn { --tone: #9a5b00; --tone-bg: #fdf1dc; }
.verify-card--bad { --tone: #b3261e; --tone-bg: #fbe9e7; }
.verify-card .eyebrow::before { display: none; }
.verify-card__badge { width: 84px; height: 84px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: var(--tone-bg); }
.verify-card__badge svg { width: 42px; height: 42px; fill: none; stroke: var(--tone); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.verify-card__status { margin: 0 0 6px; font-size: 13px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--tone); }
.verify-card h1 { font-size: clamp(26px, 3.6vw, 38px); margin-bottom: 14px; letter-spacing: -.02em; }
.verify-card__lead { max-width: 600px; margin: 0 auto 26px; color: var(--ink-2); font-size: 16px; }
.verify-card__note { margin: 24px auto 0; max-width: 620px; font-size: 14px; color: var(--muted); }
.verify-card .verify-form { max-width: 420px; margin: 0 auto; }
/* Authentic result, styled like a certificate: a repeating seal watermark behind the
   details, a fine double rule inside the card edge, and ruled lines instead of striped boxes. */
.verify-card--proof { position: relative; overflow: hidden; isolation: isolate; padding: clamp(34px, 5vw, 60px) clamp(26px, 5vw, 60px); }
.verify-card--proof > :not(.verify-card__watermark) { position: relative; z-index: 1; }
.verify-card--proof::before, .verify-card--proof::after {
  content: ""; position: absolute; z-index: 0; pointer-events: none; border: 1px solid rgba(var(--glow-rgb), .16);
}
.verify-card--proof::before { inset: 10px; border-radius: calc(var(--radius) - 5px); }
.verify-card--proof::after { inset: 14px; border-radius: calc(var(--radius) - 8px); border-color: rgba(var(--glow-rgb), .08); }

/* The watermark: small seals repeated in staggered diagonal rows across the whole card, like
   security paper. It reads as texture, never competes with the text, and works at any card size. */
.verify-card__watermark {
  position: absolute; z-index: 0; inset: -60%; transform: rotate(-24deg); pointer-events: none;
  background: var(--maroon-700); opacity: .06;
  -webkit-mask: url("../assets/watermark-tile.png") 0 0 / 220px 220px repeat;
          mask: url("../assets/watermark-tile.png") 0 0 / 220px 220px repeat;
}

.verify-card__rule { display: flex; align-items: center; justify-content: center; gap: 14px; max-width: 300px; margin: 0 auto 28px; }
.verify-card__rule span { flex: 1; height: 1px; background: linear-gradient(90deg, rgba(var(--glow-rgb), 0), rgba(var(--glow-rgb), .35)); }
.verify-card__rule span:last-child { background: linear-gradient(90deg, rgba(var(--glow-rgb), .35), rgba(var(--glow-rgb), 0)); }
.verify-card__rule i { width: 7px; height: 7px; transform: rotate(45deg); background: var(--maroon-700); opacity: .55; }

.verify-card--proof .verify-card__lead { margin-bottom: 22px; }
.verify-card--proof .verify-details { border: 0; border-radius: 0; overflow: visible; background: transparent; border-top: 1px solid rgba(var(--glow-rgb), .18); }
.verify-card--proof .verify-details > div { padding: 15px 4px; background: transparent; border-bottom: 1px solid rgba(var(--glow-rgb), .12); }
.verify-card--proof .verify-details > div:nth-child(odd) { background: transparent; }
.verify-card--proof .verify-details > div:last-child { border-bottom: 1px solid rgba(var(--glow-rgb), .18); }
.verify-card--proof .verify-details dt { color: var(--accent); opacity: .8; }
.verify-details { margin: 0; text-align: left; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.verify-details > div { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.verify-details > div:last-child { border-bottom: 0; }
.verify-details > div:nth-child(odd) { background: var(--ivory); }
.verify-details dt { font-size: 12.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.verify-details dd { margin: 0; color: var(--ink); font-size: 15px; }
.verify-details ul { display: grid; gap: 6px; }
.verify-details li { position: relative; padding-left: 14px; }
.verify-details li::before { content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--tone); }

/* ---------- 404 page ---------- */
.page-404 { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.notfound {
  flex: 1; position: relative; overflow: hidden; display: grid; align-items: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(var(--glow-rgb), .08), transparent 60%),
    linear-gradient(180deg, var(--ivory) 0%, var(--ivory-2) 100%);
}
.notfound__watermark {
  position: absolute; left: 50%; top: 50%; width: min(900px, 140vw); margin: calc(min(900px, 140vw) / -2) 0 0 calc(min(900px, 140vw) / -2);
  opacity: .035; pointer-events: none; animation: spinSlow 200s linear infinite;
}
.notfound__inner { position: relative; text-align: center; padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(56px, 8vw, 104px); }
.notfound__inner > * { opacity: 0; animation: heroIn .9s cubic-bezier(.2, .7, .2, 1) both; }
.notfound__inner > :nth-child(1) { animation-delay: .05s; }
.notfound__inner > :nth-child(2) { animation-delay: .2s; }
.notfound__inner > :nth-child(3) { animation-delay: .3s; }
.notfound__inner > :nth-child(4) { animation-delay: .42s; }
.notfound__inner > :nth-child(5) { animation-delay: .54s; }
.notfound__inner > :nth-child(6) { animation-delay: .68s; }

.notfound__code {
  display: inline-flex; align-items: center; justify-content: center; gap: clamp(6px, 1.5vw, 16px); margin: 0 0 22px;
  font-family: var(--font-heading); font-weight: 700; line-height: 1; letter-spacing: -.04em;
  font-size: clamp(96px, 20vw, 200px); color: var(--accent);
}
.notfound__code img {
  width: clamp(84px, 17vw, 172px); height: auto;
  filter: drop-shadow(0 18px 30px rgba(63, 6, 6, .22));
  animation: floatY 6s ease-in-out infinite, sealTurn 14s ease-in-out infinite;
}
.notfound__eyebrow::before { display: none; }
.notfound__title { font-size: clamp(26px, 3.6vw, 44px); letter-spacing: -.03em; margin-bottom: 14px; }
.notfound__title em { font-style: italic; color: var(--accent); }
.notfound__lead { max-width: 560px; margin: 0 auto 30px; color: var(--muted); font-size: clamp(15px, 1.2vw, 17px); }
.notfound__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-bottom: 34px; }
.notfound__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 12px; }
.notfound__links a {
  display: inline-block; padding: 8px 16px; border-radius: 999px; font-size: 14px; font-weight: 500;
  background: var(--surface); border: 1px solid var(--maroon-100); color: var(--ink-2);
  transition: background .25s ease, color .25s ease, border-color .25s ease, transform .25s ease;
}
.notfound__links a:hover { background: var(--maroon-700); border-color: var(--accent); color: #fff; }
.footer--slim { padding-top: 0; }
.footer--slim .footer__bottom { border-top: 0; text-align: center; }
@keyframes floatY { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes sealTurn { 0%, 100% { rotate: -6deg; } 50% { rotate: 6deg; } }

/* ---------- Dark theme: chosen in the footer, or the system setting when nothing is chosen (js/theme.js) ---------- */
:root[data-theme="dark"] {
  --maroon-900: #3a1715; --maroon-800: #6a2b28; --maroon-700: #8a3d38; --maroon-600: #9a4741; --maroon-500: #c06a62;
  --maroon-100: #43302f; --maroon-50: #2f2526;
  --ivory: #1c1b1e; --ivory-2: #222125; --sand: #2e2c31; --ink: #e4dfd8; --ink-2: #c3bdb5; --muted: #8f8982; --line: #343238;
  --surface: #242327; --header-bg: rgba(28, 27, 30, .9); --placeholder: #6d675f;
  --accent: #d0948c; --accent-hover: #e3b3ab; --glow-rgb: 208, 148, 140;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .35); --shadow-md: 0 12px 32px rgba(0, 0, 0, .5);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --maroon-900: #3a1715; --maroon-800: #6a2b28; --maroon-700: #8a3d38; --maroon-600: #9a4741; --maroon-500: #c06a62;
  --maroon-100: #43302f; --maroon-50: #2f2526;
  --ivory: #1c1b1e; --ivory-2: #222125; --sand: #2e2c31; --ink: #e4dfd8; --ink-2: #c3bdb5; --muted: #8f8982; --line: #343238;
  --surface: #242327; --header-bg: rgba(28, 27, 30, .9); --placeholder: #6d675f;
  --accent: #d0948c; --accent-hover: #e3b3ab; --glow-rgb: 208, 148, 140;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .35); --shadow-md: 0 12px 32px rgba(0, 0, 0, .5);
  color-scheme: dark;
  }
}
:root[data-theme="dark"] .card__icon, :root[data-theme="dark"] .sector__icon { box-shadow: none; }
:root[data-theme="dark"] .hero { background: radial-gradient(ellipse at 78% 18%, rgba(156, 36, 36, .22), transparent 52%), radial-gradient(ellipse at 10% 90%, rgba(156, 36, 36, .10), transparent 45%), linear-gradient(180deg, #1f1d21 0%, #1c1b1e 100%); }
:root[data-theme="dark"] .btn--outline { color: var(--accent); border-color: rgba(208, 148, 140, .5); }
:root[data-theme="dark"] .btn--outline:hover { background: var(--maroon-700); border-color: var(--maroon-700); color: #fff; }
:root[data-theme="dark"] .card, :root[data-theme="dark"] .member, :root[data-theme="dark"] .sector, :root[data-theme="dark"] .verify-form--card { box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, var(--shadow-sm); }
:root[data-theme="dark"] .topbar { background: #1b0d0e; }
/* The maroon logo becomes white on dark surfaces (the printed documents keep it maroon) */
:root[data-theme="dark"] .brand__logo, :root[data-theme="dark"] .footer__logo, :root[data-theme="dark"] .notfound__code img { filter: brightness(0) invert(1); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero { background: radial-gradient(ellipse at 78% 18%, rgba(156, 36, 36, .22), transparent 52%), radial-gradient(ellipse at 10% 90%, rgba(156, 36, 36, .10), transparent 45%), linear-gradient(180deg, #1f1d21 0%, #1c1b1e 100%); }
  :root:not([data-theme="light"]) .btn--outline { color: var(--accent); border-color: rgba(208, 148, 140, .5); }
  :root:not([data-theme="light"]) .btn--outline:hover { background: var(--maroon-700); border-color: var(--maroon-700); color: #fff; }
  :root:not([data-theme="light"]) .card, :root:not([data-theme="light"]) .member, :root:not([data-theme="light"]) .sector, :root:not([data-theme="light"]) .verify-form--card { box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, var(--shadow-sm); }
  :root:not([data-theme="light"]) .topbar { background: #1b0d0e; }
  :root:not([data-theme="light"]) .brand__logo, :root:not([data-theme="light"]) .footer__logo, :root:not([data-theme="light"]) .notfound__code img { filter: brightness(0) invert(1); }
}
/* The call-to-action band keeps its deep maroon in the dark theme rather than the lighter accent reds */
:root[data-theme="dark"] .cta-band { background: radial-gradient(ellipse at 10% 50%, rgba(255,255,255,.06), transparent 50%), linear-gradient(120deg, #4a0909, #6a0c0c 45%, #7d1111 70%, #4a0909); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .cta-band { background: radial-gradient(ellipse at 10% 50%, rgba(255,255,255,.06), transparent 50%), linear-gradient(120deg, #4a0909, #6a0c0c 45%, #7d1111 70%, #4a0909); }
}

/* Footer: appearance switch (icons only, on the copyright line) */
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; }
.footer--slim .footer__bottom { justify-content: center; }
.theme-switch { display: inline-flex; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; padding: 2px; }
.theme-switch label { cursor: pointer; }
.theme-switch input { position: absolute; opacity: 0; pointer-events: none; }
.theme-switch span { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: rgba(255,255,255,.6); transition: background .15s, color .15s; }
.theme-switch svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.theme-switch label:hover span { color: #fff; }
.theme-switch input:checked + span { background: #fff; color: var(--maroon-900); }
.theme-switch input:focus-visible + span { outline: 2px solid #fff; outline-offset: 1px; }

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.reveal.is-visible { opacity: 1; transform: none; }
/* Hover lifts must outrank the reveal rule above (same specificity, later source order) */
.member.reveal.is-visible {
  transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .45s cubic-bezier(.2, .7, .2, 1),
              box-shadow .35s ease, border-color .35s ease;
}
.member.reveal.is-visible:hover { transform: translateY(-3px); }
.reveal .eyebrow::before { width: 0; transition: width .6s ease .3s; }
.reveal.is-visible .eyebrow::before { width: 28px; }
.form, .map { transition: transform .8s cubic-bezier(.2, .7, .2, 1), box-shadow .3s ease; }

/* ---------- Hero entrance ---------- */
.hero__content > * { opacity: 0; animation: heroIn .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero__content > :nth-child(1) { animation-delay: .1s; }
.hero__content > :nth-child(2) { animation-delay: .25s; }
.hero__content > :nth-child(3) { animation-delay: .45s; }
.hero__content > :nth-child(4) { animation-delay: .6s; }


/* ---------- Keyframes ---------- */
@keyframes heroIn { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes spinSlow { to { transform: rotate(360deg); } }
@keyframes haloPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.06); opacity: .7; } }
@keyframes rise { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes dropIn { from { opacity: 0; transform: translateY(-16px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes gradientDrift { from { background-position: 0 0, 0% 50%; } to { background-position: 0 0, 100% 50%; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes navItemIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .reveal .eyebrow::before { width: 28px; }
  .hero__content > * { opacity: 1; }
  .notfound__inner > * { opacity: 1; }
  .verify-card { opacity: 1; }
  .header.is-hidden { transform: none; }
  .marquee.is-ready { overflow-x: auto; }
}

/* ---------- Responsive ---------- */

/* Large tablets / small laptops */
@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer__grid .footer__col:last-child { grid-column: 1 / -1; }
  .contact__grid { column-gap: 40px; }
}

/* Compact desktop header (laptops, small desktops) */
@media (max-width: 1260px) {
  .nav { gap: 20px; }
  .nav__list { gap: 18px; }
  .nav__list a { font-size: 14.5px; }
  .nav__cta { padding: 11px 16px; font-size: 14px; }
  .brand__name { font-size: 17px; letter-spacing: .1em; }
  .brand__suffix { font-size: 10px; }
}

/* Hamburger menu takes over before the links can collide with the brand */
@media (max-width: 1040px) {
  :root { --header-h: 64px; }

  .topbar { display: none; }

  /* Header: no backdrop-filter here, because it would turn the header into the
     containing block for the fixed-position menu and clip it to the header's height. */
  .header { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--ivory); }
  .brand { gap: 10px; position: relative; z-index: 95; }
  .brand__logo { width: 42px; height: 42px; }
  .brand__name { font-size: 15px; letter-spacing: .1em; }
  .brand__suffix { display: none; }
  .nav-toggle { display: flex; position: relative; z-index: 95; margin-right: -8px; }

  /* Full-screen menu */
  .nav {
    position: fixed; inset: 0; width: auto;
    background: var(--ivory);
    flex-direction: column; align-items: stretch; justify-content: flex-start;
    padding: calc(var(--header-h) + 16px) clamp(18px, 4vw, 24px) 32px; gap: 24px;
    transform: translateX(100%); transition: transform .3s ease;
    z-index: 90; overflow-y: auto;
  }
  .nav.is-open { transform: translateX(0); }
  .nav__list { flex-direction: column; gap: 0; width: 100%; }
  .nav.is-open .nav__list li { animation: navItemIn .5s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(.12s + var(--i, 0) * 60ms); }
  .nav.is-open .nav__cta { animation: navItemIn .5s cubic-bezier(.2, .7, .2, 1) .45s both; }
  .nav.is-open .nav__contact { animation: fadeIn .5s ease .55s both; }
  .nav__list a {
    display: block; padding: 16px 0; font-size: 21px; font-family: var(--font-heading); font-weight: 600;
    border-bottom: 1px solid var(--line); color: var(--ink); white-space: normal;
  }
  .nav__list a::after { display: none; }
  .nav__list a.is-active { color: var(--accent); }
  .nav__cta { width: 100%; padding: 16px; font-size: 16px; }
  .nav__contact {
    display: grid; gap: 8px; margin-top: auto; padding-top: 24px; border-top: 1px solid var(--line);
    font-size: 15px; color: var(--muted);
  }
  .nav__contact a { font-weight: 600; color: var(--accent); }
}

/* Tablets */
@media (max-width: 900px) {
  /* Hero: headline first, illustration second */
  .hero__inner { min-height: 0; padding-top: 44px; padding-bottom: 52px; }
  .hero__title { font-size: clamp(30px, 7.6vw, 44px); margin-bottom: 16px; }
  .hero__lead { margin-bottom: 26px; }
  .hero__watermark { width: 420px; right: -160px; bottom: -160px; opacity: .04; }

  /* About */
  .about { grid-template-columns: 1fr; }
  .about__panel { padding: 64px var(--about-gutter); }
  .about__points { padding: 48px var(--about-gutter) 56px; }
  .about__seal { width: 380px; left: auto; right: -110px; bottom: -130px; }

  /* Practice areas: compact rows */
  .cards { grid-template-columns: 1fr; gap: 12px; }
  .card { display: grid; grid-template-columns: 46px 1fr; column-gap: 16px; padding: 18px 18px 18px 20px; background: var(--surface); }
  .member.reveal.is-visible:hover { transform: none; }
  .card::before, .card::after { display: none; }
  .card:hover .card__index { color: rgba(var(--glow-rgb), .07); -webkit-text-stroke-color: rgba(var(--glow-rgb), 0); }
  .card:hover h3 { color: var(--ink); }
  .card__index { font-size: 44px; top: 8px; right: 14px; position: absolute; }
  .card__icon { width: 46px; height: 46px; border-radius: 12px; margin: 0; grid-row: 1 / span 3; align-self: start; }
  .card__icon svg { width: 23px; height: 23px; }
  .card h3 { font-size: 17px; margin-bottom: 4px; }
  .card p { font-size: 14px; line-height: 1.55; margin-bottom: 10px; }
  .card__link { grid-column: 2; font-size: 13px; }

  /* Further areas on phones: a two-column grid of tiles. Tap a tile to read its line and enquire;
     only the first eight show until "Show all" is pressed. */
  .area-list { grid-template-columns: 1fr 1fr; gap: 10px; }
  .area { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; column-gap: 12px; row-gap: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
  .area:hover { padding-left: 14px; }
  .area__body { align-self: center; }
  .area:active { background: var(--ivory-2); }
  .area::before { display: none; }
  .area__num { display: none; }
  .area__icon { width: 36px; height: 36px; }
  .area__title { font-size: 14px; }
  .area__desc { display: none; }
  /* The arrow link covers the whole tile, so a tap anywhere opens the enquiry form */
  .area__go { position: absolute; inset: 0; width: auto; height: auto; border-radius: 14px; opacity: 0; transform: none; }
  .area__go svg { display: none; }
  /* Touch "hover" sticks after a tap, so the desktop hover effects are switched off here */
  .area:hover .area__go, .area__go:hover, .area__go:focus { opacity: 0; background: transparent; }
  .area:hover .area__icon { background: var(--surface); border-color: var(--maroon-100); transform: none; }
  .area:hover .area__icon svg { stroke: var(--maroon-700); }
  .area:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
  .area-list:not(.is-expanded) .area:nth-child(n + 9) { display: none; }
  .area-list__more { display: block; width: 100%; margin-top: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--accent); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
  .area-list__more[hidden] { display: none; }
  .area__num { display: none; }
  .area::before { display: none; }
  .area:hover { padding-left: 0; }
  .area__icon { width: 36px; height: 36px; }

  .verify__grid { grid-template-columns: 1fr; gap: 28px; }
  .verify-details > div { grid-template-columns: 1fr; gap: 4px; }
  .verify-card__watermark { -webkit-mask-size: 170px 170px; mask-size: 170px 170px; }
  .verify-card--proof::before { inset: 7px; }
  .verify-card--proof::after { inset: 10px; }

  /* Sectors */
  .marquee-group { gap: 12px; }
  .marquee { --gap: 12px; }
  .sector { width: 250px; padding: 14px 16px; gap: 12px; }
  .sector__icon { width: 38px; height: 38px; border-radius: 10px; }
  .sector__icon svg { width: 19px; height: 19px; }
  .sector__name { font-size: 14.5px; }
  .sector__desc { font-size: 12.5px; }

  /* Team */
  .team { grid-template-columns: 1fr; gap: 16px; }
  .member { gap: 14px; }
  .member__avatar { width: 60px; height: 60px; font-size: 22px; }
  .member__body p { font-size: 15.5px; }

  /* CTA band */
  .cta-band { padding: 52px 0; }
  .cta-band__inner { flex-direction: column; align-items: stretch; gap: 24px; }
  .cta-band__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .cta-band__actions .btn { width: 100%; padding: 14px 12px; font-size: 15px; }

  /* Contact: info, then form, then map */
  .contact__grid { grid-template-columns: 1fr; grid-template-areas: "info" "form" "map"; row-gap: 28px; }
  .contact__list { grid-template-columns: 1fr 1fr; gap: 18px 16px; margin-bottom: 0; }
  .contact__list > div:first-child { grid-column: 1 / -1; }
  .contact__list dd { font-size: 16px; }
  .form { padding: 24px 20px; }
  .form__title { font-size: 20px; }
  .map iframe { height: 240px; }

  /* Footer */
  .footer { padding-top: 48px; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; padding-bottom: 32px; }
  .footer__brand { grid-column: 1 / -1; align-items: center; gap: 14px; }
  .footer__logo { width: 56px; height: 56px; }
  .footer__name { font-size: 16px; white-space: normal; }
  .footer__tag { font-size: 16px; }
  .footer__grid .footer__col:last-child { grid-column: 1 / -1; }
  .footer__col ul { gap: 10px; }
  .footer__bottom { padding-bottom: 24px; }

}

/* Phones */
@media (max-width: 560px) {
  .sectors__cta .btn { width: 100%; }
  .notfound__actions { display: grid; grid-template-columns: 1fr; }
  .notfound__actions .btn { width: 100%; }
  .hero__actions { display: grid; grid-template-columns: 1fr; gap: 10px; }
  .hero__actions .btn { width: 100%; }
  .hero__watermark { display: none; }
  .checklist li { font-size: 15.5px; }
  .card { grid-template-columns: 42px 1fr; column-gap: 14px; padding: 16px 16px 16px 18px; }
  .card__icon { width: 42px; height: 42px; }
  .card__icon svg { width: 21px; height: 21px; }
  .contact__list { grid-template-columns: 1fr; }
  .form__row--2 { grid-template-columns: 1fr; }
  .cta-band h2 { font-size: 22px; }
  .cta-band p { font-size: 16px; }
  .section__title { font-size: clamp(24px, 6.4vw, 28px); }
  .eyebrow { font-size: 12px; letter-spacing: .14em; }
  .point { grid-template-columns: 46px minmax(0, 1fr); gap: 6px 14px; padding: 22px 0; }
  .point__num { font-size: 24px; }
  .about__panel .btn { width: 100%; }
  .footer__bottom { font-size: 12.5px; }
}

/* Very small phones */
@media (max-width: 340px) {
  .brand__name { font-size: 13px; letter-spacing: .08em; }
  .brand__logo { width: 36px; height: 36px; }
  .cta-band__actions { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
}

/* Landscape phones: keep the hero short and the bar out of the way */
@media (max-height: 500px) and (max-width: 900px) {
  .hero__inner { padding-top: 28px; padding-bottom: 28px; }
  body { padding-bottom: 0; }
}

/* ---------- Practice-area pages ---------- */
/* Practice cards that open their page: the whole card is the link (the title's link stretches over it) */
.card--link h3 { position: static; }
.card--link .card__title-link { color: inherit; text-decoration: none; }
.card--link .card__title-link::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.card--link .card__link { position: relative; }
.card--link:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
/* Further-area rows: the whole row opens the page */
.area__go::after { content: ""; position: absolute; inset: 0; }

.page-hero {
  position: relative; padding: clamp(32px, 5vw, 64px) 0 clamp(40px, 6vw, 64px);
  background: radial-gradient(ellipse at 88% 0%, rgba(var(--glow-rgb), .08), transparent 55%), var(--ivory);
  border-bottom: 1px solid var(--line);
}
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 26px; padding: 0; font-size: 14px; color: var(--muted); }
.crumbs li { display: inline-flex; align-items: center; gap: 6px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { color: var(--ink-2); font-weight: 500; }
.crumbs__sep { opacity: .45; }
.page-hero__head { display: flex; align-items: center; gap: 18px; }
.page-hero__head .eyebrow { margin-bottom: 4px; }
.page-hero__icon {
  flex: 0 0 auto; width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(145deg, var(--maroon-600), var(--maroon-800)); box-shadow: 0 12px 26px -12px rgba(var(--glow-rgb), .7);
}
.page-hero__icon svg { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.page-hero__title { font-size: clamp(32px, 5vw, 54px); line-height: 1.08; letter-spacing: -.02em; margin: 4px 0 0; color: var(--ink); }
.page-hero__lead { max-width: 760px; margin: 20px 0 30px; font-size: clamp(16px, 1.35vw, 19px); line-height: 1.7; color: var(--muted); }
.page-hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

.pa { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(32px, 5vw, 72px); align-items: start; }
.pa__overview p { margin: 0 0 18px; font-size: 17px; line-height: 1.8; color: var(--ink-2); }
.pa__heading { margin: 40px 0 18px; font-size: clamp(22px, 2.2vw, 28px); color: var(--ink); }
.pa__services { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pa__service { display: flex; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.pa__tick { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--maroon-50); }
.pa__tick svg { width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pa__service h3 { margin: 3px 0 4px; font-size: 16px; color: var(--ink); }
.pa__service p { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.pa__note { margin: 26px 0 0; font-size: 13.5px; color: var(--muted); }
.pa__aside { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 18px; }
.pa__box { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.pa__box h2 { margin: 0 0 14px; font-size: 18px; color: var(--ink); }
.pa__box p { margin: 0 0 16px; font-size: 14.5px; line-height: 1.6; color: var(--muted); }
.pa__box--contact { background: var(--ivory-2); }
.pa__clients { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pa__clients li { position: relative; padding-left: 18px; color: var(--ink-2); font-size: 15px; }
.pa__clients li::before { content: ""; position: absolute; left: 0; top: .62em; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.pa__contact { margin: 16px 0 0 !important; font-size: 14.5px; line-height: 1.8; }
.pa__contact a { color: var(--accent); font-weight: 600; text-decoration: none; }
.pa__related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pa__related-card {
  display: flex; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 14px;
  background: var(--surface); color: var(--ink); text-decoration: none; transition: border-color .2s ease, transform .2s ease;
}
.pa__related-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.pa__related-card > span:nth-child(2) { flex: 1; min-width: 0; }
.pa__related-card strong { display: block; font-size: 16px; }
.pa__related-card small { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.pa__related-card > svg { flex: 0 0 auto; width: 18px; height: 18px; fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pa__related-icon { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--maroon-100); background: var(--surface); }
.pa__related-icon svg { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pa__all { margin: 26px 0 0; text-align: center; }
.pa__all a { color: var(--accent); font-weight: 600; text-decoration: none; }
@media (max-width: 900px) {
  .pa { grid-template-columns: minmax(0, 1fr); }
  .pa__aside { position: static; }
  .pa__services, .pa__related { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .page-hero__actions .btn { width: 100%; }
  .page-hero__icon { width: 52px; height: 52px; border-radius: 14px; }
  .page-hero__icon svg { width: 26px; height: 26px; }
  .pa__overview p { font-size: 16px; }
}

/* ---------- Multi-page site ---------- */
.section__more { margin: 32px 0 0; text-align: center; color: var(--muted); }
.section__more a:not(.btn) { color: var(--accent); font-weight: 600; text-decoration: none; }
/* Partner previews on the home page: the whole card opens the profile */
.team--brief .member--brief { display: flex; flex-direction: column; gap: 14px; text-decoration: none; color: inherit; }
.member__summary { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.7; }
.member__more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; color: var(--accent); font-weight: 600; font-size: 14.5px; }
.member__more svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s ease; }
.member--brief:hover .member__more svg { transform: translateX(3px); }
.member[id] { scroll-margin-top: calc(var(--header-h) + 24px); }
/* Numbered steps (the verify page) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.step { padding: 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.step__num { display: block; margin-bottom: 10px; font-size: 26px; font-weight: 700; color: var(--accent); letter-spacing: -.02em; }
.step h3 { margin: 0 0 8px; font-size: 18px; color: var(--ink); }
.step p { margin: 0; color: var(--muted); line-height: 1.65; }
@media (max-width: 900px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* WhatsApp: the brand green, so it is recognised at a glance */
.btn--whatsapp { display: inline-flex; align-items: center; gap: 10px; background: #1fa855; border-color: #1fa855; color: #fff; }
.btn--whatsapp:hover { background: #188f47; border-color: #188f47; color: #fff; }
.btn--whatsapp .wa-icon { width: 22px; height: 22px; fill: currentColor; stroke: none; }
.contact__whatsapp { margin-top: 28px; }
@media (max-width: 560px) { .contact__whatsapp { width: 100%; justify-content: center; } }
