/* ============================================================
   Max Kouznichenkov — Advertising Composer & Producer
   Editorial / executive tone. Archivo Black display + Helvetica
   Neue body. Brand orange #ff5733 used as a single accent.
   ============================================================ */

:root {
  /* Palette — orange editorial grotesk */
  --ink: #111111;
  --ink-soft: #2a2a2a;
  --ink-mute: #8a8580;
  --paper: #f7f3ee;
  --paper-alt: #efeae3;
  --rule: #d9d4cc;
  --accent: #ff5a1f;
  --accent-hover: #e64a10;

  /* Fonts — Archivo display + Inter body */
  --font-display: 'Archivo', 'Archivo Black', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', 'Helvetica', Arial, sans-serif;

  /* Layout */
  --max: 1240px;
  --gutter: clamp(20px, 4vw, 56px);

  /* Type scale per brief */
  --text-xs: 11px;
  --text-sm: 12px;
  --text-base: 16px;
  --text-md: 17px;
  --text-lg: 19px;
  --text-statement: clamp(23px, 3.5vw, 42px);
  --text-hero: clamp(42px, 8.6vw, 122px);
  --text-section: clamp(33px, 6vw, 84px);
  --text-contact: clamp(42px, 7.8vw, 104px);
  --text-mega: clamp(48px, 8.6vw, 116px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--accent);
  color: #ffffff;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0;
}

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

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px var(--gutter);
  background: color-mix(in oklab, var(--paper) 92%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.site-header nav {
  display: flex;
  gap: 32px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

/* Header nav: animated underline reveal */
.site-header nav a {
  position: relative;
  padding: 4px 0;
  transition: color 0.3s ease;
}

.site-header nav a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.site-header nav a:hover {
  color: var(--accent);
}

.site-header nav a:hover::after {
  transform: scaleX(1);
}

/* Social icons in header */
.site-header nav a.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--ink);
  transition: color 0.3s ease, transform 0.3s ease;
}

.site-header nav a.social-icon::after {
  display: none;
}

.site-header nav a.social-icon:hover {
  color: var(--accent);
  transform: translateY(-1px);
}

.site-header nav a.social-icon svg {
  display: block;
}

/* ---------- hero ---------- */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(72px, 10vw, 120px) var(--gutter) clamp(96px, 13vw, 160px);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(260px, 26vw, 340px);
  gap: clamp(40px, 6vw, 96px);
  align-items: start;
}

.hero-text {
  min-width: 0;
}

.hero-portrait {
  margin: clamp(24px, 3vw, 48px) 0 0;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #efece5;
  position: relative;
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  display: block;
  will-change: transform;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-portrait:hover img {
  transform: scale(1.02);
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: clamp(24px, 3.5vw, 48px);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--text-hero);
  line-height: 0.9;
  letter-spacing: -0.04em;
  margin: 0 0 clamp(28px, 4vw, 48px);
  color: var(--ink);
  text-transform: uppercase;
}

.hero-title .accent {
  color: var(--accent);
}

/* Black continuation: sized to match section headings visually,
   constrained by the narrower hero text column so two lines fit. */
.hero-title .hero-rest {
  display: block;
  font-size: clamp(30px, 4.1vw, 56px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-top: clamp(8px, 1.2vw, 18px);
}

.hero-title .hero-line {
  display: block;
  white-space: nowrap;
}

.hero-lede {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-lg);
  line-height: 1.5;
  color: var(--ink);
  max-width: 38ch;
  margin: 0 0 clamp(28px, 4vw, 48px);
}

.hero-lede strong {
  font-weight: 600;
  color: var(--ink);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 28px 40px;
}

.link-action {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  transition: color 0.3s ease, border-color 0.3s ease, gap 0.3s ease;
}

.link-action:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
  gap: 20px;
}

/* ---------- rule between sections ---------- */
.rule {
  border: 0;
  height: 1px;
  background: var(--rule);
  max-width: var(--max);
  margin: 0 auto;
}

/* ---------- shared section spacing (+more air) ---------- */
.about,
.why-early,
.work,
.clients,
.recognition,
.services,
.contact {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(96px, 13vw, 168px) var(--gutter);
}

/* Large editorial section number — own line, accent color */
.section-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--text-section);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--accent);
  margin: 0 0 clamp(8px, 1.2vw, 20px);
  display: block;
}

/* Section display heading — black per brief */
.section-display {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--text-section);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin: 0 0 clamp(56px, 7vw, 96px);
  text-transform: uppercase;
  max-width: 12ch;
}

/* ---------- about / prose ---------- */
.prose {
  max-width: 62ch;
  margin: 0;
}

.prose p {
  font-family: var(--font-body);
  font-size: var(--text-md);
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 1.4em;
  font-weight: 400;
  max-width: 680px;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose .prose-close {
  font-weight: 500;
}

/* ---------- inline link ---------- */
.inline-link {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--ink-mute);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.inline-link:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.inline-link strong {
  font-weight: 600;
  color: inherit;
}

/* ---------- HOW I CONTRIBUTE — editorial list with orange numbers ---------- */
.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
}

.service-list li {
  display: grid;
  grid-template-columns: clamp(60px, 7vw, 84px) minmax(0, 1fr) minmax(0, 1.3fr);
  gap: clamp(20px, 3vw, 48px);
  padding: clamp(32px, 3.6vw, 48px) 0;
  border-bottom: 1px solid var(--rule);
  align-items: baseline;
}

.service-num {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  text-transform: uppercase;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  white-space: nowrap;
}

.service-num .num-parent {
  color: var(--ink-mute);
}

.service-num .num-sep {
  color: var(--ink-mute);
  opacity: 0.6;
  font-weight: 400;
}

.service-num .num-child {
  color: var(--ink);
}

.service-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0;
  text-transform: none;
}

.service-body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0;
  max-width: 52ch;
}

/* ---------- BEYOND THE MUSIC — editorial numbered list ---------- */
.why-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
  counter-reset: why;
}

.why-list li {
  display: grid;
  grid-template-columns: clamp(60px, 7vw, 84px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 48px);
  align-items: baseline;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-md);
  line-height: 1.5;
  color: var(--ink);
  padding: clamp(20px, 2.4vw, 28px) 0;
  border-bottom: 1px solid var(--rule);
  letter-spacing: -0.005em;
  counter-increment: why;
}

.why-list li::before {
  content: '03 / ' counter(why, decimal-leading-zero);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  line-height: 1;
  white-space: nowrap;
}

/* ---------- CLIENTS — flowing list with middots ---------- */
.clients-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
}

.micro-label {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 20px;
}

.client-list {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-md);
  line-height: 1.85;
  color: var(--ink);
  letter-spacing: -0.005em;
}

/* ---------- CONTACT — Apple-style balanced ---------- */
.contact {
  padding-top: clamp(112px, 15vw, 192px);
  padding-bottom: clamp(112px, 15vw, 192px);
}

.contact-headline {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: var(--text-contact);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin: 0 0 clamp(48px, 6vw, 80px);
  text-transform: uppercase;
  max-width: 14ch;
}

.contact-headline .accent {
  color: var(--accent);
}

.contact-email {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 3.6vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 clamp(48px, 6vw, 80px);
  text-transform: lowercase;
}

.contact-email a {
  display: inline-block;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--ink);
  transition: color 0.3s ease, border-color 0.3s ease;
}

.contact-email a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.contact-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 36px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}

.contact-links a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  color: var(--ink);
  transition: color 0.3s ease;
}

.contact-links a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.contact-links a:hover {
  color: var(--accent);
}

.contact-links a:hover::after {
  transform: scaleX(1);
}

.contact-note {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink-mute);
  max-width: 56ch;
  margin: clamp(48px, 6vw, 80px) 0;
}

.contact-note + .contact-links {
  margin-top: clamp(48px, 6vw, 80px);
}

.link-arrow {
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  color: inherit;
  margin-left: 8px;
  vertical-align: -0.08em;
  overflow: visible;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.contact-links a:hover .link-arrow {
  transform: translate(2px, -2px);
}

/* ---------- footer ---------- */
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px var(--gutter) 64px;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  border-top: 1px solid var(--rule);
}

.footer-meta {
  text-align: right;
}

/* ---------- REVEAL ANIMATION ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

/* Staggered children inside a revealed section */
.reveal .stagger {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
  transition-delay: 0ms;
}

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

.reveal.is-visible .stagger:nth-child(1) { transition-delay: 120ms; }
.reveal.is-visible .stagger:nth-child(2) { transition-delay: 220ms; }
.reveal.is-visible .stagger:nth-child(3) { transition-delay: 320ms; }
.reveal.is-visible .stagger:nth-child(4) { transition-delay: 420ms; }
.reveal.is-visible .stagger:nth-child(5) { transition-delay: 520ms; }
.reveal.is-visible .stagger:nth-child(6) { transition-delay: 620ms; }

/* Subtle hover — single color shift, no movement */
.service-list li,
.why-list li,
.service-title,
.service-num .num-child,
.why-list li::before {
  transition: color 0.35s ease;
}

.service-list li:hover .service-title,
.service-list li:hover .num-child {
  color: var(--accent);
}

.why-list li:hover {
  color: var(--accent);
}

.why-list li:hover::before {
  color: var(--ink);
}

/* Soft entrance for the hero on initial load */
.hero-text .eyebrow,
.hero-text .hero-title,
.hero-text .hero-lede,
.hero-text .hero-actions {
  opacity: 0;
  transform: translateY(16px);
  animation: hero-in 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
.hero-text .eyebrow { animation-delay: 0.05s; }
.hero-text .hero-title { animation-delay: 0.15s; }
.hero-text .hero-lede { animation-delay: 0.4s; }
.hero-text .hero-actions { animation-delay: 0.55s; }

.hero-portrait {
  opacity: 0;
  animation: hero-in 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.25s forwards;
}

@keyframes hero-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal .stagger {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-text .eyebrow,
  .hero-text .hero-title,
  .hero-text .hero-lede,
  .hero-text .hero-actions,
  .hero-portrait {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .hero-portrait img,
  .link-action,
  .contact-links a,
  .service-list li,
  .why-list li,
  .why-list li::before {
    transition: none !important;
  }
}

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .service-list li {
    grid-template-columns: clamp(40px, 7vw, 56px) 1fr;
    gap: 10px 20px;
  }
  .service-list li .service-body {
    grid-column: 2 / -1;
  }

  .why-list li {
    grid-template-columns: clamp(40px, 7vw, 56px) 1fr;
  }

  .clients-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  :root {
    --text-base: 15px;
    --text-md: 15px;
    --text-lg: 16px;
    --text-hero: clamp(40px, 10.5vw, 56px);
    --text-section: clamp(32px, 9.5vw, 46px);
    --text-contact: clamp(38px, 11vw, 56px);
    --text-statement: clamp(21px, 5.2vw, 27px);
  }

  .site-header nav {
    gap: 20px;
  }

  .hero {
    padding-top: 80px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-portrait {
    order: -1;
    max-width: 260px;
    aspect-ratio: 4 / 5;
  }

  .hero-title {
    max-width: 14ch;
  }

  /* On mobile let the black continuation wrap naturally. */
  .hero-title .hero-line {
    white-space: normal;
  }

  .hero-title .hero-rest {
    font-size: clamp(26px, 8vw, 42px);
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-meta {
    text-align: left;
  }
}
