/* mordysteinfeld.com shared styles. Part 1: base design. Part 2 (at the end): inner pages. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Brand palette — Ink · Bone · Oxblood */
  --ink: #0e0e0e;
  --ink-soft: #2a2520;
  --ink-mid: #3a3a3a;
  --ink-light: #7a7570;
  --warm-gray: #7a7165;
  --bone: #f1ece2;
  --bone-soft: #e7e1d4;
  --stone: #cfc6b5;
  --stone-soft: #d8d1c2;
  --oxblood: #6b1f1f;
  --oxblood-hover: #4a1414;
  --gold: #c9a96e;          /* accent on ink only */
  --gold-light: #d9bd8a;
  --rule: rgba(0,0,0,0.12);
  /* legacy aliases retained for unchanged selectors */
  --navy: var(--ink);
  --navy-mid: var(--ink-soft);
  --warm-white: var(--bone);
  --warm-off: var(--bone-soft);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bone);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── NAV ── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 22px 48px;
  background: transparent;
  transition: background 0.4s, box-shadow 0.4s;
}
nav.scrolled {
  background: rgba(14,14,14,0.97);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
.nav-name {
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  font-weight: 400;
  letter-spacing: 0.005em;
  color: var(--bone);
  text-decoration: none;
}
.nav-links { display: flex; gap: 36px; }
.nav-links a {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--gold-light); }

.nav-hamburger {
  display: none;
  flex-direction: column; gap: 5px;
  cursor: pointer; padding: 4px;
}
.nav-hamburger span {
  display: block; width: 22px; height: 1.5px;
  background: rgba(255,255,255,0.75);
  transition: transform 0.3s, opacity 0.3s;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  display: none;
  position: fixed; top: 60px; left: 0; right: 0; z-index: 99;
  background: rgba(14,14,14,0.98);
  padding: 24px;
  flex-direction: column; gap: 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color 0.2s;
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover { color: var(--gold-light); }

/* ── HERO ── */
.hero {
  background: var(--navy);
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 70% 40%, rgba(42,37,32,0.55) 0%, transparent 70%);
  pointer-events: none;
}
.hero-left {
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 120px 64px 64px 64px;
  position: relative; z-index: 1;
}
.hero-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
}
.hero-name {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(60px, 7.6vw, 108px);
  font-weight: 400;
  line-height: 0.95;
  color: var(--bone);
  margin-bottom: 14px;
  letter-spacing: -0.018em;
}
.hero-tagline {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(22px, 2.4vw, 32px);
  color: var(--gold);
  line-height: 1.3;
  letter-spacing: 0.005em;
  margin-bottom: 36px;
}
.hero-tagline em { font-style: italic; }
.hero-desc {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(255,255,255,0.62);
  max-width: 440px;
  margin-bottom: 32px;
  font-weight: 300;
}
.credentials {
  display: flex; flex-direction: column; gap: 6px;
}
.cred-item {
  display: flex; align-items: center; gap: 14px;
}
.cred-item::before {
  content: '';
  width: 20px; height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}
.cred-item span {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.03em;
  color: rgba(255,255,255,0.5);
}
.cred-item strong {
  color: rgba(255,255,255,0.85);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.08em;
  min-width: 36px;
}

.hero-right {
  position: relative;
  overflow: hidden;
}
.hero-right img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(20%);
  opacity: 0.85;
  mix-blend-mode: luminosity;
}
.hero-right::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(to right, var(--navy) 0%, transparent 30%),
              linear-gradient(to top, var(--navy) 0%, transparent 30%);
}

/* ── SECTION BASE ── */
section { padding: 100px 0; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 48px; }

.section-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--oxblood);
  margin-bottom: 16px;
}
.section-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(40px, 4.4vw, 60px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 56px;
}
.section-title em { font-style: italic; }

/* ── EXPERTISE ── */
#expertise { background: var(--warm-white); }
.expertise-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 2px;
  background: var(--rule);
}
.expertise-block {
  background: var(--warm-white);
  padding: 52px;
}
.expertise-block.secondary {
  background: var(--warm-off);
}
.expertise-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--oxblood);
  border: 1px solid var(--oxblood);
  padding: 4px 12px;
  margin-bottom: 24px;
}
.expertise-heading {
  font-family: 'Instrument Serif', serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 20px;
  color: var(--ink);
}
.expertise-body {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-mid);
  margin-bottom: 32px;
  font-weight: 300;
}
.skill-list {
  list-style: none;
  display: flex; flex-direction: column; gap: 10px;
}
.skill-list li {
  font-size: 13px;
  color: var(--ink-mid);
  padding-left: 16px;
  position: relative;
}
.skill-list li::before {
  content: '';
  position: absolute; left: 0; top: 50%;
  width: 6px; height: 1px;
  background: var(--oxblood);
}

/* ── ENGAGEMENTS ── */
#engagements { background: var(--navy); }
#engagements .section-label { color: var(--gold); }
#engagements .section-title { color: white; }

.engagements-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(255,255,255,0.08);
}
.engagement-card {
  background: var(--navy);
  padding: 28px 32px;
  transition: background 0.25s;
  border: 1px solid transparent;
  position: relative;
}
.engagement-card:hover {
  background: var(--navy-mid);
  border-color: rgba(255,255,255,0.06);
}
.eng-sector {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.eng-title {
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--bone);
  line-height: 1.25;
  margin-bottom: 10px;
}
.eng-title-sub {
  display: block;
  font-size: 11px;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  color: rgba(255,255,255,0.35);
  margin-top: 4px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.eng-desc {
  font-size: 12px;
  line-height: 1.7;
  color: rgba(255,255,255,0.4);
  font-weight: 300;
}

/* ── ABOUT ── */
#about { background: var(--warm-off); }
.about-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  align-items: start;
}
.about-photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: center top;
  filter: grayscale(15%);
}
.about-content {}
.about-bio {
  font-family: 'Instrument Serif', serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--ink);
  margin-bottom: 32px;
}
.about-detail {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-mid);
  font-weight: 300;
}
.creds-row {
  display: flex; gap: 32px; flex-wrap: wrap;
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid var(--rule);
}
.cred-badge {
  display: flex; flex-direction: column; gap: 4px;
}
.cred-badge-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--oxblood);
}
.cred-badge-value {
  font-size: 13px;
  color: var(--ink-mid);
}

/* ── CONTACT ── */
#contact {
  background: var(--warm-white);
  text-align: center;
  padding: 120px 0;
}
.contact-inner { max-width: 600px; margin: 0 auto; padding: 0 48px; }
.contact-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(44px, 5.2vw, 72px);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 18px;
}
.contact-tagline {
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  line-height: 1.3;
  color: var(--oxblood);
  margin-bottom: 36px;
}
.contact-tagline em { font-style: italic; }
.contact-sub {
  font-size: 14px;
  color: var(--ink-light);
  font-weight: 300;
  margin-bottom: 40px;
}
.contact-links {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 12px 40px;
}
.contact-links a {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--oxblood);
  transition: color 0.2s, border-color 0.2s;
}
.contact-links a:hover {
  color: var(--oxblood);
  border-bottom-color: var(--oxblood-hover);
}
.contact-links svg {
  width: 16px; height: 16px;
  stroke: currentColor; fill: none;
  stroke-width: 1.5;
  flex-shrink: 0;
}
.contact-links svg.filled {
  fill: currentColor; stroke: none;
}

/* ── FOOTER ── */
footer {
  background: var(--ink);
  padding: 28px 48px;
  display: flex; justify-content: space-between; align-items: center;
  gap: 32px;
}
footer span {
  font-size: 11px;
  color: rgba(241,236,226,0.4);
  letter-spacing: 0.06em;
}
.footer-tagline {
  font-family: 'Instrument Serif', serif !important;
  font-size: 15px !important;
  color: var(--gold) !important;
  letter-spacing: 0.005em !important;
}
.footer-tagline em { font-style: italic; }
@media (max-width: 640px) {
  footer { flex-direction: column; gap: 10px; text-align: center; padding: 24px; }
}

/* ── ANIMATIONS ── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in.visible { opacity: 1; transform: none; }



@media (max-width: 768px) {
  nav { padding: 18px 24px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .hero { grid-template-columns: 1fr; }
  .hero-right { display: none; }
  .hero-left { padding: 100px 24px 60px; }
  .container { padding: 0 24px; }
  .expertise-grid { grid-template-columns: 1fr; }
  .engagements-grid { grid-template-columns: 1fr; }
  .about-inner { grid-template-columns: 1fr; gap: 40px; }
  section { padding: 70px 0; }
}

/* ═════════════════════════════════════════════════════════════
   PART 2 — inner pages
   ═════════════════════════════════════════════════════════════ */

/* ── INNER-PAGE HERO: a short ink band with eyebrow, H1 and lead ── */
.page-hero {
  background: var(--ink);
  padding: 168px 0 88px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 80% at 70% 40%, rgba(42,37,32,0.55) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero .container { position: relative; z-index: 1; }
.page-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(40px, 5.2vw, 68px);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.015em;
  color: var(--bone);
  max-width: 920px;
  margin-bottom: 32px;
}
.page-lead {
  font-size: 16px;
  line-height: 1.8;
  color: rgba(255,255,255,0.62);
  font-weight: 300;
  max-width: 760px;
}

/* Balanced line breaks for the large serif lines */
.hero-tagline, .page-title { text-wrap: balance; }
.page-lead + .page-lead { margin-top: 16px; }

/* ── SECTION TONES ── */
.tone-light { background: var(--bone); }
.tone-soft { background: var(--bone-soft); }
.tone-ink { background: var(--ink); }
.tone-ink .section-label { color: var(--gold); }
.tone-ink .section-title { color: white; }
section.section-compact { padding: 64px 0; }

/* Section titles: one line when they fit; otherwise break at the marked point */
.title-part { display: inline-block; }

/* Optional line under a section title */
.section-title.has-sub { margin-bottom: 14px; }
.section-sub {
  font-family: 'Instrument Serif', serif;
  font-size: 22px;
  line-height: 1.3;
  color: var(--oxblood);
  margin-bottom: 48px;
}

/* ── BODY COPY ── */
.prose { max-width: 760px; }
.prose p {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-mid);
  font-weight: 300;
}
.prose > * + * { margin-top: 20px; }
.skill-list li::before { top: 0.8em; }
.skill-list.long li { font-size: 14px; line-height: 1.7; }
.skill-list.long li::before { top: 0.85em; }

/* ── TEXT LINKS ── */
.prose a, .about-detail a, .expertise-body a, .block-links a, .faq-a a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--oxblood);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  transition: color 0.2s;
}
.prose a:hover, .about-detail a:hover, .expertise-body a:hover,
.block-links a:hover, .faq-a a:hover { color: var(--oxblood); }
.block-links {
  display: flex; flex-direction: column; align-items: flex-start;
  gap: 12px;
  margin-top: 32px;
  font-size: 13px;
  line-height: 1.6;
  letter-spacing: 0.04em;
}
.about-detail.more-links { margin-top: 20px; }

/* ── ENGAGEMENT CARDS (additions) ── */
/* Card text size and contrast */
.eng-desc { font-size: 13px; color: rgba(255,255,255,0.62); }
.eng-title-sub { color: rgba(255,255,255,0.55); }
a.engagement-card { display: block; text-decoration: none; color: inherit; }
.engagements-grid > .engagement-card:last-child:nth-child(odd) { grid-column: 1 / -1; }
.eng-desc a {
  color: rgba(255,255,255,0.7);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  transition: color 0.2s;
}
.eng-desc a:hover { color: var(--gold-light); }
section.cards-band { padding: 72px 0; }
.cards-note {
  margin-top: 28px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
  font-weight: 300;
}

/* ── FORENSIC SERVICE LINES ── */
.service-lines {
  display: flex; flex-direction: column;
  gap: 2px;
  background: var(--rule);
}
.service-line {
  display: grid;
  grid-template-columns: 3fr 2fr;
  background: var(--bone);
}
.service-line.text-only { grid-template-columns: 1fr; }
.service-line .expertise-body { margin-bottom: 0; }
.line-sub {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: 19px;
  line-height: 1.35;
  color: var(--oxblood);
  margin: -8px 0 20px;
}
.service-line-cards {
  display: flex; flex-direction: column;
  gap: 1px;
  background: #212121;
}
.service-line-cards .engagement-card { flex: 1; }
.lines-note {
  margin-top: 32px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-mid);
  font-weight: 300;
  max-width: 760px;
}

/* ── FAQ (stacked, always visible) ── */
.faq-list {
  max-width: 820px;
  margin-top: 24px;
  border-top: 1px solid var(--rule);
}
.faq-item {
  padding: 32px 0;
  border-bottom: 1px solid var(--rule);
}
.faq-q {
  font-family: 'Instrument Serif', serif;
  font-size: 26px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--ink);
  margin-bottom: 14px;
}
.faq-a {
  font-size: 15px;
  line-height: 1.8;
  color: var(--ink-mid);
  font-weight: 300;
}

/* ── CAREER TIMELINE (/about) ── */
.timeline {
  list-style: none;
  max-width: 900px;
  border-top: 1px solid var(--rule);
}
.timeline-item {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 32px;
  padding: 30px 0;
  border-bottom: 1px solid var(--rule);
}
.timeline-date {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--oxblood);
  padding-top: 7px;
}
.timeline-role {
  font-family: 'Instrument Serif', serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink);
}
.timeline-org {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm-gray);
  margin-top: 6px;
}
.timeline-desc {
  font-size: 14px;
  line-height: 1.8;
  color: var(--ink-mid);
  font-weight: 300;
  margin-top: 10px;
}
.timeline-desc:first-child { margin-top: 3px; }

/* ── FOOTER (links row + identity line) ── */
footer { flex-wrap: wrap; row-gap: 20px; }
footer > span:last-of-type { text-align: right; }
.footer-links {
  flex: 0 0 100%;
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 10px 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-links a {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(241,236,226,0.6);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--gold-light); }

/* ── HOME PRACTICE CARDS: column widths ── */
@media (min-width: 769px) {
  .expertise-grid { grid-template-columns: 27fr 23fr; }
}

/* ── ROBUSTNESS AND ACCESSIBILITY ── */
/* Content hides for the fade only when the script that reveals it is running */
html:not(.js) .fade-in { opacity: 1; transform: none; }
@media print {
  .fade-in { opacity: 1 !important; transform: none !important; transition: none !important; }
  nav, .mobile-menu { position: static; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade-in { opacity: 1; transform: none; transition: none; }
}
/* Menu button: 44px tap area */
.nav-hamburger {
  background: none; border: 0;
  min-width: 44px; min-height: 44px;
  justify-content: center; align-items: center;
  margin-right: -11px;
}
/* Skip link: hidden until focused */
.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--bone); color: var(--ink);
  padding: 10px 16px; font-size: 13px; text-decoration: none;
}
.skip-link:focus { top: 16px; }
/* Contrast */
footer span { color: rgba(241,236,226,0.6); }
.contact-sub, .timeline-org { color: var(--ink-mid); }
/* Long text in a full-width last card stays readable */
.engagements-grid > .engagement-card:last-child:nth-child(odd) .eng-desc { max-width: 760px; }
/* Phone browsers: hero fits the visible screen */
.hero { min-height: 100svh; }

/* ── RESPONSIVE (additions) ── */
@media (max-width: 960px) {
  .nav-links { gap: 24px; }
  .service-line { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 10px; text-align: center; }
  footer > span:last-of-type { text-align: center; }
  .footer-links { flex: none; align-self: stretch; margin-bottom: 10px; }
}
@media (max-width: 900px) {
  nav { padding: 20px 24px; }
  .nav-links { gap: 18px; }
}
@media (max-width: 768px) {
  .page-hero { padding: 120px 0 56px; }
  .timeline-item { grid-template-columns: 1fr; gap: 8px; }
  .faq-q { font-size: 23px; }
  .expertise-block { padding: 40px 28px; }
}
