/* =========================================================
   Ackerly Ward & McKirdy LLC — Site Stylesheet
   Fully responsive, single external stylesheet, no inline styles.
   ========================================================= */

:root {
  --color-navy: #101c2e;
  --color-navy-light: #1c2f4a;
  --color-mahogany: #4a2c22;
  --color-brass: #b08d4a;
  --color-brass-light: #d4b876;
  --color-cream: #f7f4ee;
  --color-white: #ffffff;
  --color-text: #26262a;
  --color-text-light: #5c5f66;
  --color-border: #e2ddd1;
  --color-success: #2f7a4f;
  --color-success-bg: #e5f3ea;
  --color-error: #a4302a;
  --color-error-bg: #fbe7e5;
  --color-focus-ring: #7fb1e0;

  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width: 1200px;
  --radius: 6px;
  --transition: 0.25s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-white);
  line-height: 1.6;
  font-size: 16px;
}

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

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

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--color-navy);
  line-height: 1.25;
  margin: 0 0 0.6em;
}

p {
  margin: 0 0 1em;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Focus visibility (accessibility) ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-navy);
  border-bottom: 3px solid var(--color-brass);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: baseline;
}

.brand-name {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-white);
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.brand-suffix {
  color: var(--color-brass-light);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-left: 6px;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.nav-toggle .bar {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--color-white);
  border-radius: 2px;
}

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 28px;
}

.primary-nav a {
  color: var(--color-white);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: color var(--transition);
  padding: 6px 0;
}

.primary-nav a:hover,
.primary-nav a:focus {
  color: var(--color-brass-light);
}

.nav-cta {
  background-color: var(--color-brass);
  color: var(--color-navy);
  padding: 8px 18px;
  border-radius: var(--radius);
  font-weight: 600;
}

.nav-cta:hover {
  background-color: var(--color-brass-light);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: var(--color-navy);
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    100deg,
    rgba(16, 28, 46, 0.92) 0%,
    rgba(16, 28, 46, 0.75) 40%,
    rgba(16, 28, 46, 0.35) 75%
  );
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 24px;
  width: 100%;
}

.hero-content h1 {
  color: var(--color-white);
  font-size: clamp(1.9rem, 4vw, 3.1rem);
  max-width: 780px;
  margin-bottom: 0.5em;
}

.hero-lede {
  color: #e7e6e1;
  font-size: 1.1rem;
  max-width: 620px;
  margin-bottom: 2em;
}

.eyebrow {
  color: var(--color-brass-light);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.8em;
}

.eyebrow-dark {
  color: var(--color-brass);
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
  border: 2px solid transparent;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-primary {
  background-color: var(--color-brass);
  color: var(--color-navy);
}

.btn-primary:hover:not(:disabled) {
  background-color: var(--color-brass-light);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-white);
  border-color: var(--color-white);
}

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

.btn-block {
  width: 100%;
  text-align: center;
}

/* ---------- Sections ---------- */
.section {
  padding: 80px 0;
}

.band-white {
  background-color: var(--color-white);
}

.band-tint {
  background-color: var(--color-cream);
}

.band-dark {
  background-color: var(--color-navy);
}

.band-dark h2,
.band-dark .section-lede {
  color: var(--color-white);
}

.section-header {
  max-width: 720px;
  margin: 0 auto 48px;
  text-align: center;
}

.section-header h2 {
  font-size: clamp(2rem, 3.6vw, 2.7rem);
}

.section-lede {
  color: var(--color-text-light);
  font-size: 1.05rem;
}

/* Contact section heading is intentionally smaller than other section
   headers so it feels proportionate next to the form and map below it. */
#contact .section-header h2 {
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
}

/* ---------- About ---------- */
.about-text-full {
  max-width: 820px;
  margin: 0 auto;
}

.about-text p {
  color: var(--color-text-light);
}

/* ---------- Practice Areas ---------- */
.practice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.practice-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.practice-card:hover {
  box-shadow: 0 12px 24px rgba(16, 28, 46, 0.08);
  transform: translateY(-2px);
}

.practice-card h3 {
  font-size: 1.15rem;
  color: var(--color-mahogany);
}

.practice-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* ---------- Attorneys ---------- */
.attorney-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.attorney-card {
  background-color: var(--color-cream);
  border-radius: var(--radius);
  padding: 32px;
  text-align: left;
}

.attorney-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background-color: var(--color-navy);
  color: var(--color-brass-light);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.attorney-role {
  color: var(--color-brass);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.attorney-card p:not(.attorney-role) {
  color: var(--color-text-light);
}

.attorney-email {
  margin-bottom: 0;
}

.attorney-email a {
  color: var(--color-navy);
  font-weight: 500;
  text-decoration: underline;
  word-break: break-word;
}

/* ---------- Staff / Assistants ---------- */
.staff-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.staff-card {
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: left;
}

.staff-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--color-mahogany);
  color: var(--color-brass-light);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.staff-role {
  color: var(--color-brass);
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.staff-email a {
  color: var(--color-navy);
  font-weight: 500;
  text-decoration: underline;
  word-break: break-word;
}

.staff-email {
  margin-bottom: 0;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: stretch;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 28px;
  height: 100%;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Value text (address lines, hours) defaults to a light neutral tone.
   .contact-label below overrides this for the "Address"/"Phone"/"Hours"
   labels specifically, and must be declared after this rule (or with
   at least equal specificity) to win. */
.contact-list li > span {
  color: #d8d6cf;
}

.contact-label {
  color: var(--color-brass);
  text-transform: uppercase;
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  font-weight: 700;
}

.contact-list a {
  color: var(--color-white);
  text-decoration: underline;
}

.contact-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: 100%;
}

.contact-form {
  background-color: var(--color-white);
  border-radius: var(--radius);
  padding: 32px;
  flex: 1;
}

/* Honeypot field: visually hidden but present in the DOM so real
   users never see or fill it, while simple bots often will. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.form-row {
  margin-bottom: 20px;
}

.form-row label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--color-navy);
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  background-color: var(--color-white);
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--color-brass);
  box-shadow: 0 0 0 3px rgba(176, 141, 74, 0.2);
}

.form-row textarea {
  resize: vertical;
}

.form-status {
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
}

.form-status-success {
  background-color: var(--color-success-bg);
  color: var(--color-success);
  border: 1px solid var(--color-success);
}

.form-status-error {
  background-color: var(--color-error-bg);
  color: var(--color-error);
  border: 1px solid var(--color-error);
}

/* ---------- Map ---------- */
.map-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
  flex: 1;
  min-height: 380px;
}

.map-frame {
  width: 100%;
  height: 100%;
  min-height: 380px;
  border: 0;
  display: block;
}

/* ---------- Footer ---------- */
.site-footer {
  background-color: var(--color-navy-light);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  color: #b8bcc4;
  font-size: 0.85rem;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a {
  color: var(--color-brass-light);
}

/* =========================================================
   Reduced motion support (accessibility)
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }

  .practice-card:hover {
    transform: none;
  }
}

/* =========================================================
   Responsive Breakpoints
   ========================================================= */

@media (max-width: 992px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .practice-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero {
    min-height: 60vh;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .primary-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--color-navy);
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition);
  }

  .primary-nav.is-open {
    max-height: 360px;
  }

  .primary-nav ul {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 20px;
  }

  .primary-nav li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .primary-nav a {
    display: block;
    padding: 14px 0;
  }

  .nav-cta {
    display: inline-block;
    margin-top: 12px;
  }

  .attorney-grid,
  .staff-grid {
    grid-template-columns: 1fr;
  }

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

  .hero-content {
    padding: 56px 20px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .btn {
    text-align: center;
    width: 100%;
  }

  .section {
    padding: 56px 0;
  }

  .map-wrap {
    min-height: 220px;
  }

  .map-frame {
    min-height: 220px;
  }
}

@media (max-width: 480px) {
  .brand-name {
    font-size: 1.05rem;
  }

  .hero-content h1 {
    font-size: 1.6rem;
  }

  .hero-lede {
    font-size: 1rem;
  }

  .contact-form,
  .practice-card,
  .attorney-card,
  .staff-card {
    padding: 20px;
  }

  .map-wrap {
    min-height: 200px;
  }

  .map-frame {
    min-height: 200px;
  }
}
