/* Forged of Blood. Mobile-first: base styles are for phones,
   the media queries at the end add the wider layouts. */

@font-face { font-family: "Amiri"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/amiri-400.woff2") format("woff2"); }
@font-face { font-family: "Amiri"; font-weight: 400; font-style: italic; font-display: swap; src: url("/fonts/amiri-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Amiri"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/amiri-700.woff2") format("woff2"); }
@font-face { font-family: "Mirza"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/mirza-500.woff2") format("woff2"); }
@font-face { font-family: "Mirza"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/mirza-700.woff2") format("woff2"); }

:root {
  --parchment: #f0eade;
  --ink: #111111;
  --muted: #5c574c;
  --gold: #d8b63a;
  --gold-dark: #9a7d1c;
  --rust: #7a3510;
  --olive: #a39765;
  --night: #111111;
  --stone: #1b1b1b;
  --line: #d9d0bb;
  --width: 1100px;
  --text-width: 760px;
  --serif: "Amiri", Garamond, Georgia, serif;
  --display: "Mirza", Garamond, Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--parchment);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--serif);
}
img, video { max-width: 100%; height: auto; }
img { display: block; }
a { color: var(--rust); }
a:hover { color: var(--gold-dark); }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.25; }
.wrap { width: min(100% - 2.5rem, var(--width)); margin-inline: auto; }
.narrow { width: min(100% - 2.5rem, var(--text-width)); margin-inline: auto; }
.center { text-align: center; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 20; padding: .5rem 1rem; background: #fff; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--night); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.brand img { width: 120px; height: 40px; }
.menu-button {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem .75rem; border: 1px solid #444; border-radius: 4px;
  background: none; color: #eee; font: 500 1rem var(--display); cursor: pointer;
}
.menu-button span, .menu-button span::before, .menu-button span::after {
  display: block; width: 18px; height: 2px; background: currentColor; content: ""; position: relative;
}
.menu-button span::before { position: absolute; top: -6px; }
.menu-button span::after { position: absolute; top: 6px; }
.site-nav ul { margin: 0; padding: 0; list-style: none; }
.site-nav a { display: block; color: #e8e2d2; text-decoration: none; font-size: 1.05rem; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--gold); }
/* Phones: the menu opens as a list under the header. Without JavaScript it stays open. */
.js .site-nav { display: none; }
.js .site-nav.open { display: block; }
.site-nav { position: absolute; top: 100%; left: 0; right: 0; background: var(--night); border-top: 1px solid #2a2a2a; }
.site-nav li a { padding: .8rem 1.25rem; border-bottom: 1px solid #222; }
.no-js .menu-button { display: none; }
.no-js .site-nav { position: static; }

/* Footer */
.site-footer { margin-top: 4rem; padding: 2rem 0; background: var(--night); color: #efefef; text-align: center; font-size: .9rem; }
.site-footer p { margin: 0 0 1rem; }
.social { display: flex; justify-content: center; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.social a { color: #bfbfbf; }
.social a:hover { color: var(--gold); }
.social svg { width: 20px; height: 20px; fill: currentColor; }

/* Buttons */
.button {
  display: inline-block; padding: .65rem 1.4rem; border-radius: 3px;
  background: var(--gold); color: var(--ink); font: 700 1rem var(--display); text-decoration: none;
}
.button:hover { background: #e7c95a; color: var(--ink); }

/* Embeds: YouTube opens on click, iframes and videos scale with the page */
.youtube { position: relative; display: block; aspect-ratio: 16 / 9; margin: 1.5rem 0; background: #000; overflow: hidden; }
.youtube img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.youtube::after {
  content: ""; position: absolute; inset: 50% auto auto 50%; width: 68px; height: 48px;
  translate: -50% -50%; border-radius: 12px; background: #c4302b url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center / 28px no-repeat;
}
.youtube:hover::after { background-color: #e62117; }
.youtube.playing::after { display: none; }
.youtube iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
iframe { max-width: 100%; border: 0; }
.prose iframe[src*="steampowered"], .steam { display: block; width: 100%; max-width: 646px; height: 190px; margin: 1.5rem auto; }
.prose iframe[src*="soundcloud"] { width: 100%; }

/* Article text */
.prose { font-size: 1.0625rem; }
.prose a { overflow-wrap: anywhere; }  /* Long URLs must not push the page sideways. */
.prose p, .prose ul, .prose ol, .prose blockquote { margin: 0 0 1.1em; }
.prose h2, .prose h3, .prose h4 { margin: 1.6em 0 .6em; }
.prose h2 { font-size: 1.6rem; color: var(--gold-dark); }
.prose h3 { font-size: 1.3rem; }
.prose img, .prose video { margin: 1.5rem auto; }
.prose blockquote { padding-left: 1rem; border-left: 3px solid var(--olive); color: var(--muted); font-style: italic; }
.prose hr { margin: 2rem 0; border: 0; border-top: 1px solid var(--line); }

/* Single post */
.post { padding-top: 1.5rem; }
.post-banner { width: 100%; margin: 0 auto 1.5rem; }
.post-title { margin: 0 0 .25rem; color: var(--gold-dark); font-size: 1.9rem; }
.post-meta { margin: 0 0 2rem; color: var(--muted); font-size: .95rem; }
.post-meta a { color: inherit; }
.share { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem;
  margin: 3rem 0 2rem; padding: 1rem 1.25rem; background: #e6dfcf; }
.share p { margin: 0; font: 500 1.05rem var(--display); }
.share .social a { color: var(--rust); }
.post-nav { display: flex; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.post-nav a { max-width: 48%; text-decoration: none; font-family: var(--display); }
.post-nav span { display: block; color: var(--muted); font: .85rem var(--serif); }
.post-nav .newer { margin-left: auto; text-align: right; }

/* Page headings (blog, categories, about, press) */
.page-head { padding: 2.5rem 0 1.5rem; text-align: center; }
.page-head h1 { margin: 0; font-size: 2.1rem; color: var(--gold-dark); }
.page-head p { margin: .5rem 0 0; color: var(--muted); }

/* Post cards and the blog timeline */
.card { background: #f7f2e6; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.card img { width: 100%; aspect-ratio: 3 / 1; object-fit: cover; }
.card-body { padding: 1.1rem 1.25rem 1.25rem; }
.card h2, .card h3 { margin: 0 0 .35rem; font-size: 1.15rem; }
.card h2 a, .card h3 a { color: var(--rust); text-decoration: none; }
.card .meta { margin: 0 0 .6rem; color: var(--muted); font-size: .85rem; }
.card .meta a { color: inherit; }
.card .excerpt { margin: 0; font-size: 1rem; }
.timeline { padding-bottom: 1rem; }
.month { margin: 0 0 1.5rem; }
.month-label { display: inline-block; margin: 0 0 1rem; padding: .25rem .9rem; background: var(--olive);
  color: var(--ink); font: 400 1rem var(--serif); }
.month-grid { display: grid; gap: 1.5rem; }
.latest { display: grid; gap: 1.5rem; }

/* Home page */
.hero {
  position: relative; padding: 3rem 0 3.5rem; color: #e9e3d3; text-align: center;
  background: #0d0d0d url("/images/2018/12/fob_walllpaper_battlemap3.webp") center / cover no-repeat;
}
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.hero > * { position: relative; }
.hero .logo { width: min(300px, 70vw); margin: 0 auto 1.5rem; }
.hero h1 { margin: 0 0 1.25rem; color: #fff; font-size: 1.15rem; letter-spacing: .04em; }
.hero p { max-width: 640px; margin: 0 auto 1rem; font-size: 1rem; }
.hero .steam { margin-top: 2rem; }
.feature { position: relative; padding: 3.5rem 0; background: #000 center / cover no-repeat; color: #ddd6c5; overflow: hidden; }
.feature h2 { margin: 0 0 1rem; color: #fff; font-size: 1.8rem; }
.feature p { margin: 0 0 1rem; }
.feature-grid { display: grid; gap: 2rem; align-items: center; }
.feature a, .hero a { color: var(--gold); }
/* Decorative background videos: desktop only, so phones never download them. */
.bg-video { display: none; }
.feature.light { color: var(--ink); }
.feature.light h2 { color: var(--ink); }
.feature.stone { background-image: url("/images/2016/10/Branding_Background_Dark_Stone.webp"); }
.feature.philosophy { background-image: url("/images/2017/07/web04.webp"); }
.feature.philosophy h2, .feature.world h2 { color: #fff; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
.feature.world { background-image: url("/images/2017/12/WORLDMAP_FULL_SEPGRADIENT.webp"); }
.feature.philosophy .feature-text, .feature.world .feature-text {
  padding: 1.25rem 1.5rem; background: rgba(10, 10, 10, .72); border-radius: 4px;
}
/* Swipeable rows of images (cards, screenshots) */
.scroller {
  display: grid; grid-auto-flow: column; grid-auto-columns: 85%; gap: 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding-bottom: .75rem; scrollbar-color: var(--olive) transparent;
}
.scroller > * { scroll-snap-align: center; margin: 0; }
.scroller img { width: 100%; height: auto; }
.scroller-nav { display: flex; justify-content: center; gap: .75rem; margin-top: .75rem; }
.scroller-nav button {
  width: 44px; height: 44px; border: 1px solid #555; border-radius: 50%;
  background: transparent; color: #eee; font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.scroller-nav button:hover { border-color: var(--gold); color: var(--gold); }
.tiles { display: grid; gap: 1rem; }
.tiles img { width: 100%; margin: 0; }
.tiles.three { grid-template-columns: repeat(3, 1fr); }
.screenshots { padding: 3rem 0; background: var(--night); }
.screenshots h2 { margin: 0 0 1.25rem; color: #fff; text-align: center; font-size: 1.6rem; }
.screenshots .scroller { grid-auto-columns: 92%; }
.latest-section { padding: 3rem 0 0; }
.latest-section h2 { margin: 0 0 1.5rem; text-align: center; font-size: 1.15rem; letter-spacing: .08em; }
.see-more { margin: 1.5rem 0 0; text-align: right; }

/* About and press */
.section-title { margin: 3rem 0 1rem; text-align: center; color: var(--gold-dark); font-size: 1.7rem; }
.section-title::before { content: ""; display: block; width: 60%; margin: 0 auto 2rem; border-top: 1px solid var(--line); }
.page-logo { width: min(420px, 80%); margin: 1.5rem auto 2rem; }
.caption { margin-top: -1rem; font-style: italic; font-weight: 700; }
.factsheet { margin-bottom: 2rem; padding: 1.25rem 1.5rem; background: #e6dfcf; }
.factsheet h2 { margin: 0 0 .75rem; color: var(--gold-dark); font-size: 1.2rem; }
.factsheet dl { margin: 0; }
.factsheet dt { font-weight: 700; }
.factsheet dd { margin: 0 0 .75rem; }
.press h2 { color: var(--gold-dark); font-size: 1.35rem; margin: 2rem 0 .75rem; }
.press-logo { width: min(320px, 70%); margin: 1.5rem auto; }
.press-logo.small { width: 150px; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; margin: 0; }
.not-found { padding: 4rem 0 2rem; text-align: center; }
.not-found .big { margin: 0; color: #d9cfb6; font: 700 6rem/1 var(--display); }

/* Tablets and up */
@media (min-width: 500px) {
  .tiles.two { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 700px) {
  body, .prose { font-size: 1.125rem; }
  .month-grid, .latest { grid-template-columns: 1fr 1fr; }
  .scroller { grid-auto-columns: 45%; }
  .screenshots .scroller { grid-auto-columns: 70%; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 1.35rem; }
  .post-title { font-size: 2.3rem; }
}

/* Desktop: full menu, side-by-side sections, centered timeline */
@media (min-width: 960px) {
  .menu-button { display: none; }
  .js .site-nav, .site-nav { display: block; position: static; border: 0; background: none; }
  .site-nav ul { display: flex; gap: 2rem; }
  .site-nav li a { padding: 0; border: 0; font-size: 1rem; }
  .hero { padding: 4rem 0 4.5rem; }
  .feature { padding: 5rem 0; }
  .feature-grid { grid-template-columns: 1fr 1fr; gap: 3.5rem; }
  .feature.has-video { min-height: 600px; display: flex; align-items: center; }
  .feature.has-video .wrap { position: relative; z-index: 1; }
  .bg-video { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .feature-text.right { grid-column: 2; }
  .feature.philosophy, .feature.world { background-attachment: fixed; }
  .latest { grid-template-columns: repeat(3, 1fr); }
  .scroller { grid-auto-columns: calc((100% - 2rem) / 3); }
  .screenshots .scroller { grid-auto-columns: 60%; }
  .timeline { position: relative; }
  .timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 2px solid var(--olive); }
  .month { position: relative; text-align: center; }
  .month-grid { grid-template-columns: 1fr 1fr; grid-auto-flow: row dense; column-gap: 6rem; text-align: left; }
  .month-grid .left { grid-column: 1; }
  .month-grid .right { grid-column: 2; }
  .press-layout { display: grid; grid-template-columns: 240px 1fr; gap: 3rem; align-items: start; }
  .factsheet { position: sticky; top: 90px; }
  .gallery { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .feature.philosophy, .feature.world { background-attachment: scroll; }
}
