/* Pebble Stone Games — shared styles.
   Studio pages use the logo's charcoal/cream/cyan palette.
   Game pages override the tokens under body.game-* (see bottom of file). */

:root {
  --bg: #1f1f1f;
  --bg-raised: #272727;
  --bg-sunken: #191919;
  --line: #363431;
  --text: #efe4d1;
  --text-dim: #b3aa9c;
  --text-muted: #857d72;
  --accent: #6fe3ef;
  --accent-glow: rgba(111, 227, 239, 0.35);
  --cream: #efe4d1;

  --font-head: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --max: 1080px;
  --gutter: 20px;
  --radius: 14px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: -999px; top: 8px;
  background: var(--accent); color: #111; padding: 8px 14px; border-radius: 8px; z-index: 10;
}
.skip-link:focus { left: 8px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }

.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--cream); text-decoration: none;
  font-family: "Montserrat", system-ui, sans-serif; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.95rem;
}
.brand img { width: 36px; height: 36px; border-radius: 8px; }
.brand small { display: block; font-weight: 500; letter-spacing: 0.3em; font-size: 0.62rem; color: var(--text-dim); }

.nav { display: flex; gap: 22px; }
.nav a {
  color: var(--text-dim); text-decoration: none; font-weight: 600; font-size: 0.95rem;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }

@media (max-width: 560px) {
  .brand-text { display: none; }
  .nav { gap: 16px; }
}

/* ---------- Sections ---------- */

section { padding: 72px 0; }
.section-alt { background: var(--bg-raised); border-block: 1px solid var(--line); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head); font-weight: 700; font-size: 0.78rem;
  letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 12px;
}

.lead { font-size: 1.15rem; color: var(--text-dim); max-width: 40em; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-family: var(--font-head); font-weight: 700; font-size: 0.95rem;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #0e1a1c; box-shadow: 0 0 24px var(--accent-glow); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--text-muted); }

/* ---------- Studio home ---------- */

.hero-studio { padding: 40px 0 64px; text-align: center; }
.hero-studio .logo {
  width: min(680px, 100%); margin: 0 auto;
  /* logo jpg background is #1f1f1f; match the page so the edges disappear */
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 60%, transparent 100%);
          mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 60%, transparent 100%);
}
.hero-studio .tagline { font-size: clamp(1.1rem, 2.6vw, 1.35rem); color: var(--text-dim); max-width: 34em; margin: 8px auto 28px; }
.hero-studio .actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.game-card {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 0;
  border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  background: linear-gradient(160deg, #2a1f3a 0%, #1a1324 100%);
  color: #fff6e6; text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.game-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45); }
.game-card .body { padding: 36px; display: flex; flex-direction: column; justify-content: center; }
.game-card .title { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.game-card .title img { width: 64px; height: 64px; border-radius: 16px; }
.game-card h3 { font-family: "Lilita One", var(--font-head); font-weight: 400; font-size: 2rem; margin: 0; letter-spacing: 0.02em; }
.game-card p { color: #c9b8d9; }
.game-card .meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.game-card .more { font-family: var(--font-head); font-weight: 700; color: #ffc93c; }
.game-card .shots {
  display: flex; gap: 14px; justify-content: center; align-items: flex-end;
  padding: 28px 24px 0; background: radial-gradient(ellipse at 50% 100%, rgba(94, 231, 255, 0.18), transparent 70%);
}
.game-card .shots img { width: 42%; max-width: 190px; border-radius: 16px 16px 0 0; box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5); }
.game-card .shots img:first-child { transform: translateY(18px); }

@media (max-width: 760px) {
  .game-card { grid-template-columns: 1fr; }
  .game-card .body { padding: 26px; }
}

.chip {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600;
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12); color: inherit;
}

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; gap: 24px; } }

.values { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.values li { padding-left: 22px; position: relative; color: var(--text-dim); }
.values li strong { color: var(--text); display: block; font-family: var(--font-head); }
.values li::before {
  content: ""; position: absolute; left: 0; top: 0.55em; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px var(--accent-glow);
}

.contact-box {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 32px;
  background: var(--bg-sunken); text-align: center;
}
.contact-box .email { font-family: var(--font-head); font-weight: 700; font-size: clamp(1rem, 4.2vw, 1.5rem); overflow-wrap: anywhere; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; color: var(--text-muted); font-size: 0.9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* ---------- Long-form (privacy, support) ---------- */

.prose { max-width: 760px; }
.prose h2 { font-size: 1.35rem; margin-top: 2.2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.prose .updated { color: var(--text-muted); font-size: 0.95rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0 1.5em; font-size: 0.95rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-family: var(--font-head); color: var(--text-dim); font-size: 0.85rem; }
.table-scroll { overflow-x: auto; }

/* =====================================================================
   Cave Sweeper game pages — palette taken from the game (scripts/ui/palette.gd)
   ===================================================================== */

body.game-cave-sweeper {
  --bg: #1a1324;
  --bg-raised: #241b33;
  --bg-sunken: #140e1b;
  --line: #3b2d52;
  --text: #fff6e6;
  --text-dim: #c9b8d9;
  --text-muted: #8d7aa3;
  --accent: #5ee7ff;
  --accent-glow: rgba(94, 231, 255, 0.35);
  --gold: #ffc93c;
  --gold-dark: #c7851a;
  --font-head: "Lilita One", "Montserrat", system-ui, sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}
body.game-cave-sweeper h1,
body.game-cave-sweeper h2,
body.game-cave-sweeper h3 { font-weight: 400; letter-spacing: 0.02em; }
body.game-cave-sweeper .btn-primary { background: var(--gold); color: #3a2200; box-shadow: 0 4px 0 var(--gold-dark); }
body.game-cave-sweeper .btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--gold-dark); }
body.game-cave-sweeper .eyebrow { color: var(--gold); }

.cs-hero {
  position: relative; overflow: hidden; padding: 56px 0 0;
  background:
    radial-gradient(ellipse 60% 50% at 75% 60%, rgba(94, 231, 255, 0.14), transparent 70%),
    linear-gradient(180deg, #2d2240 0%, #1a1324 100%);
  border-bottom: 1px solid var(--line);
}
.cs-hero .wrap { display: grid; grid-template-columns: 1.15fr 1fr; gap: 32px; align-items: end; }
.cs-hero .copy { padding-bottom: 64px; }
.cs-hero .title-row { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.cs-hero .title-row img { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); }
.cs-hero h1 { margin: 0; font-size: clamp(2.4rem, 7vw, 4rem); text-shadow: 0 4px 0 #0e0914; }
.cs-hero .lead { color: var(--text-dim); }
.cs-hero .actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 24px; }
.cs-hero .phone-pair { display: flex; justify-content: center; gap: 18px; align-items: flex-end; }
.cs-hero .phone-pair img {
  width: 46%; max-width: 230px;
  border-radius: 26px 26px 0 0; border: 6px solid #0e0914; border-bottom: 0;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.55);
}
.cs-hero .phone-pair img:last-child { transform: translateY(-28px); }
@media (max-width: 800px) {
  .cs-hero .wrap { grid-template-columns: 1fr; }
  .cs-hero .copy { padding-bottom: 8px; }
}

.store-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 16px 9px 12px; border-radius: 12px;
  background: #0e0914; border: 1px solid var(--line); color: var(--text-dim);
  font-size: 0.8rem; line-height: 1.2; text-decoration: none;
}
.store-badge svg { width: 24px; height: 24px; flex: none; fill: currentColor; }
.store-badge strong { display: block; color: var(--text); font-size: 1rem; font-family: "Nunito", sans-serif; font-weight: 800; }
.store-badge[aria-disabled="true"] { opacity: 0.75; cursor: default; }

.how-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 32px; }
@media (max-width: 860px) { .how-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .how-grid { grid-template-columns: 1fr; } }
.how-card {
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px;
}
.how-card .num {
  width: 40px; height: 40px; border-radius: 10px; margin-bottom: 14px;
  display: grid; place-items: center;
  background: #efdcb8; color: #2f6fe0;
  font-family: "Lilita One", sans-serif; font-size: 1.4rem;
  box-shadow: inset 0 -3px 0 #d6c39e;
}
.how-card h3 { font-size: 1.25rem; margin-bottom: 6px; }
.how-card p { color: var(--text-dim); margin: 0; font-size: 0.98rem; }

.chapters { display: grid; gap: 12px; margin-top: 32px; }
.chapter {
  display: grid; grid-template-columns: 92px 1fr auto; gap: 18px; align-items: center;
  padding: 18px 22px; border-radius: var(--radius);
  background: var(--bg-raised); border: 1px solid var(--line);
  border-left: 5px solid var(--chapter, var(--accent));
}
.chapter .depths { font-family: "Lilita One", sans-serif; color: var(--text-muted); font-size: 0.95rem; }
.chapter h3 { margin: 0 0 2px; font-size: 1.3rem; }
.chapter p { margin: 0; color: var(--text-dim); font-size: 0.98rem; }
.chapter .hazard { font-weight: 800; color: var(--chapter); font-size: 0.9rem; text-align: right; white-space: nowrap; }
@media (max-width: 620px) {
  .chapter { grid-template-columns: 1fr; gap: 4px; padding: 16px 18px; }
  .chapter .hazard { text-align: left; }
}

.shots-strip {
  display: flex; gap: 18px; overflow-x: auto; padding: 8px 4px 20px; margin-top: 28px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.shots-strip figure { margin: 0; flex: 0 0 auto; width: 220px; scroll-snap-align: start; }
.shots-strip img { border-radius: 22px; border: 5px solid #0e0914; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }
.shots-strip figcaption { margin-top: 10px; text-align: center; color: var(--text-muted); font-size: 0.9rem; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 32px; margin-top: 32px; }
@media (max-width: 760px) { .features { grid-template-columns: 1fr; } }
.feature h3 { font-size: 1.2rem; color: var(--gold); margin-bottom: 6px; }
.feature p { color: var(--text-dim); margin: 0; }

.faq details {
  background: var(--bg-raised); border: 1px solid var(--line); border-radius: 12px;
  padding: 0 20px; margin-bottom: 10px;
}
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 800; list-style-position: outside; }
.faq details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.faq details p { color: var(--text-dim); }

.crumbs { font-size: 0.9rem; color: var(--text-muted); padding-top: 28px; }
.crumbs a { color: var(--text-dim); text-decoration: none; }
.crumbs a:hover { color: var(--text); }

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