/* 97 DIGITAL — one-screen site */

:root {
  --bg: #050507;
  --text: #f2f2f0;
  --text-2: #c9cacd;
  --muted: #8e9096;
  --pad-x: clamp(20px, 3vw, 54px);
  --pad-y: clamp(20px, 3vw, 54px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --overlay-center: 50% 50%;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter Tight", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
p,
ul {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Background layers ---------- */

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg) url("../bg/liquid-poster.webp") center / cover no-repeat;
}

.bg-video,
.bg-overlay,
.bg-grain {
  position: absolute;
  inset: 0;
}

.bg-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.bg-video.is-playing {
  opacity: 1;
}

/* Image mode: the poster with a very slow breathing zoom. */
.bg.is-image::before {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  animation: breathe 30s ease-in-out infinite;
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.bg-overlay {
  background:
    linear-gradient(rgba(5, 5, 7, 0.22), rgba(5, 5, 7, 0.22)),
    linear-gradient(to bottom, rgba(5, 5, 7, 0.6), transparent 25%, transparent 75%, rgba(5, 5, 7, 0.6)),
    radial-gradient(ellipse 70% 55% at var(--overlay-center), rgba(5, 5, 7, 0.55) 0%, rgba(5, 5, 7, 0.25) 60%, rgba(5, 5, 7, 0.6) 100%);
}

.bg-grain {
  opacity: 0.06;
  background-repeat: repeat;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Page layout (desktop) ---------- */

.page {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--pad-y) var(--pad-x);
}

.site-header,
.hero,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  display: inline-flex;
}

.logo img {
  display: block;
  height: 22px; /* the wordmark is cropped to its letters, so this reads larger than 22px type */
  width: auto;
  max-width: none;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 32px 0;
}

h1 {
  position: relative;
  z-index: 1; /* stays above the soft dark patch behind .services */
  font-weight: 500;
  font-size: clamp(42px, 6.2vw, 104px);
  letter-spacing: -0.035em;
  line-height: 1;
  text-wrap: balance;
}

/* One line on desktop; below this it wraps (text-wrap: balance). */
@media (min-width: 1025px) {
  h1 {
    white-space: nowrap;
  }
}

.services {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 22px;
  font-size: 19px;
  line-height: 1.4;
  color: var(--text-2);
}

/* Readability: a soft dark patch behind this text only, so bright video highlights passing
   behind it can't wash it out. The rest of the video stays undimmed. */
.services {
  position: relative;
  isolation: isolate;
}

.services::before {
  content: "";
  position: absolute;
  inset: -36px -80px;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse closest-side, rgba(5, 5, 7, 0.45) 55%, transparent 100%);
}

/* Middle-dot separators. */
.services li + li::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 4px;
  margin: 0 12px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
  transform: translateY(-1px);
}

.hero-cta {
  display: none !important;
}

.site-footer {
  display: flex;
  justify-content: center;
}

.footer-copy {
  font-size: 14px;
  color: var(--text-2);
  text-align: center;
}

/* ---------- Button ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  padding: 0 16px 0 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(14px) saturate(140%) brightness(0.72);
  backdrop-filter: blur(14px) saturate(140%) brightness(0.72); /* dimmed so highlights can't wash out the label */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 250ms ease;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .btn {
    background: rgba(30, 30, 34, 0.85);
  }
}

.btn:hover {
  background-color: rgba(255, 255, 255, 0.18);
}

.btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 4px;
}

.btn-arrow {
  display: block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 250ms ease;
}

.btn:hover .btn-arrow {
  transform: translate(2px, -2px);
}

/* ---------- Load motion ---------- */

.reveal {
  animation: fade-up 700ms var(--ease) both;
}

.services.reveal {
  animation-delay: 120ms;
}

.hero-cta.reveal {
  animation-delay: 240ms;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

/* ---------- Mobile ---------- */

@media (max-width: 768px) {
  /* Everything sits on one centred axis, in three text sizes: headline, 14px, footer 11px. */
  .bg {
    background-image: url("../bg/liquid-poster-mobile.webp");
  }

  .page {
    padding:
      max(24px, env(safe-area-inset-top)) 24px
      max(20px, env(safe-area-inset-bottom));
  }

  .site-header {
    justify-content: center;
    min-height: 18px; /* held so the centred content doesn't move with the logo size */
  }

  .logo img {
    display: block;
    height: 16px;
    width: auto;
    max-width: none;
  }

  .header-cta {
    display: none;
  }

  .hero {
    padding: 28px 0;
  }

  h1 {
    font-size: clamp(36px, 10.5vw, 44px);
    letter-spacing: -0.04em;
    line-height: 1.02;
  }

  /* Two centred lines of two services each: the ::after is a full-width item that forces the
     break after the second service, so the markup stays a plain four-item list. */
  .services {
    margin-top: 20px;
    font-size: 14px;
    line-height: 1.7;
    color: #a9aaae;
  }

  .services::after {
    content: "";
    order: 1;
    flex-basis: 100%;
    height: 0;
  }

  .services li:nth-child(n + 3) {
    order: 2;
  }

  .services li + li::before {
    width: 3px;
    height: 3px;
    margin: 0 8px;
  }

  .services li:nth-child(3)::before {
    content: none;
  }

  .services::before {
    inset: -28px -24px; /* no wider than the page margins, so it can't cause sideways scroll */
    background: radial-gradient(ellipse closest-side, rgba(5, 5, 7, 0.74) 70%, transparent 100%);
  }

  .hero-cta {
    display: inline-flex !important;
    margin-top: 28px;
    height: 46px;
    padding: 0 22px;
    font-size: 14px;
  }

  .footer-copy {
    font-size: 11px;
    color: var(--muted);
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .bg.is-image::before {
    animation: none;
  }

  .btn-arrow,
  .btn:hover .btn-arrow {
    transition: none;
    transform: none;
  }
}
