/* ==========================================================
   Sterling Heritage Law – Stylesheet
   ========================================================== */

/* --------------------- Skip Link --------------------- */

.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--gold);
  color: var(--ink);
  padding: 12px 20px;
  z-index: 100;
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

/* --------------------- Custom Properties --------------------- */

:root {
  --ink: #0c1d29;
  --ink2: #173142;
  --gold: #b79555;
  --gold2: #d6bc83;
  --ivory: #f4efe5;
  --paper: #fbfaf7;
  --muted: #64727b;
  --line: #dcd8cf;
  --white: #fff;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, Arial, sans-serif;
}

/* --------------------- Reset & Base --------------------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1180px, 92%);
  margin: auto;
}

/* --------------------- Focus Styles --------------------- */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

/* --------------------- Top Bar --------------------- */

.topbar {
  background: #081620;
  color: #c9d0d4;
  font-size: 12px;
  padding: 8px 0;
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

/* --------------------- Header & Navigation --------------------- */

.header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(12, 29, 41, 0.98);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.nav {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand img {
  width: 335px;
  max-width: 58vw;
  height: 74px;
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 28px;
  color: #f5f1e9;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.navlinks a:hover {
  color: var(--gold2);
}

.nav-cta {
  border: 1px solid var(--gold);
  padding: 12px 17px;
}

.menu {
  display: none;
  background: none;
  border: 0;
  color: white;
  font-size: 27px;
}

/* --------------------- Hero --------------------- */

.hero {
  min-height: 720px;
  display: grid;
  align-items: center;
  color: white;
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(8, 22, 32, 0.98) 0%, rgba(12, 29, 41, 0.94) 50%, rgba(12, 29, 41, 0.62) 100%),
    radial-gradient(circle at 80% 25%, #536c78 0, #203c4c 22%, #0c1d29 62%);
}

.hero:after {
  content: "";
  position: absolute;
  width: 540px;
  height: 540px;
  border: 1px solid rgba(183, 149, 85, 0.3);
  transform: rotate(45deg);
  right: -190px;
  top: 110px;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 850px;
  padding: 110px 0;
}

.kicker {
  color: var(--gold2);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 800;
}

/* --------------------- Typography --------------------- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.08;
  margin-top: 0;
}

.hero h1 {
  font-size: clamp(52px, 7.1vw, 92px);
  margin: 20px 0 26px;
  max-width: 960px;
}

.hero .lead {
  font-size: 19px;
  color: #dce3e6;
  max-width: 720px;
}

/* --------------------- Buttons & Actions --------------------- */

.actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 35px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 15px 23px;
  border: 1px solid transparent;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  font-weight: 800;
  transition: 0.2s;
}

.btn-gold {
  background: var(--gold);
  color: #0c1d29;
}

.btn-outline {
  border-color: rgba(255, 255, 255, 0.55);
  color: white;
}

.btn:hover {
  transform: translateY(-2px);
}

/* --------------------- Stats --------------------- */

.stats {
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat {
  padding: 32px;
  border-right: 1px solid var(--line);
}

.stat:last-child {
  border: 0;
}

.stat b {
  display: block;
  font: 500 38px var(--serif);
  color: var(--ink);
}

.stat span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* --------------------- Sections --------------------- */

.section {
  padding: 100px 0;
}

.section-dark {
  background: var(--ink);
  color: white;
}

.section-soft {
  background: #efede8;
}

.intro-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 90px;
}

.section h2 {
  font-size: clamp(40px, 5vw, 64px);
}

.copy {
  font-size: 18px;
  color: #43535c;
}

.section-dark .copy {
  color: #c5d0d5;
}

.rule {
  width: 70px;
  border-top: 2px solid var(--gold);
  margin: 22px 0;
}

/* --------------------- Practice Areas Grid --------------------- */

.practice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #42515a;
  border: 1px solid #42515a;
}

.practice {
  background: var(--ink);
  padding: 38px;
  min-height: 310px;
  position: relative;
}

.practice .num {
  color: var(--gold);
  font: 500 15px var(--serif);
}

.practice h3 {
  color: white;
  font-size: 31px;
  margin: 48px 0 18px;
}

.practice p {
  color: #bcc8ce;
}

.practice a {
  position: absolute;
  bottom: 30px;
  color: var(--gold2);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* --------------------- Feature / Difference --------------------- */

.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 620px;
}

.feature-art {
  background: linear-gradient(135deg, #d8d0c3, #9d8870);
  position: relative;
  overflow: hidden;
}

.feature-art::before {
  content: "SH";
  position: absolute;
  font: 700 230px var(--serif);
  color: rgba(255, 255, 255, 0.22);
  right: -10px;
  bottom: -30px;
}

.feature-copy {
  padding: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: white;
}

/* --------------------- People / Attorneys Grid --------------------- */

.people-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.person {
  background: white;
}

.person img {
  aspect-ratio: 4/5;
  object-fit: cover;
}

.person-info {
  padding: 23px;
}

.person h3 {
  font-size: 27px;
  margin-bottom: 7px;
}

.role {
  color: #9a7335;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
}

/* --------------------- Insights / Articles --------------------- */

.insights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

.article {
  background: white;
  border: 1px solid var(--line);
  padding: 30px;
  min-height: 285px;
  display: flex;
  flex-direction: column;
}

.article time {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #8a6c3e;
}

.article h3 {
  font-size: 30px;
  margin: 25px 0;
}

.article a {
  margin-top: auto;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #8a6c3e;
  font-weight: 800;
}

/* --------------------- CTA Banner --------------------- */

.cta {
  background: var(--gold);
  padding: 80px 0;
}

.cta-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.5fr;
  align-items: center;
  gap: 50px;
}

.cta h2 {
  font-size: 55px;
  margin: 0;
}

.cta .btn {
  background: var(--ink);
  color: white;
}

/* --------------------- Page Hero (Interior Pages) --------------------- */

.page-hero {
  background: var(--ink);
  color: white;
  padding: 100px 0 80px;
}

.page-hero h1 {
  font-size: clamp(50px, 7vw, 82px);
  margin: 18px 0;
}

.breadcrumbs {
  font-size: 12px;
  color: #aebac0;
}

/* --------------------- Content Grid & Sidebar --------------------- */

.content-grid {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 80px;
}

.sidebar {
  border-left: 1px solid var(--line);
  padding-left: 30px;
}

.sidebar h3 {
  font-size: 25px;
}

.sidebar a {
  display: block;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: #53626a;
}

/* --------------------- Detail Content --------------------- */

.detail h2 {
  font-size: 44px;
  margin-top: 55px;
}

.detail h2:first-child {
  margin-top: 0;
}

.detail ul {
  padding-left: 20px;
}

/* --------------------- Contact Page --------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 80px;
}

.contact-card {
  background: var(--ink);
  color: white;
  padding: 40px;
}

.contact-card h3 {
  color: white;
  font-size: 34px;
}

.contact-card p {
  color: #c2cdd2;
}

/* --------------------- Form Styles --------------------- */

form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 7px;
  padding: 14px;
  border: 1px solid #c8c8c4;
  background: white;
  font: inherit;
}

textarea {
  min-height: 150px;
}

.full {
  grid-column: 1 / -1;
}

.form-note {
  font-size: 12px;
  color: #6d777c;
}

.message {
  font-weight: 700;
  color: #54734f;
}

/* Form validation error state */

input.error,
select.error,
textarea.error {
  border-color: #c0392b;
}

.field-error {
  display: block;
  color: #c0392b;
  font-size: 11px;
  margin-top: 4px;
  font-weight: 700;
}

/* --------------------- Multi-Step Form --------------------- */

.form-steps {
  display: flex;
  gap: 0;
  margin-bottom: 30px;
  border-bottom: 1px solid var(--line);
}

.step {
  flex: 1;
  padding: 14px 16px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-align: center;
  border-bottom: 3px solid transparent;
  transition: 0.2s;
}

.step.active {
  color: var(--ink);
  border-bottom-color: var(--gold);
}

.step.completed {
  color: #54734f;
  border-bottom-color: #54734f;
}

.form-step {
  display: none;
}

.form-step.active {
  display: grid;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 14px;
  margin-top: 10px;
}

.btn-outline-dark {
  border: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
}

.btn-outline-dark:hover {
  background: var(--ink);
  color: white;
}

/* Lawyer Selection Grid */

.lawyer-select-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin-bottom: 10px;
}

.lawyer-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px;
  border: 2px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
  background: white;
  min-height: 100px;
}

.lawyer-card:hover {
  border-color: var(--gold);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.lawyer-card input[type="radio"] {
  display: none;
}

.lawyer-card:has(input:checked) {
  border-color: var(--gold);
  background: var(--ivory);
  box-shadow: 0 2px 12px rgba(183, 149, 85, 0.15);
}

.lawyer-card img {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--line);
  flex-shrink: 0;
}

.lawyer-card:has(input:checked) img {
  border-color: var(--gold);
}

.lawyer-card-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.lawyer-card-info strong {
  font-size: 16px;
  font-family: var(--serif);
  color: var(--ink);
  line-height: 1.2;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.lawyer-card-info span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #9a7335;
  font-weight: 800;
}

.lawyer-card-info small {
  font-size: 12px;
  color: var(--muted);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Review Section */

.review-section {
  grid-column: 1 / -1;
  background: var(--ivory);
  padding: 24px;
  margin-bottom: 16px;
  border-radius: 4px;
}

.review-section h3 {
  font-size: 20px;
  margin-bottom: 14px;
  color: var(--ink);
}

.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  font-size: 14px;
}

.review-grid strong {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.review-lawyer {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
}

.review-lawyer img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

/* --------------------- Footer --------------------- */

.footer {
  background: #081620;
  color: #c5ced3;
  padding: 70px 0 25px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr 0.7fr 0.9fr;
  gap: 55px;
}

.footer h3 {
  color: white;
  font-size: 22px;
}

.footer a {
  display: block;
  padding: 5px 0;
  color: #c5ced3;
}

.footer-brand img {
  width: 330px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 45px;
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
}

/* --------------------- Badge --------------------- */

.badge {
  display: inline-block;
  padding: 7px 11px;
  border: 1px solid var(--line);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin: 5px 5px 0 0;
}

/* --------------------- Back-to-Top Button --------------------- */

.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 48px;
  height: 48px;
  background: var(--ink);
  color: var(--gold);
  border: 1px solid var(--gold);
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, transform 0.2s;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-2px);
  background: var(--gold);
  color: var(--ink);
}

/* --------------------- Media Queries: Tablet --------------------- */

@media (max-width: 900px) {
  .navlinks {
    display: none;
    position: absolute;
    top: 82px;
    left: 0;
    width: 100%;
    background: var(--ink);
    padding: 25px 4%;
    flex-direction: column;
    align-items: flex-start;
  }

  .navlinks.open {
    display: flex;
  }

  .menu {
    display: block;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
  }

  .intro-grid,
  .feature,
  .contact-grid,
  .content-grid,
  .cta-grid {
    grid-template-columns: 1fr;
  }

  .practice-grid,
  .insights {
    grid-template-columns: 1fr 1fr;
  }

  .people-grid {
    grid-template-columns: 1fr 1fr;
  }

  .feature-copy {
    padding: 60px 5%;
  }

  .sidebar {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 25px 0 0;
  }
}

/* --------------------- Media Queries: Mobile --------------------- */

@media (max-width: 580px) {
  .hero {
    min-height: 620px;
  }

  .hero-content {
    padding: 75px 0;
  }

  .topbar {
    display: none;
  }

  .practice-grid,
  .insights,
  .people-grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .stat {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .section {
    padding: 70px 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    display: block;
  }

  .cta h2 {
    font-size: 42px;
  }

  form {
    grid-template-columns: 1fr;
  }

  .full {
    grid-column: auto;
  }

  .lawyer-select-grid {
    grid-template-columns: 1fr;
  }

  .review-grid {
    grid-template-columns: 1fr;
  }

  .form-steps {
    flex-direction: column;
  }

  .step {
    text-align: left;
    border-bottom: none;
    border-left: 3px solid transparent;
  }

  .step.active {
    border-left-color: var(--gold);
  }
}

/* --------------------- Reduced Motion --------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------- Print Styles --------------------- */

@media print {
  .topbar,
  .header,
  .navlinks,
  .menu,
  .cta,
  .footer,
  .back-to-top,
  .skip-link,
  .actions {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  .hero {
    min-height: auto;
    background: none;
    color: #000;
    padding: 20px 0;
  }

  .hero h1 {
    font-size: 28pt;
  }

  .section-dark {
    background: #fff;
    color: #000;
  }

  .practice {
    background: #fff;
    color: #000;
  }

  .practice h3 {
    color: #000;
  }

  .practice p {
    color: #333;
  }

  a {
    text-decoration: underline;
  }

  a[href]::after {
    content: " (" attr(href) ")";
    font-size: 10pt;
    color: #666;
  }

  .container {
    width: 100%;
  }
}
