/* Albion Castle Games · Fields of Conquest — site styles
   Fonts are the game's own (Marcellus, Marcellus SC); lines are thin and plain, never flourishes. */

:root {
  --ink: #0d0c0b;
  --ink-2: #131110;
  --ink-3: #1a1714;
  --foot: #090807;
  --text: #ece5d6;
  --dim: #b9af9c;
  --faint: #8c8374;
  --gold-text: #c9b48b;
  --line: rgba(168, 150, 118, 0.45);
  --line-soft: rgba(168, 150, 118, 0.2);
  --red: #9b2219;
  --red-hi: #b8291e;
  --red-text: #e05a4c;

  --display: "Marcellus SC", "Marcellus", Georgia, serif;
  --head: "Marcellus", Georgia, serif;
  --body: "EB Garamond", Georgia, serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 400 19px/1.6 var(--body);
  text-align: center;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Film grain over everything, very faint */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
:where(ul[role="list"]) { list-style: none; margin: 0; padding: 0; }

:focus-visible { outline: 2px solid var(--gold-text); outline-offset: 3px; }

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

.skip {
  position: absolute; left: 16px; top: -80px; z-index: 100;
  padding: 10px 16px; background: var(--text); color: var(--ink);
  font: 15px var(--display); letter-spacing: 0.1em;
}
.skip:focus { top: 16px; }

/* ─────────── Shared pieces ─────────── */

.eyebrow {
  font: 14px/1.2 var(--display);
  letter-spacing: 0.32em;
  color: var(--gold-text);
  text-transform: uppercase;
  text-wrap: balance;
}

h2 {
  margin-top: 0.35em;
  font: 400 clamp(34px, 5vw, 60px)/1.1 var(--display);
  letter-spacing: 0.02em;
  color: #f4ead2;
  background: linear-gradient(180deg, #fbf3df 35%, #d9bf86 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.95));
  text-wrap: balance;
}


/* The game's own buttons (Kit.uss): the plain one on his black button 18, a main action on his red button 19.
   Each picture is sliced at its ends and drawn at the button's height, so the ends keep their shape. --h is the button's height. */
.btn {
  --h: 52px;
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--h);
  min-width: calc(var(--h) * 3);
  padding: 0 calc(var(--h) * 0.7);
  border: 0;
  background: none;
  font: 16px/1 var(--display);
  letter-spacing: 0.12em;
  color: #f4ecd8;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.75);
  text-align: center;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s, transform 0.25s var(--ease), filter 0.2s;
}
.btn::before,
.btn::after { content: ""; position: absolute; z-index: -1; pointer-events: none; transition: filter 0.2s; }
.btn::before { inset: 0; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.55)); }
.btn:hover { transform: translateY(-1px); }
.btn:hover::before, .btn:hover::after { filter: brightness(1.14) drop-shadow(0 8px 14px rgba(0, 0, 0, 0.55)); }
.btn:active::before, .btn:active::after { filter: brightness(0.85); }

/* black 18 (383 × 116, ends 27 wide) */
.btn--black::before {
  border: 0 solid transparent;
  border-image: url("img/kit/p18_button.webp") 0 27 fill / 0 calc(var(--h) * 27 / 116) stretch;
}
.btn--black:hover { color: #ffe9a6; }

/* red 19: its plate fills rows 10–106 of 116, so it is drawn 116/96 as tall as the button and its points stand above and below */
.btn--red { color: #ffe38f; }
.btn--red::before {
  inset: calc(var(--h) * -10 / 96) 0;
  border: 0 solid transparent;
  border-image: url("img/kit/p19_plate.webp") 0 56 fill / 0 calc(var(--h) * 56 / 96) stretch;
}
.btn--red::after {
  top: calc(var(--h) * -10 / 96);
  bottom: calc(var(--h) * -10 / 96);
  left: 50%;
  width: calc(var(--h) * 69 / 96);
  transform: translateX(-50%);
  background: url("img/kit/p19_crest.webp") center / 100% 100% no-repeat;
}
.btn--red:hover { color: #fff3cf; }
.btn--small { --h: 40px; font-size: 14px; }

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
  margin-top: 34px;
}

/* Links still waiting for their address (see LINKS in main.js) */
.is-todo { cursor: default; }

/* ─────────── Header ─────────── */

.bar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px var(--gutter);
  background: linear-gradient(180deg, rgba(9, 8, 7, 0.7), transparent);
  transition: background 0.35s, padding 0.35s, box-shadow 0.35s;
}
.bar.is-solid {
  padding-block: 8px;
  background: rgba(11, 10, 9, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.bar__nav { grid-row: 1; grid-column: 1; justify-self: start; }
.bar__brand { grid-row: 1; grid-column: 2; justify-self: center; }
.bar__cta { grid-row: 1; grid-column: 3; }
.bar.is-solid .bar__brand .castle { height: 54px; }

.bar__nav { display: flex; gap: clamp(18px, 2.6vw, 36px); }
.bar__nav a {
  position: relative;
  padding: 8px 0;
  font: 15px/1 var(--display);
  letter-spacing: 0.14em;
  color: var(--dim);
  transition: color 0.2s;
}
.bar__nav a::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: var(--line);
  transform: scaleX(0);
  transition: transform 0.3s var(--ease);
}
.bar__nav a:hover { color: var(--text); }
.bar__nav a:hover::after { transform: scaleX(1); }

.bar__cta { justify-self: end; }

.bar__menu {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  /* the game's square 15, its lit square 20 when open */
  background: url("img/kit/p15_square.webp") center / 100% 100% no-repeat;
  color: var(--text);
  cursor: pointer;
}
.bar__menu[aria-expanded="true"] { background-image: url("img/kit/p20_square_glow.webp"); }
.bar__menu-lines,
.bar__menu-lines::before,
.bar__menu-lines::after {
  display: block;
  width: 20px;
  height: 1px;
  margin: 0 auto;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.2s;
}
.bar__menu-lines { position: relative; }
.bar__menu-lines::before, .bar__menu-lines::after { content: ""; position: absolute; left: 0; }
.bar__menu-lines::before { top: -6px; }
.bar__menu-lines::after { top: 6px; }
.bar__menu[aria-expanded="true"] .bar__menu-lines { background: transparent; }
.bar__menu[aria-expanded="true"] .bar__menu-lines::before { transform: translateY(6px) rotate(45deg); }
.bar__menu[aria-expanded="true"] .bar__menu-lines::after { transform: translateY(-6px) rotate(-45deg); }

/* ─────────── Hero ─────────── */

.hero {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 120px var(--gutter) 130px;
  overflow: hidden;
  isolation: isolate;
}

.hero__art { position: absolute; inset: 0; z-index: -2; }
.hero__art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  animation: settle 18s var(--ease) both;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  /* Dark at the top (header) and the foot (words and buttons), a soft shade behind the logo in the middle */
  background:
    radial-gradient(ellipse 42% 34% at 50% 50%, rgba(9, 8, 7, 0.5), transparent 75%),
    linear-gradient(180deg, rgba(9, 8, 7, 0.7) 0%, rgba(9, 8, 7, 0.3) 20%, transparent 34%, transparent 62%, rgba(13, 12, 11, 0.8) 84%, var(--ink) 100%),
    radial-gradient(ellipse 120% 90% at 50% 40%, transparent 55%, rgba(5, 5, 4, 0.7) 100%);
}

/* The line at the top, the game's logo in the middle, the words and button at the foot */
.hero__inner {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  width: 100%;
  max-width: 920px;
}
.hero h1 { margin: 0; }
/* Fit the logo to the screen's width and height, so the button stays in view */
.hero__logo { width: min(640px, 84vw, max(280px, (100svh - 420px) * 1.463)); height: auto; margin: 0 auto; filter: drop-shadow(0 6px 24px rgba(0, 0, 0, 0.75)); }
.hero__foot .hero__line { margin-top: 0; }

.hidden-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.hero__line {
  margin-top: 14px;
  font: clamp(20px, 2.4vw, 28px)/1.35 var(--head);
  color: var(--text);
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85);
  text-wrap: balance;
}
.hero__line span {
  display: block;
  margin-top: 8px;
  font: clamp(13px, 1.3vw, 15px)/1.3 var(--display);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #e6d4ad;
}
.hero .eyebrow { text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 2px 14px rgba(0, 0, 0, 0.9); color: #e6d4ad; }

.hero__step { animation: rise 1s var(--ease) both; }
.hero__inner > .hero__step { animation-delay: 0.15s; }
/* The logo comes in: the sword drops from above and lands with a small jolt, then the letters rise in, left to right,
   FIELDS, of, CONQUEST; the words and button under it follow. */
.hero__logo { display: block; overflow: visible; }
/* distances in the logo's own units (878 × 600), so the blade and its ring fall together */
/* the sword fades in from nothing as it falls (its own fade, slower than the fall), fully there as it lands */
.logo-sword { animation: logo-sword 0.72s cubic-bezier(0.55, 0, 0.85, 0.35) 0.2s both, logo-sword-fade 0.72s linear 0.2s both; }
.hero h1 { animation: logo-land 0.45s var(--ease) 0.92s both; }
.logo-letter { animation: logo-letter 0.7s cubic-bezier(0.33, 1, 0.68, 1) calc(0.98s + var(--n) * 0.045s) both; }
.hero__foot > .hero__step:nth-child(1) { animation-delay: 1.5s; }
.hero__foot > .hero__step:nth-child(2) { animation-delay: 1.7s; }

@keyframes logo-sword { from { transform: translateY(-420px); } to { transform: none; } }
@keyframes logo-sword-fade { from { opacity: 0; } 25% { opacity: 0; } 50% { opacity: 0.1; } to { opacity: 1; } }
@keyframes logo-land { 0% { transform: none; } 30% { transform: translateY(5px); } 100% { transform: none; } }
@keyframes logo-letter { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }


@keyframes settle { from { transform: scale(1.08); } to { transform: scale(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ─────────── Sections ─────────── */

.section { padding: clamp(80px, 11vw, 140px) var(--gutter); }
.section > * { max-width: var(--max); margin-inline: auto; }
.section--dark { background: var(--ink-2); }

.head { margin-bottom: clamp(44px, 6vw, 72px); }
.head__text { max-width: 560px; margin: 22px auto 0; color: var(--dim); }

/* About: the campaign map behind it, darkened and softened, fading out at the edges */
#game { position: relative; isolation: isolate; overflow: hidden; }
#game::before {
  content: "";
  position: absolute;
  inset: -20px;
  z-index: -1;
  background: url("img/shots/campaign-map.jpg") center / cover no-repeat;
  opacity: 0.28;
  filter: blur(2px) saturate(0.85);
  -webkit-mask: radial-gradient(ellipse 70% 75% at 50% 50%, #000 30%, transparent 100%);
  mask: radial-gradient(ellipse 70% 75% at 50% 50%, #000 30%, transparent 100%);
}
#game .prose p { color: #d8d2c4; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9); }

.prose { max-width: 720px; }
.prose p + p { margin-top: 18px; }
.prose p { color: var(--dim); font-size: 20px; }
.prose .lede {
  margin-bottom: 26px;
  font: clamp(24px, 2.7vw, 32px)/1.3 var(--head);
  color: var(--text);
  text-wrap: balance;
}


.subhead {
  margin-top: clamp(80px, 10vw, 120px);
  margin-bottom: 32px;
  font: 22px/1.2 var(--display);
  letter-spacing: 0.18em;
  color: var(--gold-text);
}
.subhead--first { margin-top: 0; }

/* A short line under a grid of cards */
.aside { max-width: 640px; margin-top: 28px; font-size: 17px; line-height: 1.5; color: var(--faint); text-wrap: balance; }

/* Campaign cards */

/* Five across, fewer on smaller screens; a short last row sits in the middle */
.campaigns { --cols: 5; display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.campaigns > .campaign { flex: 0 0 calc((100% - (var(--cols) - 1) * 18px) / var(--cols)); }

.campaign {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 410px; /* not a fixed aspect ratio: the card grows with its words, so nothing is squeezed */
  padding: 24px 20px 26px;
  border: 1px solid var(--line-soft);
  background: var(--ink-3);
  overflow: hidden;
  isolation: isolate;
  transition: border-color 0.4s;
}
.campaign::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(13, 12, 11, 0.97) 0%, rgba(13, 12, 11, 0.86) 30%, rgba(13, 12, 11, 0.1) 62%, rgba(13, 12, 11, 0.25) 100%);
}
.campaign__art {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.4s var(--ease);
}
.campaign:hover { border-color: var(--line); }
.campaign:hover .campaign__art { transform: scale(1.05); }

/* Campaigns without a painting: a coloured glow, the title in the middle */
.campaign--bronze::after,
.campaign--blue::after { background: linear-gradient(0deg, rgba(13, 12, 11, 0.9) 0%, transparent 45%); }
.campaign--bronze { background: radial-gradient(ellipse 80% 55% at 50% 42%, rgba(176, 118, 48, 0.3), transparent 70%), var(--ink-3); }
.campaign--blue { background: radial-gradient(ellipse 80% 55% at 50% 42%, rgba(56, 98, 160, 0.32), transparent 70%), var(--ink-3); }
.campaign--bronze .campaign__logo,
.campaign--blue .campaign__logo { margin-block: auto; }

/* Each logo fills a fixed box and keeps its shape inside it (object-fit), so none spills over the text */
.campaign__logo { flex-shrink: 0; height: 120px; }
.campaign__logo img { width: 88%; height: 100%; margin: 0 auto; object-fit: contain; filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.6)); }
.campaign--bronze .campaign__logo img { width: 92%; }

/* The next campaign, not named yet */
.campaign--soon {
  justify-content: center;
  background: radial-gradient(ellipse 80% 55% at 50% 45%, rgba(168, 150, 118, 0.1), transparent 70%), var(--ink-3);
}
.campaign--soon::after { display: none; }
.campaign__soon { font: 400 26px/1.15 var(--display); letter-spacing: 0.04em; color: var(--text); }
.campaign--soon .campaign__text p:not([class]) { margin-top: 10px; }

.campaign__when {
  margin: 18px 0 8px;
  font: 14px/1.3 var(--display);
  letter-spacing: 0.18em;
  color: var(--gold-text);
  text-wrap: balance;
}
.campaign__when span { display: block; margin-top: 4px; font-size: 13px; color: var(--dim); }
.campaign__text p:not([class]) { font-size: 17px; line-height: 1.45; color: var(--dim); text-wrap: balance; }

/* Gameplay rows */

.rows { display: grid; gap: clamp(56px, 8vw, 110px); }

.row {
  display: grid;
  grid-template-columns: 7fr 5fr;
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
}
.row:nth-child(even) .shot { order: 2; }
.row__text { max-width: 440px; justify-self: center; }
.row h3 {
  font: 400 clamp(28px, 3.2vw, 40px)/1.1 var(--display);
  text-wrap: balance;
}
.row__lead { margin-top: 16px; font: 21px/1.4 var(--head); color: var(--dim); text-wrap: balance; }

/* Screenshot and video frames */

.shot,
.video {
  --cut: 11px;
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  background: var(--ink-3);
  overflow: hidden;
  clip-path: polygon(var(--cut) 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, var(--cut) 100%, 0 calc(100% - var(--cut)), 0 var(--cut));
}
/* the rim of panel 28 (its 24 px edge drawn at 12 px), over the picture, with a soft shade inside it */
.shot::after,
.video::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border: 0 solid transparent;
  border-image: url("img/kit/p28_panel_small.webp") 24 / 12px stretch;
  box-shadow: inset 0 0 36px rgba(0, 0, 0, 0.5);
}
.shot, .video { filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.55)); }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.shot.is-empty,
.video.is-empty {
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.014) 0 1px, transparent 1px 14px),
    radial-gradient(ellipse at 50% 50%, #1f1c18, #12100e);
}
.shot__empty {
  font: 13px/1.2 var(--display);
  letter-spacing: 0.24em;
  color: var(--faint);
}
.shot--open { cursor: zoom-in; }
.shot.is-empty, .video.is-empty { display: none; }
.shot--open:hover img { transform: scale(1.03); }

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.gallery .shot--wide { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.gallery[data-count="3"] { grid-template-columns: repeat(2, 1fr); }
.gallery[data-count="5"] { grid-template-columns: repeat(2, 1fr); }
.gallery[data-count="5"] .shot--wide,
.gallery[data-count="4"] .shot--wide,
.gallery[data-count="3"] .shot--wide,
.gallery[data-count="1"] .shot--wide { grid-column: 1 / -1; grid-row: auto; aspect-ratio: 16 / 9; }
.gallery[data-count="2"] { grid-template-columns: repeat(2, 1fr); }
.gallery[data-count="2"] .shot--wide { grid-column: auto; grid-row: auto; aspect-ratio: 16 / 9; }

/* Videos: a still with a play button until played */

.videos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.video--main { grid-column: 1 / -1; }
.video iframe,
.video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; object-fit: cover; }
.video__play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: #000 center / cover no-repeat;
  cursor: pointer;
}
.video__play::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 96px;
  height: 96px;
  background: url("img/kit/p33_circle.webp") center / 100% 100% no-repeat;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.7));
  transform: translate(-50%, -50%);
  transition: transform 0.25s var(--ease);
}
.video__play::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  border-left: 22px solid #f4ead2;
  border-block: 12px solid transparent;
  transform: translate(-38%, -50%);
}
.video__play:hover::before { background-image: url("img/kit/p13_circle_gold.webp"); transform: translate(-50%, -50%) scale(1.04); }

/* ─────────── Studio logo ───────────
   The castle in the game's own layers. Hovered, it builds itself again exactly as it opens the game
   (StudioLogo.cs): the gatehouse rises and fades in, the towers follow outward 0.2 s apart, the portcullis
   comes down, and ALBION CASTLE is drawn in from the left. Same seconds and easing as the game. */

.castle {
  position: relative;
  display: block;
  height: 66px;
  aspect-ratio: 436 / 360;
  transition: height 0.35s;
}
.castle img,
.castle__gate,
.castle__letters { position: absolute; inset: 0; width: 100%; height: 100%; }
/* The game hides the raised portcullis behind black; here only the gate's opening shows it */
.castle__gate {
  -webkit-mask: url("img/castle/gate.png") 0 0 / 100% 100% no-repeat;
  mask: url("img/castle/gate.png") 0 0 / 100% 100% no-repeat;
}
.castle--foot { height: 157px; margin: 0 auto; }

.castle.is-playing .castle__part { animation: castle-rise 1.5s var(--castle-out) calc(0.1s + var(--n, 0) * 0.2s) both; }
.castle.is-playing .castle__gate { animation: castle-rise 1.5s var(--castle-out) 0.1s both; }
.castle.is-playing .castle__gate img { animation: castle-gate 1.4s cubic-bezier(0.45, 0, 0.55, 1) 0.6s both; }
.castle.is-playing .castle__letters { animation: castle-letters 0.9s var(--castle-out) 1.4s both; }
.castle { --castle-out: cubic-bezier(0.33, 1, 0.68, 1); }

@keyframes castle-rise { from { opacity: 0; transform: translateY(17.5%); } to { opacity: 1; transform: none; } }
@keyframes castle-gate { from { transform: translateY(-27.5%); } to { transform: none; } }
@keyframes castle-letters { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0); } }

/* ─────────── Footer ─────────── */

.foot {
  padding: clamp(64px, 9vw, 96px) var(--gutter) 36px;
  background: var(--foot);
}
.foot__text { max-width: 460px; margin: 22px auto 0; color: var(--dim); }

.social { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.social a {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: url("img/kit/p12_circle.webp") center / 100% 100% no-repeat;
  color: #e9dfc8;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
  transition: color 0.2s;
}
.social a:hover { color: #fff3cf; background-image: url("img/kit/p13_circle_gold.webp"); }
.social a::before {
  content: "";
  width: 20px;
  height: 20px;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}
/* Brand icons: Simple Icons (CC0), pinned version */
[data-icon="youtube"]   { --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.0.0/icons/youtube.svg"); }
[data-icon="discord"]   { --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.0.0/icons/discord.svg"); }
[data-icon="x"]         { --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.0.0/icons/x.svg"); }
[data-icon="instagram"] { --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.0.0/icons/instagram.svg"); }
[data-icon="tiktok"]    { --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.0.0/icons/tiktok.svg"); }
[data-icon="reddit"]    { --icon: url("https://cdn.jsdelivr.net/npm/simple-icons@13.0.0/icons/reddit.svg"); }

.foot__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 30px;
  margin-top: 40px;
}
.foot__nav a { font: 14px/1 var(--display); letter-spacing: 0.16em; color: var(--dim); transition: color 0.2s; }
.foot__nav a:hover { color: var(--text); }

.foot__small {
  max-width: var(--max);
  margin: 48px auto 0;
  font-size: 15px;
  color: var(--faint);
}

/* ─────────── Screenshot viewer ─────────── */

.viewer {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}
.viewer::backdrop { background: rgba(5, 5, 4, 0.92); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.viewer__stage { width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; }
.viewer img { max-width: 92vw; max-height: 86vh; width: auto; height: auto; cursor: zoom-in; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7); }
/* zoomed: every pixel of the screenshot at full size; move round it with the mouse, or drag on a phone */
.viewer.is-zoomed .viewer__stage { display: block; overflow: auto; -webkit-overflow-scrolling: touch; }
.viewer.is-zoomed img { max-width: none; max-height: none; width: auto; cursor: zoom-out; }
.viewer__hint {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  padding: 8px 18px;
  font: 14px/1 var(--display);
  letter-spacing: 0.14em;
  color: var(--dim);
  background: rgba(9, 8, 7, 0.75);
  pointer-events: none;
}
.viewer.is-zoomed .viewer__hint { display: none; }
.viewer__close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 48px;
  height: 48px;
  border: 1px solid var(--line-soft);
  border-radius: 50%;
  background: rgba(13, 12, 11, 0.8);
  color: var(--text);
  font: 28px/1 var(--body);
  cursor: pointer;
}

/* ─────────── Scroll reveal ─────────── */

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

/* ─────────── Smaller screens ─────────── */

@media (max-width: 1240px) {
  .campaigns { --cols: 3; }
}

@media (max-width: 900px) {
  /* phones: the menu button on the left where the links were, the castle still in the middle */
  .bar { grid-template-columns: 1fr auto 1fr; }
  .bar__menu { display: grid; place-items: center; grid-row: 1; grid-column: 1; justify-self: start; }
  .bar__nav {
    position: absolute;
    inset: 100% 0 auto;
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 20px;
    background: rgba(11, 10, 9, 0.97);
    box-shadow: 0 30px 40px -20px rgba(0, 0, 0, 0.8);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.25s var(--ease), visibility 0s 0.25s;
  }
  .bar__nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .bar__nav a { padding: 16px 0; font-size: 17px; }
  .bar__nav a::after { display: none; }
  .bar:has(.is-open) { background: rgba(11, 10, 9, 0.97); }

  .row { grid-template-columns: 1fr; }
  .row:nth-child(even) .shot { order: 0; }
  .row__text { max-width: 560px; }
}

@media (max-width: 720px) {
  .campaigns { --cols: 2; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery .shot--wide { grid-row: auto; aspect-ratio: 16 / 9; }
  .subhead { font-size: 18px; }
}

@media (max-width: 560px) {
  body { font-size: 18px; }
  .bar__brand .castle { height: 54px; }
  .bar.is-solid .bar__brand .castle { height: 46px; }
  .campaigns { --cols: 1; }
  .videos { grid-template-columns: 1fr; }
  .campaign { min-height: 380px; }
  .gallery { grid-template-columns: 1fr; }
  .gallery .shot--wide { grid-column: auto; }
  .actions .btn { width: 100%; max-width: 340px; }
  .social { gap: 10px; }
  .social a { width: 50px; height: 50px; }
}

@media (max-width: 400px) {
  .bar__cta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
