/* Arch Enemy Games. Colors, type and the sticker look all come from
   brand/brand-guidelines.md in the project folder: change them there first. */
:root {
  --gold: #FEB420;
  --ink: #1A1206;
  --cream: #FFF6E0;
  --white: #FFFFFF;
  --blue: #2C7CF2;
  --deep: #1F6BDB;
  --muted: rgba(26, 18, 6, 0.75);
  --outline: -2px -2px 0 var(--ink), 2px -2px 0 var(--ink), -2px 2px 0 var(--ink), 2px 2px 0 var(--ink), 4px 5px 0 var(--ink);
  --display: 'Lilita One', 'Arial Rounded MT Bold', sans-serif;
  --body: 'IBM Plex Sans', system-ui, sans-serif;
  /* Motion: strong ease-out for anything that responds to a press or hover */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

* { box-sizing: border-box; }
html { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scrollbar-color: var(--ink) var(--cream); }
::selection { background: var(--gold); color: var(--ink); }
.ranch ::selection { background: var(--mmm-lime); color: var(--mmm-brown); }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--ink); text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
a:hover { color: var(--deep); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1; margin: 0; }
h1 { font-size: clamp(48px, 8vw, 96px); line-height: 0.95; letter-spacing: -0.01em; text-wrap: balance; }
h2 { font-size: clamp(36px, 5vw, 64px); text-wrap: balance; }
h3 { font-size: 26px; }
p { margin: 0; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.band { border-top: 4px solid var(--ink); border-bottom: 4px solid var(--ink); }
.band + .band { border-top: 0; }
.lead { font-size: 19px; max-width: 36rem; margin-top: 18px; }
.intro { margin-top: 10px; max-width: 40rem; }
.split { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; }
.split > * { flex: 1 1 440px; min-width: 0; }
.grid { display: grid; gap: 28px; margin-top: 40px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.grid-one { grid-template-columns: minmax(0, 380px); }
.grid.grid-pair { margin-top: 0; gap: 48px; }
.section.section-tight { padding-bottom: 24px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--white); padding: 8px 12px; z-index: 10; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.site-header :focus-visible, .site-footer :focus-visible, .hero :focus-visible, .deep-band :focus-visible { outline-color: var(--gold); }

/* Header and footer */
.site-header { background: var(--deep); color: var(--white); border-bottom: 4px solid var(--ink); }
.site-footer { background: var(--ink); color: var(--cream); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px 24px; padding-top: 10px; padding-bottom: 10px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--gold); }
.brand img { width: 64px; height: 64px; }
.brand span { font-family: var(--display); font-size: 26px; letter-spacing: 0.02em; text-shadow: var(--outline); }
.brand:hover { color: var(--gold); }
.nav { display: flex; flex-wrap: wrap; gap: 0 24px; font-weight: 600; font-size: 15px; }
.nav a { color: var(--white); text-decoration: none; padding: 10px 0; display: inline-block; }
.site-footer a { color: var(--cream); text-decoration: none; padding: 10px 0; display: inline-block; }
.nav a:hover, .site-footer a:hover { color: var(--gold); text-decoration: underline; }
.site-footer .wrap {
  display: flex; flex-wrap: wrap; gap: 16px 24px; justify-content: space-between;
  align-items: center; padding-top: 40px; padding-bottom: 40px; font-size: 15px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 20px; }

/* Buttons and stats */
.btn {
  display: inline-block; text-decoration: none; font: inherit; font-weight: 700;
  padding: 14px 24px; border-radius: 14px; border: 3px solid var(--ink);
  background: var(--white); color: var(--ink); box-shadow: 5px 5px 0 var(--ink);
  cursor: pointer; touch-action: manipulation;
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), background-color 160ms ease, color 160ms ease;
}
.btn:hover { color: var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--ink); }
  }
/* Pressing pushes the sticker flat onto the page, on pointer-down and with no wait */
.btn:active { transform: translate(5px, 5px); box-shadow: 0 0 0 var(--ink); transition-duration: 80ms; }
.btn:disabled { opacity: .65; cursor: progress; transform: none; }
.btn-gold { background: var(--gold); }
.btn-ink { background: var(--ink); color: var(--cream); box-shadow: none; }
.btn-ink:hover { color: var(--cream); box-shadow: none; transform: none; background: var(--deep); }
.btn-ghost { background: transparent; color: var(--white); border-color: var(--white); box-shadow: none; }
.btn-ghost:hover { color: var(--cream); background: rgba(255,255,255,.08); transform: none; box-shadow: none; }
.btn-ink:active, .btn-ghost:active { transform: scale(0.97); box-shadow: none; }
.btn-pill { border-radius: 999px; padding: 10px 20px; font-size: 15px; box-shadow: none; border-color: var(--ink); background: var(--gold); box-shadow: 3px 3px 0 var(--ink); }
.buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.stat { background: var(--cream); color: var(--ink); border: 3px solid var(--ink); border-radius: 14px; padding: 10px 18px; }
.stat small { display: block; font-size: 13px; font-weight: 600; }
.stat strong { font-family: var(--display); font-weight: 400; font-size: 28px; font-variant-numeric: tabular-nums; }

/* Cards */
.card {
  background: var(--white); border: 3px solid var(--ink); border-radius: 18px;
  box-shadow: 6px 6px 0 var(--ink); overflow: hidden; display: flex; flex-direction: column;
}
.card-body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-bottom: 3px solid var(--ink); }
.card h3.post { font-family: var(--body); font-weight: 700; font-size: 21px; line-height: 1.3; }
.card .meta { font-size: 14px; font-weight: 600; color: var(--muted); }
.card .more { font-weight: 700; margin-top: auto; padding-top: 6px; }

/* Moo Moo Martian sections use the game's own look (brand/moo-moo-martian/brand-guidelines.md) */
.ranch {
  --mmm-lime: #BBEA22; --mmm-green: #1A6C1B; --mmm-brown: #4B2D1F; --mmm-beam: #A4C3E3;
  background: var(--mmm-beam); color: var(--mmm-brown);
}
.ranch h1, .ranch h2 { font-family: 'Fredoka', var(--display); font-weight: 700; color: var(--mmm-lime);
  text-shadow: -2px -2px 0 var(--mmm-green), 2px -2px 0 var(--mmm-green), -2px 2px 0 var(--mmm-green), 2px 2px 0 var(--mmm-green), 3px 5px 0 var(--mmm-green); }
.ranch .btn, .ranch .stat { border-color: var(--mmm-brown); color: var(--mmm-brown); }
.ranch .btn { box-shadow: 5px 5px 0 var(--mmm-brown); }
.ranch .btn:active { box-shadow: 0 0 0 var(--mmm-brown); }
.ranch .btn:hover { box-shadow: 3px 3px 0 var(--mmm-brown); }
.ranch .btn-gold { background: var(--mmm-lime); }
.ranch .btn-ghost { background: var(--white); }
.ranch :focus-visible { outline-color: var(--mmm-brown); }
.ranch-hero { border-bottom: 4px solid var(--ink); }
.ranch .logo-col { display: flex; justify-content: center; position: relative; }
/* "Coming to Kickstarter" is a sticker slapped on the logo, not a label over the heading */
.sticker {
  position: absolute; top: 4%; right: 2%; z-index: 1; width: clamp(104px, 11vw, 136px); aspect-ratio: 1;
  display: grid; place-items: center; text-align: center; padding: 12px;
  background: var(--mmm-lime); color: var(--mmm-brown); border: 3px solid var(--mmm-brown); border-radius: 50%;
  box-shadow: 4px 4px 0 var(--mmm-brown); transform: rotate(12deg);
  font-family: 'Fredoka', var(--display); font-weight: 700; font-size: clamp(15px, 1.5vw, 19px); line-height: 1.05;
  transition: transform 520ms cubic-bezier(0.34, 1.4, 0.64, 1) 250ms, opacity 200ms ease 250ms;
}
/* The page's one authored moment: the sticker gets slapped onto the logo as it loads */
@starting-style { .sticker { opacity: 0; transform: rotate(-8deg) scale(1.35); } }
.ranch .logo-col img { width: 100%; max-width: 540px; }

/* Hero */
.hero { padding: 72px 0 80px; background: var(--blue); color: var(--white); }
.hero h1 { text-shadow: 4px 5px 0 var(--ink); }
.hero .lead { font-size: 24px; font-weight: 600; text-shadow: 2px 2px 0 var(--ink); }
.hero .logo-col { display: flex; justify-content: center; }
.hero .logo-col img { width: 100%; max-width: 480px; }

/* Game shelf */
.shelf-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 20px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button {
  font: inherit; font-size: 14px; font-weight: 700; min-height: 44px; padding: 10px 16px;
  border-radius: 999px; border: 2px solid var(--ink); background: var(--white); color: var(--ink); cursor: pointer;
}
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--cream); }
.game { text-decoration: none; color: var(--ink); }
.game:hover { color: var(--ink); }
.game, .link-list a { transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), background-color 160ms ease; }
@media (hover: hover) and (pointer: fine) {
  .game:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--ink); }
}
.game:active, .link-list a:active { transform: scale(0.98); transition-duration: 80ms; }
.game[hidden] { display: none; }
.cover {
  aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 16px; font-family: var(--display); font-size: 34px; line-height: 1;
  border-bottom: 3px solid var(--ink);
}
.cover img { width: 100%; height: 100%; object-fit: contain; }
.game .title { font-family: var(--display); font-size: 28px; line-height: 1.05; }
.game .meta { font-size: 13px; font-weight: 600; color: var(--muted); }
.tag {
  align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 12px; border-radius: 999px; border: 2px solid var(--ink);
}
.tag-idea { background: var(--white); }
.tag-design { background: var(--cream); }
.tag-playtesting { background: var(--deep); color: var(--white); }
.tag-kickstarter { background: var(--gold); }
.tag-shelves { background: var(--ink); color: var(--cream); }

/* Workshop, playtest, partners, about, newsletter */
.cream-band { background: var(--cream); }
.deep-band { background: var(--deep); color: var(--white); }
.deep-band h2 { color: var(--gold); text-shadow: var(--outline); }
.deep-band .card { box-shadow: none; background: var(--cream); color: var(--ink); padding: 28px; gap: 10px; }
.deep-band .card p { font-size: 15px; }
.panel {
  background: var(--gold); border: 4px solid var(--ink); border-radius: 24px; box-shadow: 8px 8px 0 var(--ink);
  padding: 48px clamp(20px, 4vw, 56px); display: flex; flex-wrap: wrap; gap: 40px; align-items: center;
}
.panel > .cow { flex: 0 0 auto; width: 180px; }
.panel > div, .panel > form { flex: 1 1 340px; min-width: 0; }
.photo-frame { border: 4px solid var(--ink); border-radius: 24px; box-shadow: 8px 8px 0 var(--ink); aspect-ratio: 1 / 1; object-fit: cover; }
.about .photo-frame { flex: 0 1 340px; }
.gold-band { background: var(--gold); border-top: 4px solid var(--ink); }
.gold-band .wrap { padding-top: 64px; padding-bottom: 64px; }

/* Forms */
form.stack { display: flex; flex-direction: column; gap: 10px; }
form.inline { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
form.inline .field { flex: 1 1 240px; display: flex; flex-direction: column; gap: 6px; }
label { font-weight: 700; }
input, select {
  font: inherit; caret-color: var(--deep); accent-color: var(--deep); padding: 14px 16px; border: 3px solid var(--ink); border-radius: 12px;
  background: var(--white); color: var(--ink); width: 100%;
}
.form-note { font-size: 15px; font-weight: 600; min-height: 1.5em; flex-basis: 100%; }
.form-note[data-state="error"] { text-decoration: underline wavy var(--deep) 2px; text-underline-offset: 0.3em; }
input::placeholder { color: var(--muted); opacity: 1; }
input:hover, select:hover { border-color: var(--deep); }
input, select { transition: border-color 160ms ease; }
/* Flag a mistyped email once the person has left the field, not while they type */
input:user-invalid { border-color: var(--deep); border-style: dashed; }
.hp { position: absolute; left: -9999px; }

/* Game page */
.steps { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.steps li { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: 16px; border: 3px solid var(--ink); background: var(--white); }
.steps li span:first-child { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.steps li strong { font-family: var(--display); font-weight: 400; font-size: 26px; line-height: 1.05; }
.steps li small { font-size: 14px; }
.steps .done { background: var(--cream); }
.steps .now { background: var(--gold); box-shadow: 5px 5px 0 var(--ink); }
.steps .next { border-style: dashed; color: var(--muted); }
.how-art { height: 96px; width: auto; align-self: flex-start; margin-bottom: 8px; }
.how .card { padding: 28px; }
.how .card p { margin-top: 8px; }
.win { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; background: var(--cream); border: 3px solid var(--ink); border-radius: 18px; padding: 24px 28px; }
.win strong { font-family: var(--display); font-weight: 400; font-size: 26px; }
.win span { flex: 1 1 400px; }
.gallery img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border: 3px solid var(--ink); border-radius: 18px; background: var(--white); }
.box-list { list-style: none; padding: 0; margin: 24px 0 0; }
.box-list strong { font-variant-numeric: tabular-nums; }
.box-list li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 2px solid var(--ink); }
.link-list { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 12px; }
.link-list a { display: block; background: var(--white); border: 3px solid var(--ink); border-radius: 14px; padding: 14px 18px; font-weight: 700; text-decoration: none; }
.link-list a:hover { background: var(--gold); color: var(--ink); }

/* Game page cast and town */
.cast { display: grid; gap: 24px; margin-top: 36px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.cast-card { margin: 0; background: var(--white); border: 3px solid #4B2D1F; border-radius: 18px; box-shadow: 6px 6px 0 #4B2D1F; overflow: hidden; display: flex; flex-direction: column; }
.cast-art { background: #A4C3E3; border-bottom: 3px solid #4B2D1F; height: 260px; display: flex; align-items: flex-end; justify-content: center; padding: 20px 16px 12px; }
.cast-art img { max-height: 100%; width: auto; object-fit: contain; }
.cast-card figcaption { padding: 16px 18px 20px; font-size: 15px; color: #4B2D1F; }
.cast-card strong { display: block; font-family: 'Fredoka', var(--display); font-weight: 700; font-size: 24px; line-height: 1.1; margin-bottom: 4px; }
.town { margin-top: 40px; display: flex; align-items: flex-end; justify-content: center; gap: clamp(4px, 1vw, 14px); background: #A4C3E3; border: 3px solid #4B2D1F; border-radius: 24px; padding: 24px 16px 0; overflow: hidden; }
.town img { width: calc((100% - 6 * 14px) / 7.6); height: auto; flex: 0 1 auto; min-width: 0; }
.town img.tall { width: calc((100% - 6 * 14px) / 12.5); }

@media (max-width: 640px) {
  .section { padding: 64px 0; }
  .brand span { font-size: 20px; }
  .brand img { width: 48px; height: 48px; }
  .site-header .wrap { gap: 4px 16px; }
  .site-header .nav { order: 3; flex-basis: 100%; justify-content: space-between; gap: 0 12px; }
  .site-header .btn-pill { padding: 8px 14px; font-size: 14px; }
  .stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; }
  .stat strong { font-size: 23px; white-space: nowrap; }
  .stat:nth-child(n+4) { grid-column: 1 / -1; }
  .buttons .btn { flex: 1 1 auto; text-align: center; }
  .panel > .cow { width: 120px; }
  .sticker { top: -2%; right: 0; width: 96px; font-size: 14px; padding: 8px; }
  .how-art { height: 72px; }
  .cast { grid-template-columns: 1fr 1fr; gap: 14px; }
  .cast-art { height: 160px; padding: 12px 8px 8px; }
  .cast-card figcaption { padding: 12px; font-size: 14px; }
  .cast-card strong { font-size: 19px; }
}
@media (max-width: 420px) {
  /* The small logo already carries the wordmark, so the text drops to keep the header on one row */
  .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .brand img { width: 56px; height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  /* Keep the color feedback, drop the movement */
  .btn, .game, .link-list a { transition-property: background-color, color; }
  .btn:hover, .btn:active, .game:hover, .game:active, .link-list a:active { transform: none; }
  .sticker { transition: opacity 200ms ease; }
  @starting-style { .sticker { opacity: 0; transform: rotate(12deg); } }
}

/* Readable by screen readers, invisible on screen */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
