:root {
  --bg-rgb: 243, 241, 234;
  --bg: rgb(var(--bg-rgb));
  --ink-rgb: 20, 18, 15;
  --ink: rgb(var(--ink-rgb));
  --accent-rgb: 255, 75, 31;
  --accent: rgb(var(--accent-rgb));
  --nav-gap: 2.5rem;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --font-body: 'Jost', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Outfit', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
}

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  background-color: var(--bg);
  background-image: url('../images/grain.svg?v=1');
  background-size: 240px 240px;
  background-blend-mode: soft-light;
  color: var(--ink);
  font-family: var(--font-body);
  min-height: 100vh;
  overflow-x: hidden;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 1.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  row-gap: 0.6rem;
  background-color: var(--bg);
  background-image: url('../images/grain.svg?v=1');
  background-size: 240px 240px;
  background-blend-mode: soft-light;
}

/* ---- Wordmark / logo mark ---- */

.wordmark {
  display: block;
  text-decoration: none;
  color: var(--ink);
  line-height: 0;
}

.wordmark-logo {
  display: block;
  height: 26px;
  width: auto;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .wordmark-logo {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .wordmark:hover .wordmark-logo,
  .wordmark:focus-visible .wordmark-logo {
    transform: scale(1.04);
  }
}

.site-nav {
  display: flex;
  justify-content: flex-end;
  gap: var(--nav-gap);
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: opacity 0.2s ease, color 0.2s ease;
}

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

.site-nav a.active {
  color: var(--accent);
  opacity: 0.85;
}

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

.bg-video {
  position: fixed;
  inset: 0;
  z-index: 0;
  background: #0b0e17;
}

.bg-video video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bg-video::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(var(--ink-rgb), 0.55) 0%, rgba(var(--ink-rgb), 0.2) 35%, rgba(var(--ink-rgb), 0.4) 100%);
}

.home .site-header {
  background: none;
}

.home .site-nav a {
  color: rgb(242, 240, 235);
}

.home .site-nav a:hover,
.home .site-nav a.active {
  color: var(--accent);
}

.hero {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5rem 1.5rem;
}

.hero-mark {
  display: block;
  width: clamp(180px, 24vw, 340px);
  aspect-ratio: 98 / 56;
}

@media (prefers-reduced-motion: no-preference) {
  .hero-mark {
    animation: orb-float 16s ease-in-out infinite;
    will-change: transform;
  }
}

/* ---- Shared page shell ---- */

.mission,
.portfolio,
.services,
.contact,
.post {
  max-width: 900px;
  margin: 0 auto;
  padding: 9rem 1.5rem 6rem;
}

.mission-intro,
.portfolio-intro,
.services-intro,
.contact-intro {
  margin-bottom: 2.75rem;
}

.eyebrow {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.62;
  margin-bottom: 0.85rem;
}

.mission-intro h1,
.portfolio-intro h1,
.services-intro h1,
.contact-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 575;
  letter-spacing: -0.01em;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2.75rem;
}

.page-head > div:first-child {
  margin-bottom: 0;
}

.orb {
  flex: 0 1 auto;
  min-width: 72px;
  display: block;
  width: clamp(130px, 15vw, 200px);
  aspect-ratio: 98 / 56;
}

@media (prefers-reduced-motion: no-preference) {
  .orb {
    animation: orb-float 16s ease-in-out infinite;
    will-change: transform;
  }
}

@keyframes orb-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }

  33% {
    transform: translate3d(-10px, -12px, 0);
  }

  66% {
    transform: translate3d(8px, -5px, 0);
  }
}

/* ---- Bio / body copy ---- */

.statement {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  max-width: 18ch;
  margin-bottom: 2.5rem;
}

.bio {
  max-width: 62ch;
}

.bio p {
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

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

/* ---- Values list (Mission page) ---- */

.values-list {
  list-style: none;
  border-top: 1px solid rgba(var(--ink-rgb), 0.15);
  margin-top: 3rem;
}

.values-list li {
  display: flex;
  align-items: baseline;
  gap: 2rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.15);
}

.values-label {
  flex: 0 0 12rem;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.62;
}

.values-list p {
  font-size: 1rem;
  line-height: 1.6;
  max-width: 48ch;
}

/* ---- Services list ---- */

.services-list {
  list-style: none;
  border-top: 1px solid rgba(var(--ink-rgb), 0.15);
}

.services-list li {
  padding: 1.9rem 0;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.15);
}

.service-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 0.6rem;
}

.service-row h2 {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 575;
}

.service-index {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  white-space: nowrap;
}

.services-list p {
  font-size: 1rem;
  line-height: 1.65;
  max-width: 58ch;
  opacity: 0.85;
}

.services-cta {
  margin-top: 3rem;
}

/* ---- Waveform (Sonic Branding accent) ---- */

.waveform {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
  margin-top: 0.9rem;
}

.waveform .bar {
  width: 3px;
  border-radius: 2px;
  background: var(--accent);
  transform-origin: bottom;
  animation: waveform-pulse 1.2s ease-in-out infinite;
}

.waveform .bar:nth-child(1) { height: 40%; animation-delay: -0.9s; animation-duration: 1.1s; }
.waveform .bar:nth-child(2) { height: 70%; animation-delay: -0.6s; animation-duration: 1.3s; }
.waveform .bar:nth-child(3) { height: 100%; animation-delay: -1.1s; animation-duration: 1s; }
.waveform .bar:nth-child(4) { height: 55%; animation-delay: -0.3s; animation-duration: 1.4s; }
.waveform .bar:nth-child(5) { height: 85%; animation-delay: -0.8s; animation-duration: 1.15s; }
.waveform .bar:nth-child(6) { height: 45%; animation-delay: -0.15s; animation-duration: 1.25s; }
.waveform .bar:nth-child(7) { height: 75%; animation-delay: -1s; animation-duration: 1.05s; }
.waveform .bar:nth-child(8) { height: 30%; animation-delay: -0.45s; animation-duration: 1.35s; }
.waveform .bar:nth-child(9) { height: 60%; animation-delay: -0.7s; animation-duration: 1.2s; }

@keyframes waveform-pulse {
  0%,
  100% {
    transform: scaleY(0.35);
  }

  50% {
    transform: scaleY(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .waveform .bar {
    animation: none;
    transform: scaleY(0.7);
  }
}

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

.pill-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.pill-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.4rem;
  border: 1px solid var(--ink);
  border-radius: 999px;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pill-links a:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.pill-links a span {
  font-size: 0.9em;
}

/* ---- Portfolio: post list ---- */

.post-list {
  list-style: none;
  border-top: 1px solid rgba(var(--ink-rgb), 0.15);
}

.post-list li {
  position: relative;
  padding: 2.4rem 3.5rem 2.4rem 0;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.15);
}

.post-list .eyebrow {
  margin-bottom: 0.7rem;
}

.post-list h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.6vw, 2.4rem);
  font-weight: 575;
  line-height: 1.15;
  letter-spacing: -0.01em;
  max-width: 24ch;
  margin-bottom: 0.9rem;
}

.post-list h2 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.post-list h2 a::after {
  content: '';
  position: absolute;
  inset: 0;
}

.post-list li:hover h2 a,
.post-list h2 a:focus-visible {
  color: var(--accent);
}

.post-list p {
  max-width: 52ch;
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.78;
}

.post-arrow {
  position: absolute;
  right: 0;
  top: 2.5rem;
  font-size: 1.5rem;
  color: var(--accent);
  transition: transform 0.3s var(--ease-out);
}

.post-list li:hover .post-arrow {
  transform: translateX(6px);
}

/* ---- Post (article page) ---- */

.post-back {
  display: inline-block;
  margin-bottom: 2.5rem;
  color: var(--ink);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.7;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.post-back:hover {
  color: var(--accent);
  opacity: 1;
}

.post-head {
  margin-bottom: 2.75rem;
}

.post-head h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 575;
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 20ch;
}

.post-body {
  max-width: 62ch;
}

.post-body p {
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 1.25rem;
}

.post-body .post-lede {
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  line-height: 1.6;
  margin-bottom: 1.6rem;
}

.post-body h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 575;
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 3rem 0 1rem;
}

.post-body a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: rgba(var(--accent-rgb), 0.6);
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.post-body a:hover {
  color: var(--accent);
  text-decoration-color: var(--accent);
}

.post-body .post-cta {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(var(--ink-rgb), 0.15);
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  font-weight: 500;
  line-height: 1.4;
}

.post-foot {
  margin-top: 3.5rem;
}

.serif-accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.12em;
}

/* ---- Contact list ---- */

.contact-list {
  list-style: none;
  border-top: 1px solid rgba(var(--ink-rgb), 0.15);
}

.contact-list li {
  display: flex;
  align-items: baseline;
  gap: 2rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.15);
}

.contact-label {
  flex: 0 0 15rem;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.62;
}

.contact-list a {
  color: var(--ink);
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  text-decoration-color: rgba(var(--ink-rgb), 0.3);
  transition: text-decoration-color 0.25s ease;
}

.contact-list a:hover {
  text-decoration-color: var(--accent);
}

/* ---- Reveal-on-scroll ---- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(2.25rem);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--reveal-delay, 0s);
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

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

@media (max-width: 860px) {
  .site-header {
    padding: 1.5rem;
  }

  .site-nav {
    gap: 1.5rem;
  }

  .mission,
  .portfolio,
  .services,
  .contact,
  .post {
    padding: 7rem 1.25rem 4rem;
  }

  .post-list li {
    padding-right: 2.5rem;
  }

  .contact-list li {
    flex-direction: column;
    gap: 0.6rem;
    padding: 1.35rem 0;
  }

  .contact-label {
    flex-basis: auto;
  }

  .values-list li {
    flex-direction: column;
    gap: 0.5rem;
  }

  .values-label {
    flex-basis: auto;
  }

  .service-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
}

@media (max-width: 600px) {
  .site-nav {
    gap: 1rem;
  }

  .site-nav a {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
  }

  .wordmark-logo {
    height: 22px;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 1.25rem 1rem;
  }

  .site-nav {
    gap: 0.7rem;
  }

  .site-nav a {
    font-size: 0.6rem;
    letter-spacing: 0.05em;
  }

  .wordmark-logo {
    height: 19px;
  }
}

@media (max-width: 360px) {
  .site-header {
    padding: 1.25rem 1rem;
    gap: 0.5rem;
  }

  .site-nav {
    gap: 0.5rem;
  }

  .site-nav a {
    font-size: 0.54rem;
    letter-spacing: 0.03em;
  }

  .wordmark-logo {
    height: 17px;
  }
}
