/* Spin Forge Journey — official site styles
   Palette and type are lifted from the game itself (styles.css tokens). */

@font-face {
  font-family: "Baloo 2";
  src: url("assets/fonts/Baloo2-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink-deep:  #191309;   /* forge dark */
  --ink-soft:  #251c0e;
  --paper:     #f4ecd6;   /* champagne base, same as in-game */
  --card:      #fffdf6;
  --line:      rgba(96, 74, 28, .14);
  --text:      #3d3420;
  --text-soft: #756747;
  --text-inv:  #f6eed8;
  --gold:      #ffce53;
  --gold-d:    #e0a41f;
  --gold-ink:  #a2760c;
  --green:     #7aa53f;

  --font-display: "Baloo 2", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radius: 18px;
  --ease-pop: cubic-bezier(.2, .7, .3, 1.12);

  /* jigsaw seam pattern — gold on dark */
  --jigsaw-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%23ffce53' stroke-opacity='0.08' stroke-width='1.5'%3E%3Cpath d='M0 0V33C0 27 14 27 14 42C14 57 0 57 0 51V84'/%3E%3Cpath d='M0 0H33C27 0 27 14 42 14C57 14 57 0 51 0H84'/%3E%3C/g%3E%3C/svg%3E");
  /* jigsaw seam pattern — ink on paper */
  --jigsaw-paper: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='84' height='84' viewBox='0 0 84 84'%3E%3Cg fill='none' stroke='%235a4420' stroke-opacity='0.07' stroke-width='1.5'%3E%3Cpath d='M0 0V33C0 27 14 27 14 42C14 57 0 57 0 51V84'/%3E%3Cpath d='M0 0H33C27 0 27 14 42 14C57 14 57 0 51 0H84'/%3E%3C/g%3E%3C/svg%3E");
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--paper);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--gold-ink); }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--gold-d);
  outline-offset: 2px;
  border-radius: 6px;
}

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 24px; }

/* ---------- top nav ---------- */

.site-nav {
  background: var(--ink-deep);
  color: var(--text-inv);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 60px;
}

.brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: .3px;
  color: var(--gold);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 26px;
  height: 26px;
  flex: none;
}

.site-nav .nav-links {
  display: flex;
  gap: 22px;
  font-size: 14px;
}

.site-nav .nav-links a {
  color: var(--text-inv);
  text-decoration: none;
  opacity: .85;
}

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

/* ---------- hero ---------- */

.hero {
  background:
    radial-gradient(1100px 520px at 50% -140px, rgba(255, 206, 83, .16), transparent 68%),
    var(--jigsaw-dark),
    linear-gradient(180deg, var(--ink-deep), var(--ink-soft));
  color: var(--text-inv);
  text-align: center;
  padding: 84px 0 92px;
  overflow: hidden;
}

.eyebrow {
  display: inline-block;
  font-size: 13px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid rgba(255, 206, 83, .35);
  border-radius: 999px;
  padding: 6px 16px;
  margin-bottom: 26px;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
  letter-spacing: .5px;
  color: #fff;
  text-shadow: 0 4px 0 rgba(160, 110, 10, .35), 0 14px 40px rgba(0, 0, 0, .5);
}

.hero h1 .gold { color: var(--gold); }

.hero .tagline {
  max-width: 560px;
  margin: 20px auto 0;
  font-size: clamp(16px, 2vw, 19px);
  color: rgba(246, 238, 216, .82);
}

/* signature: three slot reels that land on SPIN / FORGE / SOLVE */

.reels {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin: 46px auto 0;
}

.reel {
  width: clamp(104px, 15vw, 150px);
  height: 96px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(180deg, #fffdf6, #f0e5c6);
  border: 2px solid var(--gold-d);
  box-shadow:
    0 0 0 4px rgba(255, 206, 83, .18),
    0 18px 40px rgba(0, 0, 0, .45),
    inset 0 -14px 22px rgba(96, 74, 28, .18),
    inset 0 14px 22px rgba(255, 255, 255, .6);
}

.reel .strip {
  animation: reel-spin 1.15s var(--ease-pop) both;
}

.reel:nth-child(2) .strip { animation-duration: 1.55s; }
.reel:nth-child(3) .strip { animation-duration: 1.95s; }

.reel .cell {
  height: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.reel .cell .word {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(20px, 2.6vw, 26px);
  letter-spacing: .06em;
  color: var(--gold-ink);
}

.reel .cell .word.blur { color: rgba(96, 74, 28, .35); }

.reel .cell small {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-soft);
}

@keyframes reel-spin {
  from { transform: translateY(calc(-96px * 4)); }
  to   { transform: translateY(0); }
}

.store-note {
  margin-top: 44px;
  font-size: 14px;
  letter-spacing: .04em;
  color: rgba(246, 238, 216, .65);
}

.store-note .apple { color: var(--gold); }

/* ---------- sections ---------- */

section { padding: 76px 0; }

.section-head {
  max-width: 640px;
  margin-bottom: 44px;
}

.section-head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1.15;
}

.section-head h2::after {
  content: "";
  display: block;
  width: 58px;
  height: 5px;
  border-radius: 999px;
  background: var(--gold-d);
  margin-top: 12px;
}

.section-head p { margin-top: 14px; color: var(--text-soft); }

/* how it plays — a real sequence, so steps are numbered */

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

.step {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 28px;
  box-shadow: 0 8px 22px rgba(96, 74, 28, .08);
}

.step .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--gold);
  color: var(--ink-deep);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  box-shadow: 0 3px 0 var(--gold-d);
  margin-bottom: 16px;
}

.step h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 19px;
  margin-bottom: 8px;
}

.step p { font-size: 15px; color: var(--text-soft); }

/* collections gallery */

.gallery-band {
  background: var(--jigsaw-paper), linear-gradient(180deg, #efe5c9, var(--paper));
}

.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.art {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  box-shadow: 0 10px 26px rgba(96, 74, 28, .16);
}

.art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease-pop);
}

.art:hover img { transform: scale(1.05); }

.art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--jigsaw-dark);
  opacity: .9;
  pointer-events: none;
}

.art .label {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 1;
  padding: 30px 16px 12px;
  background: linear-gradient(180deg, transparent, rgba(20, 14, 5, .78));
  color: #fff;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  letter-spacing: .04em;
}

/* fair-play strip */

.fair {
  background: var(--ink-deep);
  color: var(--text-inv);
}

.fair .grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  text-align: center;
}

.fair .cell h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  color: var(--gold);
  margin-bottom: 6px;
}

.fair .cell p { font-size: 14px; color: rgba(246, 238, 216, .7); }

/* ---------- footer ---------- */

.site-foot {
  background: var(--ink-soft);
  color: rgba(246, 238, 216, .75);
  padding: 40px 0 48px;
  font-size: 14px;
}

.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 32px;
  align-items: center;
  justify-content: space-between;
}

.site-foot a { color: var(--gold); text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }

.foot-links { display: flex; gap: 22px; }

/* ---------- legal document pages ---------- */

.doc-hero {
  background: var(--jigsaw-dark), linear-gradient(180deg, var(--ink-deep), var(--ink-soft));
  color: #fff;
  padding: 56px 0;
}

.doc-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 4.6vw, 46px);
}

.doc-hero .meta {
  margin-top: 10px;
  font-size: 14px;
  color: rgba(246, 238, 216, .65);
}

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 88px;
}

.doc h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  margin: 40px 0 12px;
}

.doc h2:first-child { margin-top: 0; }

.doc p, .doc li { color: var(--text); font-size: 16px; }

.doc p + p { margin-top: 12px; }

.doc ul { margin: 12px 0 12px 22px; }

.doc li + li { margin-top: 6px; }

.doc .callout {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--gold-d);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 18px 0;
}

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .steps, .fair .grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .reels { gap: 10px; }
  section { padding: 56px 0; }
  .hero { padding: 64px 0 72px; }
}

@media (max-width: 560px) {
  body { overflow-x: clip; }
  .site-nav .wrap { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .site-nav .nav-links { gap: 14px; }
  .brand { font-size: 17px; }
  .eyebrow { font-size: 11px; letter-spacing: .14em; }
  .hero h1 { font-size: clamp(30px, 9vw, 42px); }
  .hero .tagline { font-size: 15px; }
  .reels { gap: 8px; }
  .reel { width: clamp(86px, 27vw, 120px); height: 80px; border-radius: 12px; }
  .reel .cell { height: 80px; }
  .reel .cell .word { font-size: 17px; }
  .reel .cell small { font-size: 9px; }
  @keyframes reel-spin {
    from { transform: translateY(calc(-80px * 4)); }
    to   { transform: translateY(0); }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reel .strip { animation: none; }
  .art img, .art:hover img { transition: none; transform: none; }
}
