/* Incremental Foundry studio site. Brand: Foundry Navy #0E2433, Spark Orange #F2642A, Paper Cream #F8F1E6. */

@font-face { font-family: "Lilita One"; font-weight: 400; font-display: swap; src: url(/fonts/lilita-one-400.woff2) format("woff2"); }
@font-face { font-family: "DM Mono"; font-weight: 400; font-display: swap; src: url(/fonts/dm-mono-400.woff2) format("woff2"); }
@font-face { font-family: "DM Mono"; font-weight: 500; font-display: swap; src: url(/fonts/dm-mono-500.woff2) format("woff2"); }

:root {
  --navy: #0E2433;
  --orange: #F2642A;
  --cream: #F8F1E6;
  --paper: #FBF7EF;
  --stone: #B7B1A7;
  --sand: #D8CFC0;
  --grey: #6B7280;
  --ink: #2D2A26;
  --display: "Lilita One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --mono: "DM Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--navy); font-family: var(--mono); }
a { color: var(--navy); text-decoration: none; border-bottom: 2px solid var(--orange); }
a:hover, a:focus-visible { color: var(--orange); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--orange); color: var(--cream); }

.page { max-width: 760px; margin: 0 auto; padding: 36px 28px 56px; display: flex; flex-direction: column; gap: 44px; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; border: none; }
.brand img { width: 40px; height: auto; }
.brand span { font-family: var(--display); font-size: 19px; line-height: .9; }
.top nav { display: flex; gap: 18px; font-size: 13px; flex-wrap: wrap; }

/* hero: the forge */
.hero { display: flex; flex-direction: column; gap: 28px; margin-top: -20px; }
.forge { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.forge-strike { display: flex; align-items: center; gap: 20px; min-width: 0; flex: 0 1 auto; }
.anvil { position: relative; width: 120px; height: 120px; padding: 0; border: none; background: none; cursor: pointer; flex: 0 0 auto;
  animation: if-bob 2.6s ease-in-out infinite; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.anvil img { width: 100%; height: auto; display: block; transform-origin: 50% 100%; user-select: none; -webkit-user-select: none; pointer-events: none; }
.anvil.hit img { animation: if-strike 280ms ease-out; }
.pop { position: absolute; top: 0; pointer-events: none; white-space: nowrap; font-family: var(--display); font-size: 24px;
  color: var(--orange); -webkit-text-stroke: 1px var(--navy); animation: if-pop 900ms ease-out forwards; }

.readout { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.counter { display: flex; flex-direction: column; font-family: var(--display); line-height: 1; font-variant-numeric: tabular-nums; transform-origin: 0 70%; }
.counter.bump { animation: if-bump 220ms ease-out; }
.counter .num { font-size: clamp(40px, 7vw, 56px); }
.counter .unit { font-size: 20px; color: var(--orange); }
.per-strike { font-size: 11px; letter-spacing: .2em; color: var(--grey); }

.upgrades { flex: 1 1 300px; min-width: 0; max-width: 380px; border: 2px solid var(--navy); border-radius: 14px; padding: 14px;
  display: flex; flex-direction: column; gap: 12px; background: var(--paper); }
.upgrades-head { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .2em; font-weight: 500; }
.muted { color: var(--grey); }
.upgrade-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.upgrade { position: relative; }
.upgrade button { width: 100%; aspect-ratio: 1; border-radius: 12px; border: 2px dashed var(--sand); background: var(--cream); cursor: default;
  display: flex; align-items: center; justify-content: center; padding: 7px; position: relative; font: inherit; color: inherit; touch-action: manipulation; }
.upgrade button.revealed { border-style: solid; }
.upgrade button.ready { border-color: var(--orange); cursor: pointer; }
.upgrade button.owned { border-color: var(--navy); }
/* The mask is the cream mascot with mask-mode set to alpha. Chrome can read an SVG mask by luminance, which made
   the navy version all but invisible; cream is opaque and bright, so it works either way. */
.upgrade .icon { width: 100%; height: 100%;
  -webkit-mask: url(/img/mascot-mask.svg) center / contain no-repeat; mask: url(/img/mascot-mask.svg) center / contain no-repeat alpha; }
.upgrade .q { font-family: var(--display); font-size: 20px; color: var(--stone); }
.upgrade .tick { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: var(--cream);
  font-size: 12px; font-weight: 500; display: flex; align-items: center; justify-content: center; border: 2px solid var(--paper); }
.tip { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); width: 170px; background: var(--navy); color: var(--cream);
  border-radius: 10px; padding: 10px 12px; display: none; flex-direction: column; gap: 4px; z-index: 5; pointer-events: none;
  box-shadow: 0 6px 18px rgba(14, 36, 51, .18); }
.upgrade:hover .tip, .upgrade:focus-within .tip { display: flex; }
.upgrade:nth-child(5n+1) .tip { left: 0; transform: none; }
.upgrade:nth-child(5n) .tip { left: auto; right: 0; transform: none; }
.tip b { font-family: var(--display); font-weight: 400; font-size: 16px; }
.tip span { font-size: 11px; line-height: 1.5; color: var(--stone); }
.tip span.status { color: var(--orange); }
.tip span:empty { display: none; }

h1 { margin: 0; font-family: var(--display); font-weight: 400; font-size: clamp(28px, 4.6vw, 40px); line-height: 1.12; text-wrap: pretty; }
h1 .tag { display: inline-block; background: var(--navy); color: var(--cream); padding: 0 .28em .04em; border-radius: .22em; transform: rotate(-2deg); }

/* sections */
.rule { height: 2px; background: var(--navy); border-radius: 2px; }
.block { display: flex; flex-direction: column; gap: 14px; }
.block.tight { margin-top: -22px; }
#contact { gap: 18px; }
.label { font-size: 12px; letter-spacing: .24em; font-weight: 500; color: var(--grey); }
.lead { margin: 0; font-family: var(--display); font-size: clamp(20px, 2.8vw, 24px); line-height: 1.3; }
.lead strong { font-weight: 400; color: var(--orange); }
.small { margin: 0; font-size: 14px; line-height: 1.7; color: var(--ink); text-wrap: pretty; overflow-wrap: anywhere; }
.socials { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; flex-wrap: wrap; font-size: 14px; }

footer { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 20px; border-top: 1px solid var(--stone);
  font-size: 11px; letter-spacing: .2em; color: var(--grey); }

@keyframes if-bob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-6px) rotate(-1.5deg); } }
@keyframes if-strike { 0% { transform: scale(1.06, .86) translateY(8px); } 60% { transform: scale(.97, 1.04); } 100% { transform: scale(1, 1); } }
@keyframes if-pop { 0% { opacity: 0; transform: translate(-50%, 0) scale(.7); } 15% { opacity: 1; transform: translate(-50%, -14px) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -90px) scale(1); } }
@keyframes if-bump { 0% { transform: scale(1.12); } 100% { transform: scale(1); } }

@media (prefers-reduced-motion: reduce) {
  .anvil { animation: none; }
  .anvil.hit img, .counter.bump { animation: none; }
}
@media (max-width: 420px) {
  .page { padding: 28px 16px 44px; gap: 36px; }
  .forge-strike { gap: 14px; }
  .anvil { width: 96px; height: 96px; }
}
