/* ==========================================================================
   Alvarez Immigration Law — portfolio piece 02 (boutique specialised firm)
   Deliberately a different design language from piece 01: sans-led headings,
   full-bleed hero, softer radii, terracotta on deep teal. Same engineering
   discipline — one stylesheet, no external requests.
   ========================================================================== */

:root {
  --ink: #0d2b28;
  --ink-2: #16403b;
  --body: #465956;
  --muted: #7d908d;
  --line: #e2e7e5;
  --line-soft: #eef1f0;
  --paper: #fcfcfa;
  --paper-2: #f2f5f3;
  --card: #ffffff;
  --clay: #c05f36;
  --clay-2: #a54e29;
  --clay-soft: #fbeee7;

  --sans: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;

  --wrap: 1180px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(3.75rem, 8vw, 6.5rem);
  --r: 8px;
  --r-lg: 14px;
  --r-pill: 999px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

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

body {
  margin: 0; background: var(--paper); color: var(--body);
  font-family: var(--sans); font-size: 1.0625rem; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--clay); text-underline-offset: 3px; }
a:hover { color: var(--ink); }

h1, h2, h3, h4 {
  font-family: var(--sans); color: var(--ink); font-weight: 700;
  line-height: 1.12; letter-spacing: -.022em; margin: 0 0 .6em;
}
h1 { font-size: clamp(2.3rem, 5.4vw, 3.7rem); }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.7rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }
p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

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

.skip { position: absolute; left: -9999px; top: 0; z-index: 200; background: var(--ink); color: #fff; padding: .75rem 1.25rem; }
.skip:focus { left: 0; }

/* --- Layout --------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--tint { background: var(--paper-2); }
.section--ink { background: var(--ink); color: #b9cbc7; }
.section--ink h2, .section--ink h3 { color: #fff; }

.lede { font-size: clamp(1.075rem, 1.7vw, 1.28rem); color: var(--ink-2); line-height: 1.6; }
.measure { max-width: 62ch; }
.center { text-align: center; margin-inline: auto; }

.eyebrow {
  display: inline-block;
  font-size: .75rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--clay-2); font-weight: 700;
  background: var(--clay-soft); padding: .4rem .85rem; border-radius: var(--r-pill);
  margin: 0 0 1.15rem;
}
.section--ink .eyebrow { background: rgba(192,95,54,.2); color: #f0b596; }

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  font: inherit; font-weight: 600; font-size: 1rem;
  padding: 1rem 1.75rem; border-radius: var(--r-pill);
  border: 2px solid transparent; cursor: pointer; text-decoration: none;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn--primary { background: var(--clay); color: #fff; }
.btn--primary:hover { background: var(--clay-2); color: #fff; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); background: rgba(13,43,40,.03); color: var(--ink); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--paper-2); color: var(--ink); }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn--outline-light:hover { border-color: #fff; background: rgba(255,255,255,.1); color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: .85rem; }

/* --- Header --------------------------------------------------------------- */
.topbar { background: var(--ink); color: #9fb5b1; font-size: .8125rem; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; min-height: 42px; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.topbar a:hover { color: #f0b596; }
.lang { display: flex; gap: .35rem; align-items: center; }
.lang a {
  font-size: .75rem; letter-spacing: .06em; font-weight: 700;
  padding: .22rem .55rem; border-radius: var(--r-pill); text-decoration: none;
  color: #9fb5b1;
}
.lang a[aria-current="true"] { background: rgba(255,255,255,.14); color: #fff; }
@media (max-width: 600px) { .topbar__note { display: none; } }

.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(252,252,250,.95);
  backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 80px; }

.brand { display: flex; flex-direction: column; text-decoration: none; margin-right: auto; line-height: 1.15; }
.brand__mark { font-size: 1.25rem; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.brand__sub { font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; color: var(--clay-2); font-weight: 700; margin-top: .2rem; }

.nav { display: flex; align-items: center; gap: 1.7rem; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: .95rem; font-weight: 600; }
.nav a:hover { color: var(--clay); }
.nav a[aria-current="page"] { color: var(--clay); }
.header .btn { padding: .75rem 1.4rem; font-size: .9375rem; }

.nav-toggle {
  display: none; background: none; border: 2px solid var(--line); border-radius: var(--r-pill);
  padding: .6rem 1rem; cursor: pointer; font: inherit; font-size: .9rem; font-weight: 700; color: var(--ink);
}

@media (max-width: 920px) {
  .nav-toggle { display: block; margin-left: auto; }
  .header .wrap > .btn { display: none; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.5rem; display: none;
    max-height: 70vh; overflow-y: auto;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 1rem 0; border-bottom: 1px solid var(--line-soft); }
  .nav .btn { margin-top: 1rem; width: 100%; }
}

/* --- Hero (full-bleed, centred — deliberately unlike piece 01) ------------- */
.hero {
  position: relative;
  background:
    linear-gradient(180deg, rgba(13,43,40,.86) 0%, rgba(13,43,40,.93) 100%),
    radial-gradient(120% 80% at 20% 0%, #1d5049 0%, #0d2b28 60%);
  color: #cfdedb;
  padding-block: clamp(4rem, 10vw, 7.5rem);
  text-align: center;
}
.hero h1 { color: #fff; max-width: 20ch; margin-inline: auto; }
.hero .lede { color: #c3d5d1; max-width: 56ch; margin-inline: auto; }
.hero .btn-row { justify-content: center; margin-top: 2.25rem; }

.hero__note {
  margin-top: 2rem; font-size: .9375rem; color: #9fb5b1;
}
.hero__note strong { color: #fff; }

/* --- Stats band ----------------------------------------------------------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--card);
  overflow: hidden;
  margin-top: -3.5rem; position: relative; z-index: 2;
}
.stats div { padding: 1.75rem 1.25rem; text-align: center; border-right: 1px solid var(--line); }
.stats div:last-child { border-right: 0; }
.stats strong { display: block; font-size: clamp(1.6rem, 3vw, 2.15rem); color: var(--ink); font-weight: 700; letter-spacing: -.02em; }
.stats span { font-size: .8125rem; color: var(--muted); }
@media (max-width: 780px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats div:nth-child(2) { border-right: 0; }
  .stats div:nth-child(1), .stats div:nth-child(2) { border-bottom: 1px solid var(--line); }
}

/* --- Grid / cards --------------------------------------------------------- */
.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 940px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1.5rem, 2.6vw, 2rem);
}
.card h3 { margin-bottom: .5rem; }
.card p { font-size: .975rem; }
.card--link { text-decoration: none; color: inherit; display: block; transition: border-color .18s ease, box-shadow .18s ease; }
.card--link:hover { border-color: var(--clay); box-shadow: 0 6px 24px -12px rgba(13,43,40,.28); color: inherit; }
.card__more { display: inline-block; margin-top: 1rem; font-size: .9rem; font-weight: 700; color: var(--clay); }

.tag {
  display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .04em;
  background: var(--clay-soft); color: var(--clay-2);
  padding: .3rem .7rem; border-radius: var(--r-pill); margin-bottom: .9rem;
}

/* --- Steps (horizontal timeline) ------------------------------------------ */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; counter-reset: step; }
@media (max-width: 940px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding-top: 3.25rem; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 0; left: 0;
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  background: var(--clay); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 1rem;
}
.step::after {
  content: ""; position: absolute; top: 1.25rem; left: 2.9rem; right: -1.5rem; height: 2px;
  background: var(--line);
}
.step:last-child::after { display: none; }
@media (max-width: 940px) { .step::after { display: none; } }
.step h3 { font-size: 1.15rem; }
.step p { font-size: .9375rem; }

/* --- Checklist ------------------------------------------------------------ */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { position: relative; padding: 0 0 .95rem 1.9rem; font-size: 1.0125rem; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: .7rem; height: .7rem; border-radius: 3px; background: var(--clay); opacity: .85;
}

/* --- Testimonials --------------------------------------------------------- */
.quote {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(1.5rem, 2.6vw, 2rem); display: flex; flex-direction: column;
}
.quote blockquote { margin: 0 0 1.25rem; font-family: var(--serif); font-size: 1.1rem; line-height: 1.55; color: var(--ink); font-style: italic; }
.quote figcaption { margin-top: auto; font-size: .8125rem; color: var(--muted); }
.quote figcaption b { display: block; color: var(--ink-2); font-size: .9375rem; font-weight: 700; }

.disclaimer {
  font-size: .8125rem; color: var(--muted); line-height: 1.55;
  background: var(--paper-2); border-radius: var(--r); padding: 1rem 1.15rem; margin-top: 2rem;
}
.section--tint .disclaimer { background: #fff; }

/* --- Attorneys ------------------------------------------------------------ */
.person { text-align: center; }
/* Replace .avatar with <img> when real photography exists. */
.avatar {
  aspect-ratio: 1; border-radius: 50%; margin: 0 auto 1.25rem; max-width: 190px;
  background: radial-gradient(120% 110% at 30% 20%, #e8efec 0%, #cfdcd8 60%, #b5c8c3 100%);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  font-size: 3rem; font-weight: 700; color: rgba(13,43,40,.28); letter-spacing: .02em;
}
.person h3 { margin-bottom: .2rem; }
.person__role { font-size: .875rem; color: var(--clay-2); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: .9rem; }
.person__langs { font-size: .8125rem; color: var(--muted); margin-top: .9rem; }

/* --- FAQ ------------------------------------------------------------------ */
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: .75rem; }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.25rem 3rem 1.25rem 1.35rem;
  position: relative; font-weight: 700; color: var(--ink); font-size: 1.05rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%);
  font-size: 1.5rem; color: var(--clay); line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 1.35rem 1.4rem; font-size: 1rem; }

/* --- Split ---------------------------------------------------------------- */
.split { display: grid; gap: clamp(2.5rem, 5vw, 4rem); grid-template-columns: 1.4fr .9fr; align-items: start; }
@media (max-width: 940px) { .split { grid-template-columns: 1fr; } }

.aside {
  background: var(--ink); color: #b9cbc7; border-radius: var(--r-lg);
  padding: clamp(1.5rem, 2.6vw, 2rem); position: sticky; top: 104px;
}
.aside h3 { color: #fff; }
.aside p { font-size: .9375rem; }
.aside .btn { width: 100%; margin-top: 1rem; }
@media (max-width: 940px) { .aside { position: static; } }

/* --- CTA ------------------------------------------------------------------ */
.cta-band { text-align: center; }
.cta-band p { max-width: 56ch; margin-inline: auto; color: #b9cbc7; }
.cta-band .btn-row { justify-content: center; margin-top: 2rem; }

/* --- Page head ------------------------------------------------------------ */
.pagehead { background: var(--paper-2); border-bottom: 1px solid var(--line); padding-block: clamp(3rem, 6vw, 4.5rem); }
.pagehead .lede { max-width: 60ch; }
.crumbs { font-size: .8125rem; color: var(--muted); margin-bottom: 1.25rem; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.crumbs span { margin-inline: .5rem; }

/* --- Prose ---------------------------------------------------------------- */
.prose h2 { margin-top: 2.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 2rem; }
.prose ul { padding-left: 1.15rem; margin: 0 0 1.15em; }
.prose li { margin-bottom: .55rem; }

/* --- Forms ---------------------------------------------------------------- */
.form-grid { display: grid; gap: 1.15rem; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field--full { grid-column: 1 / -1; }

.field label { display: block; font-size: .875rem; font-weight: 700; color: var(--ink-2); margin-bottom: .45rem; }
.field .req { color: var(--clay); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: var(--r);
  padding: .85rem .95rem; transition: border-color .16s ease, box-shadow .16s ease;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--clay); box-shadow: 0 0 0 3px rgba(192,95,54,.15);
}
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"], .field select[aria-invalid="true"] {
  border-color: #b03a26; box-shadow: 0 0 0 3px rgba(176,58,38,.1);
}
.field .err { display: none; font-size: .8125rem; color: #b03a26; margin-top: .4rem; }
.field .err.is-shown { display: block; }
.hint { font-size: .8125rem; color: var(--muted); margin-top: .5rem; }

.consent { display: flex; gap: .7rem; align-items: flex-start; font-size: .875rem; font-weight: 400; color: var(--body); }
.consent input { width: auto; margin-top: .25rem; flex: none; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-note {
  margin-top: 1.5rem; padding: 1rem 1.15rem; background: var(--paper-2);
  border: 1px solid var(--line); border-radius: var(--r); font-size: .8125rem; color: var(--muted); line-height: 1.55;
}
.success {
  display: none; background: #fff; border: 2px solid var(--clay); border-radius: var(--r-lg);
  padding: clamp(1.75rem, 3vw, 2.5rem); text-align: center;
}
.success.is-shown { display: block; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.5rem, 2.6vw, 2rem); }
.panel dl { margin: 0; display: grid; gap: 1.15rem; }
.panel dt { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: .3rem; }
.panel dd { margin: 0; color: var(--ink-2); }
.panel dd a { font-weight: 700; text-decoration: none; }

/* --- Footer --------------------------------------------------------------- */
.footer { background: var(--ink); color: #97aeaa; font-size: .9375rem; padding-block: clamp(3rem, 6vw, 4.5rem) 2rem; }
.footer a { color: #dbe6e4; text-decoration: none; }
.footer a:hover { color: #f0b596; }
.footer h4 { color: #fff; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 1.1rem; font-weight: 700; }
.footer__grid { display: grid; gap: 2.5rem; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; }
@media (max-width: 940px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; }
.footer__brand { font-size: 1.3rem; font-weight: 700; color: #fff; margin-bottom: .35rem; letter-spacing: -.02em; }
.footer__sub { font-size: .6875rem; letter-spacing: .14em; text-transform: uppercase; color: #f0b596; font-weight: 700; margin-bottom: .9rem; }

.legal { margin-top: clamp(2.5rem, 5vw, 3.5rem); padding-top: 1.75rem; border-top: 1px solid rgba(255,255,255,.12); font-size: .8125rem; color: #7e9490; line-height: 1.6; }
.legal p + p { margin-top: .8rem; }
.legal__row { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; margin-top: 1.25rem; }
.demo-note { margin-top: 1.25rem; padding: .8rem 1rem; border: 1px dashed rgba(255,255,255,.22); border-radius: var(--r); color: #8fa5a1; font-size: .8125rem; }
