/* Michael Nunnelley LLC — site styles */

:root {
  --ink: #0f1b2d;
  --ink-2: #1c2b42;
  --ink-soft: #46546a;
  --paper: #f7f4ee;
  --paper-2: #efe9df;
  --white: #fffdf9;
  --rule: #ddd4c4;
  --accent: #8e2a2a;       /* oxblood */
  --accent-ink: #6f1f1f;
  --brass: #c4a06a;        /* accent on dark */
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 3px;
  --header-h: 72px;
}

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

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

body {
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
ul, ol { list-style: none; }

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

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

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: var(--white); padding: 10px 14px; border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

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

/* ---------- Type ---------- */

h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.015em; line-height: 1.1; }

h1 { font-size: clamp(2.5rem, 6.2vw, 4.6rem); font-variation-settings: "opsz" 144; }
h1 em { font-style: italic; color: var(--accent); }
h2 { font-size: clamp(2rem, 4vw, 3rem); font-variation-settings: "opsz" 120; }
h3 { font-size: 1.4rem; font-variation-settings: "opsz" 36; }

.eyebrow {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 48px; padding: 0 1.4rem;
  font: 600 0.95rem/1 var(--sans); letter-spacing: 0.01em;
  text-decoration: none; border-radius: var(--radius);
  border: 1.5px solid var(--ink);
  transition: background-color .2s, color .2s, border-color .2s, transform .2s;
}
.btn-solid { background: var(--ink); color: var(--white); }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); }
.btn-line { background: transparent; color: var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--white); }
.btn-block { width: 100%; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 244, 238, 0.92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s;
}
.site-header.is-scrolled { border-color: var(--rule); box-shadow: 0 6px 24px -18px rgba(15, 27, 45, .5); }

.header-inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 1rem; }

.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px;
  font: 500 1rem/1 var(--serif); letter-spacing: 0.04em;
  color: var(--white); background: var(--ink);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 3px var(--brass);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font: 500 1.15rem/1.15 var(--serif); }
.brand-sub { font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }

.site-nav { display: flex; align-items: center; gap: 2rem; }
.site-nav ul { display: flex; gap: 1.75rem; }
.site-nav ul a {
  position: relative; text-decoration: none; font-size: 0.93rem; font-weight: 500; color: var(--ink-soft);
  padding: 0.5rem 0; transition: color .2s;
}
.site-nav ul a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.15rem; height: 1.5px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .25s;
}
.site-nav ul a:hover, .site-nav ul a.is-active { color: var(--ink); }
.site-nav ul a:hover::after, .site-nav ul a.is-active::after { transform: scaleX(1); }
.nav-cta { min-height: 42px; padding: 0 1.1rem; font-size: 0.9rem; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 0; background: transparent; cursor: pointer;
  position: relative; color: var(--ink);
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  position: absolute; left: 11px; width: 22px; height: 2px; background: currentColor; border-radius: 2px;
  transition: transform .25s, opacity .2s;
}
.nav-toggle-bar { top: 21px; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; left: 0; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

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

.hero {
  position: relative;
  padding: clamp(3.5rem, 8vw, 7rem) 0 clamp(3.5rem, 7vw, 6rem);
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(196, 160, 106, .16), transparent 60%),
    linear-gradient(var(--paper), var(--paper));
  overflow: hidden;
}
.hero::before {
  /* faint ruled-paper lines */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(to bottom, transparent 0 39px, rgba(15, 27, 45, .045) 39px 40px);
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 85%);
}
.hero-grid {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem); align-items: center;
}
.hero .eyebrow { margin-bottom: 1.25rem; }
.lede { margin-top: 1.5rem; font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-soft); max-width: 36em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2.25rem; }

/* Brief-cover credential card */
.brief {
  position: relative;
  background: var(--white);
  border: 1px solid var(--rule);
  padding: 1.75rem 1.75rem 1.5rem;
  /* stacked-paper edge */
  box-shadow: 10px 10px 0 -1px var(--paper-2), 10px 10px 0 0 var(--rule), 0 30px 60px -30px rgba(15, 27, 45, .45);
}
.brief-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 1rem; margin-bottom: 0.5rem;
  border-bottom: 3px double var(--ink);
}
.brief-kicker { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; }
.brief-seal { font: italic 400 1.9rem/1 var(--serif); color: var(--accent); }
.brief-list > div {
  display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem;
  padding: 0.8rem 0; border-bottom: 1px solid var(--rule);
}
.brief-list > div:last-child { border-bottom: 0; }
.brief-list dt { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); padding-top: 0.2rem; }
.brief-list dd { font-family: var(--serif); font-size: 1.05rem; line-height: 1.35; }
.brief-foot {
  margin-top: 0.75rem; padding-top: 0.9rem; border-top: 1px solid var(--ink);
  text-align: right; font: italic 400 0.95rem/1 var(--serif); color: var(--ink-soft);
}

/* ---------- Stats ---------- */

.stats { background: var(--ink); color: var(--white); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat {
  padding: 2.25rem 1.5rem; display: flex; flex-direction: column; gap: 0.35rem;
  border-left: 1px solid rgba(255, 255, 255, .12);
}
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-num { font: 500 clamp(2rem, 3.6vw, 2.8rem)/1 var(--serif); color: var(--brass); font-variant-numeric: lining-nums; }
.stat-label { font-size: 0.88rem; color: rgba(255, 253, 249, .75); }

/* ---------- Sections ---------- */

.section { padding: clamp(4rem, 9vw, 7.5rem) 0; }

.section-head { display: flex; align-items: flex-start; gap: 1.25rem; margin-bottom: clamp(2.5rem, 5vw, 3.75rem); }
.section-num {
  font: italic 400 clamp(2.4rem, 5vw, 3.6rem)/0.9 var(--serif); color: var(--accent);
  min-width: 2.2ch;
}
.section-head .eyebrow { margin-bottom: 0.5rem; }

/* Practice */
.practice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.practice {
  position: relative; display: flex; flex-direction: column;
  background: var(--white); border: 1px solid var(--rule); border-top: 3px solid var(--ink);
  padding: 2rem 1.75rem 1.75rem;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.practice:hover { transform: translateY(-4px); border-top-color: var(--accent); box-shadow: 0 24px 40px -30px rgba(15, 27, 45, .5); }
.practice-num { font: italic 400 1.1rem/1 var(--serif); color: var(--accent); margin-bottom: 1rem; }
.practice h3 { margin-bottom: 0.9rem; }
.practice p { color: var(--ink-soft); font-size: 0.98rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: auto; padding-top: 1.5rem; }
.tags li {
  font-size: 0.75rem; font-weight: 500; letter-spacing: 0.02em;
  padding: 0.3rem 0.65rem; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink-soft); background: var(--paper);
}

/* Record (dark) */
.section-dark { background: var(--ink-2); color: var(--white); position: relative; overflow: hidden; }
.section-dark::after {
  content: "\00A7"; position: absolute; right: -2rem; bottom: -9rem; pointer-events: none;
  font: italic 400 34rem/1 var(--serif); color: rgba(255, 255, 255, .03);
}
.section-dark .eyebrow, .section-dark .section-num { color: var(--brass); }

.record-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(2.5rem, 6vw, 6rem); }
.record-intro p { color: rgba(255, 253, 249, .78); margin-bottom: 1.1rem; max-width: 32em; }
.record-intro .section-head { margin-bottom: 2rem; }

.timeline { position: relative; padding-left: 2rem; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 0.6rem; bottom: 0.6rem; width: 1px; background: rgba(255, 255, 255, .2); }
.timeline li { position: relative; padding-bottom: 2.1rem; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: calc(-2rem + 1px); top: 0.45rem;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--ink-2); box-shadow: 0 0 0 1.5px var(--brass);
}
.timeline li.is-current::before { background: var(--brass); box-shadow: 0 0 0 5px rgba(196, 160, 106, .2); }
.tl-label { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass); margin-bottom: 0.35rem; }
.timeline h3 { font-size: 1.35rem; margin-bottom: 0.35rem; }
.timeline p { color: rgba(255, 253, 249, .7); font-size: 0.96rem; }

/* Courts band */
.courts { background: var(--paper-2); border-bottom: 1px solid var(--rule); padding: 2.5rem 0; }
.nowrap { white-space: nowrap; }
.courts .eyebrow { color: var(--ink-soft); margin-bottom: 1rem; }
.courts-list { display: flex; flex-wrap: wrap; gap: 0.5rem 0; }
.courts-list li { font: 400 clamp(1.05rem, 1.7vw, 1.3rem)/1.4 var(--serif); }
.courts-list li:not(:last-child)::after { content: "\00B7"; margin: 0 0.9rem; color: var(--accent); }

/* Approach */
.approach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(2rem, 4vw, 3.5rem); }
.approach { border-top: 1px solid var(--ink); padding-top: 1.5rem; }
.approach h3 { font-size: 1.3rem; margin-bottom: 0.75rem; }
.approach p { color: var(--ink-soft); }

/* Contact */
.contact { background: var(--white); border-top: 1px solid var(--rule); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(2.5rem, 6vw, 5rem); align-items: center; }
.contact .section-head { margin-bottom: 1.5rem; }
.contact-lede { color: var(--ink-soft); font-size: 1.1rem; max-width: 30em; }

.contact-card {
  background: var(--paper); border: 1px solid var(--rule); border-top: 3px solid var(--accent);
  padding: 2rem;
}
.contact-phone { display: block; text-decoration: none; padding-bottom: 1.25rem; border-bottom: 1px solid var(--rule); }
.contact-label { display: block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.35rem; }
.contact-value { font: 500 clamp(1.8rem, 3.4vw, 2.4rem)/1.1 var(--serif); transition: color .2s; }
.contact-phone:hover .contact-value { color: var(--accent); }
.contact-row { padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.contact-value-sm { font-family: var(--serif); font-size: 1.1rem; line-height: 1.4; }
.contact-card .btn { margin-top: 1.5rem; }

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

.site-footer { background: var(--ink); color: rgba(255, 253, 249, .7); padding: 3rem 0 2.5rem; font-size: 0.85rem; }
.footer-inner { display: grid; gap: 1.25rem; }
.footer-brand { display: flex; align-items: center; gap: 0.75rem; color: var(--white); font-family: var(--serif); font-size: 1.05rem; }
.footer-brand .brand-mark { width: 34px; height: 34px; font-size: 0.85rem; box-shadow: inset 0 0 0 1px var(--brass); }
.disclaimer { max-width: 60em; line-height: 1.6; }
.copyright { color: rgba(255, 253, 249, .5); }

/* Sticky mobile call bar */
.mobile-call {
  display: none;
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 90;
  align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 52px; border-radius: 999px;
  background: var(--accent); color: var(--white); text-decoration: none; font-weight: 600;
  box-shadow: 0 12px 30px -10px rgba(15, 27, 45, .6);
  transform: translateY(150%); transition: transform .3s ease;
}
.mobile-call svg { width: 18px; height: 18px; fill: currentColor; }
.mobile-call.is-visible { transform: translateY(0); }

/* ---------- Reveal animation ---------- */

/* Hero animates on load with CSS only; everything below reveals on scroll */
.hero .rise { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }
.hero .rise:nth-child(2) { animation-delay: .08s; }
.hero .rise:nth-child(3) { animation-delay: .16s; }
.hero .rise:nth-child(4) { animation-delay: .24s; }
.hero .brief.rise { animation-delay: .3s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero .rise { animation: none; }
  .practice, .btn, .mobile-call { transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
  .site-nav { gap: 1.25rem; }
  .site-nav ul { gap: 1.25rem; }
  .practice-grid { grid-template-columns: 1fr 1fr; }
  .practice:last-child { grid-column: 1 / -1; }
}

@media (max-width: 880px) {
  :root { --header-h: 64px; }

  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: 0.5rem var(--gutter) 1.5rem;
    box-shadow: 0 20px 30px -20px rgba(15, 27, 45, .35);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: transform .25s, opacity .25s, visibility .25s;
  }
  .site-nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: 0.95rem 0; font-size: 1.05rem; border-bottom: 1px solid var(--rule); color: var(--ink); }
  .site-nav ul a::after { display: none; }
  .nav-cta { margin-top: 1.25rem; min-height: 50px; }

  .hero-grid, .record-grid, .contact-grid { grid-template-columns: 1fr; }
  .brief { max-width: 560px; }

  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat { padding: 1.75rem 1.25rem; border-left: 0; border-top: 1px solid rgba(255, 255, 255, .12); }
  .stat:nth-child(odd) { padding-left: 0; }
  .stat:nth-child(even) { border-left: 1px solid rgba(255, 255, 255, .12); }
  .stat:nth-child(-n+2) { border-top: 0; }

  .approach-grid { grid-template-columns: 1fr; gap: 2rem; }

  .mobile-call { display: flex; }
  .site-footer { padding-bottom: 6rem; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .practice-grid { grid-template-columns: 1fr; }
  .practice:last-child { grid-column: auto; }
  .hero-actions .btn { flex: 1 1 100%; }
  .brief { padding: 1.4rem 1.25rem 1.25rem; }
  .brief { box-shadow: 6px 6px 0 -1px var(--paper-2), 6px 6px 0 0 var(--rule), 0 24px 40px -28px rgba(15, 27, 45, .45); }
  .brief-list > div { grid-template-columns: 1fr; gap: 0.2rem; }
  .section-head { gap: 0.9rem; }
  .courts-list { flex-direction: column; }
  .courts-list li:not(:last-child)::after { display: none; }
  .courts-list li { padding: 0.45rem 0; border-bottom: 1px solid var(--rule); }
  .courts-list li:last-child { border-bottom: 0; }
  .contact-card { padding: 1.5rem; }
  .brand-sub { display: none; }
}
