/* Jonidge studio site — off-white, ink, and a restrained slate accent. */
@font-face {
  font-family: Geist;
  src: url("../fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f6f6f4;
  --bg-deep: #ecece9;
  --paper: #ffffff;
  --ink: #161615;
  --ink-soft: #5c5b58;
  --line: #e3e3df;
  --accent: #3d4a5c;
  --accent-hover: #2a3340;
  --sun: #f3b53a;
  --sun-deep: #d2651a;
  --radius: 1.15rem;
  --shadow: 0 1px 2px rgba(22, 22, 21, 0.04), 0 12px 32px rgba(22, 22, 21, 0.06);
  --max: 68rem;
  --header-h: 4.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  background: var(--bg);
  color: var(--ink);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: Geist, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 430;
  font-size: 1.0625rem;
  line-height: 1.55;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    radial-gradient(900px 480px at 8% -8%, rgba(22, 22, 21, 0.03), transparent 60%),
    radial-gradient(720px 420px at 100% 0%, rgba(61, 74, 92, 0.05), transparent 55%),
    var(--bg);
}

img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--accent-hover); }
a:focus-visible,
button:focus-visible,
video:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.85rem;
  border-radius: 0.4rem;
  z-index: 20;
}
.skip:focus { top: 0.6rem; }

.wrap {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
}

/* ----- Header ----- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: var(--header-h);
  display: flex;
  align-items: center;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
}
.brand:hover { color: inherit; }
.brand .mark {
  width: 2rem;
  height: 2rem;
  border-radius: 0.55rem;
  flex: none;
}
.brand .name {
  font-weight: 640;
  font-size: 1.2rem;
  letter-spacing: -0.04em;
  line-height: 1;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
  font-weight: 530;
  font-size: 0.95rem;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
}
.nav-links a:hover { color: var(--accent); }

/* ----- Hero ----- */
.hero {
  padding: clamp(3.5rem, 10vw, 7.5rem) 0 clamp(3rem, 7vw, 5.5rem);
  text-align: center;
}
.hero-lockup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.85rem, 2vw, 1.35rem);
  margin: 0 auto 1.5rem;
}
.hero-lockup .mark {
  width: clamp(4.25rem, 10vw, 6.25rem);
  height: clamp(4.25rem, 10vw, 6.25rem);
  border-radius: clamp(0.95rem, 2.2vw, 1.4rem);
  box-shadow: var(--shadow);
}
.hero-lockup .wordmark {
  width: min(22rem, 62vw);
  height: auto;
}
.lede {
  margin: 0 auto;
  max-width: 28rem;
  color: var(--ink-soft);
  font-size: clamp(1.15rem, 2.2vw, 1.35rem);
  font-weight: 450;
  letter-spacing: -0.02em;
  line-height: 1.4;
}

/* ----- Games ----- */
.section {
  padding: 0 0 5.5rem;
}
.section-kicker {
  margin: 0 0 1.25rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.apps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.app-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem 1.5rem;
  align-items: start;
  padding: 1.35rem 1.5rem 1.45rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 0.15rem);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.app-card:hover {
  color: inherit;
  transform: translateY(-2px);
  box-shadow: 0 2px 4px rgba(22, 22, 21, 0.05), 0 18px 40px rgba(22, 22, 21, 0.09);
}
.app-card .icon {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 1.25rem;
  grid-row: span 2;
}
.app-card h2 {
  margin: 0.15rem 0 0.2rem;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.app-card .subtitle {
  margin: 0 0 0.45rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}
.app-card .oneliner {
  margin: 0;
  grid-column: 2;
  color: var(--ink);
  font-size: 0.98rem;
}
.app-card .meta {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.15rem;
  padding-top: 0.95rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: var(--bg-deep);
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.pill::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
}
/* Sunplop brand colors stay on the game card (and optionally the game page). */
.app-card-sunplop .pill {
  background: color-mix(in srgb, var(--sun) 28%, var(--paper));
  color: #7a3d08;
}
.app-card-sunplop .pill::before {
  background: var(--sun-deep);
}
.app-card .more {
  color: var(--accent);
  font-weight: 580;
  text-decoration: none;
}
.app-card:hover .more { color: var(--accent-hover); }

/* ----- Footer ----- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-deep) 55%, var(--bg));
  padding: 2.4rem 0 2rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: start;
  gap: 1.5rem 2rem;
}
.site-footer .brand .name { font-size: 1.1rem; }
.footer-contact {
  text-align: right;
  line-height: 1.5;
}
.footer-contact a {
  color: var(--ink);
  font-weight: 560;
  text-decoration: none;
  display: inline-block;
  margin-bottom: 0.35rem;
}
.footer-contact a:hover { color: var(--accent); }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem 0.95rem;
  margin: 0.15rem 0 0;
  font-size: 0.88rem;
}
.footer-links a {
  color: var(--ink-soft);
  font-weight: 520;
  margin-bottom: 0;
}
.copyright {
  flex: 1 0 100%;
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  color: color-mix(in srgb, var(--ink-soft) 80%, var(--bg));
}

/* ----- Game page ----- */
.game-hero {
  padding: clamp(2.2rem, 6vw, 4rem) 0 2rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.35rem 1.6rem;
  align-items: center;
}
.game-hero .icon {
  width: clamp(5.5rem, 16vw, 7.5rem);
  height: clamp(5.5rem, 16vw, 7.5rem);
  border-radius: 1.55rem;
  box-shadow: var(--shadow);
  grid-row: span 4;
}
.eyebrow {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.game-hero h1 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.55rem);
  font-weight: 670;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.game-hero .subtitle {
  margin: 0;
  font-size: 1.15rem;
  color: var(--ink-soft);
  font-weight: 500;
}
.game-hero .oneliner {
  margin: 0.15rem 0 0;
  max-width: 36rem;
  font-size: 1.05rem;
}
.coming-soon {
  margin: 0 0 2.2rem;
  padding: 0.9rem 1.15rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 550;
  text-align: center;
}
.feature {
  margin: 0 0 2.5rem;
  border-radius: calc(var(--radius) + 0.2rem);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.feature img { width: 100%; }

.block-title {
  margin: 0 0 1rem;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}
.preview-video {
  width: min(16.5rem, 68vw);
  margin: 0 auto 2.4rem;
}
.preview-video video {
  width: 100%;
  border-radius: 1.25rem;
  background: #161615;
  box-shadow: var(--shadow);
}
.preview-video figcaption {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-align: center;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin: 0 0 3rem;
}
.gallery figure { margin: 0; }
.gallery img,
.gallery video {
  width: 100%;
  border-radius: 1rem;
  background: #161615;
  box-shadow: var(--shadow);
}
.gallery figcaption {
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-align: center;
}
.gallery .is-video {
  grid-column: auto;
}

.prose {
  max-width: 40rem;
  margin: 0 auto 3.25rem;
}
.prose h2 {
  margin: 1.8rem 0 0.6rem;
  font-size: 1.15rem;
  font-weight: 670;
  letter-spacing: -0.02em;
}
.prose p { margin: 0.7rem 0; }
.prose ul {
  margin: 0.4rem 0 0.9rem;
  padding-left: 1.2rem;
}
.prose li { margin: 0.25rem 0; }
.prose li::marker { color: var(--accent); }
.page-sunplop .prose li::marker { color: var(--sun-deep); }
.page-sunplop .coming-soon {
  border-color: #e8d7b4;
  background: #fbf6ec;
}
.page-sunplop .coming-soon {
  border-color: color-mix(in srgb, var(--sun) 40%, var(--line));
  background: color-mix(in srgb, var(--sun) 11%, var(--paper));
}

.legal-links {
  margin: 0 0 4rem;
  padding: 1.25rem 1.35rem 1.35rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.legal-links h2 {
  margin: 0 0 0.7rem;
  font-size: 1rem;
  font-weight: 650;
}
.legal-links ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1.15rem;
}
.legal-links a { font-weight: 540; white-space: nowrap; }

/* ----- Legal pages ----- */
.legal-main {
  width: min(46rem, calc(100% - 2.5rem));
  margin: 1.75rem auto 4rem;
}
.legal-crumb {
  margin: 0 0 1rem;
  font-size: 0.88rem;
}
.legal-crumb a { color: var(--ink-soft); text-decoration: none; }
.legal-crumb a:hover { color: var(--accent); }
.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.9rem;
  margin: 0 0 1.6rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  line-height: 1.8;
}
.legal-nav a { color: var(--ink-soft); text-decoration: none; font-weight: 520; }
.legal-nav a:hover,
.legal-nav a[aria-current="page"] { color: var(--accent); }
.legal-nav a[aria-current="page"] { font-weight: 650; }

.legal-main h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  font-weight: 670;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--ink);
}
.legal-main h2 {
  margin: 1.8rem 0 0.55rem;
  font-size: 1.15rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.legal-main h3 {
  margin: 1.2rem 0 0.4rem;
  font-size: 1.02rem;
  font-weight: 640;
}
.legal-main p, .legal-main li { color: var(--ink); }
.legal-main ul, .legal-main ol { padding-left: 1.25rem; }
.legal-main li { margin: 0.28rem 0; }
.legal-main table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9rem;
  margin: 0.8rem 0 1.1rem;
  background: var(--paper);
}
.legal-main td, .legal-main th {
  border: 1px solid var(--line);
  padding: 0.5rem 0.65rem;
  vertical-align: top;
  text-align: left;
}
.legal-main th { background: color-mix(in srgb, var(--bg-deep) 70%, var(--paper)); font-weight: 600; }

/* ----- 404 ----- */
.error-page {
  text-align: center;
  padding: 6rem 1.25rem 5rem;
}
.error-page h1 {
  margin: 0 0 0.5rem;
  font-size: 2.4rem;
  letter-spacing: -0.04em;
}

@media (max-width: 800px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .game-hero { grid-template-columns: auto 1fr; }
}
@media (max-width: 640px) {
  .wrap { width: min(var(--max), calc(100% - 1.6rem)); }
  .hero { padding-top: 2.8rem; }
  .app-card {
    grid-template-columns: 4.25rem 1fr;
    padding: 1.1rem 1.1rem 1.2rem;
    gap: 0.75rem 1rem;
  }
  .app-card .icon { width: 4.25rem; height: 4.25rem; border-radius: 1rem; grid-row: span 1; }
  .app-card .oneliner,
  .app-card .meta { grid-column: 1 / -1; }
  .game-hero {
    grid-template-columns: 1fr;
    text-align: left;
    justify-items: start;
  }
  .game-hero .icon { grid-row: auto; }
  .gallery {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0.75rem;
    padding-bottom: 0.6rem;
    margin-inline: -0.8rem;
    padding-inline: 0.8rem;
    -webkit-overflow-scrolling: touch;
  }
  .gallery figure {
    flex: 0 0 52vw;
    scroll-snap-align: start;
  }
  .site-footer .wrap,
  .footer-contact { text-align: left; }
  .footer-contact { width: 100%; }
  .footer-links { justify-content: flex-start; }
  .legal-main { width: min(46rem, calc(100% - 1.6rem)); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .app-card { transition: none; }
  .app-card:hover { transform: none; }
}


/* ----- Play / in development ----- */
.dev-lock-icon {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 1.25rem;
  grid-row: span 2;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #fff;
  flex: none;
}
.dev-lock-icon svg { width: 2.15rem; height: 2.15rem; }

.play-lock {
  padding: clamp(2.8rem, 8vw, 5.5rem) 0 5rem;
}
.play-lock-card {
  max-width: 26.5rem;
  margin: 0 auto;
  padding: 2rem 1.6rem 1.85rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 0.15rem);
  box-shadow: var(--shadow);
  text-align: center;
}
.play-lock-card .dev-lock-icon {
  width: 4.25rem;
  height: 4.25rem;
  margin: 0 auto 1.05rem;
  grid-row: auto;
  border-radius: 1.1rem;
}
.play-lock-card .section-kicker { margin-bottom: 0.45rem; }
.play-lock-card h1 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.55rem, 4vw, 2rem);
  font-weight: 670;
  letter-spacing: -0.035em;
  line-height: 1.15;
}
.play-lock-copy {
  margin: 0 0 1.35rem;
  color: var(--ink-soft);
  font-size: 0.98rem;
}
.play-lock-card label {
  display: block;
  text-align: left;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.4rem;
}
.play-row {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
}
#play-password {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  letter-spacing: 0.12em;
}
#play-password:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.play-error {
  margin: 0.75rem 0 0;
  color: #8a2a1f;
  font-size: 0.92rem;
  font-weight: 550;
}

.btn-play {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.15rem;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn-play:hover { background: var(--accent-hover); color: #fff; }

.play-list-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 1rem;
  margin: 0 0 1.35rem;
}
.play-list-title {
  margin: 0.15rem 0 0.35rem;
  font-size: clamp(1.55rem, 4vw, 2.05rem);
  font-weight: 670;
  letter-spacing: -0.035em;
  line-height: 1.15;
}
.play-list-intro {
  margin: 0;
  color: var(--ink-soft);
  max-width: 36rem;
}
.lock-again {
  flex: none;
  margin: 0 0 0.2rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 550;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.lock-again:hover { color: var(--accent); }

.play-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.play-card {
  text-decoration: none;
}
.play-card .oneliner { grid-column: 2; }
.play-note {
  grid-column: 2;
  margin: -0.15rem 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}
.play-placeholder {
  display: grid;
  place-items: center;
  background: var(--bg-deep);
  color: var(--accent);
  font-weight: 700;
  font-size: 1.85rem;
  letter-spacing: -0.04em;
  box-shadow: none;
  object-fit: cover;
}
.play-list { padding-top: 2.4rem; }

@media (max-width: 800px) {
  .play-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .app-card .dev-lock-icon {
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 1rem;
    grid-row: span 1;
  }
  .play-card .oneliner,
  .play-card .play-note,
  .play-card .meta { grid-column: 1 / -1; }
  .play-list-head { flex-direction: column; align-items: start; }
  .play-row { flex-direction: column; }
  .btn-play { width: 100%; }
}
