:root {
  /* Brand colours, sampled from the PulseCraft logo */
  --ink: #1f2020;
  --ink-2: #282a29;
  --line: #3a3c3b;
  --paper: #f2efea;
  --muted: #a6a9a6;
  --pulse: #ff914d;
  --pulse-deep: #e8732b;

  --font-display: "General Sans", system-ui, sans-serif;
  --font-body: "General Sans", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1240px;
  --radius: 4px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--pulse); outline-offset: 3px; }

/* Loading screen: the logo's pulse, shown until the page has loaded */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-content: center; justify-items: center; gap: 40px;
  background: var(--ink);
  transition: opacity .6s ease, visibility .6s;
  /* Safety net: fade out on its own if the script never runs */
  animation: loader-out .6s 6s forwards;
}
.loader.done { opacity: 0; visibility: hidden; }
@keyframes loader-out { to { opacity: 0; visibility: hidden; } }
.loader-pulse { position: relative; width: 56px; height: 56px; }
.loader-pulse > * { position: absolute; inset: 0; border-radius: 50%; }
.loader-pulse .dot { background: var(--pulse); box-shadow: 0 0 50px 6px rgba(255,145,77,.35); animation: loader-beat 1.2s ease-in-out infinite; }
.loader-pulse .ring { border: 2px solid var(--pulse); animation: pulse-ring 2.4s cubic-bezier(.2,.6,.3,1) infinite; }
.loader-pulse .ring:nth-child(2) { animation-delay: .8s; }
.loader-pulse .ring:nth-child(3) { animation-delay: 1.6s; }
@keyframes loader-beat { 50% { transform: scale(.82); } }
/* Fixed size, same in-app browser fix as the header logo */
.loader-wordmark { width: 180px; height: 45px; max-width: none; margin-top: 48px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--pulse); color: var(--ink); padding: 8px 12px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* Type */
h1, h2, h3 { margin: 0; font-family: var(--font-display); font-weight: 400; line-height: 1.02; letter-spacing: -0.03em; }
h1 { font-size: clamp(3rem, 7.4vw, 6.75rem); font-weight: 400; line-height: .96; letter-spacing: -0.04em; max-width: 13ch; }
.section-title { font-size: clamp(2.4rem, 5.2vw, 4.5rem); font-weight: 400; max-width: 18ch; }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); font-weight: 500; letter-spacing: -0.025em; }
p { margin: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  background: var(--pulse); color: var(--ink);
  border: 0; border-radius: var(--radius);
  font-weight: 600; letter-spacing: .01em; text-decoration: none;
  cursor: pointer; transition: background-color .2s;
}
.btn:hover { background: var(--pulse-deep); }
.btn-ghost { background: transparent; color: var(--paper); box-shadow: inset 0 0 0 1.5px rgba(242,239,234,.5); }
.btn-ghost:hover { background: rgba(242,239,234,.08); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: .95rem; }
.btn-wide { width: 100%; }
.link {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--pulse); font-weight: 600; text-decoration: underline; text-underline-offset: 4px;
}
.link:hover { color: var(--paper); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px var(--gutter);
  background: rgba(31,32,32,.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
/* Fixed size + no shrinking: in-app browsers (Instagram, Facebook) can collapse an auto-width image inside a flex item to 0 */
.brand { display: block; flex-shrink: 0; line-height: 0; }
.brand img { height: 52px; width: 106px; max-width: none; }
.nav { display: flex; align-items: center; gap: clamp(14px, 2.5vw, 32px); }
.nav a:not(.btn) { text-decoration: none; color: var(--muted); font-weight: 500; }
.nav a:not(.btn):hover { color: var(--paper); }

/* Hero viewfinder */
.hero { padding: clamp(12px, 2vw, 24px) var(--gutter) 0; }
.viewfinder {
  position: relative; overflow: hidden;
  min-height: calc(100svh - 96px);
  max-width: 1600px; margin: 0 auto;
  display: flex; align-items: flex-end;
  border-radius: var(--radius);
  background: #191a1a;
  isolation: isolate;
}
.vf-media, .vf-media video { position: absolute; inset: 0; width: 100%; height: 100%; }
.vf-media { z-index: -1; }
.vf-media video { object-fit: cover; }
.vf-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(25,26,26,.35) 0%, rgba(25,26,26,0) 30%, rgba(25,26,26,.85) 100%);
}
/* Hero photo: shown while there's no showreel. On desktop it sits on the right and fades into the background. */
.vf-photo {
  display: none; position: absolute; top: 0; right: 0; width: 60%; height: 100%;
  object-fit: cover; object-position: 50% 42%;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 40%);
  mask-image: linear-gradient(to right, transparent 0%, #000 40%);
}
.viewfinder.no-video .vf-photo { display: block; }

/* The logo's pulse, radiating over the hero */
.vf-pulse { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.vf-pulse > * { position: absolute; left: 47%; top: 24%; margin: -24px 0 0 -24px; width: 48px; height: 48px; border-radius: 50%; }
.vf-pulse .dot { background: var(--pulse); box-shadow: 0 0 60px 8px rgba(255,145,77,.35); }
.vf-pulse .ring { border: 2px solid var(--pulse); animation: pulse-ring 3.6s cubic-bezier(.2,.6,.3,1) infinite; }
.vf-pulse .ring:nth-child(2) { animation-delay: 1.2s; }
.vf-pulse .ring:nth-child(3) { animation-delay: 2.4s; }
@keyframes pulse-ring {
  from { transform: scale(1); opacity: .9; }
  to { transform: scale(9); opacity: 0; }
}
.viewfinder.no-video video { display: none; }
}

.corner { position: absolute; width: clamp(28px, 4vw, 48px); aspect-ratio: 1; border: 0 solid rgba(242,239,234,.85); }
.corner.tl { top: 20px; left: 20px; border-top-width: 2px; border-left-width: 2px; }
.corner.tr { top: 20px; right: 20px; border-top-width: 2px; border-right-width: 2px; }
.corner.bl { bottom: 20px; left: 20px; border-bottom-width: 2px; border-left-width: 2px; }
.corner.br { bottom: 20px; right: 20px; border-bottom-width: 2px; border-right-width: 2px; }

.vf-hud {
  font-family: var(--font-mono); letter-spacing: .04em;
  position: absolute; top: 30px; left: 0; right: 0;
  display: flex; justify-content: space-between;
  padding: 0 clamp(56px, 7vw, 88px);
  font-variant-numeric: tabular-nums; font-weight: 500; font-size: .9rem;
}
.rec { display: inline-flex; align-items: center; gap: 8px; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--pulse); animation: blink 1.2s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.hero-copy {
  padding: clamp(80px, 12vw, 120px) clamp(36px, 7vw, 88px) clamp(56px, 7vw, 88px);
  display: grid; gap: 30px;
}
.hero-copy h1 { font-size: clamp(2.6rem, 5.6vw, 5.25rem); line-height: 1; }
/* Headline fades slightly toward the bottom, like light falling off */
.hero-copy h1 {
  background: linear-gradient(180deg, #fff 0%, #fff 45%, rgba(242,239,234,.55) 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 2px 22px rgba(20,21,21,.55));
}
.lede { font-size: clamp(1.05rem, 1.4vw, 1.2rem); line-height: 1.65; max-width: 48ch; color: rgba(242,239,234,.86); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }

/* Services */
.services { padding: clamp(80px, 11vw, 140px) 0 clamp(40px, 6vw, 80px); }
.service-list { list-style: none; margin: clamp(32px, 5vw, 56px) 0 0; padding: 0; }
.service {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr);
  gap: 16px 40px; align-items: start;
  padding: 32px 0; border-top: 1px solid var(--line);
}
.service:last-child { border-bottom: 1px solid var(--line); }
.service p { color: var(--muted); max-width: 44ch; }
.deliverables { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: .95rem; }
.deliverables li { padding-left: 18px; position: relative; }
.deliverables li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 2px; background: var(--pulse); }
.service .link { grid-column: 2; justify-self: start; }

/* Work */
.work { padding: clamp(60px, 8vw, 100px) 0; }
.work-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 32px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filter {
  min-height: 48px; padding: 0 22px; cursor: pointer;
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  color: var(--muted); font-size: 1rem; font-weight: 600;
}
.filter:hover { color: var(--paper); border-color: var(--muted); }
.filter[aria-pressed="true"] { background: var(--paper); border-color: var(--paper); color: var(--ink); }

.gallery {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: clamp(170px, 20vw, 290px);
  grid-auto-flow: dense; gap: 10px;
}
.tile { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--ink-2); }
.tile.wide { grid-column: span 2; }
.tile.tall { grid-row: span 2; }
.tile.big { grid-column: span 2; grid-row: span 2; }
.tile.full { grid-column: 1 / -1; grid-row: span 2; }
.tile button { all: unset; display: block; width: 100%; height: 100%; cursor: pointer; }
.tile button:focus-visible { outline: 2px solid var(--pulse); outline-offset: -2px; }
.tile img, .tile video { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.tile button:hover img, .tile button:hover video { transform: scale(1.03); }
.tile .caption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 12px;
  background: linear-gradient(transparent, rgba(25,26,26,.85));
  font-size: .9rem; font-weight: 500;
}
.client-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.client-tabs[hidden] { display: none; }
.client-tab {
  display: grid; gap: 2px; text-align: left; cursor: pointer;
  min-width: 200px; padding: 14px 20px;
  background: var(--ink-2); border: 1.5px solid var(--line); border-radius: var(--radius);
  transition: border-color .15s, background-color .15s;
}
.client-tab:hover { border-color: var(--muted); }
.client-tab[aria-selected="true"] { border-color: var(--pulse); background: rgba(255,145,77,.08); }
.client-name { font-family: var(--font-display); font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
.client-panel[hidden] { display: none; }
.tile .play {
  position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--pulse); color: var(--ink);
}
.tile.missing { display: grid; place-items: center; text-align: center; padding: 16px; border: 1.5px dashed var(--line); background: transparent; }
.tile.missing p { color: var(--muted); font-size: .85rem; }
.tile.missing code { display: block; color: var(--paper); font-family: inherit; font-weight: 600; margin-top: 4px; word-break: break-all; }
.tile[hidden] { display: none; }

/* Process: a real sequence, so it's numbered */
.process { padding: clamp(60px, 8vw, 100px) 0; background: var(--ink-2); }
.steps { list-style: none; counter-reset: step; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.steps li { counter-increment: step; padding-top: 28px; border-top: 2px solid var(--line); position: relative; }
.steps li::before {
  content: counter(step); position: absolute; top: -15px; left: 0;
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--pulse); color: var(--ink); font-weight: 600; font-size: .85rem;
}
.step-icon {
  width: 52px; height: 52px; padding: 11px; margin-bottom: 20px;
  border: 1px solid rgba(255,145,77,.4); border-radius: 14px;
  background: rgba(255,145,77,.08); color: var(--pulse);
}
.steps h3 { margin-bottom: 10px; }
.steps p { color: var(--muted); }

/* About */
.about { padding: clamp(120px, 15vw, 220px) 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 64px; align-items: start; }
.about-copy { display: grid; gap: 18px; font-size: 1.125rem; max-width: 56ch; text-shadow: 0 1px 12px rgba(20,21,21,.6); }
.about-copy p:last-child { color: rgba(242,239,234,.72); }
/* Behind-the-scenes photos sit behind the About text, tinted and fading into the page */
.about { position: relative; overflow: hidden; isolation: isolate; }
.bts { position: absolute; inset: 0; z-index: -1; display: grid; grid-template-columns: repeat(3, 1fr); }
.bts img { width: 100%; height: 100%; object-fit: cover; }
.about::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(180deg, var(--ink) 0%, rgba(31,32,32,.84) 22%, rgba(31,32,32,.78) 50%, rgba(31,32,32,.84) 78%, var(--ink) 100%);
}

/* Contact */
.contact { padding: clamp(60px, 8vw, 100px) 0 clamp(80px, 11vw, 140px); border-top: 1px solid var(--line); }
.contact-grid { display: grid; grid-template-columns: 5fr 6fr; gap: 40px 64px; }
.contact-lede { margin-top: 20px; color: var(--muted); max-width: 40ch; font-size: 1.1rem; }
.contact-email { margin-top: 16px; color: var(--muted); }
.contact-email a { color: var(--paper); text-decoration: underline; text-decoration-color: var(--pulse); text-underline-offset: 4px; word-break: break-all; }
.contact-email a:hover { color: var(--pulse); }
.enquiry { display: grid; gap: 22px; }
fieldset { border: 0; margin: 0; padding: 0; }
legend, .field > span { font-weight: 600; margin-bottom: 10px; display: block; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 999px; color: var(--muted);
  transition: background-color .15s, color .15s, border-color .15s;
}
.chip span:hover { color: var(--paper); border-color: var(--muted); }
.chip input:checked + span { background: var(--pulse); border-color: var(--pulse); color: var(--ink); font-weight: 600; }
.chip input:focus-visible + span { outline: 2px solid var(--pulse); outline-offset: 3px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  background: var(--ink-2); color: var(--paper);
  border: 1px solid var(--line); border-radius: var(--radius);
  font: inherit; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--pulse); }
.field textarea::placeholder { color: #7d807d; }
.form-error { color: var(--pulse); font-weight: 600; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.footer-brand { display: grid; gap: 8px; justify-items: start; }
.footer-row img { height: 44px; width: auto; }
.registration { color: var(--muted); font-size: .8rem; }
.footer-email { display: inline-flex; align-items: center; gap: 8px; color: var(--paper); text-decoration: none; font-size: .95rem; }
.footer-email svg { color: var(--pulse); flex: none; }
.footer-email:hover { color: var(--pulse); }
.footer-links { display: flex; flex-wrap: wrap; gap: 12px; }
.footer-links a { text-decoration: none; color: var(--muted); font-weight: 500; }
.footer-links a:hover { color: var(--paper); }
.icon-link {
  display: grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--line); border-radius: 50%;
  transition: color .15s, border-color .15s;
}
.icon-link:hover { border-color: var(--pulse); color: var(--pulse); }
.copyright { color: var(--muted); font-size: .9rem; }

/* Floating WhatsApp */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 30;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--pulse); color: var(--ink);
  box-shadow: 0 6px 24px rgba(0,0,0,.4);
  opacity: 0; transform: translateY(12px); pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.wa-float.show { opacity: 1; transform: none; pointer-events: auto; }

/* Lightbox */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(20,21,21,.96); color: var(--paper);
}
.lightbox[open] { display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; }
.lightbox::backdrop { background: rgba(0,0,0,.6); }
.lb-stage { margin: 0; display: grid; gap: 12px; justify-items: center; padding: 56px 0 24px; }
.lb-media img, .lb-media video { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: var(--radius); }
.lb-stage figcaption { color: var(--muted); }
.lb-close, .lb-nav { background: none; border: 0; cursor: pointer; color: var(--paper); font-size: 2.2rem; line-height: 1; width: 48px; height: 48px; justify-self: center; }
.lb-close { position: absolute; top: 12px; right: 12px; }
.lb-close:hover, .lb-nav:hover { color: var(--pulse); }

/* Responsive */
@media (max-width: 960px) {
  .service { grid-template-columns: 1fr 1fr; }
  .service h3 { grid-column: 1 / -1; }
  .service .link { grid-column: 1; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 44vw; }
  .tile.big { grid-row: span 1; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 48px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav a:not(.btn) { display: none; }
  .brand img { height: 42px; width: 86px; }
  /* Phone hero: the photo sits on top in the normal flow, and the headline
     follows below it in the grey area, so the two can never overlap. */
  .viewfinder { min-height: 0; display: block; }
  .vf-media { position: relative; height: 58vh; height: 58svh; min-height: 340px; }
  .corner.tl, .corner.tr { top: 12px; } .corner.bl, .corner.br { bottom: 12px; }
  .corner.tl, .corner.bl { left: 12px; } .corner.tr, .corner.br { right: 12px; }
  .vf-hud { top: 20px; padding: 0 48px; font-size: .85rem; }
  .vf-photo {
    width: 100%; height: 100%; object-position: 50% 64%;
    -webkit-mask-image: linear-gradient(to bottom, #000 75%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 75%, transparent 100%);
  }
  .vf-pulse > * { left: 20%; top: 34%; margin: -14px 0 0 -14px; width: 28px; height: 28px; }
  .hero-copy { padding: 36px 24px 64px; gap: 28px; }
  .hero-copy h1 { font-size: clamp(2.2rem, 10vw, 2.6rem); line-height: 1.04; }
  .hero-copy .lede { font-size: 1rem; line-height: 1.7; }
  .hero-actions { gap: 14px; margin-top: 8px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .service { grid-template-columns: 1fr; }
  .service .link { grid-column: 1; }
  .gallery { grid-auto-rows: 46vw; gap: 8px; }
  .tile.wide, .tile.big { grid-column: span 2; }
  .tile.tall, .tile.full { grid-row: span 1; }
  .steps { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .lightbox[open] { grid-template-columns: 1fr; }
  .lb-nav { position: absolute; bottom: 16px; }
  .lb-prev { left: 24px; } .lb-next { right: 24px; }
  .lb-stage { padding: 56px 12px 72px; }
}

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