/* Studio site. Mobile first; the breakpoints only add columns.
   The :root colours below are the studio's own, neutral look. The featured game's
   theme (config.json featured_game.theme.colors) overrides any of them, so the
   site wears the game that is coming next. Use only these names for colour. */

@font-face {
  font-family: "Fredoka";
  src: url("../fonts/fredoka.woff2") format("woff2");
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* the studio's own look (Lowmoon brand: night #12101f, moon cream #f2e2b1, glow #6c4fa3) */
  /* page */
  --bg: #12101f;
  --bg-glow: rgba(108, 79, 163, .35);
  --bg-deep: #0b0914;
  --band-top: #161329;
  --band-mid: #1c1833;
  --band-glow: rgba(108, 79, 163, .22);
  /* cards */
  --panel: #1f1b33;
  --panel-hi: #2a2445;
  --panel-lo: #221d38;
  --art-hi: #3a3160;
  --art-lo: #221d38;
  --outline: #07060d;
  /* type and accents */
  --heading: #f2e2b1;
  --on-heading: #12101f;
  --accent: #d6a03c;
  --hot: #d6a03c;
  --on-hot: #12101f;
  --text: #f3eeff;
  --muted: #c4bdd8;
  /* buttons and fields */
  --button-hi: #f7ecc8;
  --button-mid: #f2e2b1;
  --button-lo: #dcc68c;
  --on-button: #12101f;
  --field: #fffaf2;
  --field-text: #1d1a22;
  --field-hint: #6b6474;
  /* sky decorations */
  --moon-hi: #f7ecc8;
  --moon-mid: #f2e2b1;
  --moon-lo: #e0cd92;
  --moon-glow: rgba(242, 226, 177, .2);
  --radius: 22px;
  --wrap: 1120px;
  --gutter: 16px;
  color-scheme: dark;
}

@media (min-width: 720px) {
  :root { --gutter: 28px; }
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background:
    radial-gradient(1100px 640px at 80% -12%, var(--bg-glow), transparent 70%) no-repeat,
    var(--bg);
  font-family: "Fredoka", ui-rounded, "Segoe UI", system-ui, sans-serif;
  font-weight: 500;
  font-size: 1.0625rem;
  line-height: 1.55;
}

main { flex: 1 0 auto; }
main:focus { outline: none; }

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

h1, h2, h3 { font-weight: 700; text-wrap: balance; }
p { text-wrap: pretty; }

a {
  color: var(--heading);
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}
a:hover { color: color-mix(in srgb, var(--heading) 70%, #fff); }

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

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--heading);
  color: var(--on-heading);
  font-weight: 700;
}
.skip-link:focus { top: 12px; color: var(--on-heading); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap.narrow { max-width: calc(760px + 2 * var(--gutter)); }

.center { text-align: center; }

/* ---------- header ---------- */

.site-header { position: relative; z-index: 3; }

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.wordmark {
  color: var(--text);
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
}
.wordmark:hover { color: var(--heading); }
.wordmark-logo { display: block; width: auto; height: 30px; }
@media (min-width: 720px) { .wordmark-logo { height: 36px; } }

.lang-nav ul {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.lang-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 44px;
  min-height: 44px;
  justify-content: center;
  padding: 6px 12px;
  border: 2px solid color-mix(in srgb, var(--text) 30%, transparent);
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  font-size: .92rem;
  text-decoration: none;
}
.lang-link:hover { border-color: var(--heading); color: var(--heading); }
.lang-link[aria-current] {
  border-color: var(--heading);
  background: var(--heading);
  color: var(--on-heading);
}
.flag {
  flex: none;
  width: 22px;
  height: 15px;
  border-radius: 3px;
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--text) 25%, transparent);
}
/* phones show PT / EN / ES; the full name stays for screen readers */
.lang-short { display: none; }
@media (max-width: 599px) {
  .lang-full {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
  .lang-short { display: inline; }
}

/* ---------- buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 12px 26px;
  border: 3px solid var(--outline);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--button-hi) 0%, var(--button-mid) 50%, var(--button-lo) 100%);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .25), 0 5px 0 var(--outline);
  color: var(--on-button);
  font: inherit;
  font-weight: 700;
  font-size: 1.2rem;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .25);
  cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease, filter .15s ease;
}
.button:hover { color: var(--on-button); filter: brightness(1.08); }
.button:active {
  transform: translateY(3px);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .25), 0 2px 0 var(--outline);
}

.button-alt {
  background: linear-gradient(180deg, color-mix(in srgb, var(--heading) 75%, #fff) 0%, var(--heading) 55%,
              color-mix(in srgb, var(--heading) 85%, #000) 100%);
  color: var(--on-heading);
  text-shadow: none;
}
.button-alt:hover { color: var(--on-heading); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow-x: clip; /* only sideways, so the moon's glow is not cut at the top */
  padding: 0 0 72px;
}

.sky {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* ---- sky decorations (templates/decor/<name>.html), picked by featured_game.theme.sky ---- */

/* stars: a handful of gradients, no image request */
.stars {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.6px 1.6px at 8% 12%, #fff 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 22% 40%, #fff 50%, transparent 52%),
    radial-gradient(2px 2px at 35% 8%, #fff7cf 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 47% 30%, #fff 50%, transparent 52%),
    radial-gradient(1.6px 1.6px at 58% 6%, #fff 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 66% 46%, #fff 50%, transparent 52%),
    radial-gradient(2px 2px at 74% 24%, #fff 50%, transparent 52%),
    radial-gradient(1.4px 1.4px at 86% 54%, #fff7cf 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 94% 34%, #fff 50%, transparent 52%),
    radial-gradient(1.4px 1.4px at 14% 70%, #fff 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 40% 64%, #fff 50%, transparent 52%),
    radial-gradient(1.6px 1.6px at 52% 86%, #fff 50%, transparent 52%),
    radial-gradient(1.2px 1.2px at 80% 80%, #fff 50%, transparent 52%),
    radial-gradient(1.4px 1.4px at 4% 92%, #fff 50%, transparent 52%);
  opacity: .7;
  animation: twinkle 5s ease-in-out infinite alternate;
}

.moon {
  position: absolute;
  top: 6px;
  right: var(--gutter);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 36%, color-mix(in srgb, var(--moon-lo) 85%, #000) 0 9%, transparent 10%),
    radial-gradient(circle at 64% 66%, color-mix(in srgb, var(--moon-lo) 85%, #000) 0 7%, transparent 8%),
    radial-gradient(circle at 40% 38%, var(--moon-hi), var(--moon-mid) 62%, var(--moon-lo));
  box-shadow: 0 0 50px 14px var(--moon-glow);
}

.ghost {
  display: none;
  position: absolute;
  width: 58px;
  height: auto;
  animation: float 7s ease-in-out infinite;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .35));
}

@media (min-width: 720px) {
  .moon { width: 96px; height: 96px; top: 12px; right: max(var(--gutter), calc(50% - 540px)); }
  .ghost { display: block; top: 92px; right: max(140px, calc(50% - 420px)); }
}
/* two columns: moon and ghost move to the open sky between the name and the card */
@media (min-width: 960px) {
  .moon { top: 26px; right: auto; left: calc(50% - 60px); }
  .ghost { top: 112px; right: auto; left: calc(50% - 190px); }
}

.hero-grid {
  position: relative;
  display: grid;
  gap: 24px;
  align-items: center;
  padding-top: 20px;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 64px;
    padding-top: 64px;
  }
}

/* once the studio has a logo, the hero shows it instead of the name in text */
.studio-name.has-logo { text-shadow: none; line-height: 0; }
.studio-name.has-logo img { width: min(100%, 520px); height: auto; }
/* ...and the home header leaves it out, so the logo is not shown twice on one screen */
.page-home .wordmark:has(img) { visibility: hidden; }

/* phones: the hero's first line stays clear of the corner where the sky decorations sit */
@media (max-width: 719px) {
  .hero-copy .eyebrow { padding-right: 72px; }
  .studio-name.has-logo img { width: min(100% - 76px, 520px); }
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.studio-name {
  margin: 0;
  color: var(--heading);
  font-size: clamp(2.8rem, 1.5rem + 6vw, 5.4rem);
  line-height: 1;
  letter-spacing: -.005em;
  text-shadow:
    .045em 0 0 var(--outline), -.045em 0 0 var(--outline),
    0 .045em 0 var(--outline), 0 -.045em 0 var(--outline),
    .032em .032em 0 var(--outline), -.032em .032em 0 var(--outline),
    .032em -.032em 0 var(--outline), -.032em -.032em 0 var(--outline),
    0 .1em 0 var(--outline),
    0 .16em .14em rgba(0, 0, 0, .35);
}

.manifesto {
  margin: 18px 0 0;
  max-width: 30ch;
  font-size: clamp(1.15rem, 1rem + .6vw, 1.45rem);
  line-height: 1.4;
}

.hero-teaser {
  margin: 14px 0 0;
  max-width: 40ch;
  color: var(--muted);
}

/* ---------- signup card ---------- */

.signup-wrap {
  position: relative;
  z-index: 0;
  margin-top: 64px;
  scroll-margin-top: 96px;
}
@media (min-width: 960px) { .signup-wrap { margin-top: 40px; } }

/* the featured game's character peeking over a card (featured_game.theme.peek) */
.peek {
  position: absolute;
  z-index: -1;
  top: -80px;
  right: 26px;
  width: 128px;
  animation: peek 5s ease-in-out infinite;
}
/* portraits cut at the left edge fade out there instead (theme.peek_fade, feature "fade") */
.is-faded {
  -webkit-mask-image: linear-gradient(90deg, transparent 6%, #000 40%);
  mask-image: linear-gradient(90deg, transparent 6%, #000 40%);
}

.signup-card,
.note-card {
  position: relative;
  z-index: 1;
  padding: 26px 20px 22px;
  border: 4px solid var(--outline);
  border-radius: 28px;
  background: linear-gradient(180deg, var(--panel-hi) 0%, var(--panel-lo) 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, .14),
    0 8px 0 var(--outline),
    0 26px 50px rgba(0, 0, 0, .5);
}
@media (min-width: 520px) {
  .signup-card, .note-card { padding: 32px 30px 26px; }
}

.signup-title {
  margin: 0;
  color: var(--heading);
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.1rem);
  line-height: 1.1;
}

.signup-text { margin: 10px 0 20px; }

.signup { margin: 0; }

.field-label {
  display: block;
  margin: 0 0 8px;
  font-weight: 600;
}

.field-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
@media (min-width: 520px) { .field-row { flex-direction: row; } }

.email-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 58px;
  padding: 12px 16px;
  border: 3px solid var(--outline);
  border-radius: 16px;
  background: var(--field);
  box-shadow: inset 0 3px 0 rgba(0, 0, 0, .1);
  color: var(--field-text);
  font: inherit;
  font-size: 1.15rem;
}
.email-input::placeholder { color: var(--field-hint); opacity: 1; }
.email-input:focus-visible { outline-offset: 2px; }

.button-submit { flex: 0 0 auto; }

.consent {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
  line-height: 1.4;
}
.consent input {
  flex: none;
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--heading);
  cursor: pointer;
}
.consent label { cursor: pointer; }

.form-meta {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: .94rem;
}

/* the honeypot: off screen for people, still in the form for bots */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-off {
  margin: 0 0 16px;
  padding: 10px 14px;
  border: 3px solid var(--outline);
  border-radius: 14px;
  background: var(--heading);
  color: var(--on-heading);
  font-weight: 700;
  line-height: 1.3;
}
.signup.is-off .email-input,
.signup.is-off .button-submit,
.signup.is-off .consent { opacity: .55; cursor: not-allowed; }
.signup.is-off .button-submit { filter: grayscale(.7); }
.signup.is-off .consent input,
.signup.is-off .consent label { cursor: not-allowed; }

.signup.is-sending .button-submit { cursor: progress; opacity: .85; }

/* ---------- the game ---------- */

.game {
  position: relative;
  padding: 72px 0 84px;
  border-top: 4px solid var(--outline);
  background: linear-gradient(180deg, var(--band-top) 0%, var(--band-mid) 35%, var(--band-top) 100%);
}

.game-head {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.game-logo { margin: 4px auto 0; max-width: 620px; }
.logo-img {
  width: 100%;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .35));
}

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.chip {
  padding: 6px 14px;
  border: 2px solid color-mix(in srgb, var(--text) 25%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--text) 7%, transparent);
  font-size: .95rem;
  font-weight: 600;
}
.chip-hot {
  border-color: var(--outline);
  background: var(--hot);
  color: var(--on-hot);
}

.pitch {
  max-width: 42ch;
  margin: 20px auto 0;
  font-size: clamp(1.15rem, 1.05rem + .5vw, 1.35rem);
  line-height: 1.45;
}

.trailer { max-width: 960px; margin: 44px auto 0; }

.trailer-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 4px solid var(--outline);
  border-radius: 22px;
  background: var(--bg-deep);
  box-shadow: 0 8px 0 var(--outline), 0 24px 48px rgba(0, 0, 0, .45);
}
.trailer-frame img,
.trailer-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* until there is a video, dim the poster so it reads as a placeholder */
.trailer-frame.is-poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--bg-deep) 62%, transparent) 0%,
              color-mix(in srgb, var(--bg-deep) 30%, transparent) 75%);
}

.trailer-soon {
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  padding: 8px 20px 8px 8px;
  border: 3px solid var(--outline);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg-deep) 82%, transparent);
  color: var(--text);
  font-size: clamp(.95rem, .85rem + .6vw, 1.3rem);
  font-weight: 700;
  white-space: nowrap;
}
.play {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  border: 3px solid var(--outline);
  border-radius: 50%;
  background: var(--accent);
}
.play::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 9px;
  border-style: solid;
  border-width: 8px 0 8px 13px;
  border-color: transparent transparent transparent var(--outline);
}
@media (min-width: 720px) {
  .play { width: 48px; height: 48px; }
  .play::after { left: 16px; top: 11px; border-width: 10px 0 10px 16px; }
}

.features {
  display: grid;
  gap: 16px;
  margin: 56px 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 760px) {
  .features { grid-template-columns: 1fr 1fr; gap: 20px; }
}

.feature {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  border: 3px solid var(--outline);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .08), 0 5px 0 var(--outline);
}
.feature-icon {
  flex: none;
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 12px;
}
@media (min-width: 520px) {
  .feature-icon { width: 64px; height: 64px; border-radius: 16px; }
}
.feature h3 {
  margin: 0 0 6px;
  color: var(--heading);
  font-size: 1.25rem;
  line-height: 1.2;
}
.feature p { margin: 0; font-size: 1rem; }

.cast-block,
.gallery-block { margin-top: 64px; }

.block-title {
  margin: 0;
  color: var(--heading);
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem);
  line-height: 1.15;
  text-align: center;
}
.block-sub {
  margin: 6px 0 0;
  color: var(--muted);
  text-align: center;
}

.cast {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 600px) { .cast { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 960px) { .cast { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; } }

.cast-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 8px 14px;
  border: 3px solid var(--outline);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 4px 0 var(--outline);
  text-align: center;
}
/* like a game card: the portrait sits flush against the frame's left edge */
.cast-art {
  display: block;
  width: 100%;
  max-width: 120px;
  aspect-ratio: 1;
  overflow: hidden;
  border: 3px solid var(--outline);
  border-radius: 14px;
  background: radial-gradient(circle at 62% 38%, var(--art-hi), var(--art-lo) 70%);
}
.cast-img {
  width: 108%;
  max-width: none;
  height: auto;
  margin: 2% 0 0 -6%;
}
.cast-item strong {
  margin-top: 8px;
  color: var(--heading);
  font-size: 1.05rem;
  line-height: 1.2;
}
.cast-power {
  margin-top: 2px;
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.25;
}
/* a language without character names shows only the power, as the label */
.cast-item strong.cast-solo { font-size: .98rem; line-height: 1.25; }

.gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 82%;
  gap: 14px;
  margin: 24px calc(-1 * var(--gutter)) 0;
  padding: 4px var(--gutter) 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  list-style: none;
}
.gallery li { scroll-snap-align: start; }
@media (min-width: 720px) {
  .gallery {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 24px 0 0;
    padding: 0;
    overflow: visible;
  }
}

.shot {
  position: relative; /* keeps the sr-only text inside the scrolling strip */
  display: block;
  overflow: hidden;
  border: 3px solid var(--outline);
  border-radius: 16px;
  background: var(--bg-deep);
  box-shadow: 0 5px 0 var(--outline);
  transition: transform .15s ease;
}
.shot:hover { transform: translateY(-3px); }
.shot img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.game .center { margin: 56px 0 0; }

/* ---------- about ---------- */

.about {
  padding: 72px 0 88px;
  border-top: 4px solid var(--outline);
  background:
    radial-gradient(900px 480px at 50% 0%, var(--band-glow), transparent 70%),
    var(--bg);
}
.section-title {
  margin: 0 0 16px;
  color: var(--heading);
  font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.5rem);
  line-height: 1.1;
}
.about p { font-size: 1.1rem; }

.about .actions { margin-top: 36px; }

/* ---------- small pages ---------- */

.simple-page { padding: 32px 0 88px; }
.note-wrap { position: relative; z-index: 0; margin-top: 80px; }
.page-title {
  margin: 0 0 14px;
  color: var(--heading);
  font-size: clamp(1.9rem, 1.4rem + 2vw, 2.8rem);
  line-height: 1.1;
}
.lead { font-size: 1.2rem; }
.actions { margin: 28px 0 0; }
.other-lang {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 2px dashed color-mix(in srgb, var(--text) 25%, transparent);
  color: var(--muted);
}
.other-lang p { margin: 0 0 6px; }

.prose { padding-top: 40px; }
.prose h2 {
  margin: 34px 0 8px;
  color: var(--heading);
  font-size: 1.35rem;
  line-height: 1.2;
}
.prose p { margin: 0 0 12px; }
.updated { color: var(--muted); font-size: .95rem; }

/* ---------- footer ---------- */

.site-footer {
  padding: 34px 0 40px;
  border-top: 4px solid var(--outline);
  background: var(--bg-deep);
  color: var(--muted);
  font-size: .95rem;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 32px;
}
.footer-brand {
  margin: 0;
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 700;
}
.footer-links ul,
.footer-social ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-links a,
.footer-social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  color: var(--text);
}
.footer-links a:hover,
.footer-social a:hover { color: var(--heading); }
.footer-social .icon {
  flex: none;
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.footer-note { flex-basis: 100%; margin: 4px 0 0; font-size: .88rem; }

/* ---------- lightbox ---------- */

.lightbox {
  width: min(94vw, 1400px);
  max-width: none;
  max-height: 94vh;
  padding: 0;
  overflow: visible;
  border: 4px solid var(--outline);
  border-radius: 18px;
  background: var(--bg-deep);
  color: var(--text);
}
.lightbox::backdrop { background: color-mix(in srgb, var(--bg-deep) 88%, transparent); }
.lb-figure { margin: 0; }
.lb-img {
  width: 100%;
  max-height: calc(94vh - 76px);
  object-fit: contain;
  border-radius: 14px 14px 0 0;
  background: #000;
}
.lb-caption {
  min-height: 64px;
  padding: 14px 72px;
  font-size: 1rem;
  text-align: center;
}
.lb-btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 3px solid var(--outline);
  border-radius: 50%;
  background: var(--heading);
  box-shadow: 0 3px 0 var(--outline);
  color: var(--on-heading);
  cursor: pointer;
}
.lb-close { top: -20px; right: -16px; }
.lb-prev { left: 10px; bottom: 8px; }
.lb-next { right: 10px; bottom: 8px; }

/* ---------- motion ---------- */

@keyframes twinkle { from { opacity: .45; } to { opacity: .9; } }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50% { transform: translateY(-12px) rotate(3deg); }
}
@keyframes peek {
  0%, 100% { transform: translateY(18px); }
  40%, 75% { transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

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