:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --ink: #14140f;
  --muted: #5c5a52;
  --line: #e2dfd6;
  --tile: #c9c6bd;
  --accent: #38763f;
  --accent-ink: #ffffff;
  --radius: 14px;
  --max: 1080px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12120f;
    --surface: #1b1b17;
    --ink: #f1efe8;
    --muted: #a7a498;
    --line: #2e2d27;
    --tile: #4a4842;
    --accent: #5aa862;
    --accent-ink: #0e0e0b;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }

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

/* Header */
header.site {
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(8px);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; letter-spacing: -0.01em; }
.brand-mark { width: 28px; height: 28px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.brand-mark span { background: var(--ink); border-radius: 2px; }
.brand-mark span:last-child { background: var(--accent); }
nav.main { display: flex; gap: 22px; font-size: 15px; }
nav.main a { text-decoration: none; color: var(--muted); }
nav.main a:hover { color: var(--ink); }
@media (max-width: 640px) { nav.main a:not(.keep) { display: none; } }

/* Hero */
.hero { padding-top: 88px; padding-bottom: 72px; }
.eyebrow { font-size: 13px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); font-weight: 600; margin: 0 0 14px; }
h1 { font-size: clamp(36px, 6vw, 60px); line-height: 1.05; letter-spacing: -0.03em; margin: 0 0 20px; max-width: 16ch; }
h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 14px; }
h3 { font-size: 20px; margin: 0 0 8px; letter-spacing: -0.01em; }
.lede { font-size: 20px; color: var(--muted); max-width: 58ch; margin: 0 0 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 15px;
  text-decoration: none; border: 1.5px solid var(--ink);
}
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost:hover { background: var(--surface); }

section { padding: 80px 0; border-top: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { color: var(--muted); margin: 0; }

/* Squarely showcase */
.showcase > * { min-width: 0; }
.showcase { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .showcase { grid-template-columns: 1fr; gap: 40px; } }
.app-id { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.app-id img { width: 72px; height: 72px; border-radius: 18px; border: 1px solid var(--line); }
.app-id .name { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.app-id .tag { color: var(--muted); font-size: 15px; }
.features { list-style: none; padding: 0; margin: 24px 0 32px; display: grid; gap: 12px; }
.features li { padding-left: 28px; position: relative; }
.features li::before {
  content: ""; position: absolute; left: 0; top: 0.45em; width: 12px; height: 12px;
  background: var(--accent); border-radius: 3px;
}
.stores { font-size: 14px; color: var(--muted); margin-top: 14px; }

/* Puzzle board */
.board {
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  padding: 28px; box-shadow: 0 20px 50px -30px rgba(0,0,0,0.35);
  max-width: 420px; justify-self: center; width: 100%;
}
.grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px;
  font-variant-numeric: tabular-nums; font-weight: 700; text-align: center;
}
.grid > div { aspect-ratio: 1; display: grid; place-items: center; font-size: clamp(16px, 4.2vw, 22px); }
.grid .c { background: var(--bg); border: 2px solid var(--ink); border-radius: 8px; }
.grid .c.given { background: var(--ink); color: var(--bg); }
.grid .c.empty { color: transparent; }
.grid .op { color: var(--muted); font-weight: 500; }
.grid .t { color: var(--accent); }
.board .caption { font-size: 14px; color: var(--muted); margin: 18px 0 0; text-align: center; }

/* Services */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column;
}
.card .icon {
  width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); margin-bottom: 18px;
}
.card p { color: var(--muted); margin: 0 0 16px; }
.card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 15px; }
.card ul li { margin-bottom: 4px; }

/* About + contact */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.split p { color: var(--muted); }
.contact-box {
  background: var(--ink); color: var(--bg); border-radius: 20px; padding: 40px;
}
.contact-box p { color: color-mix(in srgb, var(--bg) 75%, transparent); }
.contact-box a.mail { font-size: clamp(18px, 3vw, 24px); font-weight: 700; word-break: break-all; }
.contact-box .btn { border-color: var(--bg); color: var(--bg); margin-top: 20px; }
.contact-box .btn:hover { background: var(--bg); color: var(--ink); }

/* Legal pages */
.legal { padding: 64px 0 80px; max-width: 760px; }
.legal h1 { font-size: clamp(32px, 5vw, 44px); }
.legal h2 { font-size: 22px; margin-top: 36px; }
.legal p, .legal li { color: var(--muted); }
.legal .updated { font-size: 14px; }

/* Footer */
footer.site { border-top: 1px solid var(--line); padding: 32px 0; font-size: 14px; color: var(--muted); }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
footer.site nav { display: flex; gap: 20px; flex-wrap: wrap; }
footer.site a { text-decoration: none; }
footer.site a:hover { color: var(--ink); }
