/* ============================================================
   Custom Properties
============================================================ */
:root {
  --c-primary:      #6b1111;
  --c-primary-dk:   #5a0e0e;
  --c-secondary:    #301616;
  --c-black:        #000000;
  --c-near-black:   #0d0505;
  --c-white:        #ffffff;
  --c-off-white:    #f9f4f4;
  --c-text:         #1a0d0d;
  --c-text-muted:   #5c4a4a;
  --c-border:       #e6d8d8;
  --c-error:        #b91c1c;
  --c-success:      #15622f;

  --f-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --f-sans:  'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  --sp-2xs: 0.25rem;
  --sp-xs:  0.5rem;
  --sp-sm:  1rem;
  --sp-md:  1.5rem;
  --sp-lg:  2rem;
  --sp-xl:  3rem;
  --sp-2xl: 4.5rem;
  --sp-3xl: 6rem;

  --radius: 3px;
  --ease:   200ms ease;
  --ease-md: 300ms ease;

  --max-w: 1180px;
  --header-h: 76px;
}

/* ============================================================
   Reset
============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--f-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-white);
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
a:hover { text-decoration: none; }

ul, ol { list-style: none; }
address { font-style: normal; }

/* ============================================================
   Accessibility
============================================================ */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.5rem;
  background: var(--c-primary);
  color: var(--c-white);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: var(--radius);
  transition: top var(--ease);
}
.skip-link:focus { top: 0.75rem; }

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

/* ============================================================
   Layout
============================================================ */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--sp-md);
}
@media (min-width: 768px) {
  .container { padding-inline: var(--sp-xl); }
}

/* ============================================================
   Typography
============================================================ */
h1, h2, h3, h4 {
  font-family: var(--f-serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.25rem, 4vw + 1rem, 3.75rem); }
h2 { font-size: clamp(1.75rem, 2.5vw + 0.75rem, 2.625rem); }
h3 { font-size: clamp(1.1rem, 1vw + 0.6rem, 1.35rem); }

p { max-width: 64ch; }

.section-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: var(--sp-sm);
}
.section-label--light { color: rgba(255,255,255,.55); }

.eyebrow {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.6);
  margin-bottom: var(--sp-sm);
}

/* ============================================================
   Buttons
============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--f-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--ease), border-color var(--ease), color var(--ease), box-shadow var(--ease);
}

.btn--primary {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: var(--c-white);
}
.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--c-primary-dk);
  border-color: var(--c-primary-dk);
  text-decoration: none;
  box-shadow: 0 4px 16px rgba(107,17,17,.35);
}

.btn--ghost {
  background: transparent;
  border-color: rgba(255,255,255,.45);
  color: var(--c-white);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  background: rgba(255,255,255,.08);
  border-color: var(--c-white);
  text-decoration: none;
}

.btn--submit {
  width: 100%;
  justify-content: center;
  padding: 1rem 2rem;
  font-size: 1rem;
}
.btn--submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ============================================================
   Header
============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-h);
  background: var(--c-secondary);
  border-bottom: 1px solid rgba(255,255,255,.07);
  transition: box-shadow var(--ease-md);
}
.site-header.is-scrolled {
  box-shadow: 0 2px 24px rgba(0,0,0,.4);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: var(--sp-md);
}

.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  text-decoration: none;
}
.site-logo img {
  width: 200px;
  height: auto;
  /* Convert dark logo to white for dark header */
  filter: brightness(0) invert(1);
}

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 8px;
  background: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background var(--ease);
}
.nav-toggle:hover { background: rgba(255,255,255,.08); }

.hamburger-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--c-white);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease);
}
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .hamburger-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
.primary-nav {
  display: none;
  position: absolute;
  top: var(--header-h);
  left: 0;
  right: 0;
  background: var(--c-secondary);
  border-bottom: 1px solid rgba(255,255,255,.07);
  padding-block: var(--sp-xs);
}
.primary-nav.is-open { display: block; }

.nav-list { flex-direction: column; }

.nav-link {
  display: block;
  padding: 0.75rem var(--sp-md);
  color: rgba(255,255,255,.85);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: color var(--ease);
}
.nav-link:hover { color: var(--c-white); }

.nav-link--cta {
  display: inline-flex;
  margin: var(--sp-xs) var(--sp-md) var(--sp-sm);
  padding: 0.6rem 1.25rem;
  background: var(--c-primary);
  color: var(--c-white) !important;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: background var(--ease);
}
.nav-link--cta:hover { background: var(--c-primary-dk); }

/* Desktop nav */
@media (min-width: 768px) {
  .nav-toggle { display: none; }

  .primary-nav {
    display: flex !important;
    position: static;
    background: none;
    border: none;
    padding: 0;
  }

  .nav-list {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.25rem;
  }

  .nav-link { padding: 0.5rem 0.875rem; font-size: 0.9rem; }

  .nav-link--cta {
    margin: 0;
    margin-left: 0.5rem;
    padding: 0.55rem 1.125rem;
  }
}

/* ============================================================
   Hero
============================================================ */
.hero {
  position: relative;
  background: var(--c-black);
  color: var(--c-white);
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-watermark {
  position: absolute;
  inset-block: 0;
  right: -4%;
  display: flex;
  align-items: center;
  width: clamp(280px, 50%, 580px);
  pointer-events: none;
  user-select: none;
}
.hero-watermark svg {
  width: 100%;
  height: auto;
  fill: rgba(255,255,255,.045);
}

.hero .container {
  position: relative;
  z-index: 1;
  padding-block: var(--sp-3xl);
}

.hero-content { max-width: 660px; }

.hero-content h1 {
  color: var(--c-white);
  margin-bottom: var(--sp-md);
  line-height: 1.08;
}

.text-accent {
  color: var(--c-primary);
  font-style: italic;
}

.hero-desc {
  font-size: clamp(1rem, 1.2vw + 0.5rem, 1.175rem);
  color: rgba(255,255,255,.75);
  margin-bottom: var(--sp-xl);
  max-width: 52ch;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-sm);
  align-items: center;
}

/* ============================================================
   About
============================================================ */
.section-about {
  background: var(--c-off-white);
  padding-block: var(--sp-3xl);
}

.about-layout {
  display: grid;
  gap: var(--sp-2xl);
  align-items: center;
}

.about-icon-panel {
  display: flex;
  justify-content: center;
}
.about-icon-svg {
  width: clamp(120px, 25vw, 200px);
  height: auto;
  fill: var(--c-primary);
  opacity: 0.13;
}

.about-text h2 {
  color: var(--c-secondary);
  margin-bottom: var(--sp-md);
}
.about-lead {
  font-size: 1.075rem;
  font-weight: 500;
  margin-bottom: var(--sp-md);
}
.about-text p + p { margin-top: var(--sp-sm); }

.credentials {
  display: grid;
  gap: var(--sp-sm);
  margin-top: var(--sp-xl);
  padding-top: var(--sp-xl);
  border-top: 1px solid var(--c-border);
}
.credential-item { display: flex; gap: var(--sp-sm); }
.credential-item dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-primary);
  min-width: 88px;
  flex-shrink: 0;
  padding-top: 3px;
}
.credential-item dd {
  font-size: 0.92rem;
  color: var(--c-text-muted);
}

@media (min-width: 768px) {
  .about-layout { grid-template-columns: 210px 1fr; }
  .about-icon-svg { opacity: 0.17; }
  .credentials { grid-template-columns: repeat(3,1fr); }
  .credential-item { flex-direction: column; gap: var(--sp-2xs); }
  .credential-item dt { min-width: unset; }
}

/* ============================================================
   Practice Areas
============================================================ */
.section-practice {
  background: var(--c-near-black);
  color: var(--c-white);
  padding-block: var(--sp-3xl);
}

.section-header {
  text-align: center;
  margin-bottom: var(--sp-2xl);
}
.section-header h2 { color: var(--c-white); margin-bottom: var(--sp-sm); }
.section-intro {
  color: rgba(255,255,255,.65);
  max-width: 58ch;
  margin-inline: auto;
  font-size: 1.025rem;
  line-height: 1.7;
}

.practice-grid {
  display: grid;
  gap: 1px;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.05);
}

.practice-card {
  background: var(--c-near-black);
  padding: var(--sp-xl) var(--sp-lg);
  transition: background var(--ease-md);
}
.practice-card:hover { background: #160a0a; }

.practice-card-icon {
  width: 32px;
  height: 32px;
  margin-bottom: var(--sp-md);
}
.practice-card-icon svg {
  width: 100%;
  height: 100%;
  fill: var(--c-primary);
}

.practice-card h3 {
  color: var(--c-white);
  margin-bottom: 0.625rem;
  font-size: 1.15rem;
}
.practice-card p {
  color: rgba(255,255,255,.6);
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 38ch;
}

@media (min-width: 580px)  { .practice-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 900px)  { .practice-grid { grid-template-columns: repeat(3,1fr); } }

/* ============================================================
   Contact
============================================================ */
.section-contact {
  background: var(--c-secondary);
  color: var(--c-white);
  padding-block: var(--sp-3xl);
}

.contact-layout {
  display: grid;
  gap: var(--sp-2xl);
  align-items: start;
}

.contact-info h2 {
  color: var(--c-white);
  margin-bottom: var(--sp-md);
}
.contact-info > p {
  color: rgba(255,255,255,.7);
  margin-bottom: var(--sp-xl);
  font-size: 1.025rem;
  line-height: 1.7;
}

.contact-details { display: flex; flex-direction: column; gap: var(--sp-lg); }

.contact-item { display: flex; gap: 0.875rem; align-items: flex-start; }

.contact-icon {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--c-primary);
}

.contact-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255,255,255,.45);
  margin-bottom: 0.2rem;
}
.contact-value {
  display: block;
  color: var(--c-white);
  font-size: 0.95rem;
  line-height: 1.55;
  text-decoration: none;
}
.contact-value:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Form Panel */
.contact-form-panel {
  position: relative;
  background: var(--c-white);
  border-radius: var(--radius);
  padding: var(--sp-xl);
  box-shadow: 0 8px 40px rgba(0,0,0,.25);
}

/* Honeypot */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Form rows */
.form-row {
  display: grid;
  gap: var(--sp-md);
  margin-bottom: 0;
}
@media (min-width: 460px) { .form-row { grid-template-columns: 1fr 1fr; } }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: var(--sp-md);
}

.form-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-text);
}
.req-mark { color: var(--c-primary); margin-left: 2px; }

.form-input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font-family: var(--f-sans);
  font-size: 0.95rem;
  color: var(--c-text);
  background: var(--c-white);
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  transition: border-color var(--ease), box-shadow var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.form-input:focus {
  outline: none;
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(107,17,17,.12);
}
.form-input.is-invalid {
  border-color: var(--c-error);
  box-shadow: 0 0 0 3px rgba(185,28,28,.12);
}
.form-input::placeholder { color: #b0a0a0; }

.form-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235c4a4a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-textarea {
  resize: vertical;
  min-height: 110px;
}

.form-input--captcha { max-width: 110px; }

.form-hint {
  font-size: 0.77rem;
  color: var(--c-text-muted);
  line-height: 1.4;
}
.form-error {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--c-error);
}
.form-error[hidden] { display: none; }

.form-disclaimer {
  margin-bottom: var(--sp-md);
  padding: 0.75rem 1rem;
  background: var(--c-off-white);
  border-left: 3px solid var(--c-border);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.form-disclaimer p {
  font-size: 0.77rem;
  color: var(--c-text-muted);
  line-height: 1.5;
  max-width: none;
}

/* Form status */
.form-status {
  padding: 0.875rem 1.125rem;
  border-radius: var(--radius);
  margin-bottom: var(--sp-md);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.5;
}
.form-status.is-success {
  background: #dcfce7;
  color: var(--c-success);
  border: 1px solid #bbf7d0;
}
.form-status.is-error {
  background: #fef2f2;
  color: var(--c-error);
  border: 1px solid #fecaca;
}
.form-status[hidden] { display: none; }

/* Button loading state */
.btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.btn-loading[hidden] { display: none !important; }

.spinner {
  width: 18px;
  height: 18px;
  animation: spin 0.85s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (min-width: 960px) {
  .contact-layout { grid-template-columns: 1fr 1.35fr; }
}

/* ============================================================
   Footer
============================================================ */
.site-footer {
  background: var(--c-near-black);
  color: rgba(255,255,255,.65);
  padding-block: var(--sp-2xl);
}

.footer-grid {
  display: grid;
  gap: var(--sp-xl);
  padding-bottom: var(--sp-xl);
  border-bottom: 1px solid rgba(255,255,255,.07);
  margin-bottom: var(--sp-xl);
}

.footer-brand > a {
  display: block;
}

.footer-logo {
  width: 200px;
  height: auto;
  margin-bottom: var(--sp-md);
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

.footer-address {
  font-size: 0.875rem;
  line-height: 1.8;
}
.footer-address p + p { margin-top: 0.25rem; }
.footer-address a { color: rgba(255,255,255,.55); text-decoration: none; }
.footer-address a:hover { color: var(--c-white); }

.footer-col-heading {
  font-family: var(--f-sans);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
  margin-bottom: var(--sp-md);
}

.footer-nav ul,
.footer-practice ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-nav a {
  font-size: 0.875rem;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  transition: color var(--ease);
}
.footer-nav a:hover { color: var(--c-white); }
.footer-practice li { font-size: 0.875rem; color: rgba(255,255,255,.4); }

.footer-bottom { }
.footer-disclaimer {
  font-size: 0.75rem;
  color: rgba(255,255,255,.35);
  line-height: 1.65;
  max-width: 78ch;
  margin-bottom: var(--sp-sm);
}
.footer-disclaimer strong { color: rgba(255,255,255,.5); }
.footer-copy { font-size: 0.78rem; color: rgba(255,255,255,.3); }

@media (min-width: 580px) { .footer-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.6fr 1fr 1.4fr; } }

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