/* paccastudio.com: Pacca Studio, the MeriPac label for games and apps.
   Colours of the kit (comunicazione/marchio/kit/LEGGIMI.md): ink, paper, orange,
   and the rainbow of the suite (one stop per app brand colour). */

@font-face {
  font-family: "Outfit";
  src: url("../fonts/Outfit-VF.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #15110F;
  --paper: #EFECE6;
  --orange: #F0561D;
  --red: #c0392b;
  --gold: #dba33a;
  --green: #2d7d58;
  --teal: #0f766e;
  --violet: #6d28d9;
  --rainbow: linear-gradient(115deg, var(--red) 0%, var(--orange) 20%, var(--gold) 40%, var(--green) 60%, var(--teal) 80%, var(--violet) 100%);

  --bg: var(--paper);
  --surface: #F8F6F2;
  --surface-2: #E4DFD7;
  --text: var(--ink);
  --muted: #6f6660;
  --line: rgba(21, 17, 15, .12);
  --accent: #c8461a;            /* the orange darkened for text on paper (4.6:1) */
  --shadow: 0 1px 2px rgba(21, 17, 15, .06), 0 8px 24px rgba(21, 17, 15, .08);
  --radius: 18px;
  --wrap: 1180px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15110F;
    --surface: #211C19;
    --surface-2: #2C2622;
    --text: var(--paper);
    --muted: #b3aaa2;
    --line: rgba(239, 236, 230, .12);
    --accent: #ff7a45;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.6 "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

.logo-dark { display: none; }
@media (prefers-color-scheme: dark) {
  .logo-light { display: none; }
  .logo-dark { display: block; }
}

/* --- header ---------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header::before { content: ""; display: block; height: 4px; background: var(--rainbow); }
.bar { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: block; flex: none; }
.brand img { height: 50px; width: auto; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
  text-decoration: none; font-weight: 500; padding: 8px 12px; border-radius: 999px;
  color: var(--text); white-space: nowrap;
}
.nav a:hover { background: var(--surface-2); }
.nav .lang { font-size: .85rem; font-weight: 700; letter-spacing: .06em; border: 1px solid var(--line); padding: 6px 10px; margin-left: 6px; }
.menu-toggle { display: none; }

@media (max-width: 760px) {
  .brand img { height: 42px; }
  .menu-toggle {
    display: inline-flex; margin-left: auto; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px;
    background: var(--surface); color: var(--text); cursor: pointer;
  }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px; display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 8px; border-radius: 10px; }
  .nav .lang { align-self: flex-start; margin: 8px 0 0; }
}

/* --- hero ---------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden; color: var(--paper);
  background: var(--rainbow);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(60% 70% at 50% 50%, rgba(21, 17, 15, .32), rgba(21, 17, 15, 0) 100%);
}
.hero .wrap { position: relative; z-index: 1; padding: clamp(56px, 10vw, 120px) 0; text-align: center; }
.hero h1 { margin: 0 auto; width: min(640px, 88%); }
.hero h1 img { width: 100%; filter: drop-shadow(0 6px 18px rgba(21, 17, 15, .35)); }
.hero .tagline { margin: 22px auto 0; max-width: 34ch; font-size: clamp(1.15rem, 2.4vw, 1.5rem); font-weight: 500; text-wrap: balance; text-shadow: 0 2px 12px rgba(21, 17, 15, .35); }
.hero .actions { margin-top: 30px; justify-content: center; }

/* --- buttons and chips -------------------------------------------- */
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  padding: 10px 18px; border-radius: 999px; font-weight: 600; text-decoration: none;
  background: var(--text); color: var(--bg); border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.light { background: var(--paper); color: var(--ink); }
.btn.on-dark { background: transparent; color: var(--paper); border-color: rgba(239, 236, 230, .55); }
.btn.play { background: var(--ink); color: var(--paper); }
@media (prefers-color-scheme: dark) { .btn.play { background: var(--paper); color: var(--ink); } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.chips li { font-size: .78rem; font-weight: 600; letter-spacing: .02em; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.status { flex: none; white-space: nowrap; font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.status.live { background: color-mix(in srgb, var(--green) 18%, transparent); color: var(--green); }
.status.soon { background: color-mix(in srgb, var(--gold) 22%, transparent); color: #8a6212; }
@media (prefers-color-scheme: dark) {
  .status.live { color: #6fd2a2; }
  .status.soon { color: #f0c46a; }
}

/* --- sections ------------------------------------------------------ */
section { padding: clamp(48px, 7vw, 80px) 0; }
.hero { padding: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px 24px; margin-bottom: 32px; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.section-head p { color: var(--muted); max-width: 52ch; }

/* --- featured (Culprit) ------------------------------------------- */
.featured {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 0;
  background: var(--surface); border-radius: calc(var(--radius) + 6px); overflow: hidden;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.featured .media { background: #0d0b0a; display: grid; place-items: center; min-height: 280px; }
.featured .media img { width: 100%; height: 100%; object-fit: cover; }
.featured .body { padding: clamp(24px, 4vw, 44px); display: flex; flex-direction: column; gap: 16px; justify-content: center; }
.featured .app-id { display: flex; align-items: center; gap: 14px; }
.featured .app-id img { width: 64px; height: 64px; border-radius: 16px; box-shadow: var(--shadow); }
.featured h3 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); }
.featured .kicker { color: var(--muted); font-weight: 500; }
.featured p.desc { color: var(--text); }
@media (max-width: 860px) {
  .featured { grid-template-columns: 1fr; }
  .featured .media { min-height: 0; aspect-ratio: 16 / 10; }
}
.in-evidenza { padding-bottom: 8px; }

/* --- cards --------------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); }
.card .thumb { aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .thumb.icon { display: grid; place-items: center; background: var(--rainbow); }
.card .thumb.icon img { width: 34%; height: auto; border-radius: 22%; box-shadow: 0 10px 30px rgba(21, 17, 15, .35); }
.card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card h3 { font-size: 1.3rem; }
.card p { color: var(--muted); font-size: .98rem; }
.card .actions { margin-top: auto; padding-top: 6px; }
.card .btn { min-height: 40px; padding: 8px 14px; font-size: .95rem; }

/* --- studio -------------------------------------------------------- */
.studio { background: var(--surface); border-block: 1px solid var(--line); }
.studio .cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: clamp(24px, 6vw, 72px); align-items: center; }
.studio .mark img { width: min(320px, 70%); margin-inline: auto; }
.studio .text { display: flex; flex-direction: column; gap: 14px; }
.studio .text h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.studio .text p { color: var(--muted); }
@media (max-width: 760px) {
  .studio .cols { grid-template-columns: 1fr; }
  .studio .mark img { width: 140px; margin-inline: 0; }
}

/* --- footer -------------------------------------------------------- */
.site-footer { background: var(--ink); color: var(--paper); padding: 48px 0 28px; }
.site-footer::before { content: ""; display: block; height: 4px; background: var(--rainbow); margin-top: -48px; margin-bottom: 44px; }
.foot { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(2, minmax(0, 1fr)); gap: 32px; }
.foot img { height: 40px; width: auto; }
.foot p { color: #b3aaa2; margin-top: 14px; max-width: 36ch; }
.foot h4 { margin: 0 0 12px; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: #b3aaa2; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { color: var(--paper); text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.legal { margin-top: 36px; padding-top: 18px; border-top: 1px solid rgba(239, 236, 230, .14); display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; color: #b3aaa2; font-size: .9rem; }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr 1fr; } .foot > :first-child { grid-column: 1 / -1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .card { transition: none; }
}

/* the 404 keeps its single link visible on phones too */
@media (max-width: 760px) { .nav.nav-static { position: static; display: flex; flex-direction: row; border: 0; padding: 0; background: none; } }

/* --- text pages (privacy) ----------------------------------------------- */
.doc { padding: clamp(40px, 7vw, 80px) 0; }
.doc-wrap { max-width: 46rem; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin-bottom: 14px; }
.doc .lead { font-size: 1.15rem; color: var(--muted); margin-bottom: 8px; }
.doc h2 { font-size: 1.25rem; margin: 34px 0 10px; }
.doc p { margin: 0 0 12px; }
.doc a { color: var(--accent); }
.legal a { color: #b3aaa2; }
.legal a:hover { color: var(--paper); }
