@font-face {
  font-family: Studio;
  src: local('Avenir Next');
  font-display: swap;
}

:root {
  color-scheme: dark;
  --paper: #151321;
  --surface: #211d32;
  --ink: #fff8ed;
  --muted: #d1c9db;
  --accent: #ffad78;
  --action: #ff925e;
  --line: #463c56;
  --on-bright: #22172a;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 28px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Studio, 'Avenir Next', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
a { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3, a, p { overflow-wrap: anywhere; }
h2 { font-size: clamp(30px, 4.2vw, 48px); line-height: 1.15; letter-spacing: -.04em; }
.wrap { width: min(1180px, calc(100% - 72px)); margin-inline: auto; }
.accent { color: var(--accent); }

.header {
  min-height: 98px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.brand { display: block; width: 92px; flex: 0 0 auto; }
.header nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0 clamp(12px, 3vw, 30px);
  min-width: 0;
  font-size: 14px;
  font-weight: 700;
}
.header nav a { display: inline-flex; align-items: center; min-height: 44px; }
.header nav a:hover { color: var(--accent); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, .83fr) minmax(0, 1.17fr);
  align-items: center;
  gap: clamp(32px, 5vw, 78px);
  padding-block: clamp(44px, 6.4vw, 88px) 38px;
}
.hero-copy { min-width: 0; }
.hero h1 {
  font-size: clamp(48px, 7vw, 104px);
  line-height: .99;
  letter-spacing: -.065em;
  font-weight: 850;
  margin-bottom: 24px;
}
.highlight { display: block; color: var(--accent); }
.intro {
  max-width: 36ch;
  font-size: clamp(16px, 1.7vw, 20px);
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 25px;
}
.button {
  display: inline-flex;
  min-height: 48px;
  max-width: 100%;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 750;
  text-align: center;
  transition: background .2s, transform .2s, box-shadow .2s;
}
.dark { background: var(--action); color: var(--on-bright); box-shadow: 0 4px 0 #a23f32; }
.dark:hover { background: #ffad78; transform: translateY(-2px); }
.button:active { transform: translateY(2px); }

.hero-art {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 1.6vw, 20px);
  min-width: 0;
}
.art-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--frame-line);
  border-radius: clamp(13px, 1.7vw, 22px);
  background: var(--frame);
  color: #fff8ed;
  box-shadow: 0 12px 24px #0a081f40;
  transition: transform .2s ease, border-color .2s ease;
}
.art-card:hover { transform: translateY(-3px); border-color: var(--frame-accent); }
.art-card:focus-visible { outline-color: var(--frame-accent); }
.art-card img { width: 100%; height: auto; }
.art-card > span {
  display: flex;
  flex: 1;
  align-items: center;
  padding: 10px clamp(8px, 1.3vw, 15px);
  border-top: 1px solid var(--frame-line);
  font-size: clamp(12px, 1.2vw, 16px);
  line-height: 1.25;
  font-weight: 750;
}
.snaky-art { --frame: #182b30; --frame-line: #3c5d63; --frame-accent: #8cceba; }
.snaky-poster { position: relative; container-type: inline-size; overflow: hidden; }
.snaky-poster > img { transform: scale(1.32); transform-origin: 50% 79%; }
.snaky-tagline {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  gap: .14em;
  padding: 8% 5% 6%;
  background: linear-gradient(0deg, #07121cf5 10%, #07121cdb 78%, #07121c00);
  color: #fff3d8;
  font-size: clamp(13px, 2.45vw, 37px);
  font-size: clamp(13px, 10.7cqi, 37px);
  font-weight: 850;
  line-height: 1.1;
  letter-spacing: -.03em;
  text-align: center;
  text-shadow: 0 2px 0 #07121c, 0 3px 8px #07121c;
}
.snaky-rainbow { white-space: nowrap; }
.snaky-rainbow span:nth-child(1) { color: #ff91a5; }
.snaky-rainbow span:nth-child(2) { color: #ffb578; }
.snaky-rainbow span:nth-child(3) { color: #ffe178; }
.snaky-rainbow span:nth-child(4) { color: #b9ef86; }
.snaky-rainbow span:nth-child(5) { color: #77e8bb; }
.snaky-rainbow span:nth-child(6) { color: #80dfff; }
.snaky-rainbow span:nth-child(7) { color: #a3b7ff; }
.snaky-rainbow span:nth-child(8) { color: #cfabff; }
.snaky-rainbow span:nth-child(9) { color: #ffa5e2; }
.snaky-rainbow span:nth-child(10) { color: #ffad98; }
.snaky-rainbow span:nth-child(11) { color: #f8e8aa; }
.snaky-save { font-size: .78em; }
.rome-art { --frame: #33241f; --frame-line: #77503c; --frame-accent: #efb47b; }

.section { padding-block: 30px clamp(46px, 6vw, 76px); }
.section h2 { margin-bottom: 22px; }
.game-grid, .info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 3vw, 34px);
}
.game-grid { align-items: start; }
.game {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(10px, 1.5vw, 17px);
  border-radius: 25px;
  background: var(--card);
  color: var(--on-bright);
}
.snaky-game { --card: #d8c9ff; --shade: #42346c; }
.rome-game { --card: #ffcc9f; --shade: #52342a; }
.game-image {
  display: block;
  aspect-ratio: 1.85;
  overflow: hidden;
  border-radius: 15px;
  background: var(--surface);
}
.game-image:focus-visible, .game .store-badge:focus-visible { outline-color: var(--on-bright); }
.game-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}
.game-image:hover img { transform: scale(1.045); }
.game-image > .rome-battle { scale: 1.2; transform-origin: 50% 45%; }
.rome-artwork { position: relative; }
.artwork-arrow {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: 10px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid #fff8ed80;
  border-radius: 50%;
  background: #151321dc;
  color: #fff8ed;
  cursor: pointer;
  transform: translateY(-50%);
}
.artwork-arrow[hidden] { display: none; }
.artwork-arrow::before {
  content: '';
  width: 11px;
  height: 11px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translateX(-2px) rotate(45deg);
}
.artwork-arrow.is-previous { right: auto; left: 10px; }
.artwork-arrow.is-previous::before { transform: translateX(2px) rotate(-135deg); }
.artwork-arrow:hover { background: #151321; }
.artwork-arrow:focus-visible { outline: 3px solid #fff8ed; outline-offset: 3px; }
.game-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1;
  padding: clamp(13px, 2vw, 24px) clamp(7px, 1.6vw, 18px);
}
.game-kicker {
  margin-bottom: 9px;
  padding: 2px 10px;
  border: 1px solid currentColor;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 750;
  color: var(--shade);
}
.game h3 { font-size: clamp(25px, 3vw, 38px); line-height: 1.1; letter-spacing: -.035em; margin-bottom: 10px; }
.game-content > p:not(.game-kicker) { max-width: 42ch; color: var(--shade); font-size: 15px; margin-bottom: 17px; }
.game-actions { width: 100%; margin-top: auto; }
.game-links, .store-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.story-button { border: 1px solid var(--shade); color: var(--shade); }
.story-button:hover { background: #ffffff5c; }
.story-button:focus-visible { outline-color: var(--on-bright); }
.store-badge { display: inline-flex; align-items: center; min-height: 44px; border-radius: 7px; }
.store-badge img { height: 40px; width: auto; }
.play-store-label {
  display: flex;
  align-items: center;
  gap: 7px;
  width: 128px;
  height: 40px;
  padding-inline: 7px;
  border: 1px solid #a6a6a6;
  border-radius: 7px;
  background: #000;
  color: #fff;
  font: 600 15px/1 Arial, sans-serif;
}
.play-store-label img { flex: none; width: 18px; height: 20px; }
.play-store-copy { display: grid; gap: 2px; white-space: nowrap; }
.play-store-copy small { font-size: 8px; font-weight: 400; letter-spacing: .04em; }
.video-gallery { margin-top: 9px; }
.video-gallery summary {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding-inline: 3px;
  list-style: none;
  color: var(--shade);
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}
.video-gallery summary::-webkit-details-marker { display: none; }
.video-gallery summary:hover, .video-gallery[open] summary { text-decoration: underline; text-underline-offset: 4px; }
.video-gallery summary:focus-visible, .video-preview:focus-visible, .video-frame video:focus-visible { outline: 3px solid var(--shade); outline-offset: 3px; }
.video-count {
  display: grid;
  place-items: center;
  min-width: 23px;
  min-height: 23px;
  border-radius: 50%;
  background: var(--shade);
  color: #fff8ed;
  font-size: 11px;
}
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  max-width: 390px;
  padding-top: 5px;
}
.video-clip { margin: 0; min-width: 0; }
.video-frame { aspect-ratio: 9 / 16; border-radius: 12px; background: #191422; }
.video-preview, .video-frame video { display: block; width: 100%; height: 100%; border-radius: inherit; }
.video-frame video { object-fit: contain; }
.video-preview { position: relative; overflow: hidden; }
.video-preview img { width: 100%; height: 100%; object-fit: cover; }
.video-preview span {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 5px 10px;
  border: 1px solid #ffffff65;
  border-radius: 100px;
  background: #191422;
  color: #fff8ed;
  font-size: 12px;
  font-weight: 750;
}
.video-preview:hover span { background: #fff8ed; color: var(--on-bright); }
.video-clip figcaption { margin-top: 4px; color: var(--shade); font-size: 13px; font-weight: 750; overflow-wrap: anywhere; }

.info-grid { padding-bottom: clamp(38px, 6vw, 72px); }
.info-panel {
  min-width: 0;
  padding: clamp(18px, 3vw, 32px);
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--surface);
}
.info-panel h2 { font-size: clamp(25px, 3vw, 34px); margin-bottom: 10px; }
.info-panel p { color: var(--muted); max-width: 45ch; margin-bottom: 7px; }
.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 14px;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.text-link:hover, .email-link:hover { color: var(--accent); }
.email-link { text-decoration: underline; text-underline-offset: 3px; }

.footer { border-top: 1px solid var(--line); padding-block: 30px 20px; }
.footer-top, .footer-bottom { display: flex; justify-content: space-between; align-items: flex-start; gap: 26px; }
.footer-wordmark { font-size: 30px; font-weight: 850; letter-spacing: -.05em; }
.footer-wordmark > span:last-child { font-size: 10px; letter-spacing: 2px; margin-left: 5px; }
.footer nav.footer-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.footer-group { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.footer-group p { margin: 5px 0 4px; font-size: 12px; font-weight: 750; }
.footer-group a { display: inline-flex; align-items: center; min-height: 42px; color: var(--muted); font-size: 12px; }
.footer a:hover { color: var(--accent); }
.footer-bottom { margin-top: 23px; font-size: 11px; color: var(--muted); }
.skip-link { position: fixed; top: -100px; left: 20px; z-index: 10; padding: 16px; background: var(--action); color: var(--on-bright); }
.skip-link:focus { top: 10px; }

.support-page { max-width: 960px; padding-block: 42px 66px; }
.support-back { display: inline-flex; align-items: center; min-height: 44px; color: var(--accent); margin-bottom: 18px; font-size: 14px; }
.support-page h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.12; letter-spacing: -.04em; margin-bottom: 12px; }
.support-intro { max-width: 60ch; color: var(--muted); }
.support-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-block: 25px; }
.support-option { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: clamp(16px, 3vw, 28px); }
.support-option h2 { font-size: 25px; margin-bottom: 9px; }
.support-option p { font-size: 14px; color: var(--muted); }
.support-option .text-link { display: flex; width: fit-content; }
.support-email { border-top: 1px solid var(--line); padding-top: 24px; }
.support-email h2 { font-size: 27px; margin-bottom: 10px; }
.support-email p { color: var(--muted); max-width: 60ch; font-size: 14px; }

@media (max-width: 760px) {
  .wrap { width: calc(100% - 36px); }
  .header { min-height: 78px; }
  .brand { width: 72px; }
  .header nav .contact-nav { display: none; }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 26px; padding-block: 34px 24px; }
  .hero h1 { font-size: clamp(42px, 10vw, 66px); margin-bottom: 16px; }
  .highlight { display: inline; }
  .intro { margin-bottom: 18px; }
  .hero-art { width: min(100%, 530px); justify-self: center; }
  .footer-top { flex-direction: column; gap: 12px; }
  .footer nav.footer-groups { width: 100%; gap: 18px; }
}
@media (max-width: 560px) {
  .game-grid, .info-grid, .support-options { grid-template-columns: minmax(0, 1fr); }
  .game { border-radius: 19px; }
  .game-image { border-radius: 11px; }
  .footer nav.footer-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 340px) {
  .snaky-game .game-content { padding-inline: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
