:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --surface-2: #f3f1ec;
  --text: #1c1b19;
  --muted: #5f5b54;
  --border: #e4e0d8;
  --accent: #2f5d50;
  --accent-contrast: #ffffff;
  --accent-soft: #e3ece8;
  --radius: 14px;
  --max: 1080px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces", Georgia, serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121412;
    --surface: #1a1d1b;
    --surface-2: #202421;
    --text: #ecebe7;
    --muted: #a7a39b;
    --border: #2d322f;
    --accent: #8cc2ae;
    --accent-contrast: #0f1a16;
    --accent-soft: #1f2e28;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

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

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 10;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
}
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-contrast);
  display: grid;
  place-items: center;
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 700;
}
.site-nav ul {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--text); }

/* Sections */
.hero { padding: 88px 0 64px; }
.hero p.lead {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 620px;
}
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
section { padding: 56px 0; }
section + section { border-top: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 32px; }
.section-head p { color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--accent-contrast); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn[aria-disabled="true"] {
  opacity: 0.55;
  pointer-events: none;
}
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* Products */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}
.product-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.product-card .top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.app-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  flex-shrink: 0;
  background: linear-gradient(145deg, #6b8fd6, #3d5aa8);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.2rem;
}
.app-icon.lg { width: 96px; height: 96px; border-radius: 22px; font-size: 1.8rem; }
img.app-icon { background: none; display: block; }
.product-card h3 { margin: 0; }
.product-card .platforms { font-size: 0.85rem; color: var(--muted); }
.product-card p { color: var(--muted); margin: 0; }
.product-card .links {
  margin-top: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 8px;
}
.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
}

/* Product detail */
.product-hero {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-wrap: wrap;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.info-card h3 { font-family: var(--font); font-size: 1rem; }
.info-card p:last-child, .info-card ul:last-child { margin-bottom: 0; }
.info-card ul { padding-left: 1.2em; }
.info-card li { margin-bottom: 0.4em; }
dl.facts { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }

/* About / contact */
.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
}
address { font-style: normal; }

/* Contact form */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-weight: 600; font-size: 0.95rem; }
.field input,
.field textarea {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
}
.field textarea { resize: vertical; }
.field input:focus,
.field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.contact-form .btn { align-self: flex-start; cursor: pointer; }
.contact-form .btn:disabled { opacity: 0.6; cursor: wait; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; min-height: 1.6em; color: var(--muted); }
.form-status.ok { color: var(--accent); font-weight: 600; }
.form-status.err { color: #b3261e; font-weight: 600; }
@media (prefers-color-scheme: dark) {
  .form-status.err { color: #f2b8b5; }
}
@media (max-width: 760px) {
  .contact-layout { grid-template-columns: 1fr; }
}

/* Legal / prose */
.prose { max-width: 720px; }
.prose h2 { font-size: 1.4rem; margin-top: 2em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 0.4em; }
.muted { color: var(--muted); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 40px;
  font-size: 0.9rem;
  color: var(--muted);
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer ul {
  list-style: none;
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.site-footer a { color: var(--muted); }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .container { padding: 0 16px; }
  .hero { padding: 56px 0 40px; }
  section { padding: 40px 0; }
}
