/* FoundryEdges studio site, concept A "The Molten Pour". Palette and type match the game portal (portal/src/style.css).
   Keyframe names carry an fe- prefix so they never collide with other stylesheets. */
:root {
  --bg: #0b1020; --bg-2: #080c18; --panel: #121a2b; --panel-2: #172238; --ink: #eef2fb; --muted: #a9b4cc; --line: rgba(255, 255, 255, .12);
  --cyan: #7fe8ff; --amber: #f2a65a; --teal: #1fb5b0; --magenta: #c2307a; --mint: #8ff3d6; --molten: #ffcf8a;
  --font: 'Atkinson Hyperlegible Next', 'Segoe UI', system-ui, sans-serif;
  --radius: 20px; --wrap: 1180px; --pad: clamp(16px, 4vw, 32px);
  --ease: cubic-bezier(.2, .7, .2, 1); --snap: cubic-bezier(.2, .9, .3, 1);
  --ring: clamp(150px, 24vmin, 240px); --ring-top: clamp(72px, 15vh, 150px);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.6 var(--font); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 800; line-height: 1.06; letter-spacing: -.015em; text-wrap: balance; overflow-wrap: break-word; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }
::selection { background: rgba(242, 166, 90, .35); }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--pad); }
.muted { color: var(--muted); }
.grad { background: linear-gradient(90deg, var(--molten), var(--amber) 35%, #ff7aa8 70%, var(--magenta)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* header; the ring logo turns with scroll like a gauge */
.top { position: sticky; top: 0; z-index: 20; background: rgba(11, 16, 32, .7); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; letter-spacing: .14em; font-size: .95rem; }
.logo-mark { width: 26px; height: 26px; flex: none; border-radius: 50%; background: conic-gradient(from 200deg, var(--teal), var(--magenta), var(--amber), var(--teal));
  box-shadow: 0 0 16px rgba(242, 166, 90, .45); -webkit-mask: radial-gradient(circle, transparent 5px, #000 6px); mask: radial-gradient(circle, transparent 5px, #000 6px); }
@supports (animation-timeline: scroll()) {
  .top .logo-mark { animation: fe-gauge linear both; animation-timeline: scroll(root); }
}
@keyframes fe-gauge { to { rotate: 540deg; } }
.nav { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .95rem; color: var(--muted); transition: color .2s, background-color .2s; }
.nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }

/* buttons */
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px; border-radius: 999px; font: 700 1rem var(--font); text-decoration: none; cursor: pointer;
  transition: transform .2s var(--snap), box-shadow .25s var(--ease), background-color .25s; }
.btn-molten { background: linear-gradient(90deg, var(--molten), var(--amber)); color: #1a0d00; box-shadow: 0 0 28px rgba(242, 166, 90, .45); }
.btn-molten:hover { transform: translateY(-2px); box-shadow: 0 6px 36px rgba(242, 166, 90, .6); }
.btn-ghost { background: rgba(255, 255, 255, .04); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--amber), 0 0 22px rgba(242, 166, 90, .2); }
.btn:active { transform: translateY(3px); }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: .95rem; background: var(--ink); color: #0b1020; }
.btn-sm:hover { background: #fff; box-shadow: 0 0 24px color-mix(in oklab, var(--c, var(--cyan)) 60%, transparent); }

/* ---------- hero: the pour ---------- */
.hero { position: relative; isolation: isolate; min-height: min(100svh - 64px, 940px); padding-bottom: clamp(48px, 8vh, 88px); overflow: clip;
  background: radial-gradient(70% 55% at 50% 30%, rgba(194, 48, 122, .16), transparent 70%), radial-gradient(60% 50% at 50% 100%, rgba(31, 181, 176, .12), transparent 70%); }
.pour { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; touch-action: pan-y; }
.pour-static { position: absolute; left: 50%; top: 0; z-index: -2; width: 4px; height: calc(var(--ring-top) + var(--ring) / 2); translate: -50% 0; border-radius: 4px;
  background: linear-gradient(180deg, rgba(255, 207, 138, 0), var(--molten) 30%, var(--amber) 70%, var(--magenta)); box-shadow: 0 0 18px var(--amber), 0 0 42px rgba(194, 48, 122, .6); }
.js .pour-static { opacity: 0; }
.crucible { position: absolute; left: 50%; top: var(--ring-top); z-index: -1; width: var(--ring); aspect-ratio: 1; translate: -50% 0; pointer-events: none; }
.crucible__ring { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 200deg, var(--teal), var(--magenta), var(--amber), var(--molten), var(--teal));
  -webkit-mask: radial-gradient(circle, transparent 37%, #000 38%); mask: radial-gradient(circle, transparent 37%, #000 38%);
  filter: drop-shadow(0 0 calc(18px + var(--heat, 0) * 30px) rgba(242, 166, 90, calc(.35 + var(--heat, 0) * .5)));
  animation: fe-turn 18s linear infinite; }
.crucible__heat { position: absolute; inset: 30%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 207, 138, calc(.25 + var(--heat, 0) * .7)), rgba(194, 48, 122, .15) 55%, transparent 72%); }
@keyframes fe-turn { to { rotate: 360deg; } }
.hero__text { position: relative; padding-top: calc(var(--ring-top) + var(--ring) + clamp(20px, 4vh, 44px)); text-align: center; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
.lead { margin: 18px auto 0; max-width: 44ch; font-size: clamp(1.05rem, 1.5vw, 1.25rem); color: var(--muted); }
.hint { margin-top: 22px; font-size: .85rem; color: rgba(169, 180, 204, .7); }
.no-motion .hint, html:not(.js) .hint { display: none; }
/* the headline cools from molten to ink as it sets */
.js .cast-in { animation: fe-cool 1.8s .5s var(--ease) both; }
@keyframes fe-cool {
  from { opacity: 0; translate: 0 10px; filter: blur(6px); text-shadow: 0 0 30px rgba(242, 166, 90, .9); }
  60% { opacity: 1; filter: blur(0); text-shadow: 0 0 22px rgba(242, 166, 90, .5); }
  to { opacity: 1; translate: 0 0; text-shadow: 0 0 0 transparent; }
}

/* ---------- sections ---------- */
.section { padding-block: clamp(64px, 9vw, 120px); }
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 32px; margin-bottom: 32px; }
.sec-head h2 { font-size: clamp(2rem, 4vw, 3.2rem); max-width: 20ch; }
.sec-head p { color: var(--muted); max-width: 40ch; }

/* ---------- games: the cooling bed ---------- */
.bed { display: flex; gap: 10px; height: clamp(420px, 56vh, 540px); margin: 0; padding: 0; list-style: none; }
.bar { position: relative; flex: 1 1 0; min-width: 0; border-radius: 18px; overflow: hidden; background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line); transition: flex-grow .6s var(--snap), box-shadow .4s; }
.bar::before { content: ""; position: absolute; inset: auto 0 0 0; height: 70%; z-index: 0; pointer-events: none;
  background: linear-gradient(0deg, color-mix(in oklab, var(--c) 55%, transparent), transparent); opacity: .55; transition: opacity .4s; }
.bar:hover::before { opacity: .9; }
.bar.open { flex-grow: 7; box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--c) 70%, transparent), 0 0 40px color-mix(in oklab, var(--c) 30%, transparent); }
.bar__tab { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0; border: 0; background: none; color: var(--ink); font: inherit; cursor: pointer; }
.bar__num { font-weight: 800; font-size: .9rem; color: color-mix(in oklab, var(--c) 80%, white); font-variant-numeric: tabular-nums; }
.bar__name { writing-mode: vertical-rl; rotate: 180deg; font-weight: 700; font-size: 1.05rem; white-space: nowrap; letter-spacing: .02em; }
.bar.open .bar__tab { pointer-events: none; opacity: 0; }
.bar__body { position: absolute; inset: 0; z-index: 1; display: grid; grid-template-rows: minmax(0, 1fr) auto; opacity: 0; visibility: hidden; transition: opacity .35s .15s, visibility 0s .5s; }
.bar.open .bar__body { opacity: 1; visibility: visible; transition: opacity .45s .2s, visibility 0s; }
.bar__body img { width: 100%; height: 100%; object-fit: cover; }
.bar__info { display: grid; gap: 6px; justify-items: start; padding: 20px 24px 24px; background: linear-gradient(0deg, var(--panel) 70%, color-mix(in oklab, var(--panel) 0%, transparent)); }
.bar__genre { font-size: .85rem; font-weight: 600; color: color-mix(in oklab, var(--c) 75%, white); }
.bar__info h3 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); }
.bar__info p:not(.bar__genre) { color: var(--muted); max-width: 52ch; }
.bar__info .btn { margin-top: 8px; }

/* ---------- moulds: cards cool from amber to navy ---------- */
.moulds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.mould { padding: 30px; border-radius: var(--radius); background: linear-gradient(180deg, var(--panel-2), var(--panel)); box-shadow: inset 0 0 0 1px var(--line); }
.js .mould { opacity: 0; translate: 0 18px; }
.js .mould.cast { animation: fe-quench 1.6s var(--ease) both; }
.js .mould.cast:nth-child(2) { animation-delay: .12s; } .js .mould.cast:nth-child(3) { animation-delay: .24s; }
@keyframes fe-quench {
  0% { opacity: 0; translate: 0 18px; box-shadow: inset 0 0 0 1px rgba(255, 207, 138, .9), 0 0 50px rgba(242, 166, 90, .55); background-color: #3a1d10; }
  35% { opacity: 1; translate: 0 0; box-shadow: inset 0 0 0 1px rgba(242, 166, 90, .7), 0 0 30px rgba(194, 48, 122, .35); }
  100% { opacity: 1; translate: 0 0; box-shadow: inset 0 0 0 1px var(--line), 0 0 0 transparent; }
}
.mould h3 { font-size: 1.45rem; margin: 14px 0 8px; }
.mould p:not(.mould__state) { color: var(--muted); }
.mould__state { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; color: var(--amber); box-shadow: inset 0 0 0 1px rgba(242, 166, 90, .45); }
.mould__state--live { color: #06140f; background: var(--mint); box-shadow: 0 0 16px rgba(143, 243, 214, .4); }

/* ---------- principles ---------- */
.big { font-size: clamp(2.6rem, 7.5vw, 6.2rem); line-height: 1; }
.rules { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 44px 0 0; padding: 0; list-style: none; }
.rules li { padding-top: 16px; border-top: 1px solid var(--line); }
.rules b { display: block; margin-bottom: 6px; font-size: 1.08rem; }
.rules span { color: var(--muted); }

/* ---------- prices: assay certificate ---------- */
.assay { position: relative; padding: clamp(24px, 4vw, 48px); border-radius: calc(var(--radius) + 6px); background: var(--bg-2);
  box-shadow: inset 0 0 0 1px rgba(242, 166, 90, .35), 0 0 0 8px rgba(18, 26, 43, .6), 0 0 0 9px var(--line); }
.assay__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 8px 24px; padding-bottom: 20px; border-bottom: 2px solid rgba(242, 166, 90, .5); }
.assay__head h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); }
.assay__head p { color: var(--muted); }
.ledger { margin: 0; }
.ledger div { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 3fr) minmax(0, 6fr); gap: 8px 24px; align-items: baseline; padding-block: 18px; border-bottom: 1px solid var(--line); }
.ledger dt { font-weight: 700; }
.ledger dd { margin: 0; color: var(--muted); }
.ledger .amt { color: var(--molten); font-weight: 800; font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.links { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 20px; }
.links a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--cyan); text-underline-offset: .2em; }
.links a:hover { color: var(--molten); }

/* ---------- footer ---------- */
.foot { padding-block: 48px; border-top: 1px solid var(--line); background: var(--bg-2); }
.foot__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr); gap: 24px; }
.foot .logo + p { margin-top: 12px; }
.foot__h { margin-bottom: 8px; font-size: .9rem; font-weight: 600; color: var(--muted); }
.foot p + p { margin-top: 4px; }
.foot a:not(.logo) { color: var(--cyan); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .moulds { grid-template-columns: minmax(0, 1fr); }
  .rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .foot__grid { grid-template-columns: minmax(0, 1fr); }
  .ledger div { grid-template-columns: minmax(0, 1fr) auto; }
  .ledger dd:not(.amt) { grid-column: 1 / -1; }
}
@media (max-width: 760px) {
  /* the bed stands up: bars become rows, the open one shows its art */
  .bed { flex-direction: column; height: auto; }
  .bar { flex: none; min-height: 64px; display: grid; grid-template-rows: 64px 0fr; transition: grid-template-rows .5s var(--snap), box-shadow .4s; }
  .bar.open { grid-template-rows: 0px 1fr; }
  .bar::before { inset: 0 auto 0 0; width: 60%; height: auto; background: linear-gradient(90deg, color-mix(in oklab, var(--c) 50%, transparent), transparent); }
  .bar__tab { position: relative; inset: auto; flex-direction: row; justify-content: flex-start; padding: 0 18px; gap: 14px; }
  .bar__name { writing-mode: horizontal-tb; rotate: none; white-space: normal; text-align: left; }
  .bar.open .bar__tab { visibility: hidden; }
  .bar__body { position: relative; inset: auto; min-height: 0; overflow: hidden; grid-template-rows: auto auto; }
  .bar__body img { height: auto; aspect-ratio: 1200 / 630; }
}
@media (max-width: 600px) {
  .rules { grid-template-columns: minmax(0, 1fr); }
  .nav a { padding: 0 10px; }
  .hide-sm { display: none; }
  .logo { letter-spacing: .08em; }
  .actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
  .js .pour-static { opacity: 1; }
  .js .mould { opacity: 1; translate: none; }
  .pour { display: none; }
}
