/* Rubbish Games: site styles. Mobile first; no framework. */

@font-face {
  font-family: "Fredoka";
  src: url("../fonts/Fredoka-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("../fonts/Fredoka-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  --soil: #3b2417;       /* the game logo's outline */
  --soil-soft: #5c3d2b;
  --leaf: #77b843;
  --leaf-pale: #e5f2d6;
  --honey: #f4b63d;
  --honey-pale: #fdedc6;
  --blue: #1e50b4;       /* the campaign team colour (30, 80, 180) */
  --cream: #fdf8ec;
  --card: #ffffff;
  --text: #2e1c12;
  --muted: #5c4636;
  --radius: 18px;
  --outline: 3px solid var(--soil);
  --shadow: 0 5px 0 var(--soil);
  --head: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img, video { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--head);
  font-weight: 600;
  line-height: 1.15;
  color: var(--soil);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 6vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

a { color: var(--blue); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--soil); color: #fff; padding: .6rem 1rem; border-radius: 10px;
  font-family: var(--head); text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- Header ---------- */

.site-header {
  background: var(--cream);
  border-bottom: var(--outline);
}
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .5rem 1rem; padding-block: .75rem;
}

/* The studio logo slot. Today it holds a text wordmark; swap the <span> for an <img> when the logo is ready. */
.studio-mark {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--head); font-weight: 600; font-size: 1.5rem; letter-spacing: .01em;
  color: var(--soil); text-decoration: none; line-height: 1;
}
.studio-mark img { height: 44px; width: auto; }
.studio-mark .wordmark-dot {
  width: .55em; height: .55em; border-radius: 50%;
  background: var(--leaf); border: 3px solid var(--soil);
}

.site-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: .25rem .4rem;
}
.site-nav a {
  display: inline-block; padding: .4rem .7rem; border-radius: 999px;
  font-family: var(--head); font-weight: 500; color: var(--soil); text-decoration: none;
}
.site-nav a:hover { background: var(--honey-pale); }
.site-nav a[aria-current="page"] { background: var(--leaf-pale); box-shadow: inset 0 0 0 2px var(--soil); }

/* ---------- Buttons ---------- */

.btn-row { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .7rem 1.3rem;
  font-family: var(--head); font-weight: 600; font-size: 1.1rem;
  color: var(--soil); background: var(--honey);
  border: var(--outline); border-radius: 999px; box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform .1s ease, box-shadow .1s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--soil); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--soil); }
.btn.leaf { background: var(--leaf); }
.btn.plain { background: var(--card); }
/* Official brand marks: shown unaltered (Discord: black symbol from discord.com/branding). */
.btn-icon { width: 1.35em; height: auto; flex: none; }

.btn .soon {
  font-size: .75rem; font-weight: 500; padding: .1rem .45rem; border-radius: 999px;
  background: var(--soil); color: #fff;
}

/* ---------- Hero ---------- */

.hero { position: relative; border-bottom: var(--outline); background: #9cc9ec; }
.hero > picture img {
  width: 100%; height: clamp(380px, 62vw, 720px); object-fit: cover; object-position: 50% 70%;
}
.hero-content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
  padding: clamp(1rem, 4vw, 3rem) 1rem; text-align: center;
}
.hero-logo { width: min(78vw, 480px); filter: drop-shadow(0 6px 0 rgba(59, 36, 23, .35)); }
.hero-tag {
  margin-top: .75rem; display: inline-block;
  background: var(--cream); border: var(--outline); border-radius: 999px;
  padding: .35rem 1rem; font-family: var(--head); font-weight: 600; color: var(--soil);
}

/* ---------- Sections ---------- */

.section { padding-block: clamp(2.5rem, 7vw, 4.5rem); }
.section.alt { background: var(--leaf-pale); border-block: var(--outline); }
.section.honey { background: var(--honey-pale); border-block: var(--outline); }
.lede { font-size: 1.2rem; max-width: 62ch; }
.narrow { max-width: 68ch; }

.ant-trail {
  height: 10px; border: 0; margin: 0;
  background: radial-gradient(circle, var(--soil) 2.5px, transparent 3px) 0 50% / 22px 10px repeat-x;
  opacity: .45;
}

.card {
  background: var(--card); border: var(--outline); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.25rem 1.25rem 1rem;
}

.split { display: grid; gap: 2rem; align-items: center; }

.features { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.features li { padding-left: 2.1rem; position: relative; }
.features li::before {
  content: ""; position: absolute; left: 0; top: .2em;
  width: 1.3rem; height: 1.3rem; border-radius: 50%;
  background: var(--leaf); border: 3px solid var(--soil);
}
.features strong { font-family: var(--head); font-weight: 600; color: var(--soil); }

/* Gallery */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.gallery figure { margin: 0; }
.gallery img, .media-frame {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border: var(--outline); border-radius: var(--radius); box-shadow: var(--shadow); background: #cfe3b8;
}
.gallery a { display: block; border-radius: var(--radius); }
.gallery figcaption { font-size: .95rem; color: var(--muted); margin-top: .6rem; }

.video-wrap { position: relative; }
.video-wrap video { width: 100%; }

.captain-figure { max-width: 360px; margin: 0 auto; }

/* Fact sheet */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.25rem; margin: 0; }
.facts dt { font-family: var(--head); font-weight: 600; color: var(--soil); }
.facts dd { margin: 0; }

.notice {
  border-left: 6px solid var(--honey); background: var(--honey-pale);
  padding: .8rem 1rem; border-radius: 0 12px 12px 0;
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--soil); color: #f6ecdc; padding-block: 2.5rem; margin-top: 0;
}
.site-footer a { color: #ffe6a6; }
.site-footer .studio-mark { color: #fff; }
.site-footer .studio-mark .wordmark-dot { border-color: #fff; }
.footer-grid { display: grid; gap: 1.5rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.small { font-size: .9rem; }

/* ---------- Wider screens ---------- */

@media (min-width: 720px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
  .split { grid-template-columns: 1.2fr 1fr; gap: 3rem; }
  .split.flip > :first-child { order: 2; }
  .features { grid-template-columns: repeat(2, 1fr); gap: 1.25rem 2rem; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media (forced-colors: active) {
  .btn, .card { border: 2px solid ButtonText; }
}
