:root {
  --bg: #f4efe5;
  --bg-warm: #efb366;
  --card: rgba(18, 17, 21, 0.9);
  --card-border: rgba(255, 255, 255, 0.12);
  --text: #f7f1e8;
  --muted: rgba(247, 241, 232, 0.72);
  --accent: #ff6f3c;
  --accent-alt: #ffd166;
  --shadow: 0 24px 80px rgba(15, 10, 18, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 209, 102, 0.95), transparent 32%),
    radial-gradient(circle at bottom right, rgba(255, 111, 60, 0.55), transparent 28%),
    linear-gradient(135deg, #f6f0e7 0%, #f2dfc2 42%, #d8e3d1 100%);
  overflow-x: hidden;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.15;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(circle at center, black 40%, transparent 90%);
}

.page-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.hero-card {
  width: min(100%, 860px);
  position: relative;
  padding: 32px;
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 35%),
    var(--card);
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: rise-in 640ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.hero-card::before,
.hero-card::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.7;
}

.hero-card::before {
  width: 180px;
  height: 180px;
  top: -54px;
  right: -36px;
  background: rgba(255, 209, 102, 0.32);
}

.hero-card::after {
  width: 220px;
  height: 220px;
  bottom: -100px;
  left: -80px;
  background: rgba(255, 111, 60, 0.26);
}

h1,
.idea-text,
.actions {
  position: relative;
  z-index: 1;
}

h1 {
  margin: 0 0 28px;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(2.8rem, 7vw, 5.4rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  max-width: 10ch;
}

.idea-panel {
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  animation: stagger-in 720ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.idea-text {
  margin: 0;
  font-family: "Bricolage Grotesque", sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.45rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  animation: stagger-in 840ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

button {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 14px 20px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease,
    color 180ms ease;
}

button:hover {
  transform: translateY(-2px);
}

button:active {
  transform: translateY(1px);
}

button:focus-visible {
  outline: 3px solid rgba(255, 209, 102, 0.65);
  outline-offset: 3px;
}

.shuffle-button {
  background: var(--accent);
  color: #1b0f08;
  box-shadow: 0 14px 30px rgba(255, 111, 60, 0.25);
}

.copy-button {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.idea-panel.is-transitioning .idea-text {
  opacity: 0;
  transform: translateY(10px);
}

.idea-text {
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

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

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes stagger-in {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

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

@media (max-width: 640px) {
  .hero-card {
    padding: 24px;
    border-radius: 24px;
  }

  .idea-panel {
    padding: 20px;
  }

  .actions {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}
