/* ==========================================================================
   Whitfield & Associates LLP — fictional portfolio piece
   Deep navy on cream, oxblood accent. EB Garamond throughout.
   Engraved letterhead aesthetic: centered masthead, thin double rules,
   small-caps labels, formal symmetric composition.
   ========================================================================== */

:root {
  --navy: #15233b;
  --navy-soft: #2c3e5c;
  --cream: #f7f1e3;
  --cream-deep: #efe6d2;
  --oxblood: #6e1e2a;
  --rule: #9b8c6e;
  --max: 64rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--navy);
  font-family: "EB Garamond", Garamond, "Times New Roman", serif;
  font-size: 1.125rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Accessibility helpers ---------- */

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy);
  color: var(--cream);
  padding: 0.6rem 1.2rem;
  z-index: 100;
  text-decoration: none;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Masthead (letterhead) ---------- */

.masthead {
  text-align: center;
  padding: 3rem 1.5rem 1.25rem;
  max-width: var(--max);
  margin: 0 auto;
}

.masthead-est {
  font-variant: small-caps;
  letter-spacing: 0.22em;
  font-size: 0.85rem;
  margin: 0 0 1rem;
  color: var(--navy-soft);
}

.masthead-rule {
  height: 5px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  max-width: 36rem;
  margin: 0 auto;
}

.masthead-name {
  font-size: clamp(1.9rem, 5vw, 3rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  margin: 1.2rem 0 0.2rem;
}

.masthead-name abbr {
  text-decoration: none;
  font-size: 0.6em;
  letter-spacing: 0.14em;
  vertical-align: 0.25em;
}

.amp {
  font-style: italic;
  color: var(--oxblood);
}

.masthead-sub {
  font-variant: small-caps;
  letter-spacing: 0.3em;
  font-size: 0.95rem;
  margin: 0 0 1.2rem;
  color: var(--navy-soft);
}

/* ---------- Navigation ---------- */

.nav-toggle {
  /* Never rendered at desktop widths; revealed on small screens only when
     JavaScript is running (html.js) — see the media query below. */
  display: none;
  font: inherit;
  font-variant: small-caps;
  letter-spacing: 0.2em;
  background: none;
  border: 1px solid var(--rule);
  color: var(--navy);
  padding: 0.45rem 1.4rem;
  margin-top: 1.1rem;
  cursor: pointer;
}

.site-nav {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 2.2rem;
  padding: 1.1rem 0 0;
  margin: 0;
}

.site-nav a {
  font-variant: small-caps;
  letter-spacing: 0.16em;
  font-size: 1rem;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}

.site-nav a:hover,
.site-nav a:active {
  color: var(--oxblood);
  border-bottom-color: var(--oxblood);
}

/* Mobile nav: a dignified dropdown beneath the masthead — a cream panel
   ruled top and bottom that fades and slides down 12px. The toggle exists
   in CSS only when JavaScript is running (html.js); without JS the nav
   stays fully inline and no button appears at any width. */

@media (max-width: 40rem) {
  .js .nav-toggle {
    display: inline-block;
  }

  .js .masthead nav {
    position: relative;
  }

  .js .site-nav {
    position: absolute;
    top: calc(100% + 0.75rem);
    left: -1.5rem;
    right: -1.5rem;
    z-index: 20;
    flex-direction: column;
    gap: 0.9rem;
    padding: 1.6rem 1.5rem;
    background: var(--cream-deep);
    box-shadow: 0 10px 24px rgba(21, 35, 59, 0.12);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-12px);
    transition:
      opacity 250ms ease,
      transform 250ms ease,
      visibility 0s linear 250ms;
  }

  /* The firm's thin double rule, top and bottom of the panel. */
  .js .site-nav::before,
  .js .site-nav::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 5px;
    border-top: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
  }

  .js .site-nav::before {
    top: 0;
  }

  .js .site-nav::after {
    bottom: 0;
  }

  .js .site-nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition:
      opacity 250ms ease,
      transform 250ms ease;
  }

  .js .site-nav a {
    display: inline-block;
    padding: 0.15rem 0.3rem 1px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .js .site-nav {
    transition: none;
    transform: none;
  }
}

/* ---------- Section scaffolding ---------- */

main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 3.5rem 0;
  text-align: center;
}

.section-label {
  font-variant: small-caps;
  letter-spacing: 0.3em;
  font-size: 0.9rem;
  color: var(--oxblood);
  margin: 0 0 0.4rem;
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 500;
  margin: 0 0 2rem;
  letter-spacing: 0.02em;
}

h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 0.4rem;
  letter-spacing: 0.02em;
}

.double-rule {
  height: 7px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  max-width: 44rem;
  margin: 0 auto;
}

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

.hero {
  padding-top: 4rem;
}

.hero h1 {
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 500;
  line-height: 1.25;
  max-width: 46rem;
  margin: 0 auto 1.4rem;
}

.hero-lede {
  max-width: 42rem;
  margin: 0 auto 2rem;
  font-size: 1.2rem;
}

.hero-actions {
  margin: 0 0 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.btn {
  display: inline-block;
  font-variant: small-caps;
  letter-spacing: 0.14em;
  font-size: 1.05rem;
  text-decoration: none;
  padding: 0.7rem 1.8rem;
  border: 1px solid var(--navy);
}

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

.btn-primary:hover {
  background: var(--oxblood);
  border-color: var(--oxblood);
}

.btn-quiet {
  color: var(--navy);
  background: transparent;
}

.btn-quiet:hover {
  color: var(--oxblood);
  border-color: var(--oxblood);
}

.hero-fact {
  font-variant: small-caps;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
  color: var(--navy-soft);
}

/* ---------- Practice areas: formal two-column grid ---------- */

.practice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 3rem;
  text-align: center;
}

@media (max-width: 44rem) {
  .practice-grid {
    grid-template-columns: 1fr;
  }
}

.practice-mark {
  color: var(--oxblood);
  margin-bottom: 0.6rem;
}

.practice p {
  margin: 0.3rem auto 0;
  max-width: 28rem;
}

/* ---------- About: drop cap ---------- */

.about-copy {
  max-width: 40rem;
  margin: 0 auto;
  text-align: left;
}

.about-copy p {
  margin: 0 0 1.2rem;
}

.dropcap-para::first-letter {
  font-size: 3.6em;
  float: left;
  line-height: 0.82;
  padding: 0.06em 0.12em 0 0;
  color: var(--oxblood);
  font-weight: 500;
}

/* ---------- Attorneys ---------- */

.attorney-list {
  display: grid;
  gap: 2.5rem;
  max-width: 46rem;
  margin: 0 auto;
  text-align: left;
}

.attorney {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1.4rem;
  align-items: start;
}

@media (max-width: 36rem) {
  .attorney {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .attorney-monogram {
    margin: 0 auto;
  }
}

.attorney-monogram {
  width: 5rem;
  height: 5rem;
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule);
  outline-offset: 3px;
  display: grid;
  place-items: center;
  font-variant: small-caps;
  font-size: 1.5rem;
  letter-spacing: 0.08em;
  color: var(--oxblood);
  background: var(--cream-deep);
}

.attorney-role {
  font-variant: small-caps;
  letter-spacing: 0.14em;
  font-size: 0.95rem;
  color: var(--oxblood);
  margin: 0 0 0.6rem;
}

.attorney-body p {
  margin: 0 0 0.7rem;
}

.attorney-bar {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--navy-soft);
}

/* ---------- Fees table ---------- */

.fees-table-wrap {
  max-width: 44rem;
  margin: 0 auto;
}

.fees-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.fees-table th,
.fees-table td {
  padding: 0.9rem 1rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}

.fees-table th {
  font-variant: small-caps;
  letter-spacing: 0.08em;
  font-weight: 600;
  white-space: nowrap;
  color: var(--oxblood);
}

@media (max-width: 36rem) {
  .fees-table th {
    white-space: normal;
  }
}

/* ---------- FAQ ---------- */

.faq-list {
  max-width: 42rem;
  margin: 0 auto;
  text-align: left;
}

.faq-item {
  border-bottom: 1px solid var(--rule);
}

.faq-item:first-child {
  border-top: 1px solid var(--rule);
}

.faq-item summary {
  cursor: pointer;
  padding: 1rem 0.4rem;
  list-style: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--oxblood);
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
}

.faq-item[open] summary::after {
  content: "\2212"; /* minus sign */
}

.faq-item summary h3 {
  font-size: 1.15rem;
  font-weight: 500;
  margin: 0;
  display: inline;
}

.faq-item p {
  margin: 0 0 1.2rem;
  padding: 0 0.4rem;
}

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

.contact-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  text-align: left;
}

@media (max-width: 50rem) {
  .contact-cols {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.contact-block h3 {
  font-variant: small-caps;
  letter-spacing: 0.16em;
  font-size: 1.05rem;
  color: var(--oxblood);
  margin-top: 1.2rem;
}

.contact-block h3:first-child {
  margin-top: 0;
}

.contact-block a {
  color: var(--navy);
  text-decoration-color: var(--oxblood);
}

.contact-block a:hover {
  color: var(--oxblood);
}

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

.site-footer {
  text-align: center;
  padding: 2.5rem 1.5rem 3rem;
  max-width: var(--max);
  margin: 0 auto;
}

.footer-name {
  font-variant: small-caps;
  letter-spacing: 0.2em;
  margin: 1.6rem 0 0.4rem;
}

.site-footer a {
  color: var(--navy);
}

.footer-legal {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--navy-soft);
  max-width: 38rem;
  margin: 0.6rem auto;
}

/* ---------- Minimal, motion-safe entrance ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero h1,
  .hero-lede {
    animation: rise 0.7s ease-out both;
  }

  .hero-lede {
    animation-delay: 0.12s;
  }

  @keyframes rise {
    from {
      opacity: 0;
      transform: translateY(0.6rem);
    }
    to {
      opacity: 1;
      transform: none;
    }
  }
}

/* Social links (fictional .example profiles) */
.social-links { display: flex; gap: 1.2rem; list-style: none; justify-content: center; padding: 0 1.5rem; margin: 1.5rem auto 0; }
.social-links a { display: inline-flex; color: inherit; opacity: 0.85; }
.social-links a:hover, .social-links a:focus-visible { opacity: 1; }
.social-links svg { width: 1.3rem; height: 1.3rem; }


/* The firm's number sits beside the menu control on small screens —
   set in the same engraved small caps as the masthead. */
.masthead-call { display: none; }

@media (max-width: 40rem) {
  .nav-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
  }

  .masthead-call {
    display: inline-block;
    font-variant: small-caps;
    letter-spacing: 0.14em;
    font-size: 0.95rem;
    color: var(--navy, #1d2c47);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px;
  }
}
