/* =========================================================================
   Aimfocus — site stylesheet
   Hand-authored, no framework dependency.
   ========================================================================= */

:root {
  --brand: #478ac9;
  --brand-dark: #2f5f92;
  --brand-darker: #1c3a5c;
  --brand-light: #6fa8dc;
  --accent: #29c48f;
  --accent-dark: #1c9c70;
  --ink: #10233a;
  --ink-soft: #45566b;
  --paper: #ffffff;
  --paper-soft: #f4f7fb;
  --paper-alt: #eef2f8;
  --line: #dfe6ef;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 2px 10px rgba(16, 35, 58, 0.06);
  --shadow-md: 0 10px 30px rgba(16, 35, 58, 0.10);
  --shadow-lg: 0 24px 60px rgba(16, 35, 58, 0.16);
  --maxw: 1180px;
  font-size: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5 { margin: 0 0 .5em; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }

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

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}

.section-head {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
}
.section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--ink);
}
.section-head p {
  color: var(--ink-soft);
  font-size: 1.05rem;
  margin-bottom: 0;
}

section { padding: 88px 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(41, 196, 143, 0.32);
}
.btn-primary:hover { background: var(--accent-dark); box-shadow: 0 14px 30px rgba(41, 196, 143, 0.4); }
.btn-ghost-light {
  background: rgba(255,255,255,.08);
  color: #fff;
  border-color: rgba(255,255,255,.55);
}
.btn-ghost-light:hover { background: rgba(255,255,255,.18); border-color: #fff; }
.btn-outline {
  background: transparent;
  color: var(--brand-dark);
  border-color: var(--line);
}
.btn-outline:hover { border-color: var(--brand); color: var(--brand); background: var(--paper-soft); }
.btn-sm { padding: 9px 18px; font-size: .85rem; }
.btn[disabled], .btn.is-disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--ink);
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  box-shadow: var(--shadow-sm);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-links a {
  padding: 10px 16px;
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink-soft);
  border-radius: 999px;
  transition: color .15s ease, background-color .15s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--brand-dark); background: var(--paper-alt); }
.nav-cta { margin-left: 8px; }
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 120px 0 130px;
  background: radial-gradient(120% 140% at 15% 0%, var(--brand-light) 0%, var(--brand) 38%, var(--brand-darker) 100%);
  color: #fff;
  text-align: center;
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}
.hero::before {
  width: 460px; height: 460px;
  right: -140px; top: -160px;
  background: radial-gradient(circle, rgba(255,255,255,.16), transparent 70%);
}
.hero::after {
  width: 380px; height: 380px;
  left: -120px; bottom: -180px;
  background: radial-gradient(circle, rgba(41,196,143,.28), transparent 70%);
}
.hero-inner { position: relative; z-index: 1; }
.hero .eyebrow { color: #d7ecff; justify-content: center; }
.hero .eyebrow::before { background: #fff; }
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 4.2rem);
  margin-bottom: .3em;
  letter-spacing: -0.02em;
}
.hero p.lead {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  max-width: 640px;
  margin: 0 auto 2.1em;
  color: rgba(255,255,255,.92);
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-stats {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 64px;
  padding-top: 36px;
  border-top: 1px solid rgba(255,255,255,.22);
}
.hero-stats div { text-align: center; }
.hero-stats strong { display: block; font-size: 1.7rem; font-weight: 800; }
.hero-stats span { font-size: .85rem; color: rgba(255,255,255,.78); }

/* ---------- Live Products ---------- */
.products {
  background: var(--paper-soft);
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}
.product-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 34px 28px 30px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(71,138,201,.35);
}
.product-icon {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: #fff;
}
.product-icon svg { width: 30px; height: 30px; }
.icon-order { background: linear-gradient(135deg,#ffb648,#f2793d); }
.icon-stock { background: linear-gradient(135deg,#1fbf78,#0f8f56); }
.icon-ktv { background: linear-gradient(135deg,#ff6b8b,#e0397e); }
.icon-webdav { background: linear-gradient(135deg,#4a8fe0,#2a5db0); }

.badge {
  position: absolute;
  top: 28px;
  right: 28px;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
}
.badge-live { background: rgba(41,196,143,.14); color: var(--accent-dark); }
.badge-live::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-dark);
  margin-right: 6px;
  animation: pulse 1.6s infinite;
}
.badge-private { background: rgba(71,138,201,.12); color: var(--brand-dark); }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(28,156,112,.55); }
  70% { box-shadow: 0 0 0 7px rgba(28,156,112,0); }
  100% { box-shadow: 0 0 0 0 rgba(28,156,112,0); }
}

.product-card h3 { font-size: 1.28rem; margin-bottom: .4em; }
.product-card p.desc { color: var(--ink-soft); font-size: .96rem; flex-grow: 1; }
.product-card .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 22px;
}
.product-card .tags span {
  font-size: .74rem;
  font-weight: 600;
  color: var(--brand-dark);
  background: var(--paper-alt);
  border-radius: 999px;
  padding: 4px 11px;
}
.product-card .cta-row { margin-top: auto; }
.product-card .cta-row .btn { width: 100%; }
.product-card .cta-note {
  display: block;
  margin-top: 10px;
  font-size: .8rem;
  color: var(--ink-soft);
  text-align: center;
}

/* ---------- Services ---------- */
.services { background: var(--paper); }
.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.service-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease;
  display: flex;
  flex-direction: column;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.service-card .thumb {
  aspect-ratio: 16/10.4;
  overflow: hidden;
  background: var(--paper-alt);
}
.service-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.service-card .body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex-grow: 1; }
.service-card h5 {
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: .6em;
}
.service-card p { color: var(--ink-soft); font-size: .95rem; flex-grow: 1; }
.service-card .btn { margin-top: 8px; align-self: flex-start; }

/* ---------- Business model ---------- */
.model {
  background: var(--brand-darker);
  color: #fff;
}
.model .section-head h2 { color: #fff; }
.model .section-head p { color: rgba(255,255,255,.78); }
.model-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.model-card {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius-md);
  padding: 26px 24px;
}
.model-card h4 { font-size: 1.08rem; margin-bottom: .5em; color: #fff; }
.model-card p { color: rgba(255,255,255,.82); font-size: .93rem; margin-bottom: 0; }
.model-back { text-align: center; margin-top: 40px; }
.model-back a { font-size: .9rem; font-weight: 600; color: #cfe4ff; border-bottom: 1px solid rgba(207,228,255,.4); padding-bottom: 2px; }
.model-back a:hover { color: #fff; border-color: #fff; }

/* ---------- Contact ---------- */
.contact { background: var(--paper-soft); }
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 40px;
  align-items: stretch;
}
.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.contact-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 24px 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.contact-item .ic {
  width: 44px; height: 44px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--paper-alt);
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
}
.contact-item .ic svg { width: 22px; height: 22px; }
.contact-item h5 { font-size: .95rem; margin-bottom: .3em; }
.contact-item p { color: var(--ink-soft); font-size: .88rem; margin: 0; }
.contact-note {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px 30px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.contact-note h4 { font-size: 1.2rem; }
.contact-note p { color: var(--ink-soft); margin-bottom: 0; }

/* ---------- Games menu ---------- */
.games { background: var(--paper-soft); }
.game-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px 26px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.game-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(71,138,201,.35);
}
.game-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--paper-alt);
  color: var(--brand-dark);
  font-weight: 800;
  font-size: .95rem;
  margin-bottom: 16px;
}
.game-card h3 { font-size: 1.18rem; margin-bottom: .4em; }
.game-card p { color: var(--ink-soft); font-size: .93rem; flex-grow: 1; margin-bottom: 18px; }
.game-play { font-size: .88rem; font-weight: 700; color: var(--brand-dark); }
.game-card:hover .game-play { color: var(--accent-dark); }

/* ---------- Join game (QR handoff page) ---------- */
.join-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 44px clamp(20px, 5vw, 56px);
  max-width: 520px;
  margin: 0 auto;
  text-align: center;
}
.join-card h2 { font-size: 1.4rem; margin-bottom: .4em; }
.join-card p { color: var(--ink-soft); }
.join-qr {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 180px;
  margin: 26px 0;
}
.join-qr img { border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); }
.join-link {
  background: var(--paper-alt);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: .82rem;
  word-break: break-all;
  color: var(--ink-soft);
  margin-bottom: 18px;
}
.join-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.join-status { margin-top: 16px; font-size: .82rem; color: var(--ink-soft); }

/* ---------- Legal pages (privacy, terms) ---------- */
.legal-hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-darker) 100%);
  color: #fff;
  padding: 56px 0 64px;
}
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .88rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  margin-bottom: 22px;
}
.legal-back:hover { color: #fff; }
.legal-hero .eyebrow { color: #d7ecff; }
.legal-hero .eyebrow::before { background: #fff; }
.legal-hero h1 { font-size: clamp(2rem, 4vw, 2.7rem); margin-bottom: .3em; }
.legal-hero p.lead { color: rgba(255,255,255,.9); margin: 0; max-width: 560px; }

.legal { padding: 56px 0 96px; background: var(--paper-soft); }
.legal-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 44px clamp(20px, 5vw, 64px);
  max-width: 860px;
  margin: 0 auto;
  overflow-wrap: break-word;
}
.legal-card [data-custom-class='body'] { line-height: 1.7; }

/* ---------- Footer ---------- */
.site-footer {
  background: #0e1c2c;
  color: rgba(255,255,255,.68);
  padding: 30px 0;
  text-align: center;
  font-size: .86rem;
}
.site-footer a { color: rgba(255,255,255,.86); font-weight: 600; }
.site-footer a:hover { color: #fff; }
.site-footer .foot-links {
  display: flex;
  gap: 22px;
  justify-content: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

/* ---------- Reveal-on-scroll ----------
   [data-reveal] elements render fully visible by default so content is
   never hidden if JavaScript fails to load. JS opts elements into the
   animated state by adding .reveal-pending right before observing them. */
[data-reveal].reveal-pending {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .6s ease, transform .6s ease;
}
[data-reveal].reveal-pending.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .product-grid, .service-grid, .model-grid, .game-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-cards { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  section { padding: 64px 0; }
  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 10px 20px 18px;
    display: none;
    box-shadow: var(--shadow-md);
  }
  .nav-open .nav-links { display: flex; }
  .nav-links a { padding: 12px 10px; }
  .nav-cta { margin: 8px 10px 0; }
  .nav-toggle { display: flex; }
  .hero { padding: 90px 0 80px; }
  .hero-actions { flex-direction: column; align-items: center; }
  .hero-actions .btn { width: 100%; max-width: 320px; }
  .hero-stats { gap: 24px; }
  .product-grid, .service-grid, .model-grid, .game-grid { grid-template-columns: 1fr; }
}
