/* Vantage Commerce. Dark editorial agency page: big grotesque headings,
   mono labels, and scroll-driven reveals on text and blocks. */

:root {
  --bg: #0e0e0d;
  --bg-2: #141413;
  --bg-3: #1a1a18;
  --text: #f6f4ef;
  --text-70: rgb(246 244 239 / 82%);
  --text-45: rgb(246 244 239 / 64%);
  --text-28: rgb(246 244 239 / 46%);
  --line: rgb(246 244 239 / 16%);
  --line-soft: rgb(246 244 239 / 10%);
  --accent: #ff5f3d;

  --sans: "Inter Tight", -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --t-hero: clamp(3rem, 8.4vw, 7rem);
  --t-h2: clamp(2.1rem, 5.2vw, 4.2rem);
  --t-h3: clamp(1.35rem, 2.2vw, 1.85rem);
  --t-big: clamp(1.6rem, 3.6vw, 3rem);
  --lh-hero: 0.95;
  --tr-hero: -0.04em;

  --wrap: 1280px;
  --gut: clamp(1.25rem, 4vw, 3.5rem);
  --sec: clamp(5.5rem, 13vw, 11rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-dram: cubic-bezier(0.76, 0, 0.24, 1);
  --d: 0.3s;
  --d-slow: 0.76s;
  --r: 10px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: clamp(1rem, 1.05vw, 1.0625rem);
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3 {
  margin: 0;
  font-weight: 400;
  letter-spacing: var(--tr-hero);
  line-height: var(--lh-hero);
  text-wrap: balance;
}

h1 { font-size: var(--t-hero); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); letter-spacing: -0.02em; line-height: 1.15; }

.muted { color: var(--text-45); }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: var(--bg);
  padding: 0.75rem 1rem;
  z-index: 200;
}
.skip:focus { left: 0; }

:where(a, button, input, textarea):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ── Labels and buttons ───────────────────────────────────── */

.label {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-45);
  margin: 0 0 1.75rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}
.label .idx { margin-left: auto; color: var(--text-28); letter-spacing: 0.1em; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.4rem;
  border-radius: 100px;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background var(--d) var(--ease), color var(--d) var(--ease),
              border-color var(--d) var(--ease), gap var(--d) var(--ease);
  white-space: nowrap;
}
.btn span { transition: transform var(--d) var(--ease); }
.btn:hover span { transform: translateX(3px); }

.btn-solid { background: var(--text); color: var(--bg); }
.btn-solid:hover { background: #fff; }

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

/* ── Nav ──────────────────────────────────────────────────── */

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: var(--wrap);
  margin-inline: auto;
  padding: 1.1rem var(--gut);
  transition: transform var(--d-slow) var(--ease-dram), background var(--d) var(--ease);
}
.nav.hidden { transform: translateY(-110%); }
.nav.lit { background: rgb(14 14 13 / 86%); backdrop-filter: blur(14px); }

.brand {
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.045em;
  text-decoration: none;
}
.brand .dot { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 1.6rem;
  margin-left: auto;
  font-size: 0.875rem;
}
.nav-links a {
  color: var(--text-45);
  text-decoration: none;
  transition: color var(--d) var(--ease);
}
.nav-links a:hover { color: var(--text); }

.nav-cta {
  padding: 0.55rem 1.05rem;
  border-radius: 100px;
  background: var(--text);
  color: var(--bg);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  transition: opacity var(--d) var(--ease);
}
.nav-cta:hover { opacity: 0.85; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-cta { margin-left: auto; }
}

/* ── Scroll reveals ───────────────────────────────────────── */

.js .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--d-slow) var(--ease-dram),
              transform var(--d-slow) var(--ease-dram);
}
.js .reveal.in { opacity: 1; transform: none; }

/* Word-by-word mask reveal on headings. main.js wraps each word. */
.js [data-split] .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}
.js [data-split] .w > i {
  display: inline-block;
  font-style: inherit;
  transform: translateY(110%);
  transition: transform 0.82s var(--ease-dram);
  transition-delay: calc(var(--i) * 42ms);
}
.js [data-split].in .w > i { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js [data-split] .w > i { transform: none; transition: none; }
  .roster-track { animation: none !important; }
}

/* ── Hero ─────────────────────────────────────────────────── */

.hero {
  padding-top: clamp(8rem, 18vh, 12rem);
  padding-bottom: 0;
  border-bottom: 1px solid var(--line);
}

.hero h1 { max-width: 16ch; }

.hero-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2.5rem;
  align-items: end;
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
}

.hero-sub {
  max-width: 48ch;
  color: var(--text-70);
  font-size: clamp(1rem, 1.35vw, 1.1875rem);
}

.hero-cta { display: flex; gap: 0.75rem; flex-wrap: wrap; }

@media (max-width: 860px) {
  .hero-foot { grid-template-columns: 1fr; align-items: start; }
}

/* Brand marquee */
.roster {
  overflow: hidden;
  border-top: 1px solid var(--line);
  padding: 1.5rem 0;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.roster-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marq 52s linear infinite;
}
.roster:hover .roster-track { animation-play-state: paused; }
.roster-track span {
  font-family: var(--mono);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  color: var(--text-45);
  white-space: nowrap;
}
@keyframes marq { to { transform: translateX(-50%); } }

/* ── Section shell ────────────────────────────────────────── */

.sec { padding-block: var(--sec); border-bottom: 1px solid var(--line); }

.sec-head { margin-bottom: clamp(3rem, 7vw, 5rem); }
.sec-head h2 { max-width: 18ch; }

.sec-lede {
  max-width: 62ch;
  margin-top: 1.75rem;
  color: var(--text-70);
  font-size: clamp(1rem, 1.3vw, 1.125rem);
}

/* ── Browser frame (shared by work and the case study) ────── */

.frame {
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg-2);
}
.frame .bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-3);
}
.frame .bar i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-28);
}
.frame .bar span {
  margin-left: 0.7rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-45);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.frame .shot { overflow: hidden; }
.frame .shot img { width: 100%; display: block; }

/* ── Work ─────────────────────────────────────────────────── */

.work-item {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
  border-top: 1px solid var(--line-soft);
}
.work-item:first-of-type { border-top: 0; padding-top: 0; }
.work-item.flip .panel { order: 2; }

.work-item .panel { display: block; text-decoration: none; }
.work-item .panel .shot { max-height: 520px; }
.work-item .frame {
  transition: transform var(--d-slow) var(--ease), border-color var(--d) var(--ease);
}
.work-item .panel:hover .frame {
  transform: translateY(-5px);
  border-color: var(--text-28);
}

.work-item .caption .num {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-28);
  letter-spacing: 0.14em;
  margin-bottom: 1.25rem;
}
.work-item .mark {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  padding: 0.6rem;
  margin-bottom: 1.1rem;
  background: var(--bg-3);
}
.work-item .mark img {
  max-height: 100%;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.work-item .mark.plated { background: #f1efe9; }
.work-item .mark.plated img { filter: none; }
.work-item .kind { color: var(--text-45); font-size: 0.9375rem; margin-top: 0.4rem; }
.work-item .link {
  display: inline-flex;
  gap: 0.4rem;
  margin-top: 1.1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-70);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color var(--d) var(--ease), border-color var(--d) var(--ease);
}
.work-item .link:hover { color: var(--text); border-color: var(--text-45); }

.more-title {
  margin: clamp(3rem, 7vw, 5rem) 0 1.75rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-45);
}

.more {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: clamp(1rem, 2vw, 1.75rem);
}
.more a { text-decoration: none; display: block; }
.more .shot { max-height: 210px; }
.more .frame { transition: border-color var(--d) var(--ease); }
.more a:hover .frame { border-color: var(--text-28); }
.more p { margin: 0.75rem 0 0; display: flex; flex-direction: column; gap: 0.15rem; }
.more strong { font-weight: 500; font-size: 0.9375rem; }
.more span { color: var(--text-45); font-size: 0.8125rem; }

@media (max-width: 860px) {
  .work-item { grid-template-columns: 1fr; }
  .work-item.flip .panel { order: 0; }
}

/* ── Custom apps case study ───────────────────────────────── */

.apps { background: var(--bg-2); }

.case {
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: clamp(1.5rem, 4vw, 3rem);
  background: var(--bg);
}

.case-tag {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-28);
  margin-bottom: 1rem;
}
.case-tag span { color: var(--accent); }
.case-head h3 { max-width: 22ch; }

.case-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
  margin-top: clamp(2rem, 4vw, 3rem);
}
.case-text p { color: var(--text-70); max-width: 52ch; }

.case-facts {
  list-style: none;
  margin: 2rem 0;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.case-facts li { display: flex; flex-direction: column; gap: 0.2rem; }
.case-facts strong {
  font-size: clamp(1.5rem, 3vw, 2.125rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1;
}
.case-facts span {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--text-45);
}

.case-shots { margin: 0; display: grid; gap: 1rem; }
.case-shots .shot-lg .shot { max-height: 480px; }

.shot-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 1rem;
  align-items: start;
}
.case-shots .shot-md .shot { max-height: 300px; }

.case-shots .phone {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg-3);
}
.case-shots .phone .shot { overflow: hidden; max-height: 300px; }

.case-shots figcaption {
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.6;
  color: var(--text-45);
  margin-top: 0.5rem;
}

@media (max-width: 980px) {
  .case-body { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .shot-row { grid-template-columns: 1fr; justify-items: center; }
  .case-shots .phone { width: 170px; }
}
@media (max-width: 560px) {
  .case-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
}

/* ── Services flow ────────────────────────────────────────── */

.flow { list-style: none; margin: 0; padding: 0; }

.fw {
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem);
  padding-block: clamp(1.75rem, 3.5vw, 2.75rem);
  border-top: 1px solid var(--line);
  opacity: 0.4;
  transition: opacity 0.5s var(--ease);
}
.fw:last-child { border-bottom: 1px solid var(--line); }
.fw.fill { opacity: 1; }

.fw-n {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--text-28);
  padding-top: 0.45rem;
  transition: color 0.5s var(--ease);
}
.fw.fill .fw-n { color: var(--accent); }

.fw-b { display: grid; grid-template-columns: minmax(0, 20ch) minmax(0, 1fr); gap: clamp(1rem, 3vw, 2.5rem); }
.fw-b p { color: var(--text-70); max-width: 52ch; }

@media (max-width: 760px) {
  .fw { grid-template-columns: 3rem minmax(0, 1fr); }
  .fw-b { grid-template-columns: 1fr; gap: 0.6rem; }
}

/* ── About ────────────────────────────────────────────────── */

.about .big {
  max-width: 24ch;
  font-size: var(--t-big);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

/* ── Brands wall ──────────────────────────────────────────── */

.brands .note { max-width: 56ch; margin-top: 1.5rem; color: var(--text-45); font-size: 0.875rem; }

.wall {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  overflow: hidden;
}
.wall li {
  display: grid;
  place-items: center;
  padding: 1.5rem 1rem;
  min-height: 104px;
  background: var(--bg);
  transition: background var(--d) var(--ease);
}
.wall li:hover { background: var(--bg-3); }
.wall img {
  max-height: 40px;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  /* Every mark is flattened to white. Brand colours are unreadable at this
     size on a near-black tile, and a uniform wall reads as one set. */
  filter: brightness(0) invert(1);
  opacity: 0.9;
  transition: opacity var(--d) var(--ease);
}
.wall li:hover img { opacity: 1; }

.wall li.plated { background: #f1efe9; }
.wall li.plated img { filter: none; opacity: 1; }

/* ── Contact ──────────────────────────────────────────────── */

.contact { border-bottom: 0; }

.form {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  max-width: 980px;
}
.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field-wide { grid-column: 1 / -1; }

.field label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-45);
}
.field input, .field textarea {
  font: inherit;
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.8rem 0.9rem;
  resize: vertical;
  transition: border-color var(--d) var(--ease), background var(--d) var(--ease);
}
.field input::placeholder { color: var(--text-45); }
.field input:focus, .field textarea:focus { border-color: var(--text-45); background: var(--bg-3); }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-foot {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.form-note { font-family: var(--mono); font-size: 0.75rem; color: var(--text-45); margin: 0; }
.form-note.bad { color: var(--accent); }

.direct {
  list-style: none;
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0;
  padding: 1.75rem 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  gap: clamp(2rem, 5vw, 4rem);
  flex-wrap: wrap;
}
.direct li { display: flex; flex-direction: column; gap: 0.25rem; }
.direct span {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-28);
}
.direct a {
  font-size: 1.0625rem;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: border-color var(--d) var(--ease);
}
.direct a:hover { border-color: var(--text); }

@media (max-width: 760px) {
  .form { grid-template-columns: 1fr; }
}

/* ── Footer ───────────────────────────────────────────────── */

.foot { padding-block: clamp(3rem, 7vw, 5rem); border-top: 1px solid var(--line); }
.foot .wrap { display: grid; gap: 1.25rem; }
.foot-line { color: var(--text-45); margin: 0; }
.foot-nav { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: 0.875rem; }
.foot-nav a { color: var(--text-45); text-decoration: none; transition: color var(--d) var(--ease); }
.foot-nav a:hover { color: var(--text); }
.foot-legal {
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-28);
}

/* ── Text pages (privacy, 404) ────────────────────────────── */

.prose .wrap { max-width: 820px; }
.prose h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
.prose h2 {
  margin: clamp(2.5rem, 5vw, 3.5rem) 0 0.9rem;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.prose p { color: var(--text-70); max-width: 68ch; }
.prose a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--line); }
.prose a:hover { border-color: var(--text); }
.prose .btn { border-bottom: 0; }
