/* Adam S. Elman, Attorney at Law — site styles.
   Navy and gold come from the firm's logo. Headings: Libre Caslon Text.
   Body: Public Sans (the typeface of U.S. government websites). */

:root {
  --navy: #0f1e41;
  --navy-2: #1a2c58;
  --navy-3: #2a3f72;
  --gold: #d6b345;
  --gold-soft: #e8d28c;
  --gold-ink: #7d6210;
  --ink: #1b2333;
  --muted: #535e73;
  --mist: #eef1f6;
  --line: #d3d9e4;
  --white: #fff;
  --serif: 'Libre Caslon Text', Georgia, 'Times New Roman', serif;
  --sans: 'Public Sans', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; }
body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-2); text-decoration-color: var(--gold); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--gold-ink); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; margin: 0 0 .6em; color: var(--navy); }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
address { font-style: normal; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--gold); color: var(--navy); padding: 10px 16px; font-weight: 700; }
.skip:focus { top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 48px; padding: 12px 24px; border-radius: var(--radius);
  border: 2px solid transparent; font: 700 1rem/1.2 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s;
}
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: .9375rem; }
.btn-block { width: 100%; }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold:hover { background: var(--gold-soft); color: var(--navy); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-3); color: var(--white); }
.btn-outline { border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-outline-light { border-color: var(--gold); color: var(--white); }
.btn-outline-light:hover { background: var(--gold); color: var(--navy); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--navy); color: var(--white); border-bottom: 1px solid var(--navy-3); }
.header-row { display: flex; align-items: center; gap: 24px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--white); text-decoration: none; }
.brand:hover { color: var(--white); }
.brand img { width: 20px; height: 48px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font: 700 1.35rem/1.1 var(--serif); letter-spacing: .02em; }
.brand-sub { font-size: .8125rem; color: var(--gold); letter-spacing: .04em; margin-top: 3px; }
.site-nav { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.nav-list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-list a, .nav-list summary {
  display: block; padding: 10px 12px; color: var(--white); text-decoration: none; font-weight: 600; font-size: .96875rem;
  border-bottom: 2px solid transparent; cursor: pointer;
}
.nav-list a:hover, .nav-list summary:hover { color: var(--gold); }
.nav-list a[aria-current="page"], .nav-list summary.is-current { border-bottom-color: var(--gold); }
.nav-list summary { list-style: none; }
.nav-list summary::-webkit-details-marker { display: none; }
.nav-list summary::after { content: ''; display: inline-block; width: 7px; height: 7px; margin-left: 8px; border: solid currentColor; border-width: 0 2px 2px 0; transform: translateY(-3px) rotate(45deg); }
.nav-list details[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.has-sub { position: relative; }
.sub { list-style: none; margin: 0; padding: 8px 0; }
.nav-tools { display: flex; align-items: center; gap: 16px; }
.lang-switch { display: flex; border: 1px solid var(--navy-3); border-radius: var(--radius); overflow: hidden; }
.lang-switch a { padding: 7px 10px; color: #c5cde0; text-decoration: none; font-weight: 600; font-size: .875rem; }
.lang-switch a:hover { color: var(--white); background: var(--navy-2); }
.lang-switch a[aria-current="true"] { background: var(--gold); color: var(--navy); }
.nav-toggle { display: none; }

@media (min-width: 1081px) {
  .sub { position: absolute; top: calc(100% + 6px); left: 0; min-width: 240px; background: var(--white); border-top: 3px solid var(--gold); box-shadow: 0 12px 30px rgba(15, 30, 65, .18); }
  .sub a { color: var(--navy); padding: 10px 18px; border: 0; }
  .sub a:hover { background: var(--mist); color: var(--navy); }
  .sub a[aria-current="page"] { color: var(--gold-ink); }
}

@media (max-width: 1080px) {
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center; margin-left: auto;
    width: 48px; height: 48px; background: none; border: 1px solid var(--navy-3); border-radius: var(--radius); color: var(--white); cursor: pointer;
  }
  .bars, .bars::before, .bars::after { display: block; width: 22px; height: 2px; background: currentColor; position: relative; transition: transform .2s; }
  .bars::before, .bars::after { content: ''; position: absolute; left: 0; }
  .bars::before { top: -7px; }
  .bars::after { top: 7px; }
  .nav-toggle[aria-expanded="true"] .bars { background: transparent; }
  .nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-7px) rotate(-45deg); }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy); border-top: 1px solid var(--navy-3); padding: 8px var(--gutter) 24px; max-height: calc(100vh - 76px); overflow-y: auto;
  }
  .site-nav.open { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; }
  .nav-list a, .nav-list summary { padding: 14px 4px; border-bottom: 1px solid var(--navy-3); font-size: 1.0625rem; }
  .nav-list a[aria-current="page"], .nav-list summary.is-current { color: var(--gold); border-bottom-color: var(--navy-3); }
  .sub { padding: 0 0 0 16px; }
  .nav-tools { flex-wrap: wrap; justify-content: space-between; padding-top: 18px; }
}

/* Phone lines — call in your language */
.lines { list-style: none; margin: 0; padding: 0; }
.line { display: grid; text-decoration: none; color: var(--ink); }
.line-name { font-weight: 700; font-size: .9375rem; color: var(--muted); }
.line-num { font: 700 1.5rem/1.25 var(--serif); color: var(--navy); font-variant-numeric: lining-nums tabular-nums; white-space: nowrap; }
.line-verb { font-size: .875rem; font-weight: 600; color: var(--gold-ink); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.line:hover .line-num { color: var(--gold-ink); }

.strip { background: var(--white); border-top: 4px solid var(--gold); border-bottom: 1px solid var(--line); padding: 28px 0 32px; }
.strip h2 { font-size: 1.15rem; margin-bottom: 16px; }
.lines-strip { display: grid; grid-template-columns: repeat(4, 1fr); }
.lines-strip li + li { border-left: 1px solid var(--line); }
.lines-strip .line { padding: 4px 24px; gap: 2px; }
.lines-strip li:first-child .line { padding-left: 0; }
.lines-strip .line-num { font-size: clamp(1.35rem, 2.2vw, 1.75rem); }
@media (max-width: 860px) {
  .lines-strip { grid-template-columns: 1fr 1fr; row-gap: 20px; }
  .lines-strip li:nth-child(3) { border-left: 0; }
  .lines-strip li:nth-child(odd) .line { padding-left: 0; }
}
@media (max-width: 420px) {
  .lines-strip .line { padding: 4px 12px; }
  .lines-strip .line-num { font-size: 1.15rem; }
}

.lines-stack li + li { border-top: 1px solid var(--line); }
.lines-stack .line { padding: 12px 0; grid-template-columns: 1fr auto; column-gap: 12px; align-items: baseline; }
.lines-stack .line-name { grid-column: 1 / -1; }
.lines-stack .line-num { font-size: 1.3rem; }

.lines-compact .line { padding: 6px 0; color: var(--white); grid-template-columns: 7.5em 1fr; align-items: baseline; }
.lines-compact .line-name { color: #b9c2d6; font-weight: 600; }
.lines-compact .line-num { font: 600 1rem/1.4 var(--sans); color: var(--white); }
.lines-compact .line-verb { display: none; }
.lines-compact .line:hover .line-num { color: var(--gold); }

/* Home hero */
.hero { background: var(--navy); color: var(--white); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(32px, 5vw, 72px); align-items: end; }
.hero-text { padding: clamp(48px, 8vw, 104px) 0 clamp(48px, 7vw, 88px); align-self: center; }
.hero-name { color: var(--gold); font-weight: 600; letter-spacing: .02em; margin-bottom: 18px; }
.hero h1 { color: var(--white); max-width: 15ch; font-size: clamp(2.3rem, 5.2vw, 3.9rem); line-height: 1.12; }
.hero .lead { color: #d5dbe8; font-size: clamp(1.0625rem, 1.6vw, 1.2rem); max-width: 34em; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-photo { position: relative; align-self: end; padding-top: 48px; }
.hero-photo::before { content: ''; position: absolute; inset: 24px 24px 0 -24px; border: 1px solid var(--gold); border-bottom: 0; }
.hero-photo img { position: relative; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 15%; }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 0; }
  .hero-text { padding-bottom: 32px; }
  .hero-photo { width: min(78%, 360px); padding-top: 16px; margin-left: 24px; }
  .hero-photo::before { inset: 0 16px 0 -16px; }
}

/* Generic bands */
.band { padding: clamp(56px, 8vw, 96px) 0; }
.band-mist { background: var(--mist); }
.band-navy { background: var(--navy); color: #d5dbe8; }
.band-navy h2 { color: var(--white); }
.section-head { max-width: 46em; margin-bottom: 36px; }
.section-head p { color: var(--muted); font-size: 1.0625rem; }
.band-navy .section-head p { color: #b9c2d6; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.split-photo { align-items: center; grid-template-columns: minmax(0, 380px) 1fr; }
@media (max-width: 860px) { .split, .split-photo { grid-template-columns: 1fr; } }

.list-h { font-family: var(--sans); font-size: .9375rem; color: var(--muted); font-weight: 700; margin-bottom: 8px; }
.visa-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--navy); }
.visa-list li { padding: 13px 0 13px 28px; border-bottom: 1px solid var(--line); position: relative; font-weight: 600; }
.visa-list li::before { content: ''; position: absolute; left: 4px; top: 21px; width: 10px; height: 10px; background: var(--gold); transform: rotate(45deg); }

/* Denials band over the Ellis Island photo */
.band-image { position: relative; overflow: hidden; background: var(--navy); }
.band-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.band-image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15, 30, 65, .92) 0%, rgba(15, 30, 65, .78) 45%, rgba(15, 30, 65, .2) 100%); }
.band-image .wrap { position: relative; z-index: 1; }
.panel { max-width: 34em; color: #e3e8f2; border-left: 4px solid var(--gold); padding-left: clamp(20px, 3vw, 36px); }
.panel h2 { color: var(--white); }
.panel a { color: var(--gold); font-weight: 700; }
.panel a:hover { color: var(--white); }

/* Practice area rows */
.areas { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: 48px; }
.areas a { display: grid; gap: 4px; padding: 22px 0; border-top: 1px solid #c6cedc; text-decoration: none; color: var(--ink); }
.area-name { font: 700 1.3rem/1.3 var(--serif); color: var(--navy); }
.area-desc { color: var(--muted); }
.areas a:hover .area-name { color: var(--gold-ink); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 4px; }
@media (max-width: 700px) { .areas { grid-template-columns: 1fr; } }

.photo-frame { position: relative; max-width: 380px; margin-left: 14px; }
.photo-frame::before { content: ''; position: absolute; inset: -14px 14px 14px -14px; border: 1px solid var(--gold); }
.photo-frame img { position: relative; width: 100%; }

.facts { margin: 24px 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 9.5em 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-weight: 700; color: var(--navy); }
.facts dd { margin: 0; color: var(--muted); }
@media (max-width: 480px) { .facts div { grid-template-columns: 1fr; gap: 2px; } }

/* Reviews */
.review-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 40px 56px; margin-bottom: 40px; }
.review { margin: 0; border-top: 1px solid var(--navy-3); padding-top: 24px; }
.review blockquote { margin: 0 0 14px; }
.review p { font: 400 1.2rem/1.55 var(--serif); color: var(--white); margin: 0; }
.review p::before { content: '“'; color: var(--gold); }
.review p::after { content: '”'; color: var(--gold); }
.review figcaption { color: var(--gold); font-weight: 600; }
@media (max-width: 760px) { .review-grid { grid-template-columns: 1fr; } }

/* Closing call to action */
.cta-band { background: var(--mist); border-top: 4px solid var(--gold); }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px 48px; }
.cta-row p { color: var(--muted); margin: 0; max-width: 36em; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* Inner page hero */
.page-hero { position: relative; background: var(--navy); color: #d5dbe8; display: grid; grid-template-columns: 1fr 1fr; min-height: 360px; }
.page-hero-text { width: 100%; max-width: calc(var(--wrap) / 2); margin: 0 0 0 auto; padding-top: clamp(40px, 6vw, 72px); padding-bottom: clamp(40px, 6vw, 72px); align-self: center; }
.page-hero h1 { color: var(--white); }
.page-hero .lead { font-size: clamp(1.0625rem, 1.5vw, 1.1875rem); margin: 0; max-width: 32em; }
.page-hero-img { position: relative; border-left: 4px solid var(--gold); }
.page-hero-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero-plain { grid-template-columns: 1fr; min-height: 0; }
.page-hero-plain .page-hero-text { max-width: var(--wrap); margin: 0 auto; }
@media (max-width: 900px) {
  .page-hero { grid-template-columns: 1fr; }
  .page-hero-text { max-width: none; margin: 0; }
  .page-hero-img { order: -1; height: 220px; border-left: 0; border-bottom: 4px solid var(--gold); }
}

/* Inner page body: article + sticky "talk to us" card */
.content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: clamp(32px, 6vw, 80px); padding-top: clamp(48px, 6vw, 80px); padding-bottom: clamp(56px, 7vw, 96px); align-items: start; }
.talk { position: sticky; top: 100px; background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--gold); padding: 24px; }
.talk h2 { font-size: 1.3rem; margin-bottom: 6px; }
.talk h3 { font-size: 1.05rem; margin: 24px 0 6px; }
.talk > p { color: var(--muted); font-size: .96875rem; }
.talk .lines { margin: 8px 0 20px; }
@media (max-width: 960px) {
  .content-grid { grid-template-columns: 1fr; }
  .talk { position: static; }
}

.prose { max-width: 42em; }
.prose h2 { margin-top: 1.6em; }
.prose > h2:first-child, .prose > :first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--gold-ink); }
.prose address { margin-bottom: 1.2em; }
.cols { columns: 2 16em; column-gap: 40px; }
.cols li { break-inside: avoid; }
.defs { margin: 0 0 1.5em; border-top: 2px solid var(--navy); }
.defs div { padding: 16px 0; border-bottom: 1px solid var(--line); }
.defs dt { font: 700 1.1rem/1.35 var(--serif); color: var(--navy); margin-bottom: 4px; }
.defs dd { margin: 0; color: var(--muted); }
.notice { background: var(--mist); border-left: 4px solid var(--gold); padding: 22px 26px; margin: 2em 0; }
.notice h2, .notice h3 { font-size: 1.2rem; margin: 0 0 .5em; }
.notice > :last-child { margin-bottom: 0; }
.area-index { list-style: none; padding: 0 !important; margin: 0 0 2em; border-top: 2px solid var(--navy); }
.area-index li { padding: 16px 0; border-bottom: 1px solid var(--line); margin: 0; }
.area-index a { font: 700 1.25rem/1.3 var(--serif); }
.area-index p { margin: 4px 0 0; color: var(--muted); }

/* Contact form */
.contact-form h2 { margin-bottom: 4px; }
.form-intro { color: var(--muted); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 6px; margin-bottom: 18px; font-weight: 600; }
.field small { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; font: inherit; font-weight: 400; color: var(--ink);
  background: var(--white); border: 1px solid #a9b3c6; border-radius: var(--radius);
}
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 3px solid var(--gold); outline-offset: 0; border-color: var(--navy); }
.check { display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start; margin: 4px 0 24px; color: var(--muted); font-size: .9375rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--navy); }
.hp { position: absolute; left: -9999px; }
.form-status { padding: 16px 20px; margin-bottom: 24px; border-left: 4px solid var(--gold); background: var(--mist); font-weight: 600; }
.form-status.is-error { border-left-color: #b3261e; background: #fbeceb; color: #7a1610; }
.contact-grid .talk { position: static; }
.map-wrap { line-height: 0; }
.map-wrap iframe { width: 100%; height: 380px; border: 0; filter: saturate(.85); }
.map-inline iframe { height: 340px; border: 1px solid var(--line); }

/* Footer */
.site-footer { background: var(--navy); color: #b9c2d6; padding: 64px 0 32px; font-size: .96875rem; }
.footer-grid { display: grid; grid-template-columns: 1.1fr 1fr .8fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid var(--navy-3); }
.footer-grid address { margin: 20px 0 14px; line-height: 1.6; }
.footer-h { font: 700 .9375rem/1.3 var(--sans); color: var(--white); margin-bottom: 12px; }
.site-footer a { color: #dfe4ee; text-decoration-color: rgba(214, 179, 69, .6); }
.site-footer a:hover { color: var(--gold); }
.social { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-links { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 20px; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { text-decoration: none; }
.footer-legal { padding-top: 24px; font-size: .875rem; }
.footer-legal p { max-width: 70em; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } }

/* Language suggestion bar (English pages, browser in Portuguese/Spanish) */
.lang-hint { display: flex; align-items: center; justify-content: center; gap: 12px; background: var(--gold); color: var(--navy); padding: 8px 16px; font-weight: 600; }
.lang-hint[hidden] { display: none; }
.lang-hint a { color: var(--navy); text-decoration-color: var(--navy); }
.lang-hint button { background: none; border: 0; font-size: 1.5rem; line-height: 1; color: var(--navy); cursor: pointer; width: 36px; height: 36px; }

.not-found { padding-top: 48px; padding-bottom: 72px; }
.not-found .lines-strip { margin-top: 40px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
