@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("/fonts/montserrat-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #000000;
  --beige: #ebdfd9;
  --beige-dim: rgba(235, 223, 217, 0.72);
  --pink: #ff2768;
  --glass: rgba(0, 0, 0, 0.42);
  --glass-hover: rgba(0, 0, 0, 0.66);
  --line: rgba(235, 223, 217, 0.26);
  --ink: #000000;
  --ink-soft: #4a4442;
  --field: rgba(255, 255, 255, 0.6);
  --w: min(760px, 88vw);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --type: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --type-logo: "Montserrat", "Archivo", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--black);
}

body {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  background: var(--black);
  color: var(--beige);
  font-family: var(--type);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

svg,
img,
video {
  display: block;
}

a {
  color: inherit;
}

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

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- Background video ---------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #1a1412 url("/media/skyline-poster.jpg") center / cover no-repeat;
}

.bg__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Keep the skyline's colour; darken top and bottom, and a soft pool behind the logo. */
.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 80% at 50% 45%, rgba(0, 0, 0, 0.26) 0%, rgba(0, 0, 0, 0) 60%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.28) 38%, rgba(0, 0, 0, 0.34) 62%, rgba(0, 0, 0, 0.74) 100%);
  pointer-events: none;
}

/* Intro: a black panel with a pink leading edge swipes off to reveal the video. */
.curtain {
  position: fixed;
  top: 0;
  bottom: 0;
  left: calc(-30vw - 20vh);
  z-index: 0;
  width: calc(160vw + 40vh);
  background: linear-gradient(90deg, var(--pink) 0, var(--pink) 9vw, #000 9vw);
  transform: skewX(-12deg);
  pointer-events: none;
}

/* ---------- Stage ---------- */

.stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  justify-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: max(24px, env(safe-area-inset-top)) 16px 76px;
}

.brand {
  grid-row: 2;
  width: var(--w);
  margin: 0;
}

.logo {
  width: 100%;
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 4px 30px rgba(0, 0, 0, 0.45));
}

.ink {
  fill: var(--beige);
}

.raw {
  fill: var(--pink);
}

.l,
.raw {
  transform-box: fill-box;
}

.raw {
  transform-origin: 30% 60%;
}

.actions {
  grid-row: 3;
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: var(--w);
  margin-top: clamp(28px, 6vh, 60px);
}

.socials {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  color: var(--beige);
  text-decoration: none;
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  backdrop-filter: blur(12px) saturate(1.2);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.social .icon {
  flex: none;
  width: 24px;
  height: 24px;
  transition: color 0.2s ease;
}

.social__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.social__count {
  font-size: 1.3125rem;
  font-stretch: 92%;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  line-height: 1.05;
}

.social__name {
  color: var(--beige-dim);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: 1.25;
}

.social:hover {
  border-color: var(--pink);
  background: var(--glass-hover);
}

.social:hover .icon {
  color: var(--pink);
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  padding: 14px 44px;
  border: 0;
  border-radius: 999px;
  background: var(--pink);
  color: var(--black);
  font-family: var(--type-logo);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.cta:hover {
  background: var(--beige);
}

.cta:focus-visible {
  outline-color: var(--beige);
}

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

.foot {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px max(16px, env(safe-area-inset-bottom));
  color: var(--beige-dim);
  font-size: 0.8125rem;
}

.foot p {
  margin: 0;
}

.toggle {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  color: var(--beige);
  cursor: pointer;
}

.toggle svg {
  width: 18px;
  height: 18px;
}

.toggle__play,
.toggle[data-state="paused"] .toggle__pause {
  display: none;
}

.toggle[data-state="paused"] .toggle__play {
  display: block;
}

/* No script: no video to control, so show the still frame only. */
html:not(.js) .toggle,
html:not(.js) .bg__video {
  display: none;
}

/* ---------- Work with us dialog ---------- */

.work {
  width: min(580px, calc(100vw - 24px));
  max-width: none;
  max-height: min(92svh, 900px);
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: var(--beige);
  color: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.work::backdrop {
  background: rgba(0, 0, 0, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.work__inner {
  position: relative;
  padding: 30px 30px 26px;
}

.work__close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.work__close:hover {
  background: rgba(0, 0, 0, 0.07);
}

.work__close svg {
  width: 22px;
  height: 22px;
}

.work h2 {
  margin: 0 48px 10px 0;
  font-family: var(--type-logo);
  font-size: clamp(1.875rem, 5.6vw, 2.375rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}

.work__lede {
  max-width: 40ch;
  margin: 0 0 22px;
  color: var(--ink-soft);
}

.form {
  display: grid;
  gap: 16px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field label,
.field legend {
  padding: 0;
  font-size: 0.875rem;
  font-weight: 650;
}

.field legend {
  margin-bottom: 8px;
}

.opt {
  color: var(--ink-soft);
  font-weight: 450;
}

.field input,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid rgba(0, 0, 0, 0.24);
  border-radius: 12px;
  background: var(--field);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  min-height: 112px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--pink);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 39, 104, 0.28);
}

.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] {
  border-color: #c4123f;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  position: relative;
  cursor: pointer;
}

.chip input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.chip span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid rgba(0, 0, 0, 0.24);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 550;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.chip:hover span {
  border-color: var(--ink);
}

.chip input:checked + span {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--beige);
}

.chip input:focus-visible + span {
  outline: 3px solid var(--pink);
  outline-offset: 2px;
}

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

.ts:empty {
  display: none;
}

.form__status {
  margin: 0;
  color: #b0103a;
  font-size: 0.9375rem;
  font-weight: 550;
}

.form__status:empty {
  display: none;
}

.form__status a {
  font-weight: 700;
}

.form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.send {
  min-height: 52px;
  padding: 12px 36px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--beige);
  font-family: inherit;
  font-size: 1.0625rem;
  font-weight: 750;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.send:hover {
  background: var(--pink);
  color: var(--ink);
}

.send[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.form__alt {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.875rem;
}

.form__alt a {
  color: var(--ink);
  font-weight: 650;
  text-decoration-color: var(--pink);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

.work__done {
  padding: 18px 0 6px;
}

.done__title:focus {
  outline: none;
}

.done__text {
  margin: 0 0 24px;
  color: var(--ink-soft);
}

/* ---------- 404 ---------- */

.nf__main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  min-height: 100vh;
  min-height: 100svh;
  padding: 40px 16px;
  text-align: center;
}

.nf__logo {
  display: block;
  width: min(420px, 80vw);
}

.nf__logo img {
  width: 100%;
  height: auto;
}

.nf h1 {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
}

/* ---------- Motion: one intro, once per session ---------- */

/* RAW is hidden by its writing mask until the strokes play; skip the mask when there is no intro. */
html:not(.js) .raw,
.seen .raw {
  mask: none;
}

.seen .curtain,
html:not(.js) .curtain {
  display: none;
}

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

  .curtain {
    display: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .l {
    animation: rise 0.75s cubic-bezier(0.2, 1.25, 0.35, 1) both;
  }

  .l:nth-child(1) { animation-delay: 0.1s; }
  .l:nth-child(2) { animation-delay: 0.15s; }
  .l:nth-child(3) { animation-delay: 0.2s; }
  .l:nth-child(4) { animation-delay: 0.25s; }
  .l:nth-child(5) { animation-delay: 0.36s; }
  .l:nth-child(6) { animation-delay: 0.41s; }
  .l:nth-child(7) { animation-delay: 0.46s; }

  /* The brush strokes finish around 1.75s: glow and a small thump land on that. */
  .raw {
    animation: glow 0.9s ease-out 1.72s both;
  }

  .logo {
    animation: thump 0.5s cubic-bezier(0.3, 1.6, 0.4, 1) 1.72s both;
  }

  .curtain {
    animation: swipe 0.8s cubic-bezier(0.7, 0, 0.25, 1) 1.85s both;
  }

  .bg__video {
    animation: settle 2.8s var(--ease-out) 1.9s both;
  }

  .social,
  .cta,
  .foot {
    animation: up 0.7s var(--ease-out) both;
  }

  .social:nth-child(1) { animation-delay: 2.3s; }
  .social:nth-child(2) { animation-delay: 2.37s; }
  .social:nth-child(3) { animation-delay: 2.44s; }
  .social:nth-child(4) { animation-delay: 2.51s; }
  .cta { animation-delay: 2.62s; }
  .foot { animation-delay: 2.8s; }

  /* Repeat visits in the same session: skip the build, just fade in. */
  .seen .l,
  .seen .raw,
  .seen .logo,
  .seen .social,
  .seen .cta,
  .seen .foot,
  .seen .bg__video {
    animation: none;
  }

  .seen .stage,
  .seen .bg {
    animation: fade 0.6s ease both;
  }

  .work[open] {
    animation: sheet 0.35s var(--ease-out);
  }

  .work[open]::backdrop {
    animation: fade 0.3s ease;
  }
}

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

@keyframes rise {
  from { transform: translateY(118%); }
  to { transform: none; }
}

@keyframes glow {
  0% { filter: drop-shadow(0 0 0 rgba(255, 39, 104, 0)); }
  30% { filter: drop-shadow(0 0 14px rgba(255, 39, 104, 0.85)); }
  100% { filter: drop-shadow(0 0 0 rgba(255, 39, 104, 0)); }
}

@keyframes thump {
  0% { transform: scale(1.035); }
  100% { transform: none; }
}

@keyframes swipe {
  from { transform: translateX(0) skewX(-12deg); }
  to { transform: translateX(calc(130vw + 40vh)) skewX(-12deg); }
}

@keyframes settle {
  from { transform: scale(1.07); }
  to { transform: none; }
}

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

@keyframes sheet {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Phones ---------- */

@media (max-width: 700px) {
  /* Logo dead centre; equal padding top and bottom so the footer doesn't pull it up. */
  .stage {
    padding-top: 76px;
    padding-bottom: 76px;
  }

  .actions {
    gap: 12px;
    margin-top: 32px;
  }

  /* Socials shrink to one compact row: icon and count, names kept for screen readers. */
  .socials {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }

  .social {
    gap: 7px;
    min-height: 44px;
    padding: 6px 4px;
  }

  .social .icon {
    width: 17px;
    height: 17px;
  }

  .social__count {
    font-size: 0.9375rem;
  }

  .social__name {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .cta {
    width: 100%;
    min-height: 52px;
    font-size: 1.0625rem;
  }

  .work {
    width: 100vw;
    max-height: 94svh;
    margin: auto 0 0;
    border-radius: 22px 22px 0 0;
  }

  .work__inner {
    padding: 24px 18px max(22px, env(safe-area-inset-bottom));
  }

  .field-row {
    grid-template-columns: 1fr;
  }

  .send {
    width: 100%;
  }
}

/* Very short phones: let it scroll rather than squeeze. */
@media (max-width: 700px) and (max-height: 560px) {
  .stage {
    padding-top: 32px;
  }
}

@media (orientation: portrait) {
  .bg {
    background-image: url("/media/skyline-vertical-poster.jpg");
  }
}
