:root {
  --purple-dark: #391d4e;
  --purple: #a152e1;
  --tag-bg: #f6eefd;
  --ink: #202427;
  --muted: #6c6c6c;
  --placeholder: #f9f9f9;
  --bg: #ffffff;
  --radius-lg: 24px;
  --container: 1200px;
  --gutter: 24px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-brand: "Outfit", "Inter", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

ul, dl, dd, h1, h2, h3, p { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

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

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}
.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 72px;
}
.logo {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 27px;
  letter-spacing: -0.04em;
  color: var(--purple-dark);
  line-height: 1;
  justify-self: start;
}
.main-nav { display: flex; gap: 28px; font-size: 16px; line-height: 24px; font-weight: 500; }
.main-nav a { transition: color .15s; }
.main-nav a:hover { color: var(--purple); }

.header-actions { justify-self: end; display: flex; align-items: center; gap: 12px; }
.lang { display: flex; align-items: center; gap: 5px; font-size: 16px; line-height: 24px; }
.lang button[aria-pressed="true"] { color: var(--purple); }
.lang button:hover { color: var(--purple); }
.btn-pill {
  background: var(--ink);
  color: #fff;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 999px;
  transition: background .15s;
}
.btn-pill:hover { background: var(--purple-dark); }

/* ---------- Hero ---------- */
.hero { padding-top: 40px; text-align: center; }
.hero-mark {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(32, 36, 39, 0.10);
}
.hero-mark svg { width: 38px; height: 38px; }
h1 {
  font-size: 36px;
  line-height: 48px;
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
h1 .accent { color: var(--purple); }
.lede {
  max-width: 580px;
  margin: 8px auto 0;
  font-size: 16px;
  line-height: 24px;
  text-wrap: balance;
}

/* shared placeholder surface */
.media {
  position: relative;
  display: grid;
  place-items: center;
  background: var(--placeholder);
  overflow: hidden;
}
.media img, .media video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.media-video {
  margin-top: 26px;
  aspect-ratio: 900 / 465;
  border-radius: var(--radius-lg);
}

/* ---------- Clients ---------- */
.clients { padding-block: 36px 64px; }
.client-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 24px;
  padding-inline: 14px;
}
.client-row li {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--muted);
}

/* ---------- Section headings ---------- */
.eyebrow { text-align: center; font-size: 16px; line-height: 24px; color: var(--purple-dark); }
h2 {
  text-align: center;
  font-size: 36px;
  line-height: 48px;
  font-weight: 500;
  letter-spacing: -0.025em;
  margin-top: 4px;
}

/* ---------- Services ---------- */
.services { padding-bottom: 56px; }
.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 20px auto 0;
}
.chips li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--purple-dark);
  color: #fff;
  font-size: 16px;
  line-height: 24px;
  padding: 8px 12px;
  border-radius: 999px;
}
.ico { width: 16px; height: 16px; flex: none; }

/* ---------- Work ---------- */
.work { padding-bottom: 88px; }
.work h2 { margin-bottom: 36px; }
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px 12px;
}
.card.wide { grid-column: 1 / -1; }
.card .media { aspect-ratio: 2 / 1; }
.card.wide .media { aspect-ratio: 16 / 9; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tags li {
  font-size: 12px;
  line-height: 16px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--tag-bg);
  color: var(--purple);
}
a.media-link { display: block; }
.card h3 a { transition: color .15s; }
.card:hover h3 a, .card h3 a:focus-visible { color: var(--purple); }
.card h3 { font-size: 24px; line-height: 32px; font-weight: 400; margin-top: 4px; letter-spacing: -0.01em; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #fff; text-align: center; }
.footer-main { padding: 28px var(--gutter) 40px; }
.site-footer h2 { color: var(--purple); font-weight: 600; margin: 0; }
.contacts {
  display: flex;
  justify-content: center;
  gap: 64px;
  margin-top: 20px;
  font-size: 16px;
  line-height: 24px;
}
.contacts dt { font-weight: 600; }
.contacts a:hover { color: var(--purple); }
.footer-bar { background: #000; font-size: 14px; line-height: 20px; padding: 8px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .main-nav { gap: 20px; }
  .client-row { justify-content: center; }
  .client-row li { font-size: 22px; }
}

@media (max-width: 680px) {
  :root { --gutter: 16px; --radius-lg: 20px; }
  .header-inner { grid-template-columns: auto 1fr; }
  .main-nav { display: none; }
  .logo { font-size: 26px; }
  h1, h2 { font-size: 28px; line-height: 36px; }
  .hero { padding-top: 32px; }
  .media-video { aspect-ratio: 4 / 3; }
  .work-grid { grid-template-columns: 1fr; }
  .card .media, .card.wide .media { aspect-ratio: 16 / 10; }
  .card h3 { font-size: 20px; line-height: 28px; }
  .client-row { gap: 12px 20px; padding-inline: 0; }
  .client-row li:nth-child(n+5) { display: none; }
  .contacts { flex-direction: column; gap: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- Work (project) pages ---------- */
.work-page { padding-bottom: 96px; }

/* floating close button: sticks just under the header and follows the scroll */
.close-rail { position: sticky; top: 120px; height: 0; z-index: 20; pointer-events: none; }
.rail-inner { position: relative; height: 0; }
.close-btn {
  position: absolute;
  top: -22px;
  right: -22px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: #8b9096;
  border: 1px solid rgba(32, 36, 39, 0.12);
  box-shadow: 0 2px 12px rgba(32, 36, 39, 0.16);
  pointer-events: auto;
  transition: color .15s, box-shadow .15s;
}
.close-btn:hover { color: var(--ink); box-shadow: 0 4px 16px rgba(32, 36, 39, 0.22); }
.close-btn svg { width: 16px; height: 16px; }

/* grey band with the inset hero image */
.showcase { background: var(--placeholder); padding-top: 48px; }
.showcase .media {
  aspect-ratio: 1200 / 524;
  background: #e0e1e4;
  box-shadow: 0 8px 32px rgba(32, 36, 39, 0.10);
}
.showcase.tall .media { aspect-ratio: 1200 / 634; }
.showcase + .gallery { margin-top: 64px; }

/* title + tags + text */
.entry { padding-block: 72px 64px; }
.entry-title { text-align: left; font-size: 24px; line-height: 32px; font-weight: 500; letter-spacing: -0.01em; margin: 0 0 12px; }
.entry .tags { margin: 0 0 12px; }
.entry p { max-width: 730px; font-size: 16px; line-height: 24px; }

/* full-width media block */
.block-media .media { aspect-ratio: 16 / 9; }

/* 2 x 2 gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.gallery-grid .media { aspect-ratio: 2 / 1; }

@media (max-width: 680px) {
  .close-btn { right: 0; }
  .showcase { padding-top: 24px; }
  .showcase .media, .showcase.tall .media { aspect-ratio: 4 / 3; }
  .close-rail { top: 96px; }
  .entry { padding-block: 48px 40px; }
  .gallery-grid { grid-template-columns: 1fr; }
  .showcase + .gallery { margin-top: 40px; }
}
