/* =========================================================
   Kim Au Law — Warm Serif redesign
   Editorial: ink on warm paper, hairline rules, serif display.
   ========================================================= */

:root {
  --paper:      #FDFCFA;
  --white:      #FFFFFF;
  --ink:        #231F1B;
  --ink-hover:  #3C352E;
  --body:       #6D665E;
  --muted:      #9B9287;
  --faint:      #A9A196;
  --rule:       #E8E2D8;
  --field:      #DED7CB;
  --on-dark:    #F3EFE9;
  --on-dark-2:  #A49A8E;

  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans:  'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --maxw: 1240px;
  --gutter: 56px;
}

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

/* The [hidden] attribute is what main.js toggles on #formSuccess and
   #formError. Any author-level `display` on those elements would otherwise
   outrank the UA's [hidden]{display:none} and pin them open, so enforce it. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; }

a { color: var(--ink); }
a:hover { color: var(--body); }

::placeholder { color: #B3ACA2; }

/* ---------- Layout ---------- */
.container { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.section { padding-top: 96px; }

/* ---------- Shared type ---------- */
.eyebrow {
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.section-title {
  font-family: var(--serif);
  font-size: 46px;
  font-weight: 300;
  letter-spacing: -.02em;
  line-height: 1.1;
  color: var(--ink);
  margin: 0;
}

/* Every section opens with the same centered head: eyebrow, title,
   optional intro. One rhythm across the whole page. */
.section-head-center { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.section-head-center .section-title { margin-bottom: 18px; }
.section-intro { font-size: 14.5px; line-height: 1.75; color: var(--body); margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.btn--sm { padding: 10px 20px; font-size: 12.5px; }
.btn--lg { padding: 13px 28px; font-size: 13.5px; }
.btn--xl { padding: 15px 32px; font-size: 15px; }

.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--ink-hover); color: var(--paper); }

.btn--outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: var(--paper); }

.btn--paper { background: var(--on-dark); color: var(--ink); }
.btn--paper:hover { background: #FFFFFF; color: var(--ink); }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(253, 252, 250, .93);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  padding-bottom: 28px;
}

.brand { text-decoration: none; }
.brand__name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: .01em;
  color: var(--ink);
}

.nav__links { display: flex; align-items: center; gap: 30px; }
.nav__links a {
  font-size: 13px;
  letter-spacing: .03em;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: border-color .18s ease;
}
.nav__links a:hover { border-bottom-color: var(--ink); color: var(--ink); }

.nav__cta { display: flex; align-items: center; gap: 20px; }
.nav__espanol { font-size: 12px; color: var(--muted); }

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: none;
  border: 0;
  cursor: pointer;
}
.hamburger span {
  display: block;
  height: 1px;
  width: 22px;
  background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}
.hamburger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; }
.hamburger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero { padding-top: 40px; text-align: center; }

.hero .eyebrow { margin-bottom: 26px; }

.hero__title {
  font-family: var(--serif);
  font-size: 70px;
  font-weight: 300;
  letter-spacing: -.02em;
  line-height: 1.06;
  margin: 0 auto 26px;
  max-width: 860px;
}

.hero__lede {
  font-size: 15px;
  line-height: 1.75;
  color: var(--body);
  max-width: 600px;
  margin: 0 auto 34px;
}
.hero__lede strong { color: var(--ink); font-weight: 500; }

.hero__actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.hero__trust {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 56px;
}
.hero__trust .dot { opacity: .6; }

/* =========================================================
   STAT
   ========================================================= */
.stat-row { padding-top: 64px; }
.stat {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 20px;
  padding: 36px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.stat__num {
  font-family: var(--serif);
  font-size: 52px;
  font-weight: 300;
  letter-spacing: -.02em;
  line-height: 1;
}
.stat__label {
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* =========================================================
   PRACTICE AREAS
   ========================================================= */
.pa-list { border-top: 1px solid var(--rule); }

.pa-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  gap: 40px;
  align-items: center;
  padding: 30px 0;
  border-bottom: 1px solid var(--rule);
}
.pa-row__title {
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
}
.pa-row__text {
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--body);
  margin: 0;
}
.pa-row__link {
  font-size: 13.5px;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.pa-row__link:hover { border-bottom-color: var(--ink); color: var(--ink); }

/* =========================================================
   WHY CHOOSE US — three symmetric columns under a centered head
   ========================================================= */
.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  text-align: center;
  border-top: 1px solid var(--rule);
  padding-top: 40px;
  max-width: 1080px;
  margin-inline: auto;
}
.value__title {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 400;
  margin-bottom: 8px;
}
.value__text {
  font-size: 14px;
  color: var(--body);
  line-height: 1.7;
  max-width: 300px;
  margin-inline: auto;
}

/* =========================================================
   ATTORNEYS — three centered columns framed by hairlines,
   echoing the stat band.
   ========================================================= */
.attorneys-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1080px;
  margin-inline: auto;
  text-align: center;
  padding: 40px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.attorney__name {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 300;
  letter-spacing: -.01em;
  margin: 0 0 8px;
}
.attorney__title {
  font-size: 12.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* =========================================================
   CONSULT BANNER
   ========================================================= */
.banner {
  margin-top: 96px;
  background: var(--ink);
  color: var(--on-dark);
}
.banner__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
  padding-top: 80px;
  padding-bottom: 80px;
}
.banner__title {
  font-family: var(--serif);
  font-size: 44px;
  font-weight: 300;
  letter-spacing: -.02em;
  line-height: 1.1;
  color: var(--on-dark);
  margin: 0 0 12px;
}
.banner__sub { font-size: 14.5px; color: var(--on-dark-2); margin: 0 0 30px; }

/* =========================================================
   CONTACT + MAP
   ========================================================= */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: start;
}

.form { display: flex; flex-direction: column; gap: 16px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; }

.form input,
.form textarea {
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--ink);
  padding: 13px 18px;
  border: 1px solid var(--field);
  border-radius: 999px;
  background: var(--white);
  outline: none;
  width: 100%;
  transition: border-color .18s ease;
}
.form textarea {
  border-radius: 20px;
  padding: 14px 18px;
  resize: vertical;
  min-height: 130px;
}
.form input:focus,
.form textarea:focus { border-color: var(--ink); }

.form input.is-invalid,
.form textarea.is-invalid { border-color: #B4442F; }

.field__error {
  display: none;
  font-size: 12px;
  color: #B4442F;
  margin: 6px 0 0 18px;
}
.field__error.is-visible { display: block; }

.form__hint { font-size: 12px; color: var(--muted); margin: -4px 0 0; }

.form__submit {
  align-self: flex-start;
  font-family: var(--sans);
  font-size: 13.5px;
  color: var(--paper);
  background: var(--ink);
  border: 0;
  border-radius: 999px;
  padding: 14px 32px;
  cursor: pointer;
  transition: background .18s ease;
}
.form__submit:hover { background: var(--ink-hover); }
.form__submit:disabled { opacity: .6; cursor: default; }

.form__disclaimer { font-size: 11.5px; color: var(--faint); margin: 0; line-height: 1.6; }

.form__success {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  border: 1px solid var(--rule);
  background: var(--white);
}
.form__success strong { font-size: 15px; font-family: var(--serif); font-weight: 500; }
.form__success span { font-size: 13.5px; color: var(--body); line-height: 1.6; }

.form__error-msg {
  padding: 16px 20px;
  border: 1px solid #E2C4BC;
  background: #FBF3F1;
  font-size: 13.5px;
  color: #8C3623;
  line-height: 1.6;
}
.form__error-msg a { color: inherit; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

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

.map { height: 380px; margin-bottom: 36px; }
.map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  filter: grayscale(1) contrast(.95);
}

.contact-details { display: flex; flex-direction: column; }
.detail {
  padding: 20px 0;
  border-top: 1px solid var(--rule);
}
.detail:last-child { border-bottom: 1px solid var(--rule); }
.detail__label {
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.detail__value { font-size: 15px; line-height: 1.6; color: var(--ink); }
.detail__value a { text-decoration: none; }
.detail__value a:hover { text-decoration: underline; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { background: var(--paper); }
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
  padding-top: 80px;
  padding-bottom: 48px;
  border-top: 1px solid var(--rule);
}
.footer__brand { display: flex; flex-direction: column; gap: 6px; }
.footer__name {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  color: var(--ink);
}
.footer__domain { font-size: 12.5px; color: var(--muted); }
.footer__legal {
  font-size: 12.5px;
  color: var(--muted);
  max-width: 560px;
  text-align: center;
  line-height: 1.7;
}
.footer__legal a { color: var(--muted); }
.footer__legal a:hover { color: var(--ink); }

/* =========================================================
   LEGAL PAGES (privacy / terms / messaging)
   ========================================================= */
/* "← Back to site" in the minimal legal-page nav. Same quiet
   underline-on-hover treatment as the practice-area links. */
.link-arrow {
  font-size: 13px;
  letter-spacing: .03em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  padding-bottom: 3px;
  border-bottom: 1px solid transparent;
  transition: border-color .18s ease;
}
.link-arrow:hover { border-bottom-color: var(--ink); color: var(--ink); }

.legal { max-width: 760px; margin: 0 auto; }
.legal__meta { color: var(--faint); font-size: 13px; margin: -8px 0 28px; }
.legal p, .legal li { color: var(--body); font-size: 15px; line-height: 1.8; }
.legal h2 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  color: var(--ink);
  margin: 36px 0 10px;
}
.legal a { color: var(--ink); text-decoration: underline; }
.legal a:hover { color: var(--body); }
.legal ul { padding-left: 20px; margin: 10px 0; }
.legal li { margin-bottom: 6px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  :root { --gutter: 40px; }
  .hero__title { font-size: 58px; }
  .section-title { font-size: 40px; }
  .values { gap: 28px; }
  .contact { gap: 48px; }
}

@media (max-width: 900px) {
  .section { padding-top: 72px; }

  .nav__inner { flex-wrap: wrap; }
  .hamburger { display: flex; }
  .nav__espanol { display: none; }

  .nav__links {
    display: none;
    order: 3;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding-top: 10px;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a {
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
    font-size: 15px;
  }
  .nav__links a:hover { border-bottom-color: var(--rule); }

  .hero { padding-top: 32px; }
  .hero__title { font-size: 46px; }

  .pa-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 26px 0;
  }

  .values { grid-template-columns: 1fr; gap: 0; padding-top: 0; border-top: 0; }
  .attorneys-row { grid-template-columns: 1fr; gap: 32px; }
  .value {
    padding: 24px 0;
    border-top: 1px solid var(--rule);
  }
  .value:last-child { border-bottom: 1px solid var(--rule); }

  .banner { margin-top: 72px; }
  .banner__inner {
    padding-top: 60px;
    padding-bottom: 60px;
  }
  .banner__title { font-size: 36px; }

  .contact { grid-template-columns: 1fr; }
  .contact__info-col { order: -1; }

  .footer__inner { padding-top: 60px; }
}

@media (max-width: 480px) {
  :root { --gutter: 22px; }
  .hero__title { font-size: 40px; }
  .section-title { font-size: 32px; }
  .stat__num { font-size: 42px; }
  .pa-row__title { font-size: 25px; }
  .banner__title { font-size: 30px; }
  .hero__actions .btn { width: 100%; text-align: center; }
  .form__row { grid-template-columns: 1fr; }
  .attorney__name { font-size: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
