:root {
  --paper: #FAF8F5;
  --ink: #1A1A1A;
  --ink-soft: #2B2B2B;
  --muted: #6B6B6B;
  --hairline: #E8E4DE;
  --thread: #B8232F;
  --thread-deep: #8F1A24;
  --space-xs: 0.5rem;
  --space-s: 1rem;
  --space-m: 2rem;
  --space-l: 4rem;
  --space-xl: 8rem;
  --space-xxl: 12rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Instrument Sans', -apple-system, system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection {
  background: var(--thread);
  color: var(--paper);
}

/* ============ GRAIN OVERLAY ============ */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  z-index: 100;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' /%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' /%3E%3C/svg%3E");
}

/* ============ THE RED THREAD ============ */
.thread-track {
  position: fixed;
  left: 2.5rem;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--hairline);
  z-index: 5;
  pointer-events: none;
}

.thread-line {
  position: fixed;
  left: 2.5rem;
  top: 0;
  width: 1px;
  height: 0;
  background: var(--thread);
  z-index: 6;
  pointer-events: none;
  transition: height 0.1s linear;
}

.thread-line::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--thread);
  box-shadow: 0 0 12px rgba(184, 35, 47, 0.4);
}

/* ============ LAYOUT ============ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-m) 0 6rem;
}

@media (max-width: 768px) {
  .container {
    padding: 0 1.5rem 0 3.5rem;
  }
  .thread-track, .thread-line {
    left: 1.25rem;
  }
}

/* ============ NAV ============ */
nav {
  position: fixed;
  top: var(--space-m);
  right: var(--space-m);
  z-index: 20;
  display: flex;
  gap: var(--space-m);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

nav a {
  color: var(--ink-soft);
  text-decoration: none;
  position: relative;
  padding: 0.5rem 0;
  transition: color 0.3s ease;
}

nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--thread);
  transition: width 0.3s ease;
}

nav a:hover {
  color: var(--thread);
}

nav a:hover::after {
  width: 100%;
}

@media (max-width: 768px) {
  nav {
    display: none;
  }
}

/* ============ WORDMARK ============ */
.wordmark {
  position: fixed;
  top: var(--space-m);
  left: 6rem;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
  color: var(--ink);
}

@media (max-width: 768px) {
  .wordmark {
    left: 3.5rem;
  }
}

.wordmark-icon {
  width: 56px;
  height: 14px;
  flex-shrink: 0;
}

.wordmark-text {
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 12;
}

@media (max-width: 480px) {
  .wordmark-text {
    display: none;
  }
}

/* ============ HERO ============ */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 8rem;
  padding-bottom: 4rem;
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: var(--space-m);
}

.eyebrow::before {
  content: '';
  width: 1.5rem;
  height: 1px;
  background: var(--thread);
}

h1.hero-title {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(2.5rem, 7vw, 6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 18ch;
  margin-bottom: var(--space-l);
  font-variation-settings: "opsz" 144;
}

h1.hero-title em {
  font-style: italic;
  color: var(--thread);
  font-weight: 400;
}

.hero-lead {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  line-height: 1.55;
  max-width: 42ch;
  color: var(--ink-soft);
  font-weight: 400;
  font-variation-settings: "opsz" 24;
}

.hero-meta {
  display: flex;
  gap: var(--space-l);
  margin-top: var(--space-xl);
  font-size: 0.85rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.hero-meta > div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.hero-meta strong {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .hero-meta {
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 4rem;
  }
}

/* ============ SECTIONS ============ */
section {
  padding: var(--space-xxl) 0;
  position: relative;
  scroll-margin-top: 6rem;
}

.section-number {
  font-family: 'Fraunces', serif;
  font-size: 0.95rem;
  font-weight: 400;
  font-style: italic;
  color: var(--thread);
  margin-bottom: var(--space-s);
  letter-spacing: 0.02em;
}

h2 {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-l);
  max-width: 20ch;
  font-variation-settings: "opsz" 96;
}

h2 em {
  font-style: italic;
  color: var(--thread);
  font-weight: 400;
}

/* ============ PRACTICE ============ */
.practice-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: var(--space-xl);
  align-items: start;
}

@media (max-width: 900px) {
  .practice-grid {
    grid-template-columns: 1fr;
    gap: var(--space-l);
  }
}

.practice-body p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: var(--space-s);
  color: var(--ink-soft);
  max-width: 55ch;
}

.practice-body p + p {
  margin-top: var(--space-m);
}

.practice-body p strong {
  color: var(--ink);
  font-weight: 600;
}

.audience-list {
  margin-top: var(--space-l);
  padding-top: var(--space-m);
  border-top: 1px solid var(--hairline);
}

.audience-list dt {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-xs);
  font-weight: 500;
}

.audience-list dd {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--ink);
  font-variation-settings: "opsz" 24;
}

/* ============ ENGAGEMENTS (dark) ============ */
.engagements {
  background: var(--ink);
  color: var(--paper);
  margin: 0;
  padding: var(--space-xxl) 0;
  position: relative;
}

.engagements::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--thread) 20%, var(--thread) 80%, transparent);
  opacity: 0.4;
}

.engagements h2 {
  color: var(--paper);
}

.engagements h2 em {
  color: var(--thread);
}

.engagements .section-number {
  color: var(--thread);
}

.engagement-list {
  list-style: none;
  margin-top: var(--space-l);
}

.engagement {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: var(--space-m);
  padding: var(--space-l) 0;
  border-top: 1px solid rgba(250, 248, 245, 0.12);
  transition: padding 0.4s ease;
  cursor: default;
}

.engagement:last-child {
  border-bottom: 1px solid rgba(250, 248, 245, 0.12);
}

.engagement:hover {
  padding-left: var(--space-m);
}

.engagement-num {
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  font-style: italic;
  color: var(--thread);
  padding-top: 0.4rem;
}

.engagement-content h3 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin-bottom: 0.5rem;
  font-variation-settings: "opsz" 48;
}

.engagement-duration {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--thread);
  margin-bottom: var(--space-s);
  font-weight: 500;
}

.engagement-content p {
  color: rgba(250, 248, 245, 0.7);
  font-size: 1rem;
  line-height: 1.65;
  max-width: 60ch;
  margin-bottom: 0.7rem;
}

.engagement-content p.deliverable {
  color: rgba(250, 248, 245, 0.9);
  border-left: 1px solid var(--thread);
  padding-left: var(--space-s);
  margin-top: var(--space-s);
}

@media (max-width: 768px) {
  .engagement {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }
}

/* ============ TRACK RECORD ============ */
.track-record-intro {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  line-height: 1.55;
  max-width: 48ch;
  color: var(--ink-soft);
  margin-bottom: var(--space-xl);
  font-variation-settings: "opsz" 24;
}

.companies {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
}

@media (max-width: 900px) {
  .companies {
    grid-template-columns: repeat(2, 1fr);
  }
}

.company {
  background: var(--paper);
  padding: var(--space-l) var(--space-m);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  transition: background 0.4s ease;
  position: relative;
}

.company:hover {
  background: #F3EFE8;
}

/* Logo image inside each track-record card */
.company-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 72px;
  margin-bottom: 0.9rem;
}

.company-logo {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  transition: opacity 0.3s ease;
}

/* Per-logo heights tuned for optical balance —
   each brand has different proportions, so a single
   height does not work for all five */
.logo-leica { max-height: 64px; }
.logo-bo    { max-height: 64px; }
.logo-ambu  { max-height: 40px; }
.logo-jabra { max-height: 42px; }
.logo-epos  { max-height: 28px; }

/* Single column on narrow phones so the wide EPOS|Sennheiser
   logo stays readable */
@media (max-width: 540px) {
  .companies {
    grid-template-columns: 1fr;
  }
  .company {
    min-height: 140px;
    padding: 2.5rem var(--space-m);
  }
}

.company-context {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* ============ CONTACT ============ */
#contact {
  padding-bottom: var(--space-xl);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--space-l);
  }
}

.contact-lead {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  line-height: 1.4;
  color: var(--ink-soft);
  max-width: 28ch;
  font-variation-settings: "opsz" 36;
  margin-bottom: var(--space-l);
}

.contact-quick {
  border-top: 1px solid var(--hairline);
  padding-top: var(--space-m);
}

.contact-label {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.contact-value {
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  margin-bottom: var(--space-m);
  color: var(--ink);
  font-variation-settings: "opsz" 24;
}

.contact-value-small {
  font-family: 'Fraunces', serif;
  font-size: 1.05rem;
  color: var(--ink);
  font-variation-settings: "opsz" 18;
}

.contact-value a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.contact-value a:hover {
  color: var(--thread);
  border-bottom-color: var(--thread);
}

/* ============ FORM ============ */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
  background: transparent;
}

.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field label {
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.form-field label .optional {
  text-transform: none;
  letter-spacing: 0;
  font-style: italic;
  opacity: 0.7;
  font-weight: 400;
}

.form-field input,
.form-field textarea {
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--hairline);
  padding: 0.6rem 0;
  outline: none;
  transition: border-color 0.3s ease;
  width: 100%;
  font-variation-settings: "opsz" 24;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--muted);
  opacity: 0.6;
  font-style: italic;
}

.form-field input:focus,
.form-field textarea:focus {
  border-bottom-color: var(--thread);
}

.form-field textarea {
  resize: vertical;
  min-height: 6rem;
  font-family: 'Fraunces', serif;
  line-height: 1.55;
}

.submit-btn {
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 1rem 1.5rem;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  transition: background 0.3s ease, transform 0.3s ease;
  align-self: flex-start;
  max-width: 100%;
}

.submit-btn:hover {
  background: var(--thread);
}

.submit-btn:hover .arrow {
  transform: translateX(4px);
}

.submit-btn .arrow {
  width: 20px;
  height: 14px;
  transition: transform 0.3s ease;
}

/* ============ FOOTER ============ */
footer {
  border-top: 1px solid var(--hairline);
  padding: var(--space-m) 0;
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-s);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-mark {
  width: 48px;
  height: 12px;
  opacity: 0.7;
}

footer a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: var(--thread);
}

/* ============ REVEALS ============ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.hero .eyebrow,
.hero h1,
.hero .hero-lead,
.hero .hero-meta {
  opacity: 0;
  transform: translateY(16px);
  animation: heroIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero .eyebrow { animation-delay: 0.1s; }
.hero h1 { animation-delay: 0.25s; }
.hero .hero-lead { animation-delay: 0.5s; }
.hero .hero-meta { animation-delay: 0.75s; }

@keyframes heroIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wordmark, nav {
  opacity: 0;
  animation: fadeIn 1s ease 0.1s forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--thread);
  outline-offset: 3px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============ STATUS PAGES (404 / thanks) ============ */
.status-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8rem 0 4rem;
  position: relative;
}

.status-mark {
  width: 120px;
  height: 30px;
  margin-bottom: var(--space-l);
}

.status-mark.frayed .broken-end {
  stroke-dasharray: 2 3;
}

.status-eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--thread);
  margin-bottom: var(--space-m);
}

.status-title {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(2.5rem, 6vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 18ch;
  margin-bottom: var(--space-m);
  font-variation-settings: "opsz" 144;
}

.status-title em {
  font-style: italic;
  color: var(--thread);
  font-weight: 400;
}

.status-lead {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  line-height: 1.55;
  max-width: 42ch;
  color: var(--ink-soft);
  margin-bottom: var(--space-l);
  font-variation-settings: "opsz" 24;
}

.status-actions {
  display: flex;
  gap: var(--space-m);
  flex-wrap: wrap;
  align-items: center;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--ink);
  color: var(--paper);
  padding: 1rem 1.5rem;
  text-decoration: none;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  transition: background 0.3s ease;
}

.btn-primary:hover {
  background: var(--thread);
}

.btn-secondary {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 1rem 0;
  border-bottom: 1px solid var(--hairline);
  transition: color 0.3s ease, border-color 0.3s ease;
}

.btn-secondary:hover {
  color: var(--thread);
  border-color: var(--thread);
}

/* ============ QUICK WIN ADDITIONS ============ */

/* Hero punch line — the strongest sentence, lifted from section 01 */
.hero-punch {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.25rem, 2.1vw, 1.65rem);
  line-height: 1.45;
  max-width: 44ch;
  color: var(--ink);
  font-weight: 500;
  font-variation-settings: "opsz" 32;
  margin-bottom: var(--space-m);
  font-style: italic;
}

/* CTA cluster in hero */
.hero-cta {
  display: flex;
  gap: var(--space-m);
  flex-wrap: wrap;
  align-items: center;
  margin-top: var(--space-l);
}

.hero-cta .arrow {
  width: 18px;
  height: 12px;
  transition: transform 0.3s ease;
}

.hero-cta .btn-primary:hover .arrow {
  transform: translateX(4px);
}

/* Red thread opener in The Practice section */
.practice-opener {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink);
  border-left: 2px solid var(--thread);
  padding-left: var(--space-m);
  margin-bottom: var(--space-l);
}

.practice-opener em {
  color: var(--thread);
  font-style: italic;
  font-weight: 500;
}

/* Footer tagline */
.footer-text {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.footer-tagline {
  font-family: 'Fraunces', serif;
  font-size: 0.95rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* Hero animations — extend to new elements */
.hero .hero-punch,
.hero .hero-cta {
  opacity: 0;
  transform: translateY(16px);
  animation: heroIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero .hero-punch { animation-delay: 0.4s; }
.hero .hero-cta { animation-delay: 0.65s; }

/* Re-time the elements after the new ones */
.hero .hero-lead { animation-delay: 0.85s; }
.hero .hero-meta { animation-delay: 1.05s; }

/* Mobile adjustments */
@media (max-width: 768px) {
  .hero-cta {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
  }

  .hero-cta .btn-primary,
  .hero-cta .btn-secondary {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .practice-opener {
    padding-left: var(--space-s, 1rem);
  }
}
