/* FPM Games site styles. Hand-edited (not generated); matches design/fpmgames/styles.css plus the
   production additions marked "prod" below. */

/* prod: self-hosted fonts (latin subset, variable weight; SIL OFL, see fonts/OFL-*.txt) */
@font-face { font-family: "Fredoka"; font-style: normal; font-weight: 500 600; font-display: swap; src: url("/fonts/fredoka.woff2") format("woff2"); }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("/fonts/nunito-sans.woff2") format("woff2"); }

:root {
  --ground: #EDF2EA;       /* page background, greenhouse glass */
  --paper: #FFFFFF;
  --ink: #183A27;          /* text */
  --ink-soft: #44584B;     /* secondary text, 7:1 on ground */
  --leaf: #256B43;
  --leaf-soft: #DDEBD3;
  --pot: #A9481F;          /* terracotta, primary buttons (white text 6:1) */
  --pot-deep: #8A3915;
  --pot-soft: #F3E6DA;
  --sun: #E8B21E;
  --line: #D3DECF;
  --discord: #5865F2;

  /* boss blooms */
  --daisy: #F4F1E4;
  --sunflower: #E8B21E;
  --rose: #C2264B;
  --lily: #E58FB6;
  --corpse: #6B3A7A;
  --perennial: #24312A;

  --font-display: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* spacing scale (4px base) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  --radius: 18px;
  --radius-lg: 28px;
  --shadow: 0 3px 0 rgba(24, 58, 39, .10), 0 14px 30px -14px rgba(24, 58, 39, .35);
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--pot); }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; margin: 0 0 var(--s4); letter-spacing: -.01em; }
h1 { font-size: clamp(42px, 6.4vw, 80px); }
h2 { font-size: clamp(30px, 4vw, 46px); }
h3 { font-size: 22px; }
p { margin: 0 0 var(--s4); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--s4); }
@media (min-width: 720px) { .wrap { padding: 0 var(--s6); } }

.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--s4); top: var(--s4); background: var(--paper); padding: var(--s2) var(--s4); border-radius: 8px; z-index: 10; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s2);
  font-family: var(--font-display); font-weight: 600; font-size: 18px;
  padding: 14px 24px; border-radius: 14px; text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-pot { background: var(--pot); color: #fff; box-shadow: 0 4px 0 var(--pot-deep); }
.btn-pot:hover { box-shadow: 0 6px 0 var(--pot-deep); }
.btn-ghost { background: var(--paper); color: var(--ink); border-color: var(--ink); }
.btn-discord { background: var(--discord); color: #fff; box-shadow: 0 4px 0 #3640B5; }
.btn-sm { font-size: 16px; padding: 9px 16px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 5; background: rgba(237, 242, 234, .93); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: var(--s4); }
.brand { display: flex; align-items: center; gap: var(--s3); text-decoration: none; color: var(--ink); font-family: var(--font-display); font-weight: 600; font-size: 22px; }
.brand img { width: 40px; height: 40px; }
.nav { display: flex; align-items: center; gap: var(--s5); }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 700; }
.nav a:not(.btn):hover { color: var(--pot); }
.menu-btn { display: none; background: none; border: 2px solid var(--ink); border-radius: 12px; width: 44px; height: 44px; color: var(--ink); }
.menu-btn svg { margin: auto; }
@media (max-width: 719px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--ground); border-bottom: 1px solid var(--line); padding: var(--s2) var(--s4) var(--s4); }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: var(--s3) 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: var(--s4); justify-content: center; }
}

/* ---------- Hero ---------- */
.hero { padding: var(--s7) 0 var(--s8); }
.hero-grid { display: grid; gap: var(--s6); align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: 1fr 1.15fr; gap: var(--s7); } }
.hero-art { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 4px solid var(--paper); background: #A9D8F0; }
.hero-art img { width: 100%; height: auto; }
.tags { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s4); }
.tag { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: 14px; padding: 4px 12px; border-radius: 999px; background: var(--leaf-soft); color: #1C5A36; }
.tag-wt { background: #FBEBC0; color: #6B4A00; }
.tag-pot { background: var(--pot-soft); color: var(--pot-deep); }
.tag .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.lede { font-size: 20px; color: var(--ink-soft); max-width: 36ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s5); }
.small-print { font-size: 15px; color: var(--ink-soft); margin-top: var(--s4); }

/* ---------- Sections ---------- */
section { scroll-margin-top: 80px; }
.section { padding: var(--s8) 0; }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: var(--s3) var(--s4); margin-bottom: var(--s6); }
.section-head h2 { margin: 0; }
.section-head p { margin: 0; color: var(--ink-soft); max-width: 46ch; }

/* ---------- Seed-packet boss cards ---------- */
.packets { display: grid; gap: var(--s4); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .packets { grid-template-columns: repeat(3, 1fr); gap: var(--s5); } }
.packet { --bloom: var(--daisy); --on-bloom: var(--ink); background: var(--paper); border-radius: 10px 10px var(--radius) var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.packet-top { background: var(--bloom); color: var(--on-bloom); padding: 10px var(--s4) 12px; font-family: var(--font-display); font-weight: 600; font-size: 15px; line-height: 1.2; display: flex; justify-content: space-between; gap: var(--s2); border-bottom: 3px dashed rgba(0, 0, 0, .18); }
.packet-top .num { opacity: .8; }
.packet .art { aspect-ratio: 1 / 1; overflow: hidden; }
.packet .art img { width: 100%; height: 100%; object-fit: cover; }
.packet .body { padding: var(--s4); flex: 1; display: flex; flex-direction: column; }
.packet h3 { font-size: 20px; margin-bottom: var(--s1); }
.packet p { color: var(--ink-soft); font-size: 15px; margin-bottom: var(--s3); }
.petal { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 800; color: var(--ink-soft); }
.petal i { width: 14px; height: 14px; border-radius: 50% 0; background: var(--bloom); border: 1.5px solid rgba(0, 0, 0, .25); transform: rotate(45deg); }
.packet.sunflower { --bloom: var(--sunflower); }
.packet.rose { --bloom: var(--rose); --on-bloom: #fff; }
.packet.lily { --bloom: var(--lily); }
.packet.corpse { --bloom: var(--corpse); --on-bloom: #fff; }
.packet.perennial { --bloom: var(--perennial); --on-bloom: #fff; background: #F4F6F3; }
@media (max-width: 480px) {
  .packet-top { flex-direction: column; gap: 2px; font-size: 14px; padding: 8px 12px 10px; }
  .packet .body { padding: var(--s3); }
  .packet h3 { font-size: 18px; }
  .packet p { font-size: 14px; }
}
.hub-note { margin-top: var(--s5); display: flex; gap: var(--s4); align-items: center; background: var(--paper); border-radius: var(--radius); padding: var(--s4) var(--s5); color: var(--ink-soft); }
.hub-note strong { color: var(--ink); }
.hub-note p { margin: 0; }
.hub-note svg { width: 36px; height: 36px; flex: none; color: var(--leaf); }

/* ---------- Feature blocks ---------- */
.features { display: grid; gap: var(--s4); }
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); gap: var(--s5); } }
@media (min-width: 1024px) { .features.four { grid-template-columns: repeat(4, 1fr); } .features.three { grid-template-columns: repeat(3, 1fr); } }
.feature { background: var(--paper); border-radius: var(--radius); padding: var(--s5); box-shadow: var(--shadow); }
.feature .ico { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: var(--s4); }
.feature .ico svg { width: 28px; height: 28px; }
.feature h3 { margin-bottom: var(--s2); }
.feature p { color: var(--ink-soft); margin: 0; font-size: 16px; }
.ico-pot { background: var(--pot-soft); color: var(--pot-deep); }
.ico-leaf { background: var(--leaf-soft); color: var(--leaf); }
.ico-sun { background: #FBEBC0; color: #7A5600; }
.ico-rose { background: #F7DCE2; color: #A11E3E; }

/* ---------- Games grid ---------- */
.games { display: grid; gap: var(--s5); grid-template-columns: 1fr; }
@media (min-width: 640px) { .games { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .games { grid-template-columns: repeat(3, 1fr); } }
.game-card { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; color: inherit; text-decoration: none; transition: transform .15s ease; }
a.game-card:hover { transform: translateY(-4px); }
.game-card .thumb { aspect-ratio: 4 / 3; overflow: hidden; }
.game-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.game-card .body { padding: var(--s5); display: flex; flex-direction: column; flex: 1; }
.game-card h3 { margin-bottom: var(--s2); }
.game-card p { color: var(--ink-soft); margin-bottom: var(--s4); }
.game-card .more { margin-top: auto; font-weight: 800; color: var(--pot); }
.game-card.muted .more { color: var(--ink-soft); }

/* ---------- Studio ---------- */
.studio { background: var(--paper); border-radius: var(--radius-lg); padding: var(--s7) var(--s5); display: grid; gap: var(--s6); }
@media (min-width: 900px) { .studio { grid-template-columns: 1.2fr 1fr; padding: var(--s8); align-items: center; } }
.studio p { font-size: 18px; color: var(--ink-soft); max-width: 52ch; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.facts li { display: flex; gap: var(--s4); align-items: center; padding: var(--s4); border-radius: 14px; background: var(--ground); font-weight: 700; }
.facts .ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; }
.facts .ico svg { width: 24px; height: 24px; }

/* ---------- Community ---------- */
.community { background: var(--ink); color: #fff; border-radius: var(--radius-lg); padding: var(--s7) var(--s5); position: relative; overflow: hidden; }
@media (min-width: 900px) { .community { padding: var(--s8); } }
.community h2 { color: #fff; max-width: 18ch; }
.community > p { color: #CFE3D6; font-size: 18px; max-width: 46ch; }
.community .deco { position: absolute; right: -30px; bottom: -40px; width: 220px; opacity: .22; pointer-events: none; }
.channels { display: grid; gap: var(--s4); margin-top: var(--s6); position: relative; }
@media (min-width: 720px) { .channels { grid-template-columns: repeat(2, 1fr); } }
.channel { display: flex; gap: var(--s4); align-items: center; padding: var(--s5); border-radius: var(--radius); text-decoration: none; color: #fff; transition: transform .15s ease; }
.channel:hover { transform: translateY(-3px); }
.channel svg { width: 40px; height: 40px; flex: none; }
.channel strong { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.channel span { color: rgba(255, 255, 255, .85); font-size: 16px; }
.channel .arrow { margin-left: auto; font-size: 24px; }
.channel-discord { background: var(--discord); }
.channel-x { background: #000; border: 1px solid #3A4F42; }

/* ---------- Game page ---------- */
.crumbs { font-size: 15px; margin: var(--s5) 0 0; color: var(--ink-soft); }
.crumbs a { color: var(--ink-soft); }
.info-list { display: grid; grid-template-columns: auto 1fr; gap: var(--s2) var(--s5); margin: var(--s5) 0 0; font-size: 16px; }
.info-list dt { font-weight: 800; }
.info-list dd { margin: 0; color: var(--ink-soft); }

.loop { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); counter-reset: step; }
@media (min-width: 900px) { .loop { grid-template-columns: repeat(5, 1fr); } }
.loop li { counter-increment: step; position: relative; background: var(--paper); border-radius: var(--radius); padding: var(--s4) var(--s4) var(--s4) 64px; box-shadow: var(--shadow); font-weight: 700; min-height: 72px; display: flex; flex-direction: column; justify-content: center; }
.loop li::before { content: counter(step); position: absolute; left: var(--s4); top: 50%; transform: translateY(-50%); width: 36px; height: 36px; border-radius: 50%; background: var(--pot); color: #fff; font-family: var(--font-display); display: grid; place-items: center; }
.loop li span { font-weight: 400; font-size: 15px; color: var(--ink-soft); }
@media (min-width: 900px) {
  .loop li { padding: var(--s5) var(--s4) var(--s4); justify-content: flex-start; }
  .loop li::before { position: static; transform: none; margin-bottom: var(--s3); }
  .loop li:not(:last-child)::after { content: "\2192"; position: absolute; right: -16px; top: 30px; font-size: 20px; color: var(--pot); z-index: 1; }
}
.loop-back { margin-top: var(--s4); color: var(--ink-soft); font-size: 16px; }

.currencies { display: grid; gap: var(--s3); margin-top: var(--s5); }
@media (min-width: 760px) { .currencies { grid-template-columns: repeat(3, 1fr); } }
.currency { display: flex; gap: var(--s3); align-items: flex-start; background: var(--paper); border-radius: 14px; padding: var(--s4); font-size: 15px; color: var(--ink-soft); }
.currency strong { display: block; color: var(--ink); font-size: 17px; }
.currency svg { width: 32px; height: 32px; flex: none; }

.enemies { display: grid; gap: var(--s4); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .enemies { grid-template-columns: repeat(5, 1fr); } }
.enemy { background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.enemy img { width: 100%; aspect-ratio: 1 / 1; }
.enemy div { padding: var(--s3) var(--s4) var(--s4); }
.enemy h3 { font-size: 18px; margin-bottom: 2px; }
.enemy p { font-size: 15px; color: var(--ink-soft); margin: 0; }

.guns { display: grid; gap: var(--s3); grid-template-columns: 1fr; }
@media (min-width: 640px) { .guns { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .guns { grid-template-columns: repeat(3, 1fr); } }
.gun { display: flex; gap: var(--s4); align-items: center; background: var(--paper); border-radius: var(--radius); padding: var(--s4); box-shadow: var(--shadow); }
.gun .n { flex: none; width: 44px; height: 44px; border-radius: 12px; background: var(--pot-soft); color: var(--pot-deep); font-family: var(--font-display); font-weight: 600; font-size: 20px; display: grid; place-items: center; }
.gun h3 { font-size: 19px; margin: 0; }
.gun p { margin: 0; font-size: 15px; color: var(--ink-soft); }
.gun.big .n { background: var(--pot); color: #fff; }

.armour { display: grid; gap: var(--s5); }
@media (min-width: 900px) { .armour { grid-template-columns: 1fr 1.4fr; align-items: start; } }
.slots { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s3); }
.slot { background: var(--paper); border-radius: 14px; padding: var(--s4); font-weight: 800; display: flex; align-items: center; gap: var(--s3); }
.slot svg { width: 28px; height: 28px; color: var(--leaf); flex: none; }
.tiers { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s2); }
.tiers li { display: flex; align-items: center; gap: var(--s3); background: var(--paper); border-radius: 12px; padding: 10px var(--s4); font-weight: 700; }
.tiers i { width: 28px; height: 28px; border-radius: 8px; border: 2px solid rgba(0, 0, 0, .15); flex: none; }
.tiers .sw-canvas { background: #D8C9A8; }
.tiers .sw-daisy { background: var(--daisy); }
.tiers .sw-sunflower { background: var(--sunflower); }
.tiers .sw-rose { background: var(--rose); }
.tiers .sw-lily { background: var(--lily); }
.tiers .sw-corpse { background: var(--corpse); }
.tiers small { margin-left: auto; color: var(--ink-soft); font-weight: 400; font-size: 14px; text-align: right; }

/* ---------- Footer ---------- */
.site-footer { margin-top: var(--s8); padding: var(--s7) 0 var(--s6); border-top: 1px solid var(--line); }
.footer-grid { display: flex; flex-wrap: wrap; gap: var(--s5); justify-content: space-between; align-items: center; }
.socials { display: flex; flex-wrap: wrap; gap: var(--s2); list-style: none; padding: 0; margin: 0; }
.socials a { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--paper); color: var(--ink); border: 1px solid var(--line); transition: background .15s, color .15s; }
.socials a:hover { background: var(--ink); color: #fff; }
.socials svg { width: 20px; height: 20px; }
.legal { margin-top: var(--s5); font-size: 14px; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: var(--s2) var(--s5); justify-content: space-between; }
.legal a { color: var(--ink-soft); }

/* prod: 404 page */
.not-found { text-align: center; }
.not-found img { width: 160px; height: 160px; margin: 0 auto var(--s5); }
.not-found p { color: var(--ink-soft); font-size: 18px; max-width: 40ch; margin-left: auto; margin-right: auto; }
.not-found .cta-row { justify-content: center; }

/* prod: smooth in-page scrolling, and no motion at all for people who ask for less */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .btn:hover, a.game-card:hover, .channel:hover { transform: none; }
}
