/* JoCliMe shared styles */

:root {
  --bg: #0c0c0d;
  --bg-2: #131314;
  --surface: #191919;
  --surface-2: #202021;
  --border: #2c2c2e;
  --border-soft: #202021;
  --text: #ededee;
  --muted: #a2a2a5;
  --faint: #6f6f73;
  --accent: #f5843c;
  --accent-2: #ff9f61;
  --accent-ink: #1c0f04;
  --accent-soft: rgba(245, 132, 60, 0.14);
  --maxw: 1120px;
  --sans: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --display: "Sora", var(--sans);
}

/* Per-game display font */
body.t-safehaven { --display: "Cinzel", Georgia, "Times New Roman", serif; }
body.t-safehaven h1,
body.t-safehaven h2,
body.t-safehaven h3,
body.t-safehaven .section-title { letter-spacing: 0; }

body.t-tta { --display: "Barlow Semi Condensed", var(--sans); }

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.narrow { max-width: 760px; }

/* ---------- Top nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 12, 17, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "Sora", var(--sans);
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.brand .mark {
  width: 26px; height: 26px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center;
  color: var(--accent-ink);
  font-size: 0.82rem;
  font-weight: 800;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.nav-links a {
  padding: 7px 14px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.nav-links a.active { color: var(--text); }
@media (max-width: 480px) {
  .nav-inner { padding: 12px 16px; gap: 10px; }
  .nav-links { gap: 2px; flex-wrap: nowrap; }
  .nav-links a { padding: 7px 9px; font-size: 0.85rem; }
  .brand { font-size: 1rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: 11px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn svg { width: 18px; height: 18px; }
.btn.disabled { opacity: 0.55; pointer-events: none; }

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

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-soft);
  background:
    radial-gradient(900px 420px at 50% -120px, var(--accent-soft), transparent 65%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
}
.hero-inner { padding: 88px 0 76px; text-align: center; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.08; }
.hero h1 {
  font-weight: 800;
  font-size: clamp(2.3rem, 6vw, 3.9rem);
  margin: 16px 0 16px;
}
.hero h1.logo-title { margin: 0 auto 22px; max-width: 600px; line-height: 0; }
.hero h1.logo-title img { width: 100%; height: auto; }

/* Two-column hero (logo + text) */
.hero-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; text-align: left; }
.hero-split h1.logo-title { margin: 0; max-width: 100%; }
.hero-split .sub { margin: 0 0 26px; max-width: 480px; text-align: left; }
.hero-split .hero-cta { justify-content: flex-start; }
.hero-split .hs-meta { margin: 20px 0 0; font-size: 0.9rem; color: var(--faint); }
@media (max-width: 820px) {
  .hero-split { grid-template-columns: 1fr; text-align: center; gap: 30px; }
  .hero-split h1.logo-title { margin: 0 auto; max-width: 440px; }
  .hero-split .sub { margin-left: auto; margin-right: auto; text-align: center; }
  .hero-split .hero-cta { justify-content: center; }
  .hero-split .hs-meta { text-align: center; }
}

/* Icon + title brand block (left column of a split hero) */
.hero-split .hs-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 20px; }
.hero-split .hs-brand .app-icon { width: 228px; height: 228px; border-radius: 22%; box-shadow: 0 16px 44px rgba(0, 0, 0, 0.5); }
.hero-split .hs-brand h1 { margin: 0; font-size: clamp(2rem, 4.2vw, 3rem); }
@media (max-width: 820px) {
  .hero-split .hs-brand .app-icon { width: 186px; height: 186px; }
}
.hero .sub {
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 30px;
  text-wrap: balance;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- Sections ---------- */
section { padding: 72px 0; }
section.tight { padding: 52px 0; }
.section-title {
  font-size: clamp(1.5rem, 3.5vw, 2.1rem);
  font-weight: 700;
  margin: 0 0 10px;
}
.section-lead { color: var(--muted); max-width: 640px; margin: 0 0 36px; }
.center { text-align: center; }
.center .section-lead { margin-left: auto; margin-right: auto; }

/* ---------- Game cards (studio home) ---------- */
.games { display: grid; gap: 26px; grid-template-columns: repeat(2, 1fr); }
.game-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.game-card:hover { transform: translateY(-4px); border-color: #38405400; border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); }
.game-card .shot { aspect-ratio: 16 / 9; background: var(--surface-2); }
.game-card .shot img { width: 100%; height: 100%; object-fit: cover; }
.game-card .body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.game-card h3 { font-size: 1.4rem; margin: 0 0 6px; }
.game-card .tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.tag {
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 6px;
}
.game-card p { color: var(--muted); margin: 0 0 20px; }
.game-card .actions { margin-top: auto; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Prose / feature blocks ---------- */
.prose p { color: var(--muted); font-size: 1.05rem; }
.prose p strong { color: var(--text); }

/* ---------- Trailer (Plyr) ---------- */
.trailer {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}
.trailer .plyr { --plyr-color-main: var(--accent); }
#sh-trailer { display: block; width: 100%; }

/* ---------- Lightbox ---------- */
a.lb, img.zoom { cursor: zoom-in; }
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: none; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.92);
  padding: 24px; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 100%; max-height: 92vh;
  border-radius: 10px; box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  cursor: default;
}
.lightbox-close {
  position: absolute; top: 16px; right: 20px;
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.4); color: #fff;
  font-size: 1.5rem; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.15s ease;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.14); }

/* ---------- Legal / policy pages ---------- */
.legal { max-width: 760px; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.5rem); margin: 0 0 6px; }
.legal .eff { color: var(--faint); font-size: 0.92rem; margin: 0 0 4px; }
.legal .flag { color: var(--accent); font-size: 0.88rem; margin: 0 0 10px; }
.legal h2 { font-size: 1.3rem; margin: 38px 0 10px; }
.legal h3 { font-size: 1.05rem; margin: 24px 0 8px; }
.legal p, .legal li { color: var(--muted); }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 16px; padding-left: 20px; }
.legal li { margin: 0 0 8px; }
.legal strong { color: var(--text); }
.legal a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--accent-2); }
.legal .backlink { display: inline-block; margin-bottom: 26px; color: var(--muted); text-decoration: none; font-size: 0.92rem; }
.legal .backlink:hover { color: var(--text); }

.feat-cols { display: grid; gap: 0 56px; grid-template-columns: repeat(2, 1fr); }
.feat-list { list-style: none; margin: 0; padding: 0; }
.feat-list li { padding: 18px 0; border-top: 1px solid var(--border); display: flex; gap: 14px; }
.feat-list li:first-child { border-top: 0; }
.feat-list li::before {
  content: ""; flex: none; width: 9px; height: 9px; margin-top: 8px;
  border-radius: 2px; background: var(--accent);
}
.feat-list strong { display: block; font-family: var(--display); font-weight: 700; color: var(--text); margin-bottom: 3px; }
.feat-list span { color: var(--muted); font-size: 0.96rem; }
@media (max-width: 720px) { .feat-cols { grid-template-columns: 1fr; gap: 0; } .feat-cols .feat-list + .feat-list li:first-child { border-top: 1px solid var(--border); } }

/* ---------- Unit grid (SafeHaven) ---------- */
.unit-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
.unit {
  display: flex; gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
}
.unit .u-name { font-weight: 700; color: var(--text); font-family: var(--display); }
.unit .u-name .dot { color: var(--accent); }
.unit p { margin: 4px 0 0; color: var(--muted); font-size: 0.94rem; }

/* ---------- Screenshot gallery ---------- */
.gallery { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
.gallery img, .gallery .ph {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: 12px; border: 1px solid var(--border);
}
.gallery a { display: block; overflow: hidden; border-radius: 12px; }
.gallery a img { transition: transform 0.3s ease; }
.gallery a:hover img { transform: scale(1.03); }

/* ---------- How to play steps ---------- */
.steps { display: grid; gap: 16px; }
.step {
  display: flex; gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}
.step .n {
  flex: none;
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-weight: 700; font-family: var(--display);
}
.step h3 { font-size: 1.05rem; margin: 2px 0 4px; }
.step p { margin: 0; color: var(--muted); font-size: 0.96rem; }
.step p + p { margin-top: 8px; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 12px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px 20px;
}
.faq summary {
  cursor: pointer;
  padding: 16px 0;
  font-weight: 600;
  font-family: var(--display);
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: 0 0 16px; color: var(--muted); }

/* ---------- Image placeholder ---------- */
.ph {
  display: flex; align-items: center; justify-content: center; text-align: center;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)),
    var(--surface-2);
  border: 1px dashed var(--border);
  border-radius: 12px;
  color: var(--faint);
  font-size: 0.82rem;
  padding: 18px;
}
.ph::before {
  content: "";
  width: 22px; height: 22px; margin-right: 10px; flex: none;
  background: var(--faint);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.6'/%3E%3Cpath d='m21 15-5-5L5 21'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.6'/%3E%3Cpath d='m21 15-5-5L5 21'/%3E%3C/svg%3E") center/contain no-repeat;
}
.ph.wide { aspect-ratio: 16 / 9; }
.ph.square { aspect-ratio: 1 / 1; }
.ph.phone { aspect-ratio: 9 / 16; }
.ph.icon { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto; }
.ph.icon::before { margin: 0; }

/* ---------- Two-column showcase (image + text) ---------- */
.showcase { display: grid; grid-template-columns: minmax(0, 385px) minmax(0, 1fr); gap: 48px; align-items: center; }
.showcase + .showcase { margin-top: 44px; }
.showcase.rev { grid-template-columns: minmax(0, 1fr) minmax(0, 385px); }
.showcase.rev .sc-media { order: 2; }
.showcase.howto-single { align-items: start; }
.showcase.howto-single .sc-media { position: sticky; top: 80px; }
.sc-media { border-radius: 16px; overflow: hidden; }
.sc-media img, .sc-media .ph { width: 100%; border-radius: 16px; }
.sc-media img { transition: transform 0.35s ease; }
.sc-media:hover img { transform: scale(1.05); }
.sc-media .ph.phone { aspect-ratio: 9 / 16; }
.sc-text > :first-child { margin-top: 0; }
.shots-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 385px)); gap: 24px; justify-content: center; }
.shots-2 .ph.phone { aspect-ratio: 9 / 16; }
.shots-2 .frame { overflow: hidden; border-radius: 12px; border: 1px solid var(--border); }
.shots-2 .frame img { width: 100%; display: block; transition: transform 0.35s ease; }
.shots-2 .frame:hover img { transform: scale(1.05); }
@media (max-width: 760px) {
  .showcase, .showcase.rev { grid-template-columns: 1fr; gap: 26px; }
  .showcase .sc-media, .showcase.rev .sc-media { order: -1; max-width: 300px; margin: 0 auto; width: 100%; }
  .showcase.howto-single .sc-media { position: static; }
}

/* ---------- Store badges ---------- */
.badge-row { display: flex; gap: 12px; flex-wrap: wrap; }
.store-badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 11px 18px; border-radius: 11px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text); text-decoration: none;
  font-weight: 600; font-size: 0.95rem;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.store-badge:hover { border-color: var(--accent); transform: translateY(-1px); }
.store-badge small { display: block; font-size: 0.68rem; color: var(--muted); font-weight: 500; line-height: 1; margin-bottom: 2px; }
.store-badge .lbl { line-height: 1.15; }
.store-badge svg { width: 22px; height: 22px; flex: none; }

/* ---------- Footer ---------- */
footer.site {
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  padding: 44px 0;
}
footer.site .inner {
  display: flex; justify-content: space-between; align-items: center;
  gap: 18px; flex-wrap: wrap;
}
footer.site .f-brand { font-family: "Sora", var(--sans); font-weight: 700; color: var(--text); }
footer.site .f-links { display: flex; gap: 20px; flex-wrap: wrap; }
footer.site a { color: var(--muted); text-decoration: none; font-size: 0.92rem; }
footer.site a:hover { color: var(--text); }
footer.site .copy { color: var(--faint); font-size: 0.85rem; width: 100%; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .feature-grid { grid-template-columns: 1fr; }
  .games { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .unit-grid, .gallery { grid-template-columns: 1fr; }
  .hero-inner { padding: 64px 0 56px; }
  section { padding: 56px 0; }
}
