/* Coldwire Studio
   A cold, frost-light studio page; the games bring the heat. One memorable element: the wire
   across the top of the home page that the featured game hangs from (a spark runs along it
   once on load). Everything else stays quiet. */

:root {
  --frost: #e9f1f4; /* page */
  --rime: #cfe0e8; /* panels, rules */
  --rime-deep: #b4cad6;
  --ink: #102434; /* text */
  --ink-soft: #3d5568;
  --current: #2b6bff; /* the wire */
  --current-text: #1d50cc; /* links: darker for contrast on frost */
  --spark: #7fe3ff;
  --ember: #ff7a3d; /* Hillfire's own colour, used only for Hillfire */
  --ember-deep: #c4491c;
  --white: #ffffff;

  --display: 'Big Shoulders Display', 'Arial Narrow', sans-serif;
  --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --page: min(1180px, 100% - 32px);
  --radius-lg: 22px;
  --radius-sm: 10px;
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--frost);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
}

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

a {
  color: var(--current-text);
  text-underline-offset: 3px;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--current);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  padding: 8px 14px;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-sm);
  z-index: 10;
}
.skip:focus {
  left: 16px;
}

.wrap {
  width: var(--page);
  margin-inline: auto;
}

/* ---- type scale (1.25 ratio from 17px body) ---- */
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: 0.005em;
  margin: 0;
}
h1 {
  font-size: clamp(56px, 11vw, 132px);
}
h2 {
  font-size: clamp(36px, 5.5vw, 56px);
}
h3 {
  font-size: 30px;
}
p {
  margin: 0;
  max-width: 64ch;
}
.lede {
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ---- header ---- */
.site-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  color: var(--ink);
  text-decoration: none;
}
.brand-name {
  font-family: var(--display);
  font-weight: 800;
  font-size: 30px;
  letter-spacing: 0.06em;
  line-height: 1;
}
.brand-sub {
  font-family: var(--display);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: 0.08em;
  color: var(--current-text);
}
.site-nav {
  display: flex;
  gap: 4px;
}
.site-nav a {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.site-nav a:hover {
  background: var(--rime);
}
.site-nav a[aria-current='page'] {
  color: var(--current-text);
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.12s ease;
}
.btn:active {
  transform: translateY(2px);
}
/* Hillfire's play button wears Hillfire's colour; ink text keeps it readable (white on this
   orange is under 3:1) */
.btn-play {
  background: var(--ember);
  color: var(--ink);
  box-shadow: 0 4px 0 var(--ember-deep);
}
.btn-play:active {
  box-shadow: 0 2px 0 var(--ember-deep);
}
.btn-plain {
  border-color: var(--ink);
  color: var(--ink);
}
.btn-plain:hover {
  background: var(--white);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---- the wire (home hero) ---- */
.hero {
  position: relative;
  padding-bottom: 72px;
}
.wire {
  display: block;
  width: 100%;
  height: 90px;
  overflow: visible;
}
.wire .cable {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.5;
}
.wire .drop {
  stroke: var(--ink);
  stroke-width: 2;
}
.wire .spark {
  fill: none;
  stroke: var(--spark);
  stroke-width: 6;
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px var(--current));
  stroke-dasharray: 26 1000;
  stroke-dashoffset: 26;
  opacity: 0;
  animation: spark-run 1.7s cubic-bezier(0.5, 0, 0.7, 1) 0.5s forwards;
}
@keyframes spark-run {
  0% {
    stroke-dashoffset: 26;
    opacity: 1;
  }
  92% {
    opacity: 1;
  }
  100% {
    stroke-dashoffset: -1000;
    opacity: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .wire .spark {
    animation: none;
  }
  .btn {
    transition: none;
  }
}

/* the featured game: a lit sign hanging from the wire */
.feature {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  margin-top: -6px;
}
.feature-shot {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 3px solid var(--ink);
  box-shadow: 0 0 0 6px var(--rime), 0 30px 60px -20px rgba(196, 73, 28, 0.55);
}
.feature-shot img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.feature-text {
  display: grid;
  gap: 18px;
  justify-items: start;
}
/* the home page's H1: one quiet line above the wire, naming the studio and what it makes */
.home-title {
  margin-top: 4px;
  font-family: var(--body);
  font-weight: 600;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--ink-soft);
}
/* the featured game's name: an H2 (the H1 names the studio) at the H1's size */
.feature-title {
  font-size: clamp(56px, 11vw, 132px);
}
.feature-text h1,
.feature-text .feature-title {
  color: var(--ember-deep);
}
.feature-text .lede {
  font-size: 19px;
}
.facts {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
  color: var(--ink-soft);
  font-size: 16px;
}
.facts li {
  display: flex;
  gap: 10px;
  align-items: baseline;
}
.facts li::before {
  content: '';
  flex: none;
  width: 14px;
  height: 2px;
  background: var(--current);
  transform: translateY(-4px);
}

/* ---- sections ---- */
.section {
  padding-block: 64px;
  border-top: 2px solid var(--rime);
}
.section > .wrap > h2 {
  margin-bottom: 28px;
}

/* games grid */
.games {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 24px;
}
.game {
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--rime-deep);
}
.game img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.game-body {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 20px 22px 24px;
}
.game-body .actions {
  margin-top: 6px;
}
.game-body .btn {
  min-height: 46px;
  font-size: 16px;
  padding: 0 20px;
}
/* the slot for the next game: an unplugged socket, not a fake card */
.game-next {
  display: grid;
  place-content: center;
  gap: 10px;
  min-height: 260px;
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 2px dashed var(--rime-deep);
  color: var(--ink-soft);
}
.game-next h3 {
  color: var(--ink);
}

/* about strip on home */
.about-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 40px;
  align-items: start;
}
.about-strip p + p {
  margin-top: 14px;
}

/* ---- inner pages ---- */
.page-head {
  padding-block: 40px 32px;
  display: grid;
  gap: 16px;
}
.page-head h1 {
  font-size: clamp(52px, 9vw, 104px);
}
.prose {
  display: grid;
  gap: 16px;
  padding-bottom: 72px;
}
.prose h2 {
  font-size: 34px;
  margin-top: 28px;
}
.prose ul {
  margin: 0;
  padding-left: 22px;
  max-width: 64ch;
}
.prose li + li {
  margin-top: 6px;
}
.note {
  padding: 16px 20px;
  border-left: 4px solid var(--current);
  background: var(--white);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  max-width: 64ch;
}

/* game page */
.game-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 40px;
  align-items: center;
  padding-block: 24px 56px;
}
.game-hero h1 {
  color: var(--ember-deep);
}
.game-hero .feature-text {
  gap: 18px;
}
.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 20px;
}
.steps li {
  counter-increment: step;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 20px;
  background: var(--white);
  border-radius: var(--radius-sm);
  border-top: 4px solid var(--current);
}
/* a real sequence (one match, in order), so the steps are numbered */
.steps li::before {
  content: counter(step);
  font-family: var(--display);
  font-weight: 800;
  font-size: 40px;
  line-height: 1;
  color: var(--current-text);
}
.steps h3 {
  font-size: 26px;
}
.cats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: 14px 28px;
  margin: 0;
}
.cats div {
  padding-top: 12px;
  border-top: 2px solid var(--rime-deep);
}
.cats dt {
  font-weight: 700;
}
.cats dd {
  margin: 2px 0 0;
  color: var(--ink-soft);
}
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 18px;
}
.shots figure {
  margin: 0;
  display: grid;
  gap: 8px;
}
.shots img {
  border-radius: var(--radius-sm);
  border: 2px solid var(--rime-deep);
}
.shots figcaption {
  font-size: 15px;
  color: var(--ink-soft);
}
.controls .prose {
  padding-bottom: 0;
}
.controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 24px;
}
.faq {
  display: grid;
  gap: 12px;
  max-width: 76ch;
}
.faq details {
  background: var(--white);
  border-radius: var(--radius-sm);
  padding: 4px 20px;
}
.faq summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 700;
}
.faq details p {
  padding-bottom: 16px;
}
.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--ink);
  color: var(--frost);
}
.cta-band h2 {
  color: var(--white);
}

/* ---- footer ---- */
.site-foot {
  padding-block: 40px 48px;
  border-top: 2px solid var(--rime);
  color: var(--ink-soft);
  font-size: 15px;
}
.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.foot-links a {
  color: var(--ink);
}

/* the stats line (site/js/stats.js): what's counted, with a one-tap switch */
.stats-line {
  flex-basis: 100%;
  margin: 0;
  font-size: 14px;
}
.stats-btn {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  color: var(--current-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---- small screens ---- */
@media (max-width: 860px) {
  .feature,
  .game-hero,
  .about-strip {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .wire {
    height: 56px;
  }
  .section {
    padding-block: 48px;
  }
  .game-next {
    min-height: 0;
  }
}
@media (max-width: 560px) {
  .site-head {
    flex-wrap: wrap;
    padding-block: 16px;
  }
  .brand-name {
    font-size: 26px;
  }
  .site-nav {
    width: 100%;
    margin-left: -12px;
  }
  .lede {
    font-size: 18px;
  }
  .actions .btn {
    flex: 1 1 auto;
  }
  .cta-band {
    padding: 24px;
  }
}

/* the wire's drop lines meet the featured screenshot's top corners: two-column layout on wide
   screens, full-width screenshot on narrow ones */
.drops-narrow {
  display: none;
}
@media (max-width: 860px) {
  .drops-wide {
    display: none;
  }
  .drops-narrow {
    display: inline;
  }
}
