/* s4m.ai teaser. Black, white and grey only. One typeface (Inter, self-hosted). */
@font-face { font-family: "Inter"; src: url(/fonts/inter-latin-var.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #f3f3f3; --ink-2: #a9a9a9; --ink-3: #8a8a8a; --line: rgba(255, 255, 255, 0.2);
  --pad: clamp(1.5rem, 8vw, 9rem);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { background: #000; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #000; color: var(--ink); overflow-x: hidden;
  font: 300 1.0625rem/1.65 Inter, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
:focus-visible { outline: 1px solid rgba(255, 255, 255, 0.8); outline-offset: 4px; }

/* ---------------------------------------------------------------- the fixed scene behind the page */
.stage { position: fixed; inset: 0; height: 100vh; height: 100lvh; z-index: 0; overflow: hidden; pointer-events: none; background: #000; contain: strict; }
.depth { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.depth--front { z-index: 3; }
.haze {
  position: absolute; inset: -12%; z-index: 1; will-change: transform;
  background:
    radial-gradient(42% 46% at 68% 58%, rgba(255, 255, 255, 0.04), transparent 72%),
    radial-gradient(60% 40% at 30% 110%, rgba(255, 255, 255, 0.02), transparent 70%);
}
/* The figure: black in the video is treated as empty space (screen blend), so the dust behind shows around it. */
.figure-wrap {
  position: absolute; z-index: 2; bottom: -5vh; right: -7vw; height: min(108vh, 74vw); aspect-ratio: 1280 / 1094;
  mix-blend-mode: screen; will-change: transform, opacity; transform-origin: 50% 70%;
}
.figure {
  position: absolute; inset: 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
}
.figure__still, .figure__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.figure__video { opacity: 0; transition: opacity 1.6s ease; }
.figure__video.on { opacity: 1; }
/* A slow band of light across the metal. Overlay on black stays black, so only the figure catches it. */
.figure::after {
  content: ""; position: absolute; inset: 0; mix-blend-mode: overlay;
  background: linear-gradient(104deg, transparent 42%, rgba(255, 255, 255, 0.5) 50%, transparent 58%) no-repeat;
  background-size: 260% 100%; background-position: 130% 0;
  animation: sweep 13s cubic-bezier(0.5, 0, 0.3, 1) 3s infinite;
}
@keyframes sweep { 0% { background-position: 130% 0; } 55%, 100% { background-position: -40% 0; } }
.grain {
  position: absolute; inset: -60px; z-index: 4; opacity: 0.045;
  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.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0.9 0 0 0 -0.25'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(5) infinite;
}
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-22px, 14px); } 40% { transform: translate(16px, -26px); } 60% { transform: translate(-30px, -8px); } 80% { transform: translate(24px, 22px); } 100% { transform: translate(0, 0); } }
/* Keeps the words readable: darker on the text side and at the very edges. */
.shade {
  position: absolute; inset: 0; z-index: 5;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.72) 0, rgba(0, 0, 0, 0.3) 34%, transparent 58%),
    radial-gradient(120% 90% at 60% 50%, transparent 55%, rgba(0, 0, 0, 0.75) 100%);
}

/* ---------------------------------------------------------------- the page */
main { position: relative; z-index: 1; }
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: grid; align-content: center; padding: 4rem var(--pad); }
.hero__inner { max-width: 36rem; animation: arrive 2.4s cubic-bezier(0.2, 0.6, 0.2, 1) 0.15s both; }
@keyframes arrive { from { opacity: 0; transform: translate3d(0, 10px, 0); } to { opacity: 1; transform: none; } }
.mark {
  margin: 0; font-weight: 200; font-size: clamp(4.4rem, 12vw, 11.5rem); line-height: 0.95; letter-spacing: 0.24em;
  margin-left: -0.05em; white-space: nowrap; cursor: default;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation;
}
.line { margin: clamp(1.2rem, 2.4vw, 2rem) 0 0; font-size: clamp(0.82rem, 1.25vw, 1.05rem); letter-spacing: 0.42em; text-transform: uppercase; color: var(--ink-2); }

.wait { margin-top: clamp(2.4rem, 5vw, 4rem); max-width: 23rem; }
.wait__row { display: flex; align-items: center; border-bottom: 1px solid var(--line); transition: border-color 0.4s; }
.wait__row:focus-within { border-color: rgba(255, 255, 255, 0.85); }
.wait input[type="email"] {
  flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--ink); padding: 0.95rem 0;
  font: inherit; font-size: 1rem; letter-spacing: 0.06em; border-radius: 0;
}
.wait input::placeholder { color: var(--ink-3); opacity: 1; }
.wait input:-webkit-autofill { -webkit-text-fill-color: var(--ink); transition: background-color 99999s; }
.wait button {
  flex: none; width: 2.75rem; height: 2.75rem; margin-right: -0.5rem; display: grid; place-items: center; cursor: pointer;
  background: none; border: 0; color: var(--ink-2); transition: color 0.3s, transform 0.3s;
}
.wait button svg { width: 1.5rem; height: 1.5rem; }
.wait button:hover, .wait__row:focus-within button { color: #fff; transform: translateX(3px); }
.wait button:disabled { opacity: 0.4; cursor: default; transform: none; }
.wait__note { margin: 0.85rem 0 0; min-height: 1.3em; font-size: 0.78rem; letter-spacing: 0.05em; color: var(--ink-3); }
.wait.is-done .wait__row { display: none; }
.wait.is-done .wait__note { margin: 0; font-size: 1rem; letter-spacing: 0.08em; color: var(--ink); }
.wait.is-error .wait__note { color: #d6d6d6; }

.cue { position: absolute; left: var(--pad); bottom: 2.2rem; width: 1px; height: 3.2rem; background: linear-gradient(#fff, transparent); opacity: 0.5; transform-origin: top; animation: cue 3.2s ease-in-out 2.5s infinite both; }
@keyframes cue { 0% { transform: scaleY(0); opacity: 0; } 35% { transform: scaleY(1); opacity: 0.55; } 100% { transform: scaleY(1) translateY(1.2rem); opacity: 0; } }

.panel { min-height: 88vh; min-height: 88svh; display: grid; align-content: center; padding: 12vh var(--pad); }
.panel__inner { max-width: 31rem; }
.panel .n { margin: 0; font-size: 0.74rem; letter-spacing: 0.4em; color: var(--ink-3); }
.panel h2 { margin: 1.1rem 0 1.5rem; font-weight: 200; font-size: clamp(2.3rem, 5vw, 4.4rem); line-height: 1.06; letter-spacing: 0.005em; }
.panel p { margin: 0; max-width: 27rem; font-size: clamp(1.02rem, 1.3vw, 1.16rem); color: var(--ink-2); }
.panel--close { min-height: 80vh; min-height: 80svh; }
.panel--close h2 { margin-top: 0; }

.js .reveal { opacity: 0; transform: translate3d(0, 22px, 0); transition: opacity 1.5s ease, transform 1.5s cubic-bezier(0.2, 0.6, 0.2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

.foot { position: relative; z-index: 1; display: flex; gap: 0.4rem; padding: 1.6rem var(--pad) 2rem; font-size: 0.72rem; letter-spacing: 0.14em; color: var(--ink-3); }
.foot a { margin-left: 1.6rem; text-decoration: none; transition: color 0.3s; }
.foot a:hover { color: var(--ink); }

/* ---------------------------------------------------------------- phones and narrow windows: figure below, words above */
@media (max-width: 820px), (max-aspect-ratio: 1 / 1) {
  .figure-wrap { right: auto; left: 50%; bottom: -2vh; height: auto; width: min(138vw, 78vh); margin-left: calc(min(138vw, 78vh) / -2 + 4vw); transform-origin: 50% 80%; }
  .shade { background: linear-gradient(180deg, rgba(0, 0, 0, 0.78) 0, rgba(0, 0, 0, 0.35) 38%, transparent 62%), radial-gradient(130% 80% at 50% 60%, transparent 55%, rgba(0, 0, 0, 0.7) 100%); }
  .hero { align-content: start; padding-top: clamp(4.5rem, 15vh, 9rem); }
  .mark { font-size: clamp(3.6rem, 19vw, 7rem); }
  .cue { display: none; }
  .panel { min-height: 76vh; min-height: 76svh; }
}
@media (max-height: 520px) and (orientation: landscape) { .hero { align-content: center; padding-top: 2rem; } .wait { margin-top: 1.4rem; } }

/* ---------------------------------------------------------------- less motion */
@media (prefers-reduced-motion: reduce) {
  .hero__inner, .cue, .grain, .figure::after { animation: none; }
  .cue { display: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .figure__video { display: none; }
}

/* ---------------------------------------------------------------- privacy, terms, not found */
.plain { min-height: 100vh; display: flex; flex-direction: column; }
.plain__top { padding: 2.2rem var(--pad) 0; }
.plain__mark { font-weight: 200; font-size: 1.5rem; letter-spacing: 0.3em; text-decoration: none; }
.prose { flex: 1; width: 100%; max-width: calc(44rem + 2 * var(--pad)); padding: 3.5rem var(--pad) 4rem; color: #c4c4c4; }
.prose h1 { margin: 0 0 0.6rem; font-weight: 200; font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.1; color: var(--ink); }
.prose h2 { margin: 2.6rem 0 0.6rem; font-weight: 400; font-size: 0.82rem; letter-spacing: 0.26em; text-transform: uppercase; color: var(--ink); }
.prose p, .prose ul { margin: 0 0 1rem; }
.prose ul { padding-left: 1.1rem; }
.prose li { margin-bottom: 0.5rem; }
.prose strong { font-weight: 500; color: var(--ink); }
.prose a { text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, 0.4); }
.prose .muted { color: var(--ink-3); font-size: 0.9rem; }

/* ---------------------------------------------------------------- phones: smooth scrolling first */
@media (hover: none), (pointer: coarse) {
  .stage { bottom: auto; }
  .figure-wrap { mix-blend-mode: normal; will-change: auto; z-index: 0; }
  /* Without the screen blend the video's near-black would show as a box: fade its edges out instead. */
  .figure {
    -webkit-mask-image: radial-gradient(62% 58% at 50% 62%, #000 58%, transparent 100%);
    mask-image: radial-gradient(62% 58% at 50% 62%, #000 58%, transparent 100%);
  }
  .haze { will-change: auto; }
  .grain { display: none; animation: none; }
  .figure::after { display: none; animation: none; }
}
