/* Rose Security tokens (light) */
:root {
  --surface: #F6F2EC;
  --surface-raised: #FFFFFF;
  --surface-tile: #F0EBE4;
  --ink: #17151C;
  --ink-muted: #6E6873;
  --line: #E3DDD4;
  --rose: #E8335F;
  --rose-text: #B8163E;
  --rose-light: #FF8FA9;
  --blush: #FFE3EA;
  --on-rose: #FFFFFF;
  --protected: #11714C;
  --protected-soft: #DDF3E9;

  --font-display: "Inter Tight", "Helvetica Neue", Arial, sans-serif;
  --font-accent: "Instrument Serif", Georgia, serif;

  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  --radius-lg: 26px;
  --radius-pill: 999px;
  --shadow-card: 0 10px 30px rgba(60, 40, 30, 0.12);

  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --expo-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
}

/* Hero: everything centered, petals rise from the bottom edge */
.hero {
  --petals: min(760px, 120vw);
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-7) var(--space-4) calc(var(--petals) * 0.42);
  text-align: center;
}

.copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  color: var(--ink);
  text-decoration: none;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.lockup svg { display: block; }

.headline {
  margin: var(--space-6) 0 var(--space-7);
  font-size: clamp(64px, 10vw, 128px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.035em;
  white-space: nowrap;
}
.headline em {
  font-family: var(--font-accent);
  font-style: italic;
  font-weight: 400;
  font-size: 1.12em;
  letter-spacing: 0;
  color: var(--rose);
}

/* Sign-up card */
.card {
  width: 100%;
  max-width: 520px;
  padding: var(--space-5);
  background: var(--surface-raised);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  text-align: left;
}
.label {
  display: block;
  font-size: 13px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.row {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-3);
}
.row input {
  flex: 1;
  min-width: 0;
  height: 52px;
  padding: 0 var(--space-5);
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  background: var(--surface-tile);
  color: var(--ink);
  font: 400 17px/26px var(--font-display);
}
.row input::placeholder { color: var(--ink-muted); }
.row input:focus { outline: none; border-color: var(--rose); background: var(--surface-raised); }

.row button {
  flex: none;
  height: 52px;
  padding: 0 var(--space-5);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--rose);
  color: var(--on-rose);
  font: 800 19px/1 var(--font-display);
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 0.24s var(--spring), background 0.2s;
}
.row button:hover { background: #D42A55; }
.row button:active { transform: scale(0.96); }
.row button:focus-visible { outline: 2px solid var(--rose-text); outline-offset: 3px; }
.row button[disabled] { opacity: 0.6; cursor: default; }

.status {
  display: none;
  align-items: center;
  gap: var(--space-2);
  width: fit-content;
  margin: var(--space-3) 0 0;
  padding: 6px var(--space-3);
  border-radius: var(--radius-pill);
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
}
.status.ok, .status.err { display: inline-flex; }
.status.ok { background: var(--protected-soft); color: var(--protected); }
.status.err { background: var(--blush); color: var(--rose-text); }
.status svg { flex: none; }

.legal {
  margin: var(--space-5) 0 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--ink-muted);
}

/* Petal trail: small petals that fall from the cursor or finger */
.trail-petal { position: fixed; left: 0; top: 0; border-radius: 28%; pointer-events: none; z-index: 40; will-change: transform, opacity; }

/* Petals: rounded squares at 0° / 45°, cropped by the hero's bottom edge */
.petals {
  position: absolute;
  left: 50%;
  bottom: calc(var(--petals) * -0.56);
  width: var(--petals);
  height: var(--petals);
  transform: translateX(-50%);
}
.p {
  position: absolute;
  top: 50%;
  left: 50%;
  border-radius: 24%;
  transform: translate(-50%, -50%) rotate(var(--r));
}
.p1 { width: 72%; height: 72%; --r: 0deg;  background: var(--blush); }
.p2 { width: 72%; height: 72%; --r: 45deg; background: var(--blush); }
.p3 { width: 50%; height: 50%; --r: 0deg;  background: var(--rose-light); }
.p4 { width: 50%; height: 50%; --r: 45deg; background: var(--rose-light); }
.p5 { width: 26%; height: 26%; --r: 45deg; background: var(--rose); }

@media (prefers-reduced-motion: no-preference) {
  .petals { animation: rise-petals 0.9s var(--expo-out) backwards; }
  .p { animation: open 1s var(--spring) backwards; }
  .p1 { animation-delay: 0.10s; }
  .p2 { animation-delay: 0.15s; }
  .p3 { animation-delay: 0.25s; }
  .p4 { animation-delay: 0.30s; }
  .p5 { animation-delay: 0.40s; }

  .copy > * { animation: rise 0.5s var(--spring) backwards; }
  .copy > :nth-child(2) { animation-delay: 0.05s; }
  .copy > :nth-child(3) { animation-delay: 0.1s; }
  .copy > :nth-child(4) { animation-delay: 0.15s; }
}
@keyframes rise-petals { from { transform: translate(-50%, 30%); } }
@keyframes open { from { transform: translate(-50%, -50%) rotate(calc(var(--r) - 90deg)) scale(0.2); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

@media (max-width: 600px) {
  .hero { --petals: 520px; }
  .headline { margin: var(--space-5) 0 var(--space-6); font-size: 60px; }
  .card { padding: var(--space-4); }
  .row { flex-direction: column; }
  .row input { flex: none; }
  .row button { width: 100%; }
}
