/* P1x3l P3rf3ct Studios */
:root {
  --bg: #fbfaff;
  --surface: #ffffff;
  --surface-2: #f3f0fb;
  --text: #17142b;
  --muted: #565170;
  --line: #e3dff0;
  --brand: #6d28d9;
  --brand-2: #0891b2;
  --accent: var(--brand);
  --pink: #db2777;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(23, 20, 43, .06), 0 8px 24px rgba(23, 20, 43, .06);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pixel: "Silkscreen", ui-monospace, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0c1a;
    --surface: #17142b;
    --surface-2: #1f1b38;
    --text: #f3f1ff;
    --muted: #b6b0d3;
    --line: #2e2950;
    --brand: #c4b5fd;
    --brand-2: #67e8f9;
    --pink: #f9a8d4;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 17px/1.65 var(--font); overflow-x: hidden;
  font-feature-settings: "calt" 0; /* stop Inter turning the x in "1x3" into a multiplication sign */
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.wrap.narrow { max-width: 780px; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none;
  font-family: var(--pixel); font-size: 18px; letter-spacing: .02em; }
.logo { width: 44px; height: 44px; flex: none; border-radius: 50%; }
@media (prefers-color-scheme: dark) { .logo { box-shadow: 0 0 0 2px var(--line); } }
.topnav { display: flex; gap: 20px; }
.topnav a { color: var(--muted); text-decoration: none; font-weight: 500; }
.topnav a:hover { color: var(--text); }

/* App sub-navigation */
.subnav { background: var(--surface); border-bottom: 1px solid var(--line); }
.subnav .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding-top: 10px; padding-bottom: 10px; }
.subnav-app { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); text-decoration: none; }
.subnav-app img { border-radius: 6px; }
.subnav-links { display: flex; flex-wrap: wrap; gap: 4px; }
.subnav-links a { padding: 6px 12px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; }
.subnav-links a:hover { background: var(--surface-2); color: var(--text); }
.subnav-links a[aria-current="page"] { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); }

/* Buttons */
.btn { display: inline-block; background: var(--accent); color: var(--bg); border: 0; cursor: pointer;
  padding: 12px 22px; border-radius: 12px; font: 600 16px var(--font); text-decoration: none;
  box-shadow: 4px 4px 0 color-mix(in srgb, var(--accent) 35%, transparent); transition: transform .12s, box-shadow .12s; }
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 color-mix(in srgb, var(--accent) 35%, transparent); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 color-mix(in srgb, var(--accent) 35%, transparent); }

/* Home hero */
.hero { position: relative; padding: 88px 0 72px; overflow: hidden; }
.hero h1 { font-size: clamp(36px, 6vw, 64px); line-height: 1.08; margin: 8px 0 16px; letter-spacing: -.02em; max-width: 14ch; }
.hero .lead { font-size: 19px; color: var(--muted); max-width: 56ch; margin-bottom: 28px; }
.hl { background: linear-gradient(90deg, var(--brand), var(--pink), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eyebrow { font-family: var(--pixel); font-size: 14px; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; margin: 0; }
.pixels { position: absolute; right: 16px; top: 64px; display: grid; grid-template-columns: repeat(6, 28px); gap: 6px; opacity: .9; pointer-events: none; }
.pixels i { width: 28px; height: 28px; border-radius: 4px; background: var(--brand);
  opacity: .4; animation: twinkle 4s ease-in-out infinite; animation-delay: calc(var(--d) * -0.37s); }
.pixels i:nth-child(3n) { background: var(--pink); }
.pixels i:nth-child(5n) { background: var(--brand-2); }
@keyframes twinkle { 50% { opacity: .08; } }
@media (max-width: 860px) { .pixels { display: none; } .hero { padding: 56px 0 48px; } }
@media (prefers-reduced-motion: reduce) { .pixels i { animation: none; } html { scroll-behavior: auto; } }

/* Apps grid */
.apps { padding: 24px 0 72px; }
.section-title { font-size: 28px; margin: 0 0 6px; letter-spacing: -.01em; }
.section-sub { color: var(--muted); margin: 0 0 28px; max-width: 64ch; }
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 20px; }
.app-card { --a: var(--card-accent); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; border-top: 4px solid var(--a); }
@media (prefers-color-scheme: dark) { .app-card { --a: var(--card-accent-dark); } }
.app-card-top { display: flex; gap: 16px; align-items: center; text-decoration: none; color: inherit; }
.app-card-top img { width: 72px; height: 72px; border-radius: 18px; flex: none; object-fit: cover; }
.app-card h3 { margin: 0; font-size: 20px; line-height: 1.25; }
.app-card-top:hover h3 { color: var(--a); }
.tag { color: var(--muted); margin: 2px 0 0; font-size: 15px; }
.app-card > p { color: var(--muted); font-size: 16px; margin: 14px 0 10px; }
.facts { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.facts li { font-size: 13px; font-weight: 500; padding: 3px 10px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.play-link { align-self: flex-start; margin: auto 0 14px; padding: 9px 16px; border-radius: 10px; font-weight: 600; font-size: 15px;
  text-decoration: none; background: var(--a); color: var(--surface); }
.play-link:hover { filter: brightness(1.08); }
.play-link + .card-links { margin-top: 0; }
.card-links { margin-top: auto; display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; border-top: 1px dashed var(--line); }
.card-links a { font-size: 14px; font-weight: 600; color: var(--a); text-decoration: none; padding: 6px 12px; border-radius: 10px;
  background: color-mix(in srgb, var(--a) 12%, transparent); }
.card-links a:hover { background: color-mix(in srgb, var(--a) 22%, transparent); }

/* Contact */
.contact { padding: 56px 0 80px; background: var(--surface-2); border-top: 1px solid var(--line); }
.contact-list { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.contact-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.contact-list span { font-weight: 600; }
.contact-list a { overflow-wrap: anywhere; }

/* App overview */
.app-hero { padding: 56px 0 24px; text-align: center; }
.app-hero img { border-radius: 28px; box-shadow: var(--shadow); }
.app-hero h1 { font-size: clamp(30px, 5vw, 44px); margin: 18px 0 4px; line-height: 1.15; }
.app-hero .lead { color: var(--muted); max-width: 60ch; margin: 16px auto; }
.app-hero .facts { justify-content: center; margin-bottom: 26px; }
.app-hero + section { padding: 32px 0 72px; }
.doc-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; margin: 18px 0 20px; }
.doc-tile { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: var(--radius); background: var(--surface);
  border: 1px solid var(--line); text-decoration: none; color: var(--text); box-shadow: var(--shadow); }
.doc-tile strong { color: var(--accent); }
.doc-tile span { color: var(--muted); font-size: 15px; }
.doc-tile:hover { border-color: var(--accent); }

/* Legal docs */
.doc-hero { padding: 48px 0 28px; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 9%, transparent), transparent); }
.doc-hero h1 { font-size: clamp(30px, 5vw, 44px); margin: 6px 0 4px; line-height: 1.15; }
.updated { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.doc-hero .lead { font-size: 18px; color: var(--muted); }
.doc { padding-bottom: 72px; }
.doc section { scroll-margin-top: 80px; }
.doc h2 { font-size: 23px; margin: 40px 0 10px; line-height: 1.3; }
.doc h2 .num { color: var(--accent); font-family: var(--pixel); font-size: 18px; }
.doc h3 { font-size: 18px; margin: 24px 0 6px; }
.doc p, .doc li { color: color-mix(in srgb, var(--text) 82%, var(--muted)); }
.doc li { margin: 6px 0; }
.summary { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--accent); border-radius: var(--radius);
  padding: 6px 22px 8px; margin: 8px 0 24px; box-shadow: var(--shadow); }
.summary h2 { font-size: 18px; margin: 14px 0 0; }
.toc { background: var(--surface-2); border-radius: var(--radius); padding: 14px 22px; }
.toc h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 4px 0; font-family: var(--pixel); }
.toc ol { columns: 2 220px; column-gap: 28px; margin: 0; padding-left: 22px; font-size: 15px; }
.toc li { margin: 3px 0; break-inside: avoid; }
.toc a { text-decoration: none; }
.toc a:hover { text-decoration: underline; }
.caps { font-size: 15px; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
.steps li { margin: 8px 0; }

/* Deletion form */
#request { margin-top: 40px; }
.delete-form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow);
  display: grid; gap: 6px; }
.delete-form label { font-weight: 600; margin-top: 10px; }
.delete-form input[type="email"], .delete-form select, .delete-form textarea {
  width: 100%; font: 16px var(--font); color: var(--text); background: var(--bg); border: 1.5px solid var(--line);
  border-radius: 10px; padding: 11px 12px; }
.delete-form input:focus, .delete-form select:focus, .delete-form textarea:focus { border-color: var(--accent); outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
.delete-form .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin: 14px 0 4px; }
.delete-form .check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.delete-form .btn { justify-self: start; margin-top: 8px; }
.help { color: var(--muted); font-size: 14px; margin: 0; }
.form-error { color: #b91c1c; font-weight: 600; margin: 4px 0 0; }
@media (prefers-color-scheme: dark) { .form-error { color: #fca5a5; } }
.fallback { margin-top: 16px; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 24px; background: var(--surface); font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1.5fr 1.5fr; gap: 28px; }
.site-footer h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 4px 0 8px; font-family: var(--pixel); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 4px 0; }
.site-footer li a { color: var(--text); text-decoration: none; overflow-wrap: anywhere; }
.site-footer li a:hover { color: var(--brand); text-decoration: underline; }
.copyright { color: var(--muted); margin-top: 28px; font-size: 14px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } .topnav { gap: 14px; } .brand span { font-size: 15px; } }
@media (max-width: 400px) { .topnav { display: none; } }

@media print {
  .site-header, .subnav, .site-footer, .toc, .delete-form, .btn { display: none !important; }
  body { background: #fff; color: #000; }
}
