/* =============================================================
   Portfolio v16 — minimal editorial
   Light theme. Space Grotesk. Original code.
   ============================================================= */

:root {
  --bg:        #F5F5F5;
  --card:      #FFFFFF;
  --card-alt:  #EFEFEF;
  --text:      #0A0A0A;
  --muted:     #6B6B6B;
  --line:      #E2E2E2;
  --line-2:    #D4D4D4;
  --footer-bg: #0A0A0A;
  --footer-fg: #F5F5F5;
  --footer-mt: #8A8A8A;

  --display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --sans:    "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono:    "JetBrains Mono", ui-monospace, "Cascadia Mono", "Source Code Pro", monospace;

  --radius:    16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --ease:      cubic-bezier(0.16, 1, 0.3, 1);
  --ease-snap: cubic-bezier(0.4, 0, 0.2, 1);

  --container-max: 1280px;
  --pad: clamp(20px, 4vw, 48px);
  --section-y: clamp(80px, 10vw, 160px);
  --nav-h: 64px;
}

/* =============================================================
   Reset & base
   ============================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  padding-top: var(--nav-h);
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: clamp(15px, 1.05vw, 17px);
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

main {
  position: relative;
  z-index: 2;
  background: var(--bg);
}

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

img {
  height: auto;
}

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

button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

ol,
ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, p {
  margin: 0;
}

::selection {
  background: var(--text);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 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;
}

.skip-link:focus {
  left: 12px;
  top: 12px;
  padding: 8px 12px;
  background: var(--text);
  color: var(--bg);
  border-radius: 6px;
  z-index: 1000;
}

.intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background: #111111;
  color: var(--bg);
  pointer-events: none;
  animation: intro-panel-out 650ms var(--ease-snap) 1100ms both;
}

.intro-brand {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(22px, 2vw, 28px);
  line-height: 1;
  animation: intro-brand-out 1500ms var(--ease-snap) both;
}

@keyframes intro-panel-out {
  0%,
  42% {
    opacity: 1;
    visibility: visible;
  }
  100% {
    opacity: 0;
    visibility: hidden;
  }
}

@keyframes intro-brand-out {
  0%,
  58% {
    opacity: 1;
    transform: translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-8px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-overlay {
    display: none;
    animation: none;
  }

  .intro-brand {
    animation: none;
  }
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* =============================================================
   Typography helpers
   ============================================================= */
.section-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(32px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.section-meta {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 8px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

/* =============================================================
   Navigation
   ============================================================= */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  --container-max: 1760px;
  background: rgba(245, 245, 245, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transform: translate3d(0, 0, 0);
  transition: transform 2600ms var(--ease), opacity 2200ms var(--ease), border-color 220ms var(--ease), background-color 680ms var(--ease);
  will-change: transform, opacity;
}

.site-nav::after {
  content: "";
  position: absolute;
  left: max(var(--pad), calc((100vw - var(--container-max)) / 2 + var(--pad)));
  right: max(var(--pad), calc((100vw - var(--container-max)) / 2 + var(--pad)));
  bottom: 0;
  height: 1.5px;
  background: var(--text);
  transform-origin: left center;
  pointer-events: none;
}

.site-nav.is-scrolled {
  border-color: var(--line);
}

.site-nav.is-nav-tucked {
  opacity: 0;
  transform: translate3d(0, calc(-100% - 14px), 0);
  pointer-events: none;
}

@media (prefers-reduced-motion: no-preference) {
  .site-nav::after {
    animation: nav-line-in 3600ms var(--ease) 1900ms both;
  }

  .nav-brand,
  .nav-anchors a,
  .nav-meta {
    opacity: 0;
    transform: translateY(10px);
    animation: nav-item-in 720ms var(--ease) both;
    will-change: transform, opacity;
  }

  .nav-brand { animation-delay: 1550ms; }
  .nav-anchors a:nth-child(1) { animation-delay: 1960ms; }
  .nav-anchors a:nth-child(2) { animation-delay: 2140ms; }
  .nav-anchors a:nth-child(3) { animation-delay: 2320ms; }
  .nav-anchors a:nth-child(4) { animation-delay: 2500ms; }
  .nav-meta { animation-delay: 2680ms; }
}

@keyframes nav-line-in {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

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

.nav-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: var(--nav-h);
  gap: 16px;
}

.nav-spacer {
  min-width: 1px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 0;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 500;
  line-height: 1;
}

.nav-anchors {
  display: flex;
  gap: clamp(20px, 2.6vw, 38px);
  font-size: 16px;
  font-weight: 500;
  color: rgba(10, 10, 10, 0.72);
  transition: opacity 520ms var(--ease), transform 520ms var(--ease);
  will-change: opacity, transform;
}

.site-nav.is-nav-tucked .nav-anchors {
  transform: translateY(-8px);
}

.nav-anchors a {
  position: relative;
  padding: 6px 0;
  transition: color 180ms var(--ease);
}

.nav-anchors a:hover,
.nav-anchors a:focus-visible {
  color: var(--text);
}

.nav-meta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 14px;
  color: rgba(10, 10, 10, 0.68);
  font-variant-numeric: tabular-nums;
}

.nav-meta .dot {
  opacity: 0.5;
}

@media (max-width: 720px) {
  .nav-anchors { display: none; }
  .nav-inner { grid-template-columns: 1fr auto; }
}

/* =============================================================
   Hero — mixed-flow typography
   ============================================================= */
.hero {
  position: relative;
  isolation: isolate;
  --container-max: 1760px;
  overflow: hidden;
  padding-top: clamp(6px, 1vw, 18px);
  padding-bottom: clamp(60px, 8vw, 140px);
  background-image: linear-gradient(90deg, rgba(10, 10, 10, 0.055) 1px, transparent 1px);
  background-size: clamp(88px, 9.2vw, 132px) 100%;
  background-position: max(var(--pad), calc((100vw - var(--container-max)) / 2 + var(--pad))) 0;
}

.hero-typo {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: clamp(28px, 3.6vw, 72px);
  font-family: var(--display);
  font-weight: 300;
  font-size: 42px;
  line-height: 1.04;
  letter-spacing: 0;
  color: var(--text);
}

@media (min-width: 720px) {
  .hero-typo { font-size: 78px; }
}

@media (min-width: 1120px) {
  .hero-typo { font-size: 124px; }
}

@media (min-width: 1600px) {
  .hero-typo { font-size: 150px; }
}

.aster,
.hero-symbol {
  display: inline-block;
  vertical-align: -0.06em;
  width: 0.62em;
  height: 0.62em;
  margin-right: 0.06em;
}

.hero-symbol {
  width: auto;
  height: auto;
  font-size: 0.72em;
  line-height: 1;
  vertical-align: 0.02em;
}

.aster img {
  width: 100%;
  height: 100%;
  animation: spin 24s linear infinite;
  transform-origin: center;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
  .aster img {
    animation: none;
  }
}

/* Mask-reveal lines (puvindren-style) */
.hero-mask {
  display: block;
  overflow: hidden;
  transform: translate3d(var(--hero-shift-x, 0px), 0, 0);
  will-change: transform;
}

.hero-mask--right .hero-mask-inner {
  text-align: center;
}

.hero-mask--clear {
  clear: left;
}

.hero-mask--system {
  clear: left;
}

.hero-mask--name .hero-mask-inner,
.hero-mask--role .hero-mask-inner,
.hero-mask--system .hero-mask-inner {
  text-align: center;
}

.hero-mask--name .hero-mask-inner {
  white-space: nowrap;
}

.hero-mask--name .hero-mask-inner {
  font-size: 1em;
}

.hero-mask--system .hero-mask-inner {
  font-size: clamp(40px, 4.35vw, 78px);
  text-wrap: balance;
}

.hero-mask--role {
  margin-top: 0.14em;
  margin-bottom: 0.18em;
}

.hero-mask--role .hero-mask-inner {
  font-size: 0.9em;
}

@media (min-width: 1120px) and (max-width: 1399px) {
.hero-mask--name .hero-mask-inner {
    font-size: 0.92em;
  }

  .hero-mask--system .hero-mask-inner {
    font-size: clamp(42px, 4.45vw, 62px);
  }

  .hero-mask--role .hero-mask-inner {
    font-size: 0.82em;
  }
}

.hero-mask-inner {
  display: block;
  font-weight: inherit;
  margin: 0;
  animation: hero-rise 1900ms var(--ease) both;
  animation-delay: calc(2600ms + var(--i, 0) * 350ms);
  will-change: transform;
}

@keyframes hero-rise {
  from { transform: translateY(42px); opacity: 0.001; }
  to { transform: translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-mask-inner {
    animation: none;
  }
}

.hero-aside {
  position: relative;
  float: none;
  width: min(540px, 100%);
  margin: 0.1em 0 0 clamp(48px, 8vw, 156px);
  font-family: var(--sans);
  font-weight: 500;
  font-size: 20px;
  line-height: 1.42;
  letter-spacing: 0;
}

@media (min-width: 860px) {
  .hero-typo {
    grid-template-columns: minmax(360px, 0.42fr) minmax(0, 0.58fr);
    column-gap: clamp(32px, 4vw, 80px);
  }

  .hero-mask--name,
  .hero-mask--system {
    grid-column: 1 / -1;
  }

  .hero-aside {
    grid-row: 2;
    grid-column: 1;
    align-self: center;
    justify-self: end;
    left: clamp(96px, 8vw, 168px);
    margin: 0;
  }

  .hero-mask--role {
    grid-row: 2;
    grid-column: 2;
    align-self: center;
    justify-self: center;
    width: 100%;
    margin: 0;
  }
}

@media (min-width: 1120px) {
  .hero-aside {
    font-size: 26px;
  }
}

@media (min-width: 1600px) {
  .hero-aside {
    font-size: 30px;
  }
}

.hero-aside.reveal {
  transform: translateY(40px);
  transition-duration: 1000ms;
  transition-delay: 3700ms;
}

@media (prefers-reduced-motion: reduce) {
  .hero-aside.reveal {
    transform: none;
    transition: none;
  }
}

.hero-lead {
  color: var(--text);
  text-wrap: pretty;
}

.hero-lead-line {
  display: block;
  opacity: 0;
  transform: translateY(18px);
  animation: hero-lead-line-in 1600ms var(--ease) both;
  animation-delay: calc(4200ms + var(--line, 0) * 400ms);
  will-change: transform, opacity;
}

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

@media (prefers-reduced-motion: reduce) {
  .hero-lead-line {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

.hero-link {
  color: #2C8CFF;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease);
  white-space: nowrap;
}

.hero-link:hover,
.hero-link:focus-visible {
  border-color: currentColor;
}

@media (max-width: 720px) {
  .hero-aside {
    width: 100%;
    left: 0;
    margin: 24px 0;
    font-size: 19px;
  }
  .hero-mask--right .hero-mask-inner { text-align: left; }
  .hero-mask--clear { clear: none; }
  .hero-mask--system { clear: none; }
  .hero-mask--name .hero-mask-inner,
  .hero-mask--role .hero-mask-inner,
  .hero-mask--system .hero-mask-inner {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .hero-typo { font-size: 38px; }
  .hero-mask--name .hero-mask-inner { font-size: 0.82em; }
  .hero-mask--system .hero-mask-inner { font-size: 30px; }
}

/* =============================================================
   Buttons
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  transition: background 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease), transform 280ms var(--ease);
  white-space: nowrap;
  will-change: transform;
}

.btn.primary {
  background: var(--text);
  color: var(--bg);
}

.btn.primary:hover {
  background: #1f1f1f;
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line-2);
}

.btn.ghost:hover {
  border-color: var(--text);
}

.btn-arrow {
  font-size: 13px;
  transform: translateY(-1px);
}

/* =============================================================
   Reveal animations
   ============================================================= */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 2000ms var(--ease), transform 2000ms var(--ease);
  transition-delay: calc(var(--i, 0) * 200ms);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

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

/* =============================================================
   Works rail
   ============================================================= */
.works {
  overflow: hidden;
  padding-block: clamp(84px, 9vw, 136px);
  background-image: linear-gradient(90deg, rgba(10, 10, 10, 0.055) 1px, transparent 1px);
  background-size: clamp(88px, 9.2vw, 132px) 100%;
  background-position: var(--pad) 0;
}

.works > .container,
.process > .container,
.about > .container,
.services > .container {
  max-width: none;
}

.works .section-head,
.process .section-head,
.about .section-head,
.services .section-head {
  margin-bottom: clamp(42px, 5vw, 60px);
}

.works .section-head::after,
.process .section-head::after,
.about .section-head::after,
.services .section-head::after {
  content: "";
  display: block;
  width: 100%;
  height: 1px;
  margin-top: clamp(18px, 2vw, 28px);
  background: var(--text);
}

.works .section-title,
.process .section-title,
.about .section-title,
.services .section-title {
  font-size: clamp(30px, 3vw, 34px);
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.rail-wrap {
  position: relative;
  margin-top: 0;
}

.rail {
  display: flex;
  gap: clamp(44px, 4.2vw, 64px);
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  padding-inline: var(--pad);
  padding-block: 2px clamp(22px, 3vw, 34px);
  cursor: grab;
  scrollbar-width: none;
  -ms-overflow-style: none;
  user-select: none;
  -webkit-overflow-scrolling: touch;
}

.rail::-webkit-scrollbar {
  display: none;
}

.rail.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.card {
  flex: 0 0 auto;
  width: clamp(286px, 22vw, 320px);
  scroll-snap-align: none;
}

.card-trigger {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 0;
  overflow: visible;
  cursor: pointer;
}

.card-trigger:hover .card-media img,
.card-trigger:focus-visible .card-media img {
  transform: translateY(-2px) scale(1.015);
}

.card-media {
  margin: 0 0 clamp(22px, 2.2vw, 30px);
  aspect-ratio: 16 / 9.15;
  background: transparent;
  overflow: hidden;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 520ms var(--ease), opacity 520ms var(--ease);
  pointer-events: none;
}

.card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
}

.card-title {
  order: 1;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(28px, 2.35vw, 32px);
  line-height: 1.13;
  letter-spacing: -0.035em;
  color: var(--text);
  text-wrap: balance;
}

.card-text {
  order: 3;
  color: #474747;
  font-size: clamp(16px, 1.22vw, 18px);
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.chips {
  order: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 0;
}

.chips li {
  padding: 8px 12px;
  background: #EAEAEA;
  color: var(--text);
  border-radius: 8px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: none;
}

.card-title + .card-text {
  margin-top: 0;
}

.card-body .chips {
  margin-top: 2px;
}

.card-body::before {
  content: attr(data-label);
  order: 2;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.2;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.055em;
}

@media (max-width: 720px) {
  .works {
    padding-block: 74px 96px;
  }

  .rail {
    gap: 32px;
    padding-inline: var(--pad);
  }

  .card {
    width: min(78vw, 320px);
  }

  .card-title {
    font-size: clamp(26px, 8vw, 32px);
  }

  .card-text {
    font-size: 15px;
  }
}

/* =============================================================
   Process — «Как я работаю» (timeline-list 2-col)
   ============================================================= */
.process {
  padding-block: var(--section-y);
}

.process-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(40px, 5vw, 80px);
  align-items: start;
}

.process-intro {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.process-intro p {
  font-family: var(--sans);
  font-size: clamp(20px, 1.6vw, 24px);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.4px;
  color: var(--text);
  max-width: 480px;
  margin: 0;
}

.process-list {
  display: flex;
  flex-direction: column;
}

.step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 14px 28px;
  padding: clamp(24px, 2.4vw, 32px) 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
}

.step:last-child {
  border-bottom: 1px solid var(--line);
}

.step-num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.step-body {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: 24px;
  row-gap: 8px;
  align-items: baseline;
}

.step-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  text-wrap: balance;
}

.step-meta {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
  justify-self: end;
}

.step-text {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.55;
  max-width: 60ch;
}

@media (max-width: 860px) {
  .process-grid { grid-template-columns: 1fr; }
  .step { grid-template-columns: 48px 1fr; gap: 10px 18px; }
  .step-body { grid-template-columns: 1fr; }
  .step-meta { justify-self: start; }
}

/* =============================================================
   About
   ============================================================= */
.about {
  padding-block: var(--section-y);
}

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.74fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}

.about-copy {
  grid-column: 1;
  max-width: 74ch;
}

.about-copy p {
  font-size: clamp(17px, 1.4vw, 22px);
  line-height: 1.5;
  color: var(--text);
  letter-spacing: -0.01em;
}

.about-copy p + p {
  margin-top: 18px;
  color: var(--text);
}

.about-photo {
  grid-column: 2;
  justify-self: end;
  width: min(420px, 100%);
  margin: 0 clamp(24px, 3.5vw, 56px) 0 0;
}

.about-photo img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 58%;
}

@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-copy { grid-column: auto; }
  .about-photo {
    grid-column: auto;
    justify-self: start;
    width: min(420px, 100%);
    margin: 0;
  }
}

/* =============================================================
   Services (puvindren.com style)
   ============================================================= */
.services {
  padding-block: var(--section-y);
}

.services-head {
  margin-bottom: clamp(42px, 5vw, 60px);
}

.services-title {
  color: var(--text);
  margin: 0;
}

.services-divider {
  height: 2px;
  background: var(--text);
  width: 100%;
}

.services-body {
  display: grid;
  grid-template-columns: minmax(380px, 480px) 1fr;
  gap: clamp(48px, 8vw, 120px);
  align-items: start;
}

.services-intro {
  font-family: var(--sans);
  font-size: clamp(20px, 1.6vw, 24px);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.4px;
  color: var(--text);
  margin: 0;
  max-width: 480px;
}

.services-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px 56px;
}

.service {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.service-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
}

.service-icon svg {
  width: 56px;
  height: 56px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service h3 {
  font-family: var(--sans);
  font-size: 26px;
  font-weight: 500;
  line-height: 39px;
  letter-spacing: -1px;
  color: var(--text);
  margin: 0;
  text-wrap: balance;
}

.service p {
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  letter-spacing: -0.6px;
  color: var(--text);
  margin: 0;
}

@media (max-width: 980px) {
  .services-body { grid-template-columns: 1fr; gap: 48px; }
  .services-intro { max-width: 100%; }
}

@media (max-width: 720px) {
  .services-grid { grid-template-columns: 1fr; gap: 40px; }
  .services-head { margin-bottom: 40px; }
  .services-title { font-size: 26px; line-height: 34px; }
}

/* =============================================================
   Footer
   ============================================================= */
.footer-reveal-stage {
  position: relative;
  z-index: 1;
  background: var(--footer-bg);
  overflow: hidden;
}

.site-footer {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  background: var(--footer-bg);
  color: var(--footer-fg);
  padding-block: clamp(80px, 10vw, 160px) 28px;
  overflow: hidden;
  transform: translate3d(0, var(--footer-reveal-y, 0px), 0);
  will-change: transform;
}

.footer-container {
  display: flex;
  flex-direction: column;
  gap: clamp(56px, 7vw, 112px);
}

.footer-marquee {
  margin: 0 0 clamp(56px, 7vw, 112px);
  display: flex;
  align-items: center;
  width: 100%;
  overflow: hidden;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(64px, 14vw, 220px);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--footer-fg);
  white-space: nowrap;
  user-select: none;
}

.footer-marquee-track {
  display: inline-flex;
  flex-shrink: 0;
  min-width: 100%;
  animation: footer-marquee 64s linear infinite;
  will-change: transform;
}

.footer-marquee-item {
  flex-shrink: 0;
  padding-right: 0.18em;
}

@keyframes footer-marquee {
  to { transform: translateX(-100%); }
}

@media (prefers-reduced-motion: reduce) {
  .site-footer {
    transform: none;
    will-change: auto;
  }

  .footer-marquee-track {
    animation: none;
  }

  .footer-marquee-track[aria-hidden="true"] {
    display: none;
  }
}

.footer-cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 5vw, 96px);
  align-items: start;
}

.footer-socials {
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 1.4vw, 22px);
  font-size: clamp(15px, 1.05vw, 17px);
}

.footer-socials a {
  display: inline-grid;
  grid-template-columns: 22px auto auto;
  align-items: center;
  gap: 14px;
  color: var(--footer-fg);
  width: fit-content;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color 220ms var(--ease), color 220ms var(--ease);
}

.footer-socials a:hover,
.footer-socials a:focus-visible {
  border-color: var(--footer-fg);
}

.footer-soc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  color: var(--footer-mt);
  transition: color 220ms var(--ease);
}

.footer-socials a:hover .footer-soc-icon,
.footer-socials a:focus-visible .footer-soc-icon {
  color: var(--footer-fg);
}

.footer-soc-icon svg {
  width: 20px;
  height: 20px;
}

.footer-soc-label {
  font-weight: 400;
}

.footer-soc-arrow {
  color: var(--footer-mt);
  font-size: 14px;
  margin-left: 4px;
}

.footer-pitch {
  margin: 0;
  max-width: 36ch;
  justify-self: end;
  font-size: clamp(16px, 1.3vw, 22px);
  line-height: 1.45;
  color: var(--footer-fg);
  letter-spacing: 0;
}

.footer-pitch-link {
  color: #2C8CFF;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease);
  white-space: nowrap;
}

.footer-pitch-link:hover,
.footer-pitch-link:focus-visible {
  border-color: currentColor;
}

.footer-baseline {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid rgba(245, 245, 245, 0.12);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--footer-mt);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-brand {
  grid-column: 2;
  justify-self: center;
  color: var(--footer-fg);
  letter-spacing: 0.12em;
}

.back-top {
  grid-column: 3;
  justify-self: end;
  font-family: var(--mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--footer-mt);
  border: 0;
  padding: 0;
  border-radius: 0;
  transition: color 200ms var(--ease);
}

.back-top:hover,
.back-top:focus-visible {
  color: var(--footer-fg);
}

@media (max-width: 860px) {
  .footer-cols { grid-template-columns: 1fr; gap: 40px; }
  .footer-pitch { justify-self: start; max-width: none; }
  .footer-baseline {
    grid-template-columns: 1fr;
    gap: 10px;
    text-align: left;
  }
  .footer-brand,
  .back-top {
    grid-column: auto;
    justify-self: start;
  }
}

/* =============================================================
   Modal
   ============================================================= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: clamp(16px, 3vw, 48px);
}

.modal:not([hidden]).is-open {
  display: flex;
  animation: fadeIn 240ms var(--ease);
}

.modal-card {
  position: relative;
  width: 100%;
  max-width: 1080px;
  max-height: calc(100vh - clamp(32px, 6vw, 96px));
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  overflow: hidden;
  animation: cardIn 320ms var(--ease);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  font-size: 14px;
  color: var(--text);
  transition: background 180ms var(--ease), border-color 180ms var(--ease);
}

.modal-close:hover {
  border-color: var(--text);
}

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-height: inherit;
  min-height: min(480px, calc(100vh - clamp(32px, 6vw, 96px)));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-media {
  background: var(--card-alt);
  padding: clamp(16px, 2vw, 24px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  border-right: 1px solid var(--line);
  align-items: stretch;
}

.modal-media--single {
  justify-content: flex-start;
  align-items: stretch;
}

.modal-media--single .modal-video-card.vertical-video {
  align-self: center;
}

.modal-video-card {
  width: 100%;
  margin: 0;
  background: transparent;
}

.modal-video-card.vertical-video {
  max-width: min(320px, 100%);
  width: 100%;
}

.modal-video-card video {
  width: 100%;
  display: block;
  background: #0a0a0a;
  border-radius: var(--radius);
}

.modal-video-card.vertical-video video {
  aspect-ratio: 9 / 16;
  object-fit: contain;
  max-height: min(52vh, 560px);
  width: auto;
  max-width: 100%;
  margin-inline: auto;
}

.modal-video-card video:fullscreen,
.modal-video-card video:-webkit-full-screen {
  width: 100vw !important;
  height: 100vh !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: contain !important;
  border-radius: 0;
  background: #000;
}

.modal-video-caption {
  padding: 12px 2px 0;
  background: transparent;
  color: var(--text);
}

.modal-video-caption h3 {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.3;
}

.modal-video-caption p {
  margin-top: 4px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.modal-copy {
  padding: clamp(20px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.modal-kicker {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.modal-copy h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(24px, 2.6vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.modal-lead {
  font-size: clamp(15px, 1.1vw, 17px);
  color: var(--muted);
  line-height: 1.55;
}

.modal-route {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.modal-route span {
  color: var(--text);
}

.modal-route i {
  display: inline-block;
  width: 14px;
  height: 1px;
  background: var(--line-2);
}

.modal-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-section h3 {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.modal-section ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-section li {
  position: relative;
  padding-left: 16px;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.modal-section li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--text);
}

.modal-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 8px;
}

@media (max-width: 860px) {
  .modal-body { grid-template-columns: 1fr; }
  .modal-media { border-right: 0; border-bottom: 1px solid var(--line); }
  .modal-video-card.vertical-video video { max-height: 64vh; }
}

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

@keyframes cardIn {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .modal:not([hidden]).is-open,
  .modal-card { animation: none; }
}

/* =============================================================
   Body lock for modal-open
   ============================================================= */
html.is-modal-open,
body.is-modal-open {
  overflow: hidden;
}

/* =============================================================
   Smaller breakpoints final
   ============================================================= */
@media (max-width: 540px) {
  .hero-typo {
    font-size: 38px;
    line-height: 1.0;
  }
  .nav-meta { font-size: 12px; }
  .footer-baseline { font-size: 11px; }
}
