/* ---------- Fallback fonts ----------
   Local fonts scaled to match Fraunces/Inter widths, so the headline wraps the
   same before and after the web fonts swap in (prevents layout shift). */
@font-face {
  font-family: "Fraunces Fallback Georgia";
  src: local("Georgia Bold"), local("Georgia-Bold");
  font-weight: 600;
  size-adjust: 74.7%;
}

@font-face {
  font-family: "Fraunces Fallback Noto";
  src: local("Noto Serif Bold"), local("NotoSerif-Bold");
  font-weight: 600;
  size-adjust: 75.8%;
}

@font-face {
  font-family: "Fraunces Fallback DejaVu";
  src: local("DejaVu Serif Bold"), local("DejaVuSerif-Bold");
  font-weight: 600;
  size-adjust: 67.4%;
}

@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("ArialMT");
  size-adjust: 107.06%;
  ascent-override: 90.49%;
  descent-override: 22.56%;
  line-gap-override: 0%;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #fbfafd;
  --surface: #ffffff;
  --ink: #121212;
  --ink-soft: #3d3b45;
  --muted: #5c5966;
  --primary: #7101bf;
  --primary-hover: #5f00a3;
  --lilac: #f4ecfb;
  --lilac-border: #e6d6f5;
  --line: #ebe7f0;
  --error: #b00032;

  --font-head: "Fraunces", "Fraunces Fallback Georgia", "Fraunces Fallback Noto", "Fraunces Fallback DejaVu", Georgia, serif;
  --font-body: "Inter", "Inter Fallback", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow-card: 0 1px 2px rgba(18, 18, 18, .04), 0 12px 40px -12px rgba(73, 1, 125, .18);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }

h1, h2 { margin: 0; }

p { margin: 0; }

ul { margin: 0; padding: 0; list-style: none; }

[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Background glow ---------- */
.glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .55;
  will-change: transform;
}

.blob--1 {
  width: 520px; height: 520px;
  top: -160px; right: -120px;
  background: radial-gradient(circle, rgba(113, 1, 191, .32), rgba(113, 1, 191, 0) 70%);
  animation: drift-1 32s ease-in-out infinite alternate;
}

.blob--2 {
  width: 460px; height: 460px;
  bottom: -180px; left: -140px;
  background: radial-gradient(circle, rgba(160, 90, 230, .28), rgba(160, 90, 230, 0) 70%);
  animation: drift-2 38s ease-in-out infinite alternate;
}

.blob--3 {
  width: 360px; height: 360px;
  top: 40%; left: 45%;
  background: radial-gradient(circle, rgba(200, 150, 255, .22), rgba(200, 150, 255, 0) 70%);
  animation: drift-3 28s ease-in-out infinite alternate;
}

@keyframes drift-1 { to { transform: translate(-120px, 90px) scale(1.08); } }
@keyframes drift-2 { to { transform: translate(140px, -80px) scale(1.1); } }
@keyframes drift-3 { to { transform: translate(-90px, -110px) scale(.92); } }

/* ---------- Layout ---------- */
.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 5.5rem) clamp(1.25rem, 4vw, 2.5rem) 7rem;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "head side"
    "copy side";
  column-gap: clamp(2.5rem, 5vw, 4.5rem);
  row-gap: 2rem;
}

.area-head { grid-area: head; }
.area-copy { grid-area: copy; }

.side {
  grid-area: side;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

@media (max-width: 899px) {
  .page {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas:
      "head"
      "visual"
      "form"
      "copy";
    row-gap: 2rem;
  }

  .side { display: contents; }
  .area-visual { grid-area: visual; }
  .area-form { grid-area: form; }
}

/* ---------- Left column ---------- */
.label-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: .75rem;
  letter-spacing: .14em;
  color: var(--primary);
  background: var(--lilac);
  border: 1px solid var(--lilac-border);
  padding: .4rem .8rem;
  border-radius: 999px;
  margin-bottom: 1.4rem;
}

.title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(2.35rem, 5.2vw, 3.9rem);
  line-height: 1.07;
  letter-spacing: -.02em;
  font-variation-settings: "opsz" 120;
  text-wrap: balance;
}

.hl {
  position: relative;
  white-space: nowrap;
  z-index: 0;
}

.hl::after {
  content: "";
  position: absolute;
  left: -.04em; right: -.04em;
  bottom: .04em;
  height: .14em;
  border-radius: 999px;
  background: var(--primary);
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left center;
  animation: underline 1.1s var(--ease-out) .55s forwards;
}

@keyframes underline { to { transform: scaleX(1); } }

@media (max-width: 420px) {
  .hl { white-space: normal; }
}

.subtitle {
  margin-top: 1.25rem;
  font-size: clamp(1.125rem, 1.6vw, 1.3rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 34em;
}

.body {
  color: var(--ink-soft);
  max-width: 36em;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin: 1.4rem 0 2.4rem;
}

.chip {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .7rem 1rem .7rem .7rem;
  background: var(--surface);
  border: 1px solid var(--lilac-border);
  border-radius: var(--radius-md);
  box-shadow: 0 6px 20px -12px rgba(113, 1, 191, .35);
  font-weight: 600;
  font-size: .98rem;
}

.chip__icon {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--lilac);
  color: var(--primary);
  flex: none;
}

.checklist__title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.5rem;
  letter-spacing: -.01em;
  margin-bottom: 1rem;
}

.checklist {
  display: grid;
  gap: .9rem;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  color: var(--ink-soft);
}

.check {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px; height: 24px;
  margin-top: .12rem;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(113, 1, 191, .55);
}

/* ---------- Hero card ---------- */
.hero-card {
  position: relative;
  margin: 0;
  padding: .6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.hero-gif {
  width: 100%;
  height: auto;
  border-radius: calc(var(--radius-lg) - .6rem);
  background: var(--lilac);
}

/* ---------- Notification cards ---------- */
.notif {
  position: absolute;
  display: flex;
  align-items: center;
  gap: .55rem;
  max-width: 250px;
  padding: .6rem .85rem .6rem .6rem;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 14px 34px -14px rgba(18, 18, 18, .28);
  font-size: .82rem;
  font-weight: 500;
  line-height: 1.3;
  color: var(--ink);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: bob 6s ease-in-out infinite;
  --tilt: -3deg;
  transform: rotate(var(--tilt));
}

.notif__badge {
  flex: none;
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .1em;
  color: #fff;
  background: var(--primary);
  padding: .22rem .42rem;
  border-radius: 6px;
}

.notif--1 { top: -22px; left: -34px; --tilt: -4deg; animation-delay: -1s; }
.notif--2 { bottom: 18%; right: -30px; --tilt: 3deg; animation-delay: -3s; animation-duration: 7s; }
.notif--3 { bottom: -24px; left: 10%; --tilt: -2deg; animation-delay: -4.5s; animation-duration: 6.5s; }

@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(var(--tilt)); }
  50% { transform: translateY(-9px) rotate(var(--tilt)); }
}

@media (max-width: 1100px) and (min-width: 900px) {
  .notif--1 { left: -14px; }
  .notif--2 { right: -12px; }
}

@media (max-width: 899px) {
  .notif { font-size: .74rem; max-width: 210px; padding: .45rem .65rem .45rem .45rem; }
  .notif--1 { top: -16px; left: -6px; }
  .notif--2 { right: -6px; bottom: -18px; }
  .notif--3 { display: none; }
}

/* ---------- Form card ---------- */
.form-card {
  position: relative;
  padding: clamp(1.5rem, 3vw, 2rem);
  background: linear-gradient(180deg, #fbf7fe 0%, var(--lilac) 100%);
  border: 1px solid var(--lilac-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

@media (max-width: 899px) {
  .form-card { margin-top: .75rem; }
}

.form-card__title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.6rem;
  letter-spacing: -.01em;
  line-height: 1.2;
}

.form-card__note {
  margin-top: .5rem;
  font-size: .95rem;
  color: var(--muted);
}

.signup {
  margin-top: 1.25rem;
  display: grid;
  gap: .9rem;
}

.field { display: grid; gap: .35rem; }

.field label {
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
}

.field input {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid #d9d2e3;
  border-radius: 12px;
  padding: .8rem .95rem;
  transition: border-color .2s, box-shadow .2s;
}

.field input:hover { border-color: #bfb3cf; }

.field input:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(113, 1, 191, .18);
}

.field input[aria-invalid="true"] { border-color: var(--error); }

.field__error {
  font-size: .85rem;
  color: var(--error);
}

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

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  margin-top: .3rem;
  width: 100%;
  min-height: 52px;
  padding: .9rem 1.4rem;
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: .06em;
  color: #fff;
  background: var(--primary);
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(113, 1, 191, .7);
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background-color .2s;
}

.btn:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 16px 30px -12px rgba(113, 1, 191, .75);
}

.btn:active { transform: translateY(0); }

.btn:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.btn[disabled] { cursor: progress; }

.btn[disabled]:hover { transform: none; }

.btn__spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}

.btn.is-loading .btn__spinner { display: inline-block; }

@keyframes spin { to { transform: rotate(360deg); } }

.form-status {
  font-size: .9rem;
  color: var(--error);
}

.form-status:empty { display: none; }

.form-success {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.5;
  animation: pop .5s var(--ease-out);
}

.form-success:focus { outline: none; }

.form-success__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
}

@keyframes pop {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: none; }
}

/* ---------- Connect pill ---------- */
.connect {
  position: fixed;
  right: calc(1rem + env(safe-area-inset-right, 0px));
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  z-index: 20;
  display: inline-flex;
  align-items: center;
  padding: .6rem 1.05rem;
  font-size: .88rem;
  font-weight: 600;
  color: #fff;
  background: var(--ink);
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 10px 26px -10px rgba(18, 18, 18, .55);
  transition: transform .25s var(--ease-out), background-color .2s;
}

.connect:hover { transform: translateY(-2px); background: var(--primary); }

.connect:focus-visible { outline-color: var(--primary); border-radius: 999px; }

/* On mobile the pill would cover the form, so it waits until the form is scrolled past. */
@media (max-width: 899px) {
  .js .connect {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .3s var(--ease-out), transform .3s var(--ease-out), visibility 0s linear .3s;
  }

  .js .connect.is-shown {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .3s var(--ease-out), transform .3s var(--ease-out), visibility 0s;
  }
}

/* ---------- Reveal on scroll ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: calc(var(--d, 0) * 90ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

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

  .js .reveal { opacity: 1; transform: none; }

  .hl::after { transform: scaleX(1); }

  .notif { transform: rotate(var(--tilt)); }

  .btn.is-loading .btn__spinner { display: none; }
}
