/* Mocha Play — shared styles for every page */

:root {
  /* Colors taken from the logo */
  --cup: #8C6047;        /* the mug */
  --cocoa: #4A2A1C;      /* dark coffee */
  --espresso: #2B170F;   /* darkest coffee */
  --foam: #FFEED0;       /* milk foam, logo lettering */
  --paper: #FFF8EC;      /* page background */
  --ginger: #F5A43C;     /* the orange kitten */
  --ginger-deep: #C8701A;
  --slate: #8E8682;      /* the grey kitten */
  --ink: #2B170F;
  --muted: #6E5A50;
  --line: #EADCC8;
  --surface: #FFFFFF;
  --ok: #2F7D57;

  --radius-lg: 22px;
  --radius-sm: 10px;
  --wrap: 1100px;
  --font-display: "Fredoka", "Trebuchet MS", sans-serif;
  --font-body: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, video { max-width: 100%; display: block; }
img { height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ginger); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--wrap), 100% - 3rem); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--foam); color: var(--ink); padding: .5rem 1rem; border-radius: var(--radius-sm); z-index: 100; }
.skip:focus { left: .5rem; }

h1, h2, h3 { font-family: var(--font-display); line-height: 1.05; margin: 0; letter-spacing: -.01em; }
h1 { font-size: clamp(2.8rem, 8vw, 5.6rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.55rem; font-weight: 600; }
p { margin: 0; }
.lead { color: var(--muted); max-width: 38rem; font-size: 1.15rem; }

/* ---------- Top bar ---------- */
.topbar { background: var(--espresso); color: var(--foam); position: sticky; top: 0; z-index: 50; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 5.75rem; padding: .4rem 0; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: var(--foam); }
.brand img { width: 46px; height: auto; }
.brand-wordmark img { width: auto; height: 76px; }
@media (max-width: 760px) { .brand-wordmark img { height: 56px; } }
.menu { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.menu a { display: block; padding: .45rem .8rem; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .98rem; color: #F3E3CF; }
.menu a:hover { background: var(--cocoa); }
.menu a[aria-current="page"] { background: var(--foam); color: var(--espresso); }
.menu-toggle { display: none; }

@media (max-width: 760px) {
  .menu-toggle {
    display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-weight: 600;
    background: var(--cocoa); color: var(--foam); border: 0; border-radius: 999px; padding: .45rem .95rem; cursor: pointer;
  }
  .menu { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--espresso); flex-direction: column; padding: .5rem 1.5rem 1.25rem; }
  .menu.open { display: flex; }
  .menu a { padding: .75rem 1rem; font-size: 1.1rem; }
}

/* ---------- Foam edge: the wavy milk-foam line between dark and light areas ---------- */
.foam-edge { position: relative; }
.foam-edge::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 28px;
  background: var(--edge, var(--paper)); /* color of the section below */
  -webkit-mask: radial-gradient(circle at 24px 0, transparent 23px, #000 24px) 0 0 / 48px 28px repeat-x;
          mask: radial-gradient(circle at 24px 0, transparent 23px, #000 24px) 0 0 / 48px 28px repeat-x;
}

/* ---------- Home hero ---------- */
.hero { background: var(--cocoa); color: var(--foam); overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; padding: 4rem 0 6rem; }
.hero h1 { color: var(--foam); margin-bottom: 1.4rem; }
.hero p { color: #F1DFCB; font-size: 1.2rem; max-width: 34rem; }
.hero-logo { width: 100%; max-width: 600px; justify-self: end; filter: drop-shadow(0 22px 34px rgba(20, 8, 3, .45)); }
.hero-logo img { width: 100%; }

.news {
  display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 1.6rem;
  background: var(--ginger); color: var(--espresso); text-decoration: none; font-weight: 700;
  padding: .4rem 1rem .4rem .4rem; border-radius: 999px; font-size: .95rem; line-height: 1.3;
}
.news:hover { background: #FFB95C; }
.news b { background: var(--espresso); color: var(--foam); border-radius: 999px; padding: .15rem .65rem; font-size: .85rem; }

@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; padding: 2.5rem 0 4.5rem; }
  .hero-logo { order: -1; justify-self: center; max-width: 340px; }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero { background: var(--cocoa); color: var(--foam); }
.page-hero .wrap { padding: 3rem 0 4.5rem; }
.page-hero h1 { font-size: clamp(2.4rem, 6vw, 4rem); color: var(--foam); margin: .6rem 0 1rem; }
.page-hero p { color: #F1DFCB; max-width: 40rem; font-size: 1.15rem; }
.crumbs { font-size: .95rem; color: #D9C2AC; }
.crumbs a { color: #D9C2AC; text-decoration-color: rgba(255, 238, 208, .35); text-underline-offset: .2em; }
.crumbs a:hover { color: var(--foam); }

/* ---------- Sections ---------- */
.section { padding: 5rem 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 2.5rem; }
.section-head .lead { margin-top: .8rem; }
.dark { background: var(--espresso); color: var(--foam); }
.dark .lead { color: #D9C6B4; }
.dark h2, .dark h3 { color: var(--foam); }
@media (max-width: 760px) { .section { padding: 3.5rem 0; } }

/* ---------- Pills & buttons ---------- */
.pill { display: inline-block; font-weight: 600; font-size: .85rem; padding: .22rem .75rem; border-radius: 999px; background: var(--ginger); color: var(--espresso); }
.pill.live { background: var(--ok); color: #fff; }
.pill.dev { background: var(--foam); color: var(--cocoa); border: 1px solid var(--line); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; margin: 0; padding: 0; }
.chips li { font-size: .82rem; font-weight: 600; padding: .15rem .6rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.dark .chips li { background: var(--cocoa); border-color: #5B3727; color: #F1E3D8; }

.btn { display: inline-block; font-weight: 700; text-decoration: none; padding: .7rem 1.2rem; border-radius: var(--radius-sm); font-size: 1rem; line-height: 1.2; border: 2px solid transparent; }
.btn-main { background: var(--cocoa); color: var(--foam); }
.btn-main:hover { background: var(--espresso); }
.btn-ginger { background: var(--ginger); color: var(--espresso); }
.btn-ginger:hover { background: #FFB95C; }
.btn-line { border-color: var(--line); color: var(--ink); }
.btn-line:hover { border-color: var(--ginger); }
.dark .btn-line { border-color: #6B4535; color: var(--foam); }
.dark .btn-line:hover { border-color: var(--ginger); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-top: 1.75rem; }
.sale { font-weight: 700; color: var(--ginger-deep); }

/* ---------- Tool rows (home) ---------- */
.tool-row { display: grid; grid-template-columns: 1fr 1.1fr; gap: 3rem; align-items: center; }
.tool-row + .tool-row { margin-top: 4rem; padding-top: 4rem; border-top: 2px dashed var(--line); }
.tool-row h3 { font-size: 1.9rem; margin: .7rem 0 .8rem; }
.tool-row h3 a { text-decoration: none; }
.tool-row h3 a:hover { text-decoration: underline; text-decoration-color: var(--ginger); text-underline-offset: .15em; }
.tool-row p { color: var(--muted); }
.tool-row .chips { margin-top: 1.1rem; }
.tool-row.small { grid-template-columns: 1fr 1.1fr; }
.shot { display: block; border-radius: var(--radius-lg); overflow: hidden; background: var(--cocoa); box-shadow: 0 18px 40px rgba(43, 23, 15, .2); }
.shot img { width: 100%; height: auto; }
.placeholder { aspect-ratio: 16 / 10; border-radius: var(--radius-lg); border: 2px dashed var(--line); display: grid; place-items: center; text-align: center; color: var(--muted); padding: 1.5rem; background: var(--surface); }
.placeholder img { width: 90px; opacity: .55; margin: 0 auto .8rem; }
@media (max-width: 760px) { .tool-row, .tool-row.small { grid-template-columns: 1fr; gap: 1.75rem; } }

/* ---------- Effects ---------- */
.fx-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.75rem; }
.fx-card { background: var(--cocoa); border-radius: var(--radius-lg); overflow: hidden; display: flex; flex-direction: column; border: 1px solid #5B3727; }
.fx-media { aspect-ratio: 16 / 9; background: #1E100A; position: relative; overflow: hidden; flex: none; }
.fx-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fx-body { padding: 1.4rem 1.5rem 1.6rem; display: flex; flex-direction: column; align-items: flex-start; gap: .8rem; flex: 1; }
.fx-body .actions { margin-top: auto; padding-top: .4rem; }
.fx-body p { color: #E6D5CA; }
.fx-next { grid-column: 1 / -1; border: 2px dashed #6B4535; border-radius: var(--radius-lg); display: grid; place-items: center; text-align: center; padding: 1.75rem 2rem; color: #D9C6B4; }
.fx-next strong { display: block; font-family: var(--font-display); font-size: 1.4rem; color: var(--foam); margin-bottom: .4rem; }
.fx-next a { color: var(--ginger); }
.fine { margin-top: 2.25rem; font-size: .92rem; color: #C9B3A2; max-width: 48rem; }
.fine a { color: var(--ginger); }
@media (max-width: 860px) { .fx-grid { grid-template-columns: 1fr; } }

/* ---------- Games ---------- */
.game { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: center; }
.game h3 { font-size: 1.9rem; margin: .7rem 0 .8rem; }
.game p { color: var(--muted); }
@media (max-width: 760px) { .game { grid-template-columns: 1fr; gap: 1.75rem; } }

.games-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.game-card { display: flex; flex-direction: column; gap: 1.25rem; }
.game-card h3 { font-size: 1.7rem; margin: .7rem 0 .6rem; }
.game-card p { color: var(--muted); }
@media (max-width: 760px) { .games-grid { grid-template-columns: 1fr; gap: 2.75rem; } }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2.5rem; }
.contact-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.75rem; }
.contact-box h3 { font-size: 1.3rem; margin-bottom: .4rem; }
.contact-box p { color: var(--muted); margin-bottom: 1rem; }
.mail {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  color: var(--ink); text-decoration-color: var(--ginger); text-decoration-thickness: .15em; text-underline-offset: .25em; word-break: break-word;
}
.mail:hover { color: var(--cup); }
@media (max-width: 760px) { .contact { grid-template-columns: 1fr; } }

/* ---------- Tool page details ---------- */
.detail { display: grid; grid-template-columns: 1.2fr .8fr; gap: 3.5rem; align-items: start; }
.features { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .9rem; }
.features li { padding-left: 2rem; position: relative; }
.features li::before {
  content: ""; position: absolute; left: 0; top: .35em; width: 1.1rem; height: 1.1rem; border-radius: 50%;
  background: var(--ginger); box-shadow: inset 0 0 0 4px var(--foam), 0 0 0 2px var(--ginger);
}
.side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.75rem; position: sticky; top: 6rem; }
.side h3 { font-size: 1.25rem; margin-bottom: .9rem; }
.side dl { margin: 0; display: grid; gap: .8rem; }
.side dt { font-weight: 600; font-size: .9rem; color: var(--muted); }
.side dd { margin: 0; }
.side .btn { width: 100%; text-align: center; margin-top: .6rem; }
@media (max-width: 860px) { .detail { grid-template-columns: 1fr; } .side { position: static; } }

/* ---------- Gallery + lightbox ---------- */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.gallery figure { margin: 0; }
.gallery a { display: block; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--cocoa); }
.gallery a:hover { border-color: var(--ginger); }
.gallery img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.gallery figcaption { font-size: .92rem; color: var(--muted); margin-top: .55rem; }
@media (max-width: 760px) { .gallery { grid-template-columns: 1fr; } }

.lightbox { border: 0; padding: 0; background: transparent; max-width: min(1400px, 94vw); width: 100%; overflow: visible; }
.lightbox::backdrop { background: rgba(20, 10, 6, .94); }
.lightbox img { width: 100%; height: auto; max-height: 82vh; object-fit: contain; border-radius: 12px; }
.lb-bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .8rem; color: #F1E3D8; }
.lb-btns { display: flex; gap: .5rem; }
.lb-btns button { font: inherit; font-weight: 700; background: #5B3727; color: var(--foam); border: 0; border-radius: var(--radius-sm); padding: .5rem .9rem; cursor: pointer; }
.lb-btns button:hover { background: #7A5242; }

/* ---------- Footer ---------- */
.footer { background: var(--espresso); color: #D9C6B4; padding: 3.5rem 0 2.5rem; margin-top: 0; }
.footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; }
.footer .brand { margin-bottom: .8rem; }
.footer h2 { font-size: 1.05rem; color: var(--foam); margin-bottom: .8rem; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .4rem; }
.footer a { color: #D9C6B4; text-decoration: none; }
.footer a:hover { color: var(--foam); text-decoration: underline; }
.footer .copy { grid-column: 1 / -1; border-top: 1px solid #4A2E22; padding-top: 1.5rem; font-size: .9rem; }
@media (max-width: 760px) { .footer .wrap { grid-template-columns: 1fr; } }

/* ---------- 404 ---------- */
.lost { text-align: center; padding: 5rem 0 6rem; }
.lost img { width: min(320px, 70%); margin: 0 auto 2rem; }
.lost p { color: var(--muted); margin: 1rem auto 0; max-width: 30rem; }
.lost .actions { justify-content: center; }
.footer .brand { color: var(--foam); }
