:root {
  --brand-red: #be1e2d;
  --brand-red-deep: #8f1622;
  --brand-rose: #c46b64;
  --brand-gold: #d8ab5d;
  --brand-gold-deep: #b9873e;
  --paper: #f7f1eb;
  --paper-bright: #fffaf5;
  --paper-shadow: #eadfd6;
  --ink: #2f1f1d;
  --ink-soft: #6c5550;
  --line: rgba(111, 29, 33, 0.14);
  --shadow: rgba(74, 31, 34, 0.16);
  --shadow-strong: rgba(74, 31, 34, 0.24);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100svh;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(196, 107, 100, 0.2), transparent 34%),
    radial-gradient(circle at right 15% top 8%, rgba(216, 171, 93, 0.22), transparent 24%),
    linear-gradient(180deg, #fdf8f3 0%, #f8f1ea 42%, #f3e7de 100%);
  font-family: Georgia, "Times New Roman", serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.15), transparent 30%, rgba(190, 30, 45, 0.05) 100%),
    radial-gradient(circle at 14% 12%, rgba(255, 255, 255, 0.75), transparent 14%),
    radial-gradient(circle at 86% 22%, rgba(255, 255, 255, 0.55), transparent 12%);
  opacity: 0.8;
}

.page-shell {
  width: min(1180px, calc(100% - 2rem));
  min-height: 100svh;
  margin: 0 auto;
  padding: clamp(1rem, 2vw, 1.75rem) 0;
  display: grid;
  align-items: center;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: center;
}

.hero-copy {
  padding: clamp(1.35rem, 2vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    linear-gradient(180deg, rgba(255, 250, 245, 0.94), rgba(247, 241, 235, 0.96)),
    var(--paper);
  box-shadow: 0 24px 60px var(--shadow);
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--brand-red);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--brand-red-deep);
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 0.95;
}

.intro {
  max-width: 39rem;
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.18rem, 1.6vw, 1.38rem);
  line-height: 1.7;
}

.crystal-panel {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 1.15rem 1.5rem;
  align-items: center;
}

.orb-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  grid-column: 1;
  grid-row: 1;
  width: min(100%, 280px);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  background: transparent;
  transition: transform 180ms ease;
}

.orb-button:hover,
.orb-button:focus-visible {
  transform: translateY(-3px) scale(1.015);
}

.orb-button:focus-visible {
  outline: 3px solid rgba(190, 30, 45, 0.35);
  outline-offset: 8px;
}

.orb-glow,
.orb-core {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.orb-glow {
  background:
    radial-gradient(circle at 28% 28%, rgba(255, 255, 255, 0.95), transparent 16%),
    radial-gradient(circle at 55% 70%, rgba(216, 171, 93, 0.4), transparent 28%),
    radial-gradient(circle at center, rgba(196, 107, 100, 0.38), rgba(190, 30, 45, 0.1) 62%, transparent 74%);
  filter: blur(15px);
  transform: scale(1.1);
}

.orb-core {
  display: grid;
  place-items: center;
  padding: 2.1rem;
  border: 2px solid rgba(216, 171, 93, 0.88);
  background:
    radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.98), transparent 16%),
    radial-gradient(circle at 50% 52%, rgba(255, 255, 255, 0.18), rgba(125, 32, 39, 0.92) 64%),
    radial-gradient(circle at 74% 74%, rgba(216, 171, 93, 0.28), transparent 18%);
  box-shadow:
    inset 0 0 48px rgba(255, 241, 225, 0.2),
    0 24px 48px rgba(111, 29, 33, 0.26);
}

.orb-label {
  width: 100%;
  max-width: 9ch;
  text-align: center;
  color: var(--paper-bright);
  font-size: clamp(1.35rem, 3vw, 1.95rem);
  line-height: 1.15;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.2);
}

.fortune-card {
  position: relative;
  grid-column: 2;
  grid-row: 1 / span 2;
  min-height: 100%;
  padding: 1.35rem 1.35rem 1.45rem;
  border: 1px solid rgba(111, 29, 33, 0.1);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 244, 238, 0.98)),
    var(--paper-bright);
  color: var(--ink);
  box-shadow: 0 18px 40px var(--shadow);
  overflow: hidden;
}

.fortune-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 10px;
  background: linear-gradient(180deg, var(--brand-red), var(--brand-gold));
}

.fortune-status {
  margin: 0;
  color: var(--brand-red);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fortune-text {
  margin: 0.8rem 0 0;
  color: var(--ink);
  font-size: clamp(1.12rem, 2vw, 1.5rem);
  line-height: 1.5;
}

.fortune-book {
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
  font-weight: 700;
}

.actions {
  grid-column: 1;
  grid-row: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  align-items: center;
}

.secondary-button,
.primary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.35rem;
  padding: 0.95rem 1.35rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: clamp(1.08rem, 1.4vw, 1.2rem);
  font-weight: 700;
  transition: transform 160ms ease, opacity 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.secondary-button {
  border: 1px solid rgba(111, 29, 33, 0.18);
  background: rgba(255, 255, 255, 0.8);
  color: var(--brand-red-deep);
  cursor: pointer;
}

.primary-link {
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--brand-red) 0%, #cf3342 100%);
  color: var(--paper-bright);
  box-shadow: 0 12px 30px rgba(190, 30, 45, 0.22);
}

.secondary-button:hover,
.secondary-button:focus-visible,
.primary-link:hover,
.primary-link:focus-visible {
  transform: translateY(-1px);
}

.secondary-button:focus-visible,
.primary-link:focus-visible {
  outline: 3px solid rgba(184, 135, 62, 0.24);
  outline-offset: 3px;
}

.primary-link.is-disabled {
  pointer-events: none;
  opacity: 0.45;
}

.hero-art {
  display: flex;
  justify-content: center;
}

.image-frame {
  width: min(100%, 520px);
  padding: 0.85rem;
  border: 1px solid rgba(111, 29, 33, 0.12);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 250, 245, 0.9), rgba(247, 241, 235, 0.92)),
    var(--paper-bright);
  box-shadow: 0 20px 48px var(--shadow-strong);
}

.image-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
}

.fortune-card.is-revealed {
  animation: cardPulse 360ms ease;
}

@keyframes cardPulse {
  0% {
    transform: scale(0.985);
  }
  100% {
    transform: scale(1);
  }
}

@media (max-width: 960px) {
  .page-shell {
    min-height: auto;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .hero-art {
    order: 2;
  }

  .image-frame {
    width: min(100%, 420px);
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: calc(100% - 1rem);
    padding: 0.75rem 0;
  }

  .hero-copy {
    padding: 1rem;
    border-radius: 24px;
  }

  .crystal-panel {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .orb-button,
  .actions,
  .fortune-card {
    grid-column: auto;
    grid-row: auto;
  }

  .fortune-card,
  .actions {
    width: 100%;
  }

  .actions {
    justify-content: center;
  }

  .secondary-button,
  .primary-link {
    flex: 1 1 220px;
  }
}

@media (max-width: 520px), (max-height: 820px) {
  h1 {
    font-size: clamp(1.9rem, 9vw, 2.8rem);
  }

  .intro {
    font-size: 1.08rem;
    line-height: 1.6;
  }

  .orb-button {
    width: min(76vw, 240px);
  }

  .orb-core {
    padding: 1.7rem;
  }

  .fortune-text {
    font-size: 1.05rem;
    line-height: 1.45;
  }

  .image-frame {
    width: min(100%, 320px);
    padding: 0.65rem;
  }
}
