/* ============================================================
   Tiedrich Global — Base elements, layout primitives, utilities
   ============================================================ */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-white);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--type-base);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, video { display: block; max-width: 100%; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-heading);
  color: var(--color-text);
  margin: 0;
}

p { margin: 0; }

/* UA margins on these would silently narrow and shift the blocks they wrap */
figure, blockquote, figcaption { margin: 0; }
ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

a { color: var(--color-blue); transition: color 0.15s ease; }
a:hover { color: var(--color-teal); }

button { font: inherit; }

:focus-visible {
  outline: 2px solid var(--color-teal);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

input::placeholder, textarea::placeholder { color: #9AA1A9; }

/* ── Layout primitives ──────────────────────────────────────
   Every section follows: section > container > element.
   ───────────────────────────────────────────────────────── */

.section {
  position: relative;
  background: var(--color-white);
  padding: var(--section-py-lg) var(--section-px);
}
.section--sm  { padding-top: var(--section-py-sm);  padding-bottom: var(--section-py-sm); }
.section--md  { padding-top: var(--section-py-md);  padding-bottom: var(--section-py-md); }
.section--beat { padding-top: 5.5rem; padding-bottom: 5.5rem; }
.section--tight-top    { padding-top: 2.5rem; }
.section--tight-bottom { padding-bottom: 2.5rem; }
.section--divided { border-top: var(--border-thin) solid var(--color-border); }
.section--surface { background: var(--color-surface); }

.container    { max-width: var(--container); margin: 0 auto; }
.container--md { max-width: 60rem; margin: 0 auto; }
.container--lg { max-width: var(--container-lg); margin: 0 auto; }
.container--xl { max-width: var(--container-xl); margin: 0 auto; }
.container--wide { max-width: 84rem; margin: 0 auto; }

/* ── Section headers ────────────────────────────────────── */

.section-head { max-width: 46rem; margin-bottom: 3.5rem; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head--center .accent-rule { margin-left: auto; margin-right: auto; }

.eyebrow {
  font-size: 0.8125rem;
  font-weight: var(--weight-bold);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-teal);
  margin: 0 0 1rem;
}
.eyebrow--on-dark { color: var(--color-sky); }

.accent-rule {
  display: block;
  width: var(--accent-rule-w);
  height: var(--accent-rule-h);
  background: var(--color-accent-rule);
  border-radius: 2px;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 2.5rem;
  letter-spacing: var(--tracking-tight);
  line-height: 1.16;
  margin: 0 0 1.25rem;
}
.section-title--lg { font-size: 3rem; letter-spacing: -0.03em; line-height: 1.12; }
.section-title--md { font-size: 2.75rem; letter-spacing: -0.025em; line-height: 1.14; }
.section-title--on-dark { color: var(--color-white); }

.section-lede {
  font-size: 1.0625rem;
  line-height: var(--leading-relaxed);
  color: var(--color-text-secondary);
  margin: 0;
}
.section-lede--on-dark { color: rgba(255, 255, 255, 0.78); }

@media (max-width: 991px) {
  .section { padding-left: 6vw; padding-right: 6vw; padding-top: var(--section-py-md); padding-bottom: var(--section-py-md); }
  .section-title    { font-size: 2rem; }
  .section-title--lg { font-size: 2.125rem; }
  .section-title--md { font-size: 2rem; }
  .section-head { margin-bottom: 2.5rem; }
}
@media (max-width: 575px) {
  .section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
  .section-title, .section-title--lg, .section-title--md { font-size: 1.75rem; }
}

/* ── Utilities ──────────────────────────────────────────── */

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

.skip-link {
  position: absolute; left: 0; top: 0; z-index: 999;
  padding: 0.75rem 1.25rem;
  background: var(--color-navy); color: var(--color-white);
  font-weight: var(--weight-semibold); text-decoration: none;
  transform: translateY(-120%);
}
.skip-link:focus { transform: none; color: var(--color-white); }

/* ── Scroll reveal ──────────────────────────────────────────
   Headings and paragraphs blur-fade in as they enter view.
   The .reveal class is applied by js/main.js only when motion
   is allowed, so content is visible by default (and stays
   visible with JS off or reduced motion on).
   ───────────────────────────────────────────────────────── */

.reveal {
  filter: blur(10px);
  opacity: 0;
  transition: filter 0.8s ease, opacity 0.8s ease;
  will-change: filter, opacity;
}
.reveal.is-visible { filter: blur(0); opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { filter: none; opacity: 1; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Anchor targets sit below the floating navbar, so a jump link lands with the
   section's eyebrow and heading visible rather than part-way down its content. */
#our-firm, #meet-lee, #credentials-at-a-glance, #past-work, #how-we-work,
#priorities, #testimonials, #press, #publications, #speaking, #watch,
#recognitions, #all-publications, #faq {
  scroll-margin-top: 7.5rem;
}
