/* TrollCoding's site. The colors come from Troll Memory's theme (TMColors.kt). The one web font is
   self-hosted (assets/fonts, SIL OFL), so the site makes no third-party requests and tracks no one. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/assets/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #14101a;
  --bg-deep: #0f0c14;
  --surface: #1f1829;
  --raised: #2a2236;
  --border: #332b44;
  --border-strong: #463b5c;
  --text: #f0ebf5;
  --muted: #a397b2;
  --teal: #3fd9ce;
  --glow: #8ff2ea;
  --amber: #e8c44d;
  --on-teal: #0c1f1e;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
  --display: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  overflow-x: clip;
  background:
    radial-gradient(ellipse 70% 45% at 85% -10%, rgba(63, 217, 206, 0.10), transparent 70%),
    radial-gradient(ellipse 60% 40% at 10% -5%, rgba(232, 196, 77, 0.08), transparent 70%),
    var(--bg);
  background-repeat: no-repeat;
  color: var(--text);
  font: 17px/1.65 var(--body);
}
a { color: var(--glow); text-underline-offset: 3px; }
a:hover { color: var(--teal); }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 2px solid var(--glow); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--teal); color: var(--on-teal); }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 720px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--teal); color: var(--on-teal); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* ---------- Type ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.02em; margin: 0 0 12px; }
h1 { font-size: clamp(2.5rem, 7vw, 4.4rem); line-height: 1.02; letter-spacing: -0.035em; }
h2 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); line-height: 1.08; }
h3 { font-size: 1.25rem; line-height: 1.25; letter-spacing: -0.01em; }
p, li { margin: 0 0 12px; }
.lead { font-size: clamp(1.08rem, 2vw, 1.25rem); color: var(--muted); max-width: 36em; }
.muted { color: var(--muted); }
.hl { background: linear-gradient(100deg, var(--teal), var(--glow) 60%, var(--amber)); -webkit-background-clip: text; background-clip: text; color: transparent; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 14px;
  font: 600 0.8rem/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--amber);
}
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border); color: var(--muted);
  font-size: 0.85rem; font-weight: 500; line-height: 1.2;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(63, 217, 206, 0.18); }
.pill-amber { color: var(--amber); border-color: rgba(232, 196, 77, 0.35); background: rgba(232, 196, 77, 0.08); }
.pill-teal { color: var(--glow); border-color: rgba(63, 217, 206, 0.35); background: rgba(63, 217, 206, 0.08); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px; border: 1px solid transparent;
  font: 600 1rem/1.2 var(--body); text-decoration: none; cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--teal); color: var(--on-teal); box-shadow: 0 10px 30px -10px rgba(63, 217, 206, 0.6); }
.btn-primary:hover { background: var(--glow); color: var(--on-teal); transform: translateY(-1px); }
.btn-ghost { border-color: var(--border-strong); color: var(--text); background: rgba(255, 255, 255, 0.02); }
.btn-ghost:hover { border-color: var(--teal); color: var(--text); background: rgba(63, 217, 206, 0.06); }
.btn-sm { padding: 8px 16px; font-size: 0.92rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 16, 26, 0.78); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(51, 43, 68, 0.6);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 1.2rem/1 var(--display); letter-spacing: -0.02em; }
.brand img { width: 34px; height: 34px; }
.brand em { font-style: normal; color: var(--teal); }
.brand:hover { color: var(--text); }
.brand { flex: none; }
.site-header nav { display: flex; align-items: center; gap: 4px; }
.site-header nav a:not(.btn) { color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: 0.95rem; }
.site-header nav a:not(.btn):hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.site-header nav .btn { margin-left: 8px; }
.lang-switch { display: inline-flex; gap: 2px; margin-left: 6px; padding: 3px; border: 1px solid var(--border-strong); border-radius: 999px; }
.site-header nav .lang-switch a { padding: 4px 10px; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.06em; }
.site-header nav .lang-switch a[aria-current] { background: var(--raised); color: var(--text); }
@media (max-width: 720px) {
  .site-header nav .hide-sm { display: none; }
  .site-header nav a:not(.btn) { padding: 8px; }
}
@media (max-width: 400px) {
  .brand { font-size: 1.05rem; gap: 8px; }
  .brand img { width: 30px; height: 30px; }
  .lang-switch { margin-left: 0; }
  .site-header nav .btn { margin-left: 4px; padding: 8px 12px; font-size: 0.88rem; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section + .section { border-top: 1px solid rgba(51, 43, 68, 0.5); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head p:not(.eyebrow) { color: var(--muted); font-size: 1.1rem; margin: 0; }
.section-head.center { margin-inline: auto; text-align: center; }

/* ---------- Home: hero ---------- */
.hero { position: relative; padding: clamp(48px, 9vw, 104px) 0 clamp(56px, 9vw, 96px); }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(240, 235, 245, 0.07) 1px, transparent 1px); background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, #000, transparent 75%);
}
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 48px; }
.hero h1 { margin: 20px 0 20px; }
.proof { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; color: var(--muted); font-size: 0.95rem; }
.proof li { margin: 0; display: inline-flex; align-items: center; gap: 8px; }
.proof svg { width: 18px; height: 18px; color: var(--teal); flex: none; }

.hero-visual { position: relative; display: flex; justify-content: center; padding: 24px 0; }
.hero-visual::before {
  content: ""; position: absolute; width: 78%; aspect-ratio: 1; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(63, 217, 206, 0.28), rgba(232, 196, 77, 0.08) 45%, transparent 70%); filter: blur(10px);
}
.phone {
  position: relative; width: min(270px, 70vw); padding: 10px; border-radius: 40px;
  background: linear-gradient(160deg, #2c2438, #120e18); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow), 0 0 0 1px rgba(0, 0, 0, 0.4) inset; transform: rotate(3deg);
}
.phone img { border-radius: 31px; }
.bubble {
  position: absolute; z-index: 2; display: flex; align-items: center; gap: 10px; max-width: 230px;
  padding: 10px 14px 10px 10px; border-radius: 18px; background: rgba(42, 34, 54, 0.92);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow); font-size: 0.92rem; line-height: 1.35;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.bubble img { width: 38px; height: 38px; border-radius: 12px; flex: none; }
.bubble b { display: block; font-size: 0.78rem; color: var(--amber); font-weight: 600; letter-spacing: 0.02em; }
.bubble-a { top: 14%; left: -4%; animation: float 6s ease-in-out infinite; }
.bubble-b { bottom: 12%; right: -2%; animation: float 7s ease-in-out -3s infinite; }
@keyframes float { 50% { transform: translateY(-8px); } }

/* ---------- Home: products ---------- */
.product {
  display: grid; grid-template-columns: 1.1fr 0.9fr; overflow: hidden; color: var(--text); text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.product:hover { border-color: var(--border-strong); box-shadow: var(--shadow); }
.product .media { position: relative; min-height: 280px; }
.product .media img { width: 100%; height: 100%; object-fit: cover; }
.product .body { padding: clamp(24px, 4vw, 40px); display: flex; flex-direction: column; gap: 14px; }
.product .title { display: flex; align-items: center; gap: 14px; }
.product .title img { width: 56px; height: 56px; border-radius: 14px; }
.product h3 { font-size: 1.7rem; margin: 0; }
.product p { color: var(--muted); margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { font-size: 0.82rem; color: var(--muted); padding: 4px 10px; border-radius: 8px; background: var(--raised); }
.more { font-weight: 600; color: var(--glow); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.more svg { width: 18px; height: 18px; transition: transform 0.2s; }
.more:hover svg { transform: translateX(4px); }
.product .media { display: block; }
.product h3 a { color: inherit; text-decoration: none; }
.product h3 a:hover { color: var(--glow); }
.product .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: auto; padding-top: 8px; }
.product .play-badge img { height: 42px; }

.next {
  margin-top: 20px; display: flex; align-items: center; gap: 18px; padding: 22px 26px;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius); color: var(--muted);
}
.next .icon { flex: none; }
.next h3 { color: var(--text); margin: 0 0 2px; font-size: 1.1rem; }
.next p { margin: 0; }

/* ---------- Cards (principles, features) ---------- */
.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); list-style: none; padding: 0; margin: 0; }
.card {
  background: linear-gradient(180deg, var(--surface), rgba(31, 24, 41, 0.6)); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; margin: 0; transition: border-color 0.25s;
}
.card:hover { border-color: var(--border-strong); }
.card h3 { margin: 18px 0 8px; }
.card p { color: var(--muted); margin: 0; }
.icon {
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px;
  background: rgba(63, 217, 206, 0.1); border: 1px solid rgba(63, 217, 206, 0.25); color: var(--teal);
}
.icon svg { width: 24px; height: 24px; }
.icon-amber { background: rgba(232, 196, 77, 0.1); border-color: rgba(232, 196, 77, 0.3); color: var(--amber); }

/* ---------- Home: studio ---------- */
.studio { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.studio p:not(.eyebrow) { color: var(--muted); font-size: 1.08rem; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0; }
.stats div { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.stats dt { font: 700 2.4rem/1 var(--display); letter-spacing: -0.03em; color: var(--text); margin-bottom: 8px; }
.stats dd { margin: 0; color: var(--muted); font-size: 0.95rem; }
.stats div:nth-child(1) dt { color: var(--teal); }
.stats div:nth-child(4) dt { color: var(--amber); }

/* ---------- Call-to-action band ---------- */
.cta {
  position: relative; overflow: hidden; text-align: center; padding: clamp(44px, 7vw, 72px) 24px;
  border-radius: 28px; border: 1px solid var(--border-strong);
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(63, 217, 206, 0.18), transparent 70%),
    radial-gradient(ellipse 50% 60% at 50% 120%, rgba(232, 196, 77, 0.12), transparent 70%),
    var(--surface);
}
.cta h2 { max-width: 18em; margin: 0 auto 12px; }
.cta p:not(.eyebrow) { color: var(--muted); margin: 0 auto; max-width: 32em; font-size: 1.1rem; }
.cta .btn-row { justify-content: center; }
.cta-art {
  background:
    linear-gradient(180deg, rgba(20, 16, 26, 0.55), rgba(20, 16, 26, 0.92)),
    url("/troll-memory/img/banner.jpg") center 30% / cover;
}


/* ---------- Footer ---------- */
.site-footer { margin-top: 32px; border-top: 1px solid var(--border); background: var(--bg-deep); color: var(--muted); font-size: 0.95rem; }
.site-footer .top { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 32px; padding: 56px 20px 40px; }
.site-footer .top > div:first-child p { margin: 14px 0 0; max-width: 22em; }
.site-footer h4 { margin: 4px 0 14px; color: var(--text); font: 600 0.8rem/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin: 0 0 8px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.site-footer .bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 20px; border-top: 1px solid var(--border); font-size: 0.88rem; }

/* ---------- A game's page ---------- */
.app-hero { padding: clamp(40px, 7vw, 80px) 0 clamp(48px, 8vw, 88px); }
.app-hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.app-id { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.app-id img { width: 76px; height: 76px; border-radius: 18px; box-shadow: var(--shadow); }
.app-id .eyebrow { margin: 0 0 6px; }
.app-id h1 { margin: 0; font-size: clamp(2.3rem, 6vw, 3.6rem); }
.app-hero p:not(.lead):not(.eyebrow) { color: var(--muted); max-width: 36em; }
/* Google's official badge, unmodified (Google Play brand guidelines). */
.play-badge { display: inline-flex; border-radius: 10px; transition: transform 0.2s, filter 0.2s; }
.play-badge img { height: 50px; width: auto; }
.cta .play-badge img { height: 56px; }
.play-badge:hover { transform: translateY(-1px); filter: drop-shadow(0 8px 20px rgba(63, 217, 206, 0.25)); }

/* Trailer: a self-hosted poster that links to YouTube; site.js swaps in the player on click, so
   nothing loads from YouTube until someone presses play. */
.video { max-width: 920px; margin: 0 auto; }
.video-frame {
  position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #000;
  border-radius: var(--radius); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
}
.video-frame img, .video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video-frame img { transition: transform 0.4s, filter 0.4s; filter: brightness(0.85); }
.video-frame:hover img { transform: scale(1.02); filter: brightness(1); }
.video-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 84px; height: 84px;
  display: grid; place-items: center; border-radius: 50%; background: var(--teal); color: var(--on-teal);
  box-shadow: 0 0 0 10px rgba(63, 217, 206, 0.22), var(--shadow); transition: transform 0.2s, background-color 0.2s;
}
.video-play svg { width: 34px; height: 34px; margin-left: 5px; }
.video-frame:hover .video-play { transform: translate(-50%, -50%) scale(1.06); background: var(--glow); }
.video-tag {
  position: absolute; left: 16px; bottom: 16px; padding: 6px 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 600;
  background: rgba(20, 16, 26, 0.8); color: var(--text); border: 1px solid var(--border-strong);
}
.video-note { margin: 14px 0 0; text-align: center; color: var(--muted); font-size: 0.9rem; }


.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 240px); gap: 16px;
  overflow-x: auto; padding: 4px 4px 18px; scroll-snap-type: x mandatory; scrollbar-color: var(--border-strong) transparent;
}
.shots figure { margin: 0; scroll-snap-align: start; }
.shots img { border-radius: 20px; border: 1px solid var(--border); }
.shots figcaption { font-size: 0.88rem; color: var(--muted); margin-top: 10px; }

/* ---------- Privacy ---------- */
.policy { padding-top: 48px; }
.policy h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); }
.policy h2 { margin-top: 40px; font-size: 1.35rem; }
.policy .meta { color: var(--muted); margin-bottom: 28px; }
.policy hr { border: 0; border-top: 1px solid var(--border); margin: 64px 0; }
.policy p, .policy li { color: #d9d1e3; }
.policy strong { color: var(--text); }

/* ---------- 404 ---------- */
.lost { text-align: center; padding: clamp(64px, 12vw, 140px) 0; }
.lost .cards-404 { display: flex; justify-content: center; gap: 14px; margin-bottom: 36px; }
.lost .cards-404 span {
  width: 74px; height: 104px; display: grid; place-items: center; border-radius: 12px;
  font: 700 2.2rem/1 var(--display); background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow);
}
.lost .cards-404 span:nth-child(1) { transform: rotate(-8deg); color: var(--teal); }
.lost .cards-404 span:nth-child(2) { transform: translateY(-10px); color: var(--amber); }
.lost .cards-404 span:nth-child(3) { transform: rotate(8deg); color: var(--teal); }
.lost .lead { margin: 0 auto; }
.lost .btn-row { justify-content: center; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero .wrap, .app-hero .wrap, .studio { grid-template-columns: 1fr; }
  .product { grid-template-columns: 1fr; }
  .product .media { min-height: 0; aspect-ratio: 1024 / 500; }
  .site-footer .top { grid-template-columns: 1fr 1fr; }
  .site-footer .top > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .bubble { max-width: 200px; font-size: 0.85rem; }
  .bubble-a { left: 0; }
  .bubble-b { right: 0; }
  .next { flex-direction: column; align-items: flex-start; }
  .stats dt { font-size: 2rem; }
  .btn-row .btn { flex: 1 1 auto; }
  .site-footer .top { padding: 44px 16px 32px; }
  .site-footer .bottom { padding: 18px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
