/* APPDEV — monochrome base (black, white, hairlines) with client brand colours only on project bands. */
:root {
  --black: #000;
  --ink: #0b0b0c;
  --white: #fff;
  --grey-1: #a3a3a3;
  --grey-2: #6b6b6b;
  --line: #262626;
  --line-strong: #3a3a3a;

  --f-display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --f-label: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(20px, 4vw, 56px);
  --max: 1360px;
  --nav-h: 72px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font: 400 17px/1.6 var(--f-display);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -.03em; line-height: 1; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

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

::selection { background: var(--white); color: var(--black); }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.label {
  font: 400 .78rem/1.4 var(--f-label);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--grey-1);
}

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--white); color: var(--black); padding: 8px 14px;
}
.skip:focus { left: 8px; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(0, 0, 0, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.nav .wrap { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav__logo img { height: 34px; width: auto; }
.nav__links { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 36px); }
.nav__links a { font: 400 .78rem/1 var(--f-label); letter-spacing: .12em; text-transform: uppercase; color: var(--grey-1); transition: color .2s; }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--white); }
.lang { display: flex; border: 1px solid var(--line-strong); border-radius: 99px; overflow: hidden; }
.lang button {
  background: none; border: 0; color: var(--grey-2); cursor: pointer;
  font: 500 .72rem/1 var(--f-label); letter-spacing: .08em; padding: 7px 10px;
}
.lang button[aria-pressed="true"] { background: var(--white); color: var(--black); }
.nav__toggle { display: none; background: none; border: 0; color: var(--white); cursor: pointer; padding: 8px; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: currentColor; margin: 5px 0; transition: transform .3s var(--ease), opacity .2s; }

@media (max-width: 860px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; inset: calc(var(--nav-h) + env(safe-area-inset-top, 0px)) 0 auto 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--black); border-bottom: 1px solid var(--line);
    padding: 8px max(var(--gutter), env(safe-area-inset-left, 0px)) 24px;
    transform: translateY(-120%); transition: transform .4s var(--ease);
  }
  .nav__links a { font-size: 1rem; padding: 14px 0; width: 100%; border-bottom: 1px solid var(--line); }
  .nav__links .lang { margin-top: 18px; }
  .nav.is-open .nav__links { transform: none; }
  .nav.is-open { background: var(--black); }
  .nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ---------- Hero ---------- */
.hero { padding-top: calc(var(--nav-h) + clamp(64px, 12vw, 160px)); padding-bottom: clamp(48px, 7vw, 96px); }
.hero__title {
  font-size: clamp(2.2rem, 11.2vw, 11.5rem);
  font-weight: 900;
  font-stretch: 112%;
  line-height: .86;
  letter-spacing: -.05em;
  text-transform: uppercase;
}
.hero__kicker {
  display: block; margin-bottom: clamp(20px, 3vw, 36px);
  font: 400 .78rem/1.4 var(--f-label); font-stretch: normal; letter-spacing: .12em; color: var(--grey-1);
}
/* Phones: twice the size, slightly narrower letterforms so CRAFT. still fits the screen */
@media (max-width: 640px) { .hero__title { font-size: 22vw; font-stretch: 100%; } }
.hero__title .hl { color: #f4ff1d; }
.hero__title .outline .pink { -webkit-text-stroke-color: #e20048; letter-spacing: calc(-.05em + 2px); }
.hero__title .outline { display: inline-block; margin-top: .14em; color: transparent; -webkit-text-stroke: clamp(1px, .18vw, 2.5px) var(--white); }
.hero__meta { display: grid; grid-template-columns: 1fr minmax(0, 520px); gap: 32px; margin-top: clamp(36px, 5vw, 64px); align-items: end; }
.hero__meta p { color: var(--grey-1); font-size: clamp(1.05rem, 1.4vw, 1.25rem); max-width: 52ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
@media (max-width: 760px) { .hero__meta { grid-template-columns: 1fr; } }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 .8rem/1 var(--f-label); letter-spacing: .1em; text-transform: uppercase;
  padding: 16px 22px; border: 1px solid var(--white); border-radius: 99px;
  transition: background .2s, color .2s;
}
.btn:hover { background: var(--white); color: var(--black); }
.btn--solid { background: var(--white); color: var(--black); }
.btn--solid:hover { background: transparent; color: var(--white); }

/* Phone strip under the hero */
.strip { display: flex; gap: 0; align-items: flex-end; padding-top: 16px; padding-bottom: clamp(48px, 8vw, 120px); }
/* Phones rest at 70% and overlap their boxes slightly so they sit close together.
   The hovered one grows around its own centre above its neighbours, which blur into the background. */
.strip a { flex: 1 1 0; min-width: 0; margin-inline: -1.1%; position: relative; z-index: 1; }
.strip a:hover, .strip a:focus-visible { z-index: 2; }
.strip img { width: 100%; height: auto; aspect-ratio: 1362 / 2913; object-fit: contain; object-position: center bottom; filter: grayscale(1) brightness(.8); transform: translateY(0) scale(.7); transform-origin: center bottom; transition: filter .5s, transform .5s var(--ease); }
.strip:has(a:hover, a:focus-visible) img { filter: grayscale(1) brightness(.55) blur(4px); }
/* translateY(27.5%) = half of the extra height gained going from .7 to 1.25, so the phone expands from its centre */
.strip a:hover img, .strip a:focus-visible img { filter: none; transform: translateY(27.5%) scale(1.25); }
/* Phones: no hover, so the strip becomes a swipeable row of full-colour phones */
@media (max-width: 640px) {
  .strip {
    overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
    gap: 12px; padding-bottom: 48px; scrollbar-width: none;
  }
  .strip::-webkit-scrollbar { display: none; }
  .strip { scroll-padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)); }
  .strip a { flex: 0 0 40%; margin-inline: 0; scroll-snap-align: start; }
  .strip img,
  .strip:has(a:hover, a:focus-visible) img,
  .strip a:hover img, .strip a:focus-visible img { filter: none; transform: none; }
}

/* ---------- Section heads ---------- */
.section { padding-block: clamp(72px, 10vw, 140px); border-top: 1px solid var(--line); }
.section__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; margin-bottom: clamp(40px, 6vw, 80px); align-items: end; }
.section__head h2 { font-size: clamp(2.3rem, 5vw, 5rem); font-weight: 900; letter-spacing: -.045em; text-transform: uppercase; line-height: .9; }
.section__head p { color: var(--grey-1); max-width: 56ch; }
.section__head .label { display: block; margin-bottom: 20px; }
@media (max-width: 760px) { .section__head { grid-template-columns: minmax(0, 1fr); } }
.page-head h1, .hero__title { overflow-wrap: break-word; }

/* ---------- Services (hairline rows) ---------- */
.services { border-top: 1px solid var(--line-strong); }
.service {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) minmax(0, 4fr);
  gap: 24px 40px; align-items: baseline;
  padding-block: clamp(24px, 3vw, 36px); border-bottom: 1px solid var(--line-strong);
}
/* Hover: the row's texts grow slightly. Scaling with transform keeps the layout still, so nothing reflows. */
.service h3, .service p, .service .tech { transition: transform .6s var(--ease), color .6s var(--ease); transform-origin: left center; }
.service h3 { font-size: clamp(1.7rem, 3.4vw, 2.9rem); font-weight: 800; letter-spacing: -.035em; text-transform: uppercase; }
.service p { color: var(--grey-1); }
.service .tech { font: 400 .78rem/1.7 var(--f-label); color: var(--grey-2); letter-spacing: .04em; text-align: right; transform-origin: right center; }
.service:hover h3 { transform: scale(1.07); }
.service:hover p { transform: scale(1.03); color: #d4d4d4; }
.service:hover .tech { transform: scale(1.06); color: var(--grey-1); }
@media (max-width: 900px) {
  .service { grid-template-columns: 1fr; gap: 10px; }
  .service .tech { text-align: left; transform-origin: left center; }
}

/* ---------- Process ---------- */
.process { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line-strong); }
.step { padding: 28px 24px 8px 0; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.step + .step { padding-left: 24px; }
.step:last-child { border-right: 0; }
.step .num { font: 400 .78rem/1 var(--f-label); color: var(--grey-2); }
.step h3 { font-size: 1.5rem; text-transform: uppercase; }
.step p { color: var(--grey-1); font-size: .95rem; }
@media (max-width: 1000px) {
  .process { grid-template-columns: 1fr 1fr; }
  .step, .step + .step { padding: 24px 20px 24px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .step:nth-child(even) { padding-left: 20px; border-left: 1px solid var(--line); }
}
@media (max-width: 560px) {
  .process { grid-template-columns: 1fr; }
  .step:nth-child(even) { padding-left: 0; border-left: 0; }
}

/* ---------- Projects (full-bleed brand bands) ---------- */
.projects__intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 24px 48px; }
.projects__note { color: var(--grey-1); max-width: 30ch; text-align: right; }
@media (max-width: 760px) { .projects__intro { grid-template-columns: 1fr; } .projects__note { text-align: left; } }

.case {
  --c1: #222; --c2: #111; --accent: #fff;
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 90% at 85% 40%, color-mix(in srgb, var(--c1) 85%, transparent) 0%, transparent 60%),
    linear-gradient(115deg, var(--c2) 0%, var(--black) 72%);
  border-top: 1px solid var(--line);
}
.case .wrap {
  display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(0, 380px);
  gap: clamp(24px, 4vw, 64px); align-items: center;
  padding-block: clamp(56px, 7vw, 96px);
  min-height: clamp(520px, 52vw, 680px);
}
.case__index { align-self: start; font: 400 .78rem/1.5 var(--f-label); color: rgba(255, 255, 255, .55); letter-spacing: .1em; }
.case__body { display: flex; flex-direction: column; gap: 22px; align-self: center; }
.case__logo { height: clamp(34px, 3.4vw, 48px); width: auto; object-fit: contain; object-position: left center; align-self: flex-start; }
.case__logo--square { height: clamp(56px, 5vw, 72px); border-radius: 16px; }
.case h3 { font-size: clamp(2.2rem, 4.6vw, 4.2rem); font-weight: 800; letter-spacing: -.04em; max-width: 16ch; }
.case p { color: rgba(255, 255, 255, .78); max-width: 54ch; font-size: 1.05rem; }
.case__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.case__tags li { font: 400 .74rem/1 var(--f-label); letter-spacing: .06em; border: 1px solid rgba(255, 255, 255, .28); border-radius: 99px; padding: 8px 12px; }
.case__partner { display: flex; align-items: center; gap: 12px; font: 400 .74rem/1 var(--f-label); color: rgba(255, 255, 255, .6); letter-spacing: .06em; }
.case__partner img { height: 26px; width: auto; }
.case__shot { align-self: center; justify-self: center; width: 100%; max-width: 340px; transition: transform .8s var(--ease); }
.case:hover .case__shot { transform: translateY(-12px); }
.case__shot img { width: 100%; height: auto; filter: drop-shadow(0 40px 60px rgba(0, 0, 0, .55)); }

.case--newday    { --c1: #1f5cff; --c2: #0a1f5c; }
.case--refresher { --c1: #e8364f; --c2: #3a0d17; }
.case--sts       { --c1: #00238d; --c2: #131d2d; }
.case--sts::after { content: ""; position: absolute; right: -10%; bottom: -30%; width: 40%; aspect-ratio: 1; background: radial-gradient(closest-side, rgba(250, 164, 26, .35), transparent); pointer-events: none; }
.case--csfd      { --c1: #ba0305; --c2: #2a0405; }
.case--superzoo  { --c1: #ffd400; --c2: #4b230e; }
.case--driverama { --c1: #f2b705; --c2: #0d3b30; }
.case--polus     { --c1: #3d5afe; --c2: #000037; }
.case--globus    { --c1: #00ac4f; --c2: #06331c; }
.case--globus::after { content: ""; position: absolute; right: -10%; bottom: -30%; width: 40%; aspect-ratio: 1; background: radial-gradient(closest-side, rgba(245, 130, 32, .35), transparent); pointer-events: none; }
.case--grason    { --c1: #4f8fa0; --c2: #24224a; }
.case--paysy     { --c1: #7252d3; --c2: #24185a; }
.case--yours     { --c1: #e20048; --c2: #3d0014; }

.case--paysy .case__logo, .case--polus .case__logo { filter: brightness(0) invert(1); }

@media (max-width: 900px) {
  .case .wrap { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 28px; }
  .case__body { padding-bottom: 0; }
  .case__shot { max-width: 280px; margin-top: 8px; }
}

/* Client logo wall */
.clients { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-left: 1px solid var(--line); border-top: 1px solid var(--line); }
.clients li { display: grid; place-items: center; aspect-ratio: 16 / 9; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 20px; }
.clients img { max-height: 44px; max-width: 70%; width: auto; opacity: .9; transition: opacity .3s, transform .3s var(--ease); }
.clients li:hover img { opacity: 1; transform: scale(1.06); }
.clients img.mono-dark { filter: brightness(0) invert(1); }
@media (max-width: 700px) { .clients { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Team ---------- */
.team { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: clamp(16px, 2vw, 28px); }
.member { display: flex; flex-direction: column; gap: 14px; }
.member img { aspect-ratio: 1; width: 100%; max-width: 140px; border-radius: 50%; border: 1px solid var(--line-strong); object-fit: cover; object-position: center 25%; filter: grayscale(1) contrast(1.05); transition: filter .4s; background: var(--ink); }
.member:hover img { filter: none; }
.member h3 { font-size: 1.15rem; letter-spacing: -.02em; }
.member .label { font-size: .7rem; }
.member blockquote { margin: 0; color: var(--grey-1); font-size: .9rem; }
@media (max-width: 1100px) { .team { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .team { grid-template-columns: repeat(2, minmax(0, 1fr)); } .member blockquote { display: none; } }

/* ---------- Lists (blog, careers) ---------- */
.rows { border-top: 1px solid var(--line-strong); }
.row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center;
  padding-block: 26px; border-bottom: 1px solid var(--line-strong);
}
.row > div { transition: transform .6s var(--ease); }
.row h3 { font-size: clamp(1.3rem, 2.6vw, 2.1rem); font-weight: 700; letter-spacing: -.03em; }
.row p { color: var(--grey-1); margin-top: 8px; max-width: 70ch; font-size: .95rem; }
.row .arrow { font: 400 1.3rem/1 var(--f-label); color: var(--grey-2); transition: transform .6s var(--ease), color .4s; }
a.row:hover > div { transform: translateX(14px); }
a.row:hover .arrow { transform: translateX(6px); color: var(--white); }

/* ---------- Contact ---------- */
.contact { padding-block: clamp(96px, 14vw, 200px); border-top: 1px solid var(--line); }
.contact__mail {
  display: inline-block; margin-top: 28px;
  font-size: clamp(1.35rem, 5.3vw, 5rem); font-weight: 900; color: #f4ff1d; letter-spacing: -.05em; line-height: .95;
  overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 3px no-repeat;
  transition: background-size .5s var(--ease);
}
.contact__mail:hover { background-size: 100% 3px; }
.contact__row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; align-items: center; }
.copy-status { font: 400 .78rem/1 var(--f-label); color: var(--grey-1); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 32px calc(32px + env(safe-area-inset-bottom, 0px)); }
.footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.footer img { height: 26px; width: auto; }
.footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
.footer a, .footer small { font: 400 .74rem/1 var(--f-label); color: var(--grey-2); letter-spacing: .08em; text-transform: uppercase; }
.footer a:hover { color: var(--white); }

/* ---------- Inner pages (blog post, careers) ---------- */
.page-head { padding-top: calc(var(--nav-h) + clamp(56px, 9vw, 120px)); padding-bottom: clamp(40px, 6vw, 72px); }
.page-head h1 { font-size: clamp(2.8rem, 8vw, 7rem); font-weight: 900; letter-spacing: -.05em; text-transform: uppercase; line-height: .9; }
.page-head p { color: var(--grey-1); max-width: 60ch; margin-top: 24px; font-size: 1.1rem; }
.page-head .label { display: block; margin-bottom: 24px; }
.page-head .label a:hover { color: var(--white); }

.prose { max-width: 720px; padding-bottom: clamp(72px, 10vw, 140px); font-size: 1.1rem; line-height: 1.75; color: #d6d6d6; }
.prose > * + * { margin-top: 1.1em; }
.prose h2, .prose h3, .prose h4 { color: var(--white); font-size: 1.6rem; letter-spacing: -.02em; line-height: 1.2; margin-top: 2em; }
.prose strong { color: var(--white); }
.prose ul, .prose ol { padding-left: 1.2em; list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: .4em; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

.job { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px 64px; padding-block: clamp(40px, 6vw, 72px); border-top: 1px solid var(--line-strong); }
.job h2 { font-size: clamp(2rem, 4vw, 3.4rem); text-transform: uppercase; letter-spacing: -.04em; }
.job .label { display: block; margin-top: 14px; }
.job__body { display: flex; flex-direction: column; gap: 24px; color: var(--grey-1); }
.job__body h3 { color: var(--white); font-size: .82rem; font-family: var(--f-label); font-weight: 500; letter-spacing: .12em; text-transform: uppercase; }
.job__body ul { display: grid; gap: 8px; }
.job__body li { padding-left: 22px; position: relative; }
.job__body li::before { content: "—"; position: absolute; left: 0; color: var(--grey-2); }
@media (max-width: 800px) { .job { grid-template-columns: 1fr; } }

/* ---------- Motion ---------- */
.hero .rise { animation: rise 1s var(--ease) both; }
.hero .rise + .rise { animation-delay: .15s; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }
/* Hero title typewriter (letters split by main.js) */
.hero__title.is-typing .type-char:not(.is-on) { visibility: hidden; }
.type-caret { position: relative; display: inline-block; width: 0; height: .74em; }
.type-caret::after {
  content: ""; position: absolute; left: .03em; bottom: 0; width: .07em; height: 100%;
  background: #e20048; animation: caret-blink 1s steps(1) infinite;
}
.hero__title.is-typing .type-caret::after { animation: none; }
.type-caret.is-done { opacity: 0; transition: opacity .4s; }
@keyframes caret-blink { 50% { opacity: 0; } }
.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; }
.reveal { transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js .reveal:not(.is-in) { opacity: .001; transform: translateY(24px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal:not(.is-in) { opacity: 1; transform: none; }
}
