:root {
  --bg: #78AADE;       /* periwinkle base */  --bg-2: #92BBE5;     /* lighter wash */
  --ink: #0D1724;      /* dark navy ink */
  --ink-mute: rgba(13, 23, 36, 0.66);
  --ink-faint: rgba(13, 23, 36, 0.42);
  --line: rgba(13, 23, 36, 0.14);
  --line-strong: rgba(13, 23, 36, 0.28);
  --cyan: #01E4BC;
  --pale: #CDE0F2;
  --surface: rgba(13, 23, 36, 0.22);
  --surface-strong: rgba(13, 23, 36, 0.45);
}

* { box-sizing: border-box; }

@font-face {
  font-family: "GT America";
  src: url("./assets/GT-America-Standard-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

html, body, #root {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "GT America", "Hanken Grotesk", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
}

.page {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 0%, #92BBE5 0%, #78AADE 55%, #6B9DD2 100%);
}

/* ─── Animated fractal centerpiece ─────────────────────── */

.bg-fractal-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.bg-fractal {
  position: absolute;
  width: min(110vmin, 1400px);
  aspect-ratio: 2584 / 1995;
  -webkit-mask: url("./assets/fractal.svg") center/contain no-repeat;
          mask: url("./assets/fractal.svg") center/contain no-repeat;
  background:
    radial-gradient(circle at 40% 30%, #6BFFD8 0%, #01E4BC 45%, #00B898 100%);
  filter: drop-shadow(0 0 40px rgba(1, 228, 188, 0.6));
  opacity: 0.95;
  will-change: transform;
}

.bg-fractal.echo {
  opacity: 0.35;
  width: min(135vmin, 1700px);
  -webkit-mask: url("./assets/fractal.svg") center/contain no-repeat;
          mask: url("./assets/fractal.svg") center/contain no-repeat;
  background: #7DEFD5;
  filter: blur(22px);
  mix-blend-mode: screen;
}

.page > .topbar, .page > .main { position: relative; z-index: 1; }

/* ─── Topbar ───────────────────────────────────────────── */

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 32px 44px;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

/* ─── Hero ─────────────────────────────────────────────── */

.main {
  display: grid;
  place-items: center;
  padding: 24px 44px 80px;
}

.hero {
  width: min(640px, 100%);
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: stretch;
}

.lede {
  margin: 0;
  font-family: "GT America", "Hanken Grotesk", sans-serif;
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.35;
  letter-spacing: -0.012em;
  color: var(--ink);
  text-wrap: pretty;
  opacity: 0;
  transform: translateY(10px);
  animation: rise 0.9s 0.05s cubic-bezier(.2,.7,.2,1) forwards;
}

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Form card ────────────────────────────────────────── */

.form-card {
  margin-top: 6px;
  padding: 22px 22px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  backdrop-filter: blur(14px) saturate(120%);
  -webkit-backdrop-filter: blur(14px) saturate(120%);
  position: relative;
  opacity: 0;
  transform: translateY(10px);
  animation: rise 0.9s 0.2s cubic-bezier(.2,.7,.2,1) forwards;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 560px) {
  .row { grid-template-columns: 1fr; }
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.lbl {
  font-size: 11px;
  color: rgba(244, 247, 251, 0.7);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

.field input {
  appearance: none;
  font-family: inherit;
  font-size: 15.5px;
  color: #F4F7FB;
  background: rgba(13, 23, 36, 0.35);
  border: 1px solid rgba(244, 247, 251, 0.22);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.field input::placeholder { color: rgba(244,247,251,0.4); }

.field input:hover { border-color: rgba(244,247,251,0.4); }

.field input:focus {
  border-color: var(--cyan);
  background: rgba(13, 23, 36, 0.55);
  box-shadow: 0 0 0 4px rgba(1, 228, 188, 0.22);
}

.field input:disabled { opacity: 0.6; }

.actions {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary {
  appearance: none;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #F4F7FB;
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  box-shadow: 0 8px 24px -10px rgba(13, 23, 36, 0.4);
}
.btn-primary:hover {
  background: var(--cyan);
  color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -10px rgba(1, 228, 188, 0.7);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary.disabled, .btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-arrow { display: inline-flex; transition: transform .2s ease; }
.btn-primary:hover .btn-arrow { transform: translateX(3px); }

.error {
  margin-top: 10px;
  font-size: 13px;
  color: #ffcccc;
  font-family: "JetBrains Mono", ui-monospace, monospace;
}

/* ─── Success state ────────────────────────────────────── */

.success {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
  color: #F4F7FB;
}

.success-mark {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  background: rgba(244, 247, 251, 0.92);
  border-radius: 14px;
}

.success-title {
  font-family: "Bricolage Grotesque", sans-serif;
  font-weight: 500;
  font-size: 17px;
  color: #F4F7FB;
  letter-spacing: -0.01em;
}
.success-sub {
  font-size: 13.5px;
  color: rgba(244, 247, 251, 0.7);
  margin-top: 3px;
}

@media (max-width: 720px) {
  .topbar { padding: 24px 22px; }
  .main { padding: 16px 22px 48px; }
}

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