:root {
  --bg: #f4efe6;
  --bg-accent: #e7ddcc;
  --surface: rgba(255, 251, 244, 0.88);
  --surface-strong: #fffaf2;
  --text: #1f1d18;
  --muted: #6d675c;
  --line: rgba(31, 29, 24, 0.12);
  --gold: #b68a43;
  --gold-deep: #8c6630;
  --green: #51614d;
  --red: #b14844;
  --shadow: 0 18px 60px rgba(61, 49, 27, 0.12);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --font-body: "Instrument Sans", "Avenir Next", "Segoe UI", sans-serif;
  --font-display: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(182, 138, 67, 0.18), transparent 22rem),
    radial-gradient(circle at left center, rgba(81, 97, 77, 0.12), transparent 18rem),
    linear-gradient(180deg, #f9f5ee 0%, var(--bg) 100%);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.page-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.page-shell-legal {
  width: min(1080px, calc(100% - 32px));
}

.site-header,
.site-footer,
.hero,
.summary-grid,
.steps-grid,
.cta-panel,
.legal-layout {
  position: relative;
  z-index: 1;
}

.site-header,
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-header {
  padding: 8px 0 28px;
}

.site-footer {
  padding: 24px 0 10px;
  color: var(--muted);
  font-size: 0.95rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(145deg, #1f1d18, #3f3524);
  box-shadow: var(--shadow);
}

.brand-mark-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-copy strong {
  font-size: 1.05rem;
  font-weight: 700;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.92rem;
}

.site-nav {
  display: inline-flex;
  gap: 18px;
  flex-wrap: wrap;
}

.site-nav a {
  color: var(--muted);
  transition: color 180ms ease;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 28px;
  align-items: stretch;
  margin-bottom: 26px;
}

.hero-copy,
.hero-card,
.summary-card,
.step-card,
.cta-panel,
.legal-card,
.request-card {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero-copy,
.hero-card {
  border-radius: calc(var(--radius-lg) + 8px);
}

.hero-copy {
  padding: clamp(28px, 5vw, 52px);
}

.hero-copy h1,
.section-heading h2,
.cta-panel h2,
.legal-card h1,
.request-card h2 {
  font-family: var(--font-display);
  line-height: 0.95;
  letter-spacing: -0.03em;
}

.hero-copy h1 {
  margin: 0 0 18px;
  font-size: clamp(3rem, 7vw, 5.4rem);
  max-width: 10ch;
}

.hero-text,
.request-copy,
.legal-copy p,
.summary-card p,
.step-card p {
  color: var(--muted);
  line-height: 1.65;
}

.eyebrow {
  margin: 0 0 14px;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 700;
}

.store-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, #1f1d18, #3b3224);
  color: #f9f5ee;
  font-weight: 600;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.store-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 24px rgba(31, 29, 24, 0.14);
}

.store-button.secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.store-button-disabled {
  background: #e5e1d8;
  border-color: #d0c8bb;
  color: #857f74;
  pointer-events: none;
  cursor: not-allowed;
  box-shadow: none;
}

.hero-card {
  padding: 22px;
  overflow: hidden;
}

.tableau-svg {
  width: 100%;
  height: 100%;
}

.felt-panel,
.demo-board {
  fill: rgba(57, 84, 66, 0.94);
  stroke: rgba(255, 255, 255, 0.16);
  stroke-width: 1.3;
}

.card-face {
  fill: #fffdf8;
  stroke: rgba(31, 29, 24, 0.14);
  stroke-width: 1.2;
}

.wildcard-card {
  fill: #f7eedb;
}

.card-back {
  fill: #c9b590;
  stroke: rgba(31, 29, 24, 0.14);
  stroke-width: 1.2;
}

.shadow-card {
  opacity: 0.7;
}

.hand-card {
  fill: rgba(255, 255, 255, 0.82);
}

.card-rank,
.mini-rank,
.badge-text,
.demo-label {
  font-family: var(--font-body);
  font-weight: 700;
}

.card-rank {
  fill: var(--text);
  font-size: 1.7rem;
}

.card-suit {
  font-size: 1.55rem;
}

.mini-rank {
  fill: var(--text);
  font-size: 1rem;
}

.mini-suit {
  font-size: 1rem;
}

.red-suit {
  fill: var(--red);
}

.dark-suit {
  fill: var(--text);
}

.joker-suit {
  fill: var(--gold-deep);
}

.tableau-caption,
.demo-label,
.legal-meta {
  fill: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 0.93rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 64px;
}

.summary-card,
.step-card,
.legal-card,
.request-card {
  border-radius: var(--radius-lg);
}

.summary-card {
  padding: 24px;
}

.summary-card h2,
.step-card h3,
.legal-copy h2 {
  margin: 0 0 10px;
  font-size: 1.08rem;
}

.how-to-play {
  margin-bottom: 64px;
}

.section-heading {
  max-width: 680px;
  margin-bottom: 24px;
}

.section-heading h2,
.cta-panel h2,
.legal-card h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 4rem);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.step-card {
  padding: 20px;
}

.step-visual {
  margin-bottom: 18px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 251, 244, 0.35), rgba(231, 221, 204, 0.48));
}

.demo-svg {
  width: 100%;
  height: auto;
}

.motion-line {
  fill: none;
  stroke: rgba(248, 243, 231, 0.8);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 7 11;
  animation: pulseLine 2.2s ease-in-out infinite;
}

.draw-card {
  animation: drawCard 3.4s ease-in-out infinite;
}

.set-row-top {
  animation: settleSet 3.2s ease-in-out infinite;
}

.ghost-card {
  animation: ghostPulse 2.6s ease-in-out infinite;
}

.layoff-card {
  animation: layoffMove 3.2s ease-in-out infinite;
}

.float-card-a {
  animation: floatA 4.8s ease-in-out infinite;
}

.float-card-b {
  animation: floatB 5.2s ease-in-out infinite;
}

.float-card-c {
  animation: floatC 4.4s ease-in-out infinite;
}

.ghost-outline {
  fill: transparent;
  stroke: rgba(255, 253, 248, 0.72);
  stroke-width: 1.5;
  stroke-dasharray: 5 7;
}

.ghost-text {
  fill: rgba(255, 253, 248, 0.82);
  font-weight: 700;
}

.badge-pill {
  fill: rgba(247, 238, 219, 0.95);
}

.badge-text {
  fill: var(--green);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.cta-panel {
  border-radius: calc(var(--radius-lg) + 8px);
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.8fr);
  gap: 20px;
  align-items: start;
}

.legal-card,
.request-card {
  padding: 28px;
}

.legal-meta {
  margin: 10px 0 20px;
}

.legal-copy h2 {
  margin-top: 26px;
}

.request-panel {
  margin-top: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 250, 242, 0.75);
  overflow: hidden;
}

.request-panel-static {
  padding: 20px;
}

.request-panel-static p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

@keyframes drawCard {
  0%,
  18%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  42% {
    transform: translate(88px, 18px) rotate(8deg);
  }
  56% {
    transform: translate(118px, 26px) rotate(4deg);
  }
}

@keyframes settleSet {
  0%,
  100% {
    transform: translateY(0);
  }
  45% {
    transform: translateY(-6px);
  }
  60% {
    transform: translateY(0);
  }
}

@keyframes ghostPulse {
  0%,
  100% {
    opacity: 0.4;
  }
  50% {
    opacity: 1;
  }
}

@keyframes layoffMove {
  0%,
  18%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
  46% {
    transform: translate(-46px, 52px) rotate(-10deg);
  }
  62% {
    transform: translate(-52px, 56px) rotate(-8deg);
    opacity: 0.85;
  }
}

@keyframes pulseLine {
  0%,
  100% {
    opacity: 0.25;
    stroke-dashoffset: 0;
  }
  50% {
    opacity: 1;
    stroke-dashoffset: -18;
  }
}

@keyframes floatA {
  0%,
  100% {
    transform: translateY(0) rotate(-3deg);
  }
  50% {
    transform: translateY(-9px) rotate(-1deg);
  }
}

@keyframes floatB {
  0%,
  100% {
    transform: translateY(0) rotate(1deg);
  }
  50% {
    transform: translateY(8px) rotate(3deg);
  }
}

@keyframes floatC {
  0%,
  100% {
    transform: translateY(0) rotate(4deg);
  }
  50% {
    transform: translateY(-7px) rotate(1deg);
  }
}

@media (max-width: 920px) {
  .hero,
  .legal-layout,
  .summary-grid,
  .steps-grid,
  .cta-panel {
    grid-template-columns: 1fr;
  }

  .cta-panel,
  .site-header,
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .page-shell,
  .page-shell-legal {
    width: min(100% - 20px, 100%);
    padding-top: 18px;
  }

  .hero-copy,
  .hero-card,
  .summary-card,
  .step-card,
  .cta-panel,
  .legal-card,
  .request-card {
    border-radius: 22px;
  }

  .hero-copy {
    padding: 24px;
  }

  .hero-copy h1 {
    font-size: 2.8rem;
  }

  .site-nav {
    gap: 14px;
  }

  .brand {
    align-items: flex-start;
  }

  .store-links {
    width: 100%;
  }

  .store-button {
    width: 100%;
  }
}
