/* Atlas Studios
   Near-black and white. The footage supplies the colour.
   Type: Jost (geometric sans) for everything, Courier Prime for captions. */

:root {
  --bg: #0e0e0e;
  --panel: #161616;
  --text: #ffffff;
  --soft: #d2d2d2;
  --muted: #b0b0b0;
  --line: rgba(255, 255, 255, 0.2);
  --error: #ff9a8f;
  --pad: clamp(18px, 2.4vw, 36px);
  --sans: "Jost", "Futura", "Century Gothic", ui-sans-serif, system-ui, sans-serif;
  --mono: "Courier Prime", "Courier New", ui-monospace, monospace;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img, svg, video, canvas { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: 1; letter-spacing: -0.01em; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }

:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

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

.skip {
  position: absolute;
  left: 12px;
  top: -64px;
  z-index: 100;
  padding: 0.7rem 1rem;
  background: #fff;
  color: #000;
  font-weight: 600;
}
.skip:focus { top: 12px; }

.mono { font-family: var(--mono); font-size: 0.95rem; }
.mono-link { font: 400 0.95rem/1.4 var(--mono); text-decoration: none; }
.mono-link:hover { text-decoration: underline; text-underline-offset: 0.25em; }

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px var(--pad);
  color: #fff;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.45);
  pointer-events: none;
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.nav.is-hidden { transform: translateY(-110%); opacity: 0; }
.nav a, .nav button { pointer-events: auto; }
.nav-left, .nav-right { display: flex; align-items: center; gap: 24px; }
.nav-right { justify-self: end; }
.nav a { font-size: 1rem; text-decoration: none; }
.nav a:hover { text-decoration: underline; text-underline-offset: 0.3em; }
.nav-brand { font-family: 'Racing Sans One', var(--sans, 'Jost', sans-serif); font-weight: 400; font-size: 1.4rem; letter-spacing: 0.01em; text-transform: uppercase; }
.nav-brand:hover { text-decoration: none; }

.nav-toggle {
  display: none;
  padding: 0.4rem 0;
  border: 0;
  background: none;
  color: inherit;
  font-size: 1rem;
  cursor: pointer;
}

.menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.3rem;
  padding: 90px var(--pad) 40px;
  background: var(--bg);
}
.menu[hidden] { display: none; }
.menu a { font-weight: 700; font-size: clamp(2.6rem, 12vw, 4rem); text-transform: uppercase; line-height: 1.1; text-decoration: none; }

@media (max-width: 720px) {
  .nav-left, .nav-right a { display: none; }
  .nav { grid-template-columns: 1fr auto 1fr; }
  .nav-brand { grid-column: 2; }
  .nav-toggle { display: block; }
}

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

.hero { position: relative; height: 100svh; min-height: 520px; overflow: hidden; background: var(--bg); }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 55% 50%; opacity: 0; transition: opacity 0.7s ease; }
.hero-video.is-on { opacity: 1; }
.hero-dots { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 160px; background: linear-gradient(rgba(0, 0, 0, 0.5), transparent); pointer-events: none; }

/* Services: the words roll upward one at a time on the right of the hero.
   Five services, 2.6 s each. The last line repeats the first so the loop has no jump. */
.hero::before { content: ""; position: absolute; inset: auto 0 0 0; height: 55%; background: linear-gradient(transparent, rgba(0, 0, 0, 0.8)); pointer-events: none; }
.services {
  position: absolute;
  z-index: 1;
  right: var(--pad);
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  justify-items: end;
  gap: 0.7rem;
  text-align: right;
  text-shadow: 0 2px 22px rgba(0, 0, 0, 0.6), 0 0 3px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}
/* A soft dark glow behind the words so they stay legible over bright parts of the video */
.services::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -2.5rem -3rem -2.5rem -6rem;
  background: radial-gradient(ellipse at 65% 50%, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.45) 45%, transparent 75%);
  filter: blur(14px);
}
.services-label { font: 400 0.95rem/1 var(--mono); }
/* Each service is a big title with a short line under it. Every item has the same height (--item) so the roll lands exactly. */
.services-window {
  --t: clamp(2rem, 4.6vw, 4.2rem);
  --s: clamp(1rem, 1.3vw, 1.2rem);
  --item: calc(var(--t) * 1.15 + var(--s) * 3.4 + 0.5rem);
  display: block;
  height: var(--item);
  overflow: hidden;
}
.services-list { display: block; animation: services-roll 8s cubic-bezier(0.7, 0, 0.3, 1) infinite; }
.services-item { display: block; height: var(--item); }
.services-title { display: block; font-size: var(--t); font-weight: 700; line-height: 1.15; text-transform: uppercase; letter-spacing: -0.02em; white-space: nowrap; }
.services-sub { display: block; text-wrap: balance; max-width: 24em; margin: 0.5rem 0 0 auto; font-size: var(--s); font-weight: 400; line-height: 1.45; color: var(--soft); }
@keyframes services-roll {
  0%, 42%   { transform: translateY(0); }
  50%, 92%  { transform: translateY(calc(var(--item) * -1)); }
  100%      { transform: translateY(calc(var(--item) * -2)); }
}
@media (max-width: 720px) { .services { top: auto; bottom: clamp(150px, 26vh, 240px); transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .services-window { height: auto; }
  .services-list { animation: none; }
  .services-item { height: auto; margin-bottom: 1.6rem; }
  .services-repeat { display: none !important; }
}

/* ---------- Brands (grey logos on the video; they fade in as you start to scroll) ---------- */

.hero-brands {
  position: absolute;
  z-index: 1;
  left: var(--pad);
  right: var(--pad);
  bottom: clamp(24px, 5vh, 56px);
  text-align: center;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.6);
}
/* A soft dark glow behind the logos so the grey stays readable over bright parts of the video */
.hero-brands::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -2.5rem -3rem;
  background: radial-gradient(ellipse at 50% 55%, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.5) 45%, transparent 75%);
  filter: blur(12px);
}
.brands-label { margin: 0 0 clamp(14px, 2.2vh, 24px); font: 400 0.95rem/1 var(--mono); color: var(--soft); }
.brands-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 20px clamp(36px, 8vw, 120px); }
.brands-list li { --base: clamp(44px, 4.8vw, 66px); opacity: 0.9; }
.brands-list img { height: calc(var(--base) * var(--h, 1)); width: auto; filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.55)); }

/* ---------- Work ---------- */

.work { padding: clamp(40px, 7vw, 100px) var(--pad) clamp(72px, 10vw, 160px); }
.work-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: clamp(20px, 2.6vw, 36px); }
.work-head h2 { font-size: clamp(2.6rem, 6vw, 5rem); text-transform: uppercase; letter-spacing: -0.02em; }

/* Clips: a grid of small clips in their original 16:9 shape (4 across, 2 on phones). */
.clips { max-width: 1800px; margin: 0 auto; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tile { aspect-ratio: 16 / 9; background: var(--panel); overflow: hidden; }
.tile video { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.tile:hover video { transform: scale(1.06); }
@media (max-width: 700px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .tile video { transition: none; } }

/* ---------- Services: text on the left, a dot-halftone of the footage on the right ---------- */

.offer { padding: clamp(72px, 10vw, 150px) var(--pad); }
.soon { margin: clamp(20px, 3vw, 40px) 0 0; font: 400 clamp(1.1rem, 1.6vw, 1.4rem)/1.4 var(--mono); color: var(--muted); }
.offer-title { font-size: clamp(2.6rem, 6vw, 5rem); text-transform: uppercase; letter-spacing: -0.02em; }
.svc-stage { display: grid; margin-top: clamp(28px, 4vw, 56px); }
.svc {
  grid-area: 1 / 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: stretch;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}
.svc.is-on { opacity: 1; visibility: visible; transition: opacity 0.6s ease, visibility 0s; }
.svc-copy { display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: clamp(0px, 2vw, 24px); }
.svc-num { margin: 0; font-weight: 700; font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1; color: var(--muted); }
.svc-name { margin-top: 0.35rem; font-size: clamp(2.2rem, 4.6vw, 4rem); line-height: 1.02; text-transform: uppercase; letter-spacing: -0.02em; }
.svc-meta { margin: 0.9rem 0 0; font: 400 0.95rem/1.3 var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.svc-text { max-width: 26em; margin: clamp(16px, 2vw, 28px) 0 clamp(28px, 4vw, 52px); font-size: clamp(1.1rem, 1.5vw, 1.35rem); line-height: 1.5; color: var(--soft); }
.svc-nav { display: flex; gap: 12px; }
.svc-btn {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}
.svc-btn:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); }
.svc-art { position: relative; margin: 0; height: clamp(380px, 68vh, 720px); overflow: hidden; }
.svc-art canvas, .svc-art img { position: absolute; inset: 0; width: 100%; height: 100%; }
.svc-art img { object-fit: cover; filter: grayscale(1) contrast(1.1); opacity: 0.75; }
.svc-art.dots img { display: none; }
/* the real clip sits here unseen; the script reads its frames and draws them as dots */
.svc-art:not(.dots) { -webkit-mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent), linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent); -webkit-mask-composite: source-in; mask-image: linear-gradient(to right, transparent, #000 14%, #000 86%, transparent), linear-gradient(to bottom, transparent, #000 14%, #000 86%, transparent); mask-composite: intersect; }
.svc-art video { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Without JavaScript both services just sit one under the other */
html:not(.js) .svc { grid-area: auto; opacity: 1; visibility: visible; margin-bottom: 56px; }
html:not(.js) .svc-nav { display: none; }

@media (max-width: 760px) {
  .svc { grid-template-columns: 1fr; gap: 24px; }
  .svc-art { order: -1; height: clamp(260px, 78vw, 440px); }
  .svc-btn { width: 52px; height: 52px; }
}
@media (prefers-reduced-motion: reduce) { .svc, .svc.is-on { transition: none; } }

/* ---------- Closing line ---------- */

.about { padding: clamp(72px, 12vw, 160px) var(--pad); text-align: center; }
.about-line { max-width: 24em; margin: 0 auto; font-size: clamp(1.4rem, 2.7vw, 2.4rem); line-height: 1.35; color: var(--soft); }
.offer-more { display: inline-block; margin-top: clamp(28px, 4vw, 48px); }
.about-link { display: inline-block; margin-top: clamp(32px, 5vw, 56px); }

/* ---------- Services page ---------- */

.services-page { padding: clamp(110px, 14vw, 180px) var(--pad) 0; }
.sp-head { max-width: 1400px; margin: 0 auto clamp(48px, 7vw, 96px); }
.sp-jump { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: clamp(24px, 3vw, 40px); }
.sp-jump a { font: 400 0.95rem/1.4 var(--mono); text-decoration: none; color: var(--soft); }
.sp-jump a span { color: var(--muted); }
.sp-jump a:hover { color: #fff; text-decoration: underline; text-underline-offset: 0.25em; }

.detail {
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(40px, 6vw, 88px) 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
  scroll-margin-top: 60px;
}
.detail-num { margin: 0; font-weight: 700; font-size: clamp(2.2rem, 4vw, 3.4rem); line-height: 1; color: var(--muted); }
.detail-title { margin-top: 0.35rem; font-size: clamp(2.4rem, 5vw, 4.4rem); line-height: 1.02; text-transform: uppercase; letter-spacing: -0.02em; }
.detail-lead { max-width: 30em; margin: clamp(18px, 2vw, 28px) 0 clamp(36px, 5vw, 64px); font-size: clamp(1.2rem, 1.8vw, 1.5rem); line-height: 1.45; color: var(--soft); }
.detail-label { margin: 0 0 0.8rem; font: 400 0.95rem/1.3 var(--mono); color: var(--muted); }
.detail-list, .steps { list-style: none; margin: 0 0 clamp(36px, 5vw, 64px); padding: 0; }
.detail-list li, .steps li { padding: 1.1rem 0; border-top: 1px solid var(--line); }
.detail-list li:last-child, .steps li:last-child { border-bottom: 1px solid var(--line); }
.detail-list h3, .steps h3 { font-size: clamp(1.2rem, 1.7vw, 1.5rem); font-weight: 600; line-height: 1.2; }
.detail-list p, .steps p { max-width: 36em; margin: 0.35rem 0 0; color: var(--muted); line-height: 1.5; }
.steps { counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-left: 3.2rem; }
.steps li::before { content: "0" counter(step); position: absolute; left: 0; top: 1.25rem; font: 400 0.95rem/1.3 var(--mono); color: var(--muted); }
.detail .svc-art { position: sticky; top: 96px; height: clamp(360px, 72vh, 680px); }
.sp-end { max-width: 1400px; margin: 0 auto; padding: clamp(56px, 9vw, 130px) 0; border-top: 1px solid var(--line); text-align: center; }
@media (max-width: 860px) {
  .detail { grid-template-columns: 1fr; }
  .detail .svc-art { position: relative; top: auto; order: -1; height: clamp(260px, 78vw, 440px); }
}

/* ---------- Footer ---------- */

.footer { padding: 56px var(--pad) 0; overflow: hidden; }
.footer-top { display: flex; justify-content: space-between; gap: 1rem; font: 400 0.9rem/1.4 var(--mono); }
.footer-top a { text-decoration: none; }
.footer-top a:hover { text-decoration: underline; text-underline-offset: 0.25em; }
.footer-top p { margin: 0; color: var(--muted); }
.footer-mark {
  margin: clamp(28px, 4vw, 56px) calc(var(--pad) * -1) 0;
  font-family: 'Racing Sans One', var(--sans);
  font-weight: 400;
  font-size: 31vw;
  line-height: 0.78;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}
@media (max-width: 720px) { .footer-top p { display: none; } }

/* ---------- Start a project ---------- */

.page { padding: clamp(110px, 14vw, 180px) var(--pad) clamp(72px, 10vw, 140px); }
.page-inner { max-width: 760px; margin-inline: auto; }
.page-title { font-size: clamp(2.8rem, 8vw, 6rem); text-transform: uppercase; letter-spacing: -0.02em; line-height: 0.98; }
.page-lede { margin: 1.2rem 0 clamp(36px, 5vw, 60px); font-size: clamp(1.2rem, 2vw, 1.5rem); color: var(--soft); max-width: 30em; line-height: 1.4; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem 2rem; }
.field { display: grid; gap: 0.4rem; align-content: start; }
.field--wide { grid-column: 1 / -1; }
.field label { font-weight: 500; font-size: 1rem; }
.field .opt { font-weight: 400; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.75rem 0;
  border: 0;
  border-bottom: 1.5px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
}
.field input:hover, .field select:hover, .field textarea:hover { border-bottom-color: rgba(255, 255, 255, 0.5); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 0; border-bottom-color: #fff; box-shadow: 0 1.5px 0 0 #fff; }
.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 1.8rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' fill='none' stroke='%23ffffff' stroke-width='2'%3E%3Cpath d='M1 1.5l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.2rem center;
}
.field select option { background: var(--panel); color: var(--text); }
.field textarea { min-height: 8rem; resize: vertical; }
.field [aria-invalid="true"] { border-bottom-color: var(--error); }
.field-error { min-height: 1.2em; font-size: 0.92rem; color: var(--error); }

.form-actions { margin-top: 1.8rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95em 1.7em;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #000;
  font: 600 1rem/1 var(--sans);
  cursor: pointer;
  transition: background-color 0.2s;
}
.btn:hover { background: #cfcfcf; }
.form-status { margin: 0; max-width: 46ch; color: var(--muted); }
.page-note { margin-top: 2.4rem; color: var(--muted); }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
