@font-face {
  font-family: "Jost";
  src: url("/fonts/jost-latin.woff2") format("woff2");
  font-weight: 300 600;
  font-display: swap;
}

:root {
  --sea-deep: #0e2a44;
  --sea-night: #081b2d;
  --sea: #3f6e98;
  --foam: #f3f6f9;
  --mist: #a9bfd3;
  --marigold: #f2c14e;
  --marigold-light: #f7d47f;
  --line: rgb(169 191 211 / 0.16);
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --topbar: 4rem;
  color-scheme: dark;
}

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

html {
  background: var(--sea-deep);
  color: var(--foam);
  font-family: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  font-size: 100%;
  line-height: 1.5;
  overflow-x: clip;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--topbar) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(60rem 40rem at 75% 20%, rgb(63 110 152 / 0.32), transparent 70%),
    radial-gradient(40rem 30rem at 10% 90%, rgb(242 193 78 / 0.06), transparent 70%),
    var(--sea-deep);
}

a {
  color: var(--foam);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--marigold-light);
}

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

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

/* Top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(14 42 68 / 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 80rem;
  height: var(--topbar);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.wordmark {
  font-size: 1.625rem;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  text-decoration: none;
}

.topbar-cta {
  padding: 0.5rem 1rem;
  border: 1px solid rgb(243 246 249 / 0.22);
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.2s, border-color 0.2s;
}

.topbar-cta:hover {
  color: var(--foam);
  background: rgb(243 246 249 / 0.08);
  border-color: rgb(243 246 249 / 0.4);
}

/* Hero: title, video and sign-up. Stacked on phones, side by side on wide screens. */

.hero {
  flex: 1;
  display: grid;
  grid-template-areas:
    "title"
    "film"
    "body";
  align-content: start;
  gap: clamp(1.75rem, 6vw, 2.75rem);
  width: 100%;
  max-width: 80rem;
  margin: 0 auto;
  padding: clamp(2rem, 7vw, 4rem) var(--gutter) clamp(3rem, 8vw, 5rem);
}

.hero-title {
  grid-area: title;
}

.film {
  grid-area: film;
  margin: 0;
  min-width: 0;
}

.hero-body {
  grid-area: body;
}

@media (min-width: 64rem) {
  .hero {
    grid-template-columns: minmax(0, 6fr) minmax(0, 7fr);
    grid-template-rows: 1fr 1fr;
    grid-template-areas:
      "title film"
      "body film";
    align-content: stretch;
    column-gap: clamp(3rem, 5vw, 5.5rem);
    row-gap: 2rem;
    min-height: calc(100svh - var(--topbar));
  }

  .hero-title {
    align-self: end;
  }

  .film {
    align-self: center;
  }

  .hero-body {
    align-self: start;
  }

  .hero-short {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "title"
      "body";
  }
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 1.25rem;
  padding: 0.3rem 0.85rem 0.3rem 0.7rem;
  border: 1px solid rgb(242 193 78 / 0.3);
  border-radius: 999px;
  background: rgb(242 193 78 / 0.1);
  color: var(--marigold-light);
  font-size: 0.875rem;
  font-weight: 500;
}

.badge-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--marigold);
}

h1 {
  margin: 0;
  max-width: 13ch;
  font-size: clamp(2.5rem, 4.6vw + 1rem, 4.5rem);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

@media (min-width: 64rem) {
  h1 {
    font-size: clamp(3rem, 4.2vw, 4.75rem);
  }
}

.lede {
  margin: 0 0 1.75rem;
  max-width: 34ch;
  font-size: clamp(1.125rem, 0.5vw + 1rem, 1.3125rem);
  line-height: 1.55;
  color: var(--mist);
  text-wrap: pretty;
}

/* The video and its glow */

.stage {
  position: relative;
  isolation: isolate;
}

.glow {
  position: absolute;
  inset: 6% 3%;
  z-index: -1;
  background: url("https://media.yuhi.video/demo/kaushi-love-poster.jpg") center / cover;
  filter: blur(56px) saturate(1.6);
  opacity: 0.6;
  transform: scale(1.08);
}

.glow canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.glow.live canvas {
  opacity: 1;
}

.screen {
  position: relative;
  overflow: hidden;
  border-radius: clamp(0.875rem, 1.6vw, 1.5rem);
  box-shadow:
    0 0 0 1px rgb(243 246 249 / 0.1),
    0 2rem 4rem -1.5rem rgb(4 14 24 / 0.7);
}

.screen video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1344 / 768;
  background: var(--sea-night);
  object-fit: cover;
}

.play {
  position: absolute;
  right: clamp(0.75rem, 2.2vw, 1.5rem);
  bottom: clamp(0.75rem, 2.2vw, 1.5rem);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.4rem 1.15rem 0.4rem 0.4rem;
  border: 1px solid rgb(243 246 249 / 0.24);
  border-radius: 999px;
  background: rgb(8 27 45 / 0.45);
  backdrop-filter: blur(14px) saturate(1.5);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  color: var(--foam);
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.play[hidden] {
  display: none;
}

.play-icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--marigold);
  color: var(--sea-deep);
  transition: transform 0.2s ease;
}

.play-icon svg {
  width: 1.25rem;
  height: 1.25rem;
  margin-left: 0.15rem;
  fill: currentColor;
}

.play:hover {
  background: rgb(8 27 45 / 0.6);
  border-color: rgb(243 246 249 / 0.4);
}

.play:hover .play-icon {
  transform: scale(1.06);
}

@media (max-width: 30rem) {
  .play {
    gap: 0.5rem;
    padding: 0.3rem 0.85rem 0.3rem 0.3rem;
    font-size: 0.875rem;
  }

  .play-icon {
    width: 2rem;
    height: 2rem;
  }

  .play-icon svg {
    width: 1rem;
    height: 1rem;
  }
}

.film figcaption {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--mist);
}

/* Sign-up */

.field {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  max-width: 30rem;
  padding: 0.375rem;
  border: 1px solid rgb(169 191 211 / 0.3);
  border-radius: 999px;
  background: rgb(8 27 45 / 0.65);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field:focus-within {
  border-color: var(--marigold);
  box-shadow: 0 0 0 4px rgb(242 193 78 / 0.18);
}

.field input {
  flex: 1;
  min-width: 0;
  padding: 0.7rem 0.9rem;
  border: 0;
  background: transparent;
  color: var(--foam);
  font: inherit;
  font-size: 1.0625rem;
  outline: none;
}

.field input::placeholder {
  color: #7f97ad;
}

.field button {
  flex: none;
  padding: 0.75rem 1.35rem;
  border: 0;
  border-radius: 999px;
  background: var(--marigold);
  color: var(--sea-deep);
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.2s;
}

.field button:hover {
  background: var(--marigold-light);
}

.note {
  margin: 0.9rem 0 0;
  max-width: 44ch;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--mist);
}

@media (max-width: 22rem) {
  .field {
    flex-direction: column;
    align-items: stretch;
    border-radius: 1.5rem;
  }
}

/* Footer */

.footer {
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 2rem;
  justify-content: space-between;
  max-width: 80rem;
  margin: 0 auto;
  padding: 1.5rem var(--gutter) calc(1.75rem + env(safe-area-inset-bottom));
  font-size: 0.875rem;
  color: var(--mist);
}

.footer p {
  margin: 0;
}

/* The page's one entrance: the glow comes up behind the video. */

@media (prefers-reduced-motion: no-preference) {
  .glow {
    animation: light-up 1.6s ease-out both;
  }
}

@keyframes light-up {
  from {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
