/* Gentle Giant Game Studio
   Layout: a calm sage page that belongs to the studio; every game sits in a rounded "window"
   painted in that game's own colours, so each game keeps its own world. */

:root {
  --ground: #f2f6f0;
  --surface: #ffffff;
  --ink: #1f2f29;
  --ink-soft: #55655e;
  --giant: #2f8f6b;
  --giant-deep: #1f6f52;
  --giant-pale: #d9ecdf;
  --sun: #ffb703;
  --line: #d5e0d6;

  /* Jelly Merge's own world */
  --jm-ground: #fff0f6;
  --jm-ink: #2b2d42;
  --jm-ink-soft: #5c5f77;
  --jm-primary: #c2267d;
  --jm-well: #ffffff;
  --jm-on-primary: #ffffff;

  --display: "Fredoka", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --body: "Nunito", "Avenir Next", "Segoe UI", system-ui, sans-serif;

  --wrap: 1080px;
  --radius: 28px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #14201b;
    --surface: #1c2b25;
    --ink: #eaf3ec;
    --ink-soft: #a9bbb0;
    --giant: #58c79b;
    --giant-deep: #3fae83;
    --giant-pale: #24392f;
    --line: #2c4036;

    --jm-ground: #3a1730;
    --jm-ink: #ffeaf4;
    --jm-ink-soft: #e3b9cf;
    --jm-primary: #ff7fc0;
    --jm-well: #4a1f3d;
    --jm-on-primary: #2a0f22;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

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

a { color: var(--giant-deep); }
a:focus-visible, .button:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 8px; }

h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 6.5vw, 4.4rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 4vw, 2.4rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0; max-width: 62ch; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}

/* ---- header ---- */
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 600; font-size: 1.15rem; line-height: 1.1; }
.brand svg { width: 44px; height: 44px; flex: none; }
.site-nav { display: flex; gap: 22px; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 700; }
.site-nav a:hover { color: var(--giant-deep); }

/* ---- hero ---- */
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: end; gap: 32px; padding-top: 40px; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; padding-bottom: 64px; min-width: 0; }
.hero-copy p { font-size: 1.2rem; color: var(--ink-soft); }
.hero-art svg { width: 100%; height: auto; display: block; }
.giant-body { fill: var(--giant); }
.giant-arm { fill: none; stroke: var(--giant-deep); stroke-width: 16; stroke-linecap: round; }
.giant-face { fill: none; stroke: var(--ink); stroke-width: 5; stroke-linecap: round; }
.giant-cheek { fill: var(--sun); opacity: 0.55; }
.hill { fill: var(--giant-pale); }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 12px 28px; border-radius: 18px;
  background: var(--giant-deep); color: #ffffff;
  font-family: var(--display); font-weight: 600; font-size: 1.1rem; text-decoration: none;
  box-shadow: 0 5px 0 rgba(0, 0, 0, 0.18);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  align-self: flex-start;
}
.button:hover { transform: translateY(2px); box-shadow: 0 3px 0 rgba(0, 0, 0, 0.18); }
@media (prefers-color-scheme: dark) { .button { color: #0f1a15; } }

/* ---- sections ---- */
.band { border-top: 2px solid var(--line); }
.section .wrap { padding-block: 72px; display: flex; flex-direction: column; gap: 32px; }
.section-head { display: flex; flex-direction: column; gap: 10px; }
.section-head p { color: var(--ink-soft); }

/* ---- game window (one per game) ---- */
.game-window {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: center;
  border-radius: var(--radius); padding: 40px; overflow: hidden;
}
.game-window.jelly-merge { background: var(--jm-ground); color: var(--jm-ink); }
.game-copy { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.game-copy h3 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 700; color: var(--jm-primary); }
.game-copy p { color: var(--jm-ink-soft); }
.status {
  align-self: flex-start; padding: 6px 14px; border-radius: 999px;
  background: var(--jm-well); color: var(--jm-primary);
  font-weight: 800; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase;
}
.jelly-merge .button { background: var(--jm-primary); color: var(--jm-on-primary); }
.game-shots { display: flex; justify-content: center; gap: 0; min-width: 0; }
.phone {
  width: 46%; border-radius: 22px; border: 6px solid var(--jm-ink); background: var(--jm-ink);
  overflow: hidden; box-shadow: 0 18px 30px rgba(43, 45, 66, 0.22);
}
.game-shots .phone:first-child { transform: rotate(-5deg) translateX(8%); }
.game-shots .phone:last-child { transform: rotate(4deg) translate(-8%, 6%); }

.next-slot {
  border: 2px dashed var(--line); border-radius: var(--radius); padding: 28px 32px;
  color: var(--ink-soft); font-weight: 700;
}

/* ---- about ---- */
.promises { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; list-style: none; margin: 0; padding: 0; }
.promises li { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.promises p { color: var(--ink-soft); }

/* ---- footer ---- */
.site-footer .wrap { padding-block: 32px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; color: var(--ink-soft); font-size: 0.95rem; }

/* ---- Jelly Merge page ---- */
.jm-page { background: var(--jm-ground); color: var(--jm-ink); }
.jm-page .brand, .jm-page .site-nav a { color: var(--jm-ink); }
.jm-page a { color: var(--jm-primary); }
.jm-page .button { background: var(--jm-primary); color: var(--jm-on-primary); }
.jm-page .band { border-color: color-mix(in srgb, var(--jm-primary) 22%, transparent); }
.jm-hero .wrap { padding-block: 40px 64px; display: flex; flex-direction: column; gap: 22px; }
.jm-hero h1 { color: var(--jm-primary); }
.jm-hero p { font-size: 1.2rem; color: var(--jm-ink-soft); }
.shot-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.shot-row .phone { width: 100%; }
.shot-row figure { margin: 0; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.shot-row figcaption { font-weight: 700; color: var(--jm-ink-soft); font-size: 0.95rem; }
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px 40px; list-style: none; margin: 0; padding: 0; }
.features li { display: flex; gap: 14px; min-width: 0; }
.features .dot { flex: none; width: 22px; height: 22px; margin-top: 4px; border-radius: 8px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.14); }
.features p { color: var(--jm-ink-soft); }
.jm-page .site-footer .wrap { color: var(--jm-ink-soft); }

/* ---- narrow screens ---- */
@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 16px; }
  .hero-copy { padding-bottom: 8px; }
  .hero-art { max-width: 340px; margin-inline: auto; }
  .game-window { grid-template-columns: 1fr; padding: 28px 22px 36px; }
  .promises { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .shot-row { grid-template-columns: repeat(2, 1fr); }
  .section .wrap { padding-block: 52px; }
  .brand span { font-size: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .button { transition: none; }
}
