/* Hayden Smith Legal LLC
   Self-hosted fonts only. No third-party requests. */

@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-variable.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #011c3c;
  --navy-deep: #010f22;
  --ink: #17181c;
  --slate: #4a505a;
  --sage: #edefea;
  --rule: #cdd1c9;
  --field-border: #7d848f;
  --brick: #8e3b2a;
  --sand: #efcb9a;
  --on-dark: #f3f4f1;
  --on-dark-muted: #c3cad6;
  --focus: #011c3c;
  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Hanken Grotesk", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --max: 76rem;
}

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

html {
  scroll-padding-top: 6rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: var(--serif);
  font-optical-sizing: auto;
  font-size: 1.125rem;
  line-height: 1.62;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

p { margin: 0 0 1.1em; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Focus: visible everywhere, with a light ring on dark surfaces */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-dark { --focus: #ffe2b5; }

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  padding: 0.75rem 1.1rem;
  background: var(--navy);
  color: #fff;
  font-family: var(--sans);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus { top: 1rem; outline-color: #ffe2b5; }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--rule);
}
.site-header__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  padding-block: 0.9rem;
}
.brand { display: block; line-height: 0; border-radius: 2px; }
.brand img { height: 2.75rem; width: auto; }

.site-nav { flex-basis: 100%; }
.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.9rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-block;
  padding: 0.5rem 0;
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  background: linear-gradient(var(--brick), var(--brick)) left bottom / 0 2px no-repeat;
  transition: background-size 0.2s ease;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { background-size: 100% 2px; }

@media (min-width: 52rem) {
  .site-header { position: sticky; top: 0; z-index: 20; }
  .site-header__bar { flex-wrap: nowrap; padding-block: 0.8rem; }
  .brand img { height: 3.25rem; }
  .site-nav { flex-basis: auto; }
  .site-nav ul { gap: 0.15rem 2rem; }
  .site-nav a { font-size: 1rem; }
}

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-block;
  padding: 0.95rem 1.6rem;
  border: 2px solid var(--navy);
  border-radius: 2px;
  background: var(--navy);
  color: #fff;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.btn:hover { background: #fff; color: var(--navy); }

.btn--sand { border-color: var(--sand); background: var(--sand); color: var(--navy); }
.btn--sand:hover { background: transparent; color: var(--sand); }

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.9);
  background: rgba(1, 15, 34, 0.55);
  color: #fff;
}
.btn--ghost:hover { background: #fff; color: var(--navy); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-start;
  min-height: clamp(34rem, 82vh, 49rem);
  padding-block: clamp(3.5rem, 9vh, 6.5rem) 12rem;
  background: var(--navy) url("../images/nevada-desert-dusk.svg") center bottom / cover no-repeat;
  color: var(--on-dark);
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(1, 15, 34, 0.55) 0%, rgba(1, 15, 34, 0.45) 55%, rgba(1, 15, 34, 0.1) 80%, rgba(1, 15, 34, 0) 100%);
}
@media (min-width: 60rem) {
  .hero::before {
    background:
      linear-gradient(90deg, rgba(1, 15, 34, 0.62) 0%, rgba(1, 15, 34, 0.4) 45%, rgba(1, 15, 34, 0) 72%),
      linear-gradient(180deg, rgba(1, 15, 34, 0.35) 0%, rgba(1, 15, 34, 0) 70%);
  }
}
.hero__title {
  max-width: 13ch;
  margin: 0 0 1.25rem;
  font-size: clamp(2.85rem, 1.4rem + 5.6vw, 5.6rem);
  font-weight: 380;
  line-height: 1.02;
  letter-spacing: -0.018em;
}
.hero__lede {
  max-width: 28rem;
  margin: 0 0 2.25rem;
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
  line-height: 1.45;
  color: var(--on-dark);
}
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1rem; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--sage { background: var(--sage); }
.section--navy { background: var(--navy); color: var(--on-dark); }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.12; text-wrap: balance; }
h2 {
  margin: 0 0 1.25rem;
  font-size: clamp(2rem, 1.4rem + 2vw, 3rem);
  letter-spacing: -0.012em;
}
h3 { margin: 0 0 0.6rem; font-size: clamp(1.4rem, 1.2rem + 0.7vw, 1.75rem); font-weight: 450; letter-spacing: -0.005em; }
h4 { margin: 2rem 0 0.5rem; font-size: 1.3rem; font-weight: 500; }

/* Intro */
.intro__grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
}
.intro__lead {
  max-width: 34rem;
  font-size: clamp(1.35rem, 1.15rem + 0.8vw, 1.7rem);
  line-height: 1.38;
  letter-spacing: -0.005em;
}
.intro__text { max-width: 34rem; color: var(--slate); }
.intro__photo img { width: 100%; }
@media (min-width: 60rem) {
  .intro__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 5rem; }
}

/* Areas of practice */
.areas__layout { display: grid; gap: 2rem; }
.areas__list { margin: 0; padding: 0; list-style: none; }
.area {
  padding-block: 2rem;
  border-top: 1px solid var(--field-border);
}
.area:last-child { border-bottom: 1px solid var(--field-border); }
.area p { max-width: 38rem; margin: 0; }
@media (min-width: 60rem) {
  .areas__layout { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 5rem; align-items: start; }
  .areas__head { position: sticky; top: 7rem; }
  .area:first-child { padding-top: 0.35rem; border-top: 0; }
}

/* Contact */
.contact__layout { display: grid; gap: 3rem; }
.contact__intro p { max-width: 30rem; color: var(--on-dark-muted); }
.contact__email {
  display: inline-block;
  margin-top: 0.25rem;
  color: #fff;
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
  text-decoration-line: underline;
  text-decoration-color: var(--sand);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  overflow-wrap: anywhere;
}
.contact__email:hover { text-decoration-thickness: 3px; }
@media (min-width: 60rem) {
  .contact__layout { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 5rem; align-items: start; }
  .contact__intro { position: sticky; top: 7rem; }
}

/* Form */
.intake {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background: #fff;
  color: var(--ink);
  --focus: #011c3c;
}
.intake h3 { margin-bottom: 0.4rem; }
.intake__help { margin-bottom: 1.5rem; color: var(--slate); font-size: 1rem; line-height: 1.5; }
.field { margin-bottom: 1.25rem; }
.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
}
.field__opt { font-weight: 400; color: var(--slate); }
.field input,
.field select,
.field textarea {
  display: block;
  width: 100%;
  min-height: 2.9rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--field-border);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.4;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { outline-offset: 1px; border-color: var(--navy); }
.field [aria-invalid="true"] { border-color: var(--brick); border-width: 2px; }
.field__error { margin: 0.4rem 0 0; color: var(--brick); font-family: var(--sans); font-size: 0.95rem; font-weight: 600; }
.field__hint { margin: 0.4rem 0 0; color: var(--slate); font-family: var(--sans); font-size: 0.875rem; }
.intake__actions { margin-top: 1.5rem; }
.intake__status { margin-top: 1.25rem; font-family: var(--sans); font-size: 1rem; line-height: 1.5; }
.intake__status:focus { outline: none; }
.intake__status:empty { display: none; }
.intake__status--error { padding: 0.9rem 1rem; border-left: 4px solid var(--brick); background: #f8ece8; color: var(--ink); }
.intake__status--ok { padding: 0.9rem 1rem; border-left: 4px solid var(--navy); background: var(--sage); }
.intake__fallback { margin-top: 1rem; }
.intake__fallback textarea { min-height: 11rem; font-size: 0.9rem; }
.intake__fallback .btn { margin-top: 0.75rem; padding: 0.7rem 1.1rem; font-size: 0.95rem; }

/* Notice */
.notice {
  margin-top: clamp(3rem, 7vw, 5rem);
  padding-top: 2.5rem;
  border-top: 1px solid rgba(243, 244, 241, 0.35);
}
.notice__layout { display: grid; gap: 1.25rem; }
.notice h3 { max-width: 20ch; color: #fff; }
.notice ul { margin: 0; padding-left: 1.2rem; color: var(--on-dark); }
.notice li { margin-bottom: 0.9rem; padding-left: 0.3rem; }
.notice li::marker { color: var(--sand); }
@media (min-width: 60rem) {
  .notice__layout { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 5rem; }
  .notice ul { max-width: 38rem; }
}

/* ---------- Page banner (About, Legal) ---------- */
.banner {
  position: relative;
  padding-block: clamp(3rem, 8vw, 5.5rem) clamp(5.5rem, 12vw, 9rem);
  background: var(--navy) url("../images/nevada-desert-dusk.svg") center 90% / cover no-repeat;
  color: var(--on-dark);
  isolation: isolate;
}
.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(1, 15, 34, 0.7) 0%, rgba(1, 15, 34, 0.5) 60%, rgba(1, 15, 34, 0.1) 100%);
}
@media (min-width: 60rem) {
  .banner::before {
    background:
      linear-gradient(90deg, rgba(1, 15, 34, 0.7) 0%, rgba(1, 15, 34, 0.5) 50%, rgba(1, 15, 34, 0) 80%),
      linear-gradient(180deg, rgba(1, 15, 34, 0.3) 0%, rgba(1, 15, 34, 0) 80%);
  }
}
.banner__title {
  max-width: 18ch;
  margin: 0;
  font-size: clamp(2.5rem, 1.4rem + 4.2vw, 4.4rem);
  font-weight: 380;
  line-height: 1.04;
  letter-spacing: -0.016em;
}
.banner__lede {
  max-width: 34rem;
  margin: 1.1rem 0 0;
  font-size: clamp(1.15rem, 1rem + 0.6vw, 1.4rem);
  line-height: 1.45;
}

/* ---------- About ---------- */
.profile__layout { display: grid; gap: 2.5rem; }
.profile__aside img { width: 100%; max-width: 26rem; }
.profile__aside h2 { margin-top: 2rem; font-size: 1.6rem; }
.profile__aside ul { margin: 0; padding: 0; list-style: none; }
.profile__aside li { padding-block: 0.7rem; border-top: 1px solid var(--field-border); }
.profile__aside li:last-child { border-bottom: 1px solid var(--field-border); }
.profile__body { max-width: 40rem; }
.profile__body p:first-child { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.45rem); line-height: 1.42; }
@media (min-width: 60rem) {
  .profile__layout { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 5rem; align-items: start; }
  .profile__aside { position: sticky; top: 7rem; }
}

/* ---------- Legal ---------- */
.legal__layout { display: grid; gap: 2.5rem; }
.legal__toc { font-family: var(--sans); font-size: 0.95rem; }
.legal__toc p { margin: 0 0 0.6rem; font-weight: 700; }
.legal__toc ul { margin: 0; padding: 0; list-style: none; }
.legal__toc li { margin: 0; }
.legal__toc a { display: block; padding: 0.35rem 0; text-decoration: none; }
.legal__toc a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
.legal__toc ul ul { margin: 0.2rem 0 0.8rem; padding-left: 1rem; border-left: 1px solid var(--rule); }
.legal__toc ul ul a { padding-block: 0.2rem; color: var(--slate); font-size: 0.9rem; }
.legal__body { max-width: 44rem; }
.legal__body h2 {
  margin-top: 4.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--field-border);
}
.legal__body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal__body h3 { margin: 2.25rem 0 0.6rem; font-size: 1.5rem; font-weight: 500; }
.legal__body ul,
.legal__body ol { margin: 0 0 1.2em; padding-left: 1.4rem; }
.legal__body li { margin-bottom: 0.45rem; padding-left: 0.2rem; }
.legal__body li p { margin: 0; }
.legal__body a { text-decoration-color: var(--brick); text-underline-offset: 0.2em; }
.legal__body address { margin: 0 0 1.1em; font-style: normal; }
.legal__meta { color: var(--slate); font-family: var(--sans); font-size: 0.95rem; }
@media (min-width: 60rem) {
  .legal__layout { grid-template-columns: 16rem minmax(0, 1fr); gap: 5rem; align-items: start; }
  .legal__toc { position: sticky; top: 6.5rem; max-height: calc(100vh - 8rem); overflow-y: auto; padding-right: 0.5rem; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: var(--on-dark-muted); font-family: var(--sans); font-size: 0.95rem; }
.site-footer__grid { display: grid; gap: 2rem; padding-block: 3.25rem 2rem; }
.site-footer__name { margin: 0 0 0.35rem; color: #fff; font-family: var(--serif); font-size: 1.35rem; }
.site-footer p { margin: 0; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer a { display: inline-block; padding: 0.3rem 0; color: var(--on-dark); text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
.site-footer a:hover { text-decoration-thickness: 2px; }
.site-footer__legal { padding-block: 1.25rem 2.25rem; border-top: 1px solid rgba(243, 244, 241, 0.2); }
.site-footer__legal p { max-width: none; }
@media (min-width: 52rem) {
  .site-footer__grid { grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; }
}

/* 404 */
.lost { padding-block: clamp(4rem, 12vw, 9rem); }
.lost p { max-width: 32rem; }

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

@media (forced-colors: active) {
  .btn { border: 2px solid ButtonText; }
  .hero, .banner { background-image: none; }
}

@media print {
  .site-header, .hero, .banner, .site-footer, .legal__toc, .skip { display: none; }
  body { font-size: 11pt; color: #000; }
  .legal__layout { display: block; }
}
