/* Forge — shared tokens and components for the 5 home mockups. Layouts live in each page. */
:root {
  --steel: #DDE2E6; --iron: #1A1C1F; --glow: #FFC83A; --temper: #2A6F97;
  --iron-2: #24272B; --iron-3: #2E3237; --line-d: #3A3F45; --muted-d: #9AA3AB; --temper-l: #6FAED6; --red-d: #FF6B66;
  --plate: #EEF1F3; --line-l: #C4CBD1; --muted-l: #545B62; --red-l: #B42318;
  --wide: 'Archivo', system-ui, sans-serif; --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gut: clamp(16px, 4vw, 56px); --max: 1320px;
}
.ground-dark { --bg: var(--iron); --bg-2: var(--iron-2); --bg-3: var(--iron-3); --fg: var(--steel); --muted: var(--muted-d); --line: var(--line-d); --cool: var(--temper-l); --red: var(--red-d); --anvil: #2E3237; --anvil-edge: #5B636B; }
.ground-light { --bg: var(--plate); --bg-2: #E4E8EB; --bg-3: var(--steel); --fg: var(--iron); --muted: var(--muted-l); --line: var(--line-l); --cool: var(--temper); --red: var(--red-l); --anvil: var(--iron); --anvil-edge: #3A3F45; }
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.55 var(--wide); font-stretch: 100%; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
::selection { background: var(--glow); color: var(--iron); }
* { scrollbar-color: var(--line) var(--bg); scrollbar-width: thin; }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; border-radius: 2px; }
a { color: inherit; text-underline-offset: .22em; text-decoration-thickness: 1px; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--wide); font-stretch: 125%; font-weight: 800; letter-spacing: -0.02em; line-height: 1.02; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(28px, 3.6vw, 48px); }
h3 { font-size: 20px; font-stretch: 112%; font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; }
p { margin: 0; text-wrap: pretty; }
.mono, time, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.muted { color: var(--muted); }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- header ---------- */
.hdr { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--line); }
.hdr-in { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-stretch: 125%; font-weight: 800; font-size: 19px; letter-spacing: -0.01em; text-decoration: none; }
.brand-mark { width: 30px; height: 30px; border: 1px dashed var(--muted); border-radius: 50%; display: grid; place-items: center; font: 500 8px/1 var(--mono); color: var(--muted); text-transform: uppercase; }
.tabs { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.tabs a { display: block; padding: 8px 12px; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--muted); border-radius: 6px; transition: color .2s var(--ease), background .2s var(--ease); }
.tabs a:hover { color: var(--fg); background: var(--bg-2); }
.tabs a[aria-current] { color: var(--fg); }
.hdr-act { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; color: var(--fg); background: transparent; transition: border-color .2s var(--ease), background .2s var(--ease); cursor: pointer; }
.icon-btn:hover { border-color: var(--fg); background: var(--bg-2); }
.icon-btn svg { width: 16px; height: 16px; }
.menu-btn { display: none; }
.drawer { display: none; }
@media (max-width: 900px) {
  .tabs { display: none; }
  .menu-btn { display: grid; }
  .drawer[open] { display: block; position: fixed; inset: 64px 0 auto 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px var(--gut) 20px; z-index: 19; }
  .drawer a { display: block; padding: 12px 0; font-size: 18px; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line); }
}

/* ---------- buttons ---------- */
.btn { --b: var(--glow); display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 20px; border-radius: 8px; border: 1px solid var(--b); background: var(--b); color: var(--iron); font: 700 15px/1 var(--wide); font-stretch: 112%; text-decoration: none; cursor: pointer; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -8px rgba(0, 0, 0, .55); }
.btn:active { transform: translateY(0); }
.btn svg { width: 16px; height: 16px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--fg); box-shadow: none; }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }
.chip { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px; border: 1px solid var(--line); border-radius: 99px; font: 500 11px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--glow); animation: pulse 1.6s var(--ease) infinite; }
@keyframes pulse { 50% { opacity: .25; } }

/* ---------- anvil ---------- */
[data-anvil] { position: relative; }
.anvil-svg { width: 100%; height: auto; overflow: visible; }
.anvil-ground { stroke: var(--line); stroke-width: 1; }
.anvil-body { fill: var(--anvil); stroke: var(--anvil-edge); stroke-width: 1.2; }
.anvil-face { stroke: var(--steel); stroke-opacity: .55; stroke-width: 1.4; }
.ground-light .anvil-face { stroke: #8A949C; }
.anvil-hole { fill: var(--bg); }
.anvil-line { stroke: var(--anvil-edge); stroke-width: 1; }
.anvil-bar { --heat: 0; fill: color-mix(in srgb, var(--glow) calc(30% + var(--heat) * 70%), var(--anvil-edge)); transition: fill .6s var(--ease), filter .6s var(--ease); filter: drop-shadow(0 0 calc(var(--heat) * 14px) color-mix(in srgb, var(--glow) 70%, transparent)); }
.anvil-hammer { transform-box: view-box; transform-origin: 588px 58px; }
.hammer-handle { stroke: var(--muted); stroke-width: 9; stroke-linecap: round; }
.hammer-head { fill: var(--fg); }
.ground-light .hammer-head { fill: #3A3F45; }
.spark { stroke: var(--glow); stroke-width: 2; stroke-linecap: round; transform-box: view-box; }
[data-anvil].dev .spark { stroke: var(--red); }
[data-anvil].struck .anvil-svg { transform: translateY(1.5px); }
[data-anvil].forging .anvil-bar { fill: var(--glow); filter: drop-shadow(0 0 22px var(--glow)); animation: forged .9s var(--ease); }
@keyframes forged { 0% { transform: none; } 60% { transform: translateY(-6px); } 100% { transform: translate(140px, 0); opacity: 0; } }
.anvil-bar { transform-box: view-box; }
.sim { position: absolute; font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ---------- gauge ---------- */
.gauge { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.gauge i { height: 100%; min-height: 10px; border-radius: 2px; background: var(--bg-3); border: 1px solid var(--line); transition: background .35s var(--ease), border-color .35s var(--ease); }
.gauge i.on { background: var(--glow); border-color: var(--glow); }
.gauge.full i { animation: ready 1.2s var(--ease) infinite alternate; }
@keyframes ready { to { background: color-mix(in srgb, var(--glow) 55%, var(--bg)); } }

/* ---------- ingots ---------- */
.ingots { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; }
.ingot { display: grid; gap: 2px; font: 500 11px/1.35 var(--mono); color: var(--muted); min-width: 0; }
.ingot-shape svg { width: 100%; height: auto; overflow: visible; }
.ingot-shape path { fill: none; stroke: var(--line); stroke-width: 1.4; transition: fill .5s var(--ease), stroke .5s var(--ease); }
.ingot.next .ingot-shape path { stroke: var(--glow); stroke-dasharray: 3 3; }
.ingot.forged .ingot-shape path { fill: var(--temper); stroke: var(--temper); }
.ingot.w2 .ingot-shape { padding: 0 3%; } .ingot.w1 .ingot-shape { padding: 0 10%; }
.ingot-n { color: var(--fg); font-weight: 700; }
.ingot.forged .ingot-st { color: var(--cool); }
.ingot.next .ingot-st { color: var(--glow); }
.ground-light .ingot.next .ingot-st { color: var(--iron); text-decoration: underline 2px var(--glow); text-underline-offset: 3px; }
.ingot-tx { color: var(--cool); font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ingot-st { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- log ---------- */
.log { list-style: none; margin: 0; padding: 0; font: 400 13px/1.3 var(--mono); font-variant-numeric: tabular-nums; }
.log-row { display: grid; grid-template-columns: 64px 76px minmax(0, 1fr) minmax(0, 1.2fr) 96px; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); animation: rowin .5s var(--ease); }
@keyframes rowin { from { background: color-mix(in srgb, var(--glow) 14%, transparent); } }
.log-row time { color: var(--muted); }
.log-k { text-transform: uppercase; font-size: 11px; letter-spacing: .06em; }
.log-row.sell .log-k { color: var(--fg); }
.log-row.buy { color: var(--muted); }
.log-row.dev, .log-row.dev .log-k { color: var(--red); font-weight: 700; }
.log-row.forge .log-k, .log-row.forge .log-v { color: var(--cool); font-weight: 700; }
.log-w, .log-v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.log-tx { color: var(--cool); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) {
  .log-row { grid-template-columns: 52px 64px minmax(0, 1fr); row-gap: 4px; font-size: 12px; }
  .log-v { grid-column: 3; } .log-tx { grid-column: 3; text-align: left; } .log-w { grid-column: 3; grid-row: 1; }
  .log-k { grid-row: 1; grid-column: 2; } .log-row time { grid-row: 1; grid-column: 1; }
}

/* ---------- dev bag bar ---------- */
.bagbar { --burned: 0; --reserved: .5; --sold: 0; display: flex; height: 14px; border-radius: 3px; overflow: hidden; background: var(--bg-3); border: 1px solid var(--line); }
.bagbar span { height: 100%; transition: flex-basis .8s var(--ease); }
.bagbar .b { flex: 0 0 calc(var(--burned) * 100%); background: var(--temper); }
.bagbar .r { flex: 0 0 calc(var(--reserved) * 100%); background: repeating-linear-gradient(135deg, var(--glow) 0 6px, color-mix(in srgb, var(--glow) 70%, var(--bg)) 6px 12px); }
.bagbar .s { flex: 0 0 calc(var(--sold) * 100%); background: var(--red); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 20px; font: 500 12px/1.3 var(--mono); color: var(--muted); }
.legend b { color: var(--fg); font-weight: 700; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.legend .lb { background: var(--temper); } .legend .lr { background: var(--glow); } .legend .ls { background: var(--red); } .legend .lf { background: var(--bg-3); border: 1px solid var(--line); }

/* ---------- placeholders ---------- */
.ph { display: grid; place-items: center; aspect-ratio: 1; border: 1px dashed var(--muted); border-radius: 8px; font: 500 10px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: center; padding: 6px; background: repeating-linear-gradient(135deg, transparent 0 7px, color-mix(in srgb, var(--line) 35%, transparent) 7px 8px); }

/* ---------- faq ---------- */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; padding: 20px 0; font-weight: 600; font-size: 18px; font-stretch: 108%; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: 0 0 12px; height: 12px; margin-top: 6px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .3s var(--ease); }
.faq details[open] summary::after { transform: rotate(225deg); }
.faq summary:hover { color: var(--cool); }
.faq details p { padding: 0 0 22px; color: var(--muted); max-width: 68ch; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
