/* Peak IT Solutions — site styles
   Palette: light green → dark green → black, with white.
   Dark is the default; light is chosen by the toggle or the OS setting. */

:root {
  --g-100: #d9fbe3;
  --g-300: #86efac;
  --g-400: #4ade80;
  --g-500: #22c55e;
  --g-600: #16a34a;
  --g-700: #0f7a3a;
  --g-800: #0a4d27;
  --g-900: #062e18;

  --bg: #050806;
  --bg-2: #0a110c;
  --surface: #0f1812;
  --surface-2: #142019;
  --border: #1f3326;
  --text: #f3f7f4;
  --text-dim: #a3b4a8;
  --accent: var(--g-400);
  --accent-strong: var(--g-300);
  --on-accent: #03140a;
  --glow: rgba(74, 222, 128, 0.18);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);

  --radius: 18px;
  --radius-sm: 10px;
  --wrap: 1180px;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #ffffff;
    --bg-2: #f3faf5;
    --surface: #ffffff;
    --surface-2: #f0f7f2;
    --border: #d6e7db;
    --text: #06120a;
    --text-dim: #4a5f51;
    --accent: var(--g-700);
    --accent-strong: var(--g-800);
    --on-accent: #ffffff;
    --glow: rgba(34, 197, 94, 0.16);
    --shadow: 0 20px 50px rgba(6, 46, 24, 0.12);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-2: #f3faf5;
  --surface: #ffffff;
  --surface-2: #f0f7f2;
  --border: #d6e7db;
  --text: #06120a;
  --text-dim: #4a5f51;
  --accent: var(--g-700);
  --accent-strong: var(--g-800);
  --on-accent: #ffffff;
  --glow: rgba(34, 197, 94, 0.16);
  --shadow: 0 20px 50px rgba(6, 46, 24, 0.12);
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.12; margin: 0 0 .5em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 .78rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--text-dim); max-width: 62ch; }
.grad-text {
  background: linear-gradient(100deg, var(--g-300) 0%, var(--g-500) 45%, var(--g-700) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
:root[data-theme="light"] .grad-text { background-image: linear-gradient(100deg, var(--g-500), var(--g-700) 55%, var(--g-900)); }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .grad-text { background-image: linear-gradient(100deg, var(--g-500), var(--g-700) 55%, var(--g-900)); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 600 1rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: transform .15s ease, background .2s, border-color .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: linear-gradient(135deg, var(--g-400), var(--g-600)); color: #03140a; box-shadow: 0 8px 30px var(--glow); }
.btn-primary:hover { color: #03140a; box-shadow: 0 10px 40px rgba(74,222,128,.35); }
.btn-ghost { border-color: var(--border); color: var(--text); background: color-mix(in srgb, var(--surface) 60%, transparent); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--border); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); font: 700 1.15rem/1 var(--font-head); letter-spacing: -0.01em; }
.brand:hover { color: var(--text); }
.brand img { width: 38px; height: 38px; flex: none; }
.brand small { display: block; font: 500 .68rem/1 var(--font-body); letter-spacing: .2em; text-transform: uppercase; color: var(--text-dim); margin-top: 5px; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 10px 14px; border-radius: 999px; color: var(--text-dim); text-decoration: none; font-weight: 500; font-size: .96rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 42px; height: 42px; display: inline-grid; place-items: center; border-radius: 50%;
  border: 1px solid var(--border); background: transparent; color: var(--text); cursor: pointer;
}
.icon-btn:hover { border-color: var(--accent); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }
.menu-toggle { display: none; }

@media (max-width: 860px) {
  .menu-toggle { display: inline-grid; }
  .nav-links {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px 16px 20px;
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .2s, transform .2s, visibility .2s;
  }
  .nav-links.open { transform: none; opacity: 1; visibility: visible; }
  .nav-links a { padding: 14px 12px; border-radius: var(--radius-sm); font-size: 1.05rem; }
  .nav-cta { display: none; }
}

/* ---------- hero ---------- */
.hero { position: relative; padding: clamp(56px, 9vw, 110px) 0 clamp(64px, 9vw, 120px); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-bg::before {
  content: ""; position: absolute; width: 900px; height: 900px; right: -260px; top: -320px;
  background: radial-gradient(closest-side, var(--glow), transparent 70%);
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px; opacity: .35;
  mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 30%, #000 20%, transparent 75%);
}
.hero-bg .ridge { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 42%; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 { margin-bottom: 22px; }
.hero .lead { margin-bottom: 32px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--border); }
.hero-stats div { min-width: 120px; }
.hero-stats strong { display: block; font: 700 1.7rem/1.1 var(--font-head); color: var(--text); }
.hero-stats span { font-size: .9rem; color: var(--text-dim); }

.hero-visual { position: relative; height: 560px; }
.phone {
  position: absolute; width: 250px; aspect-ratio: 1 / 2; border-radius: 34px; padding: 9px;
  background: linear-gradient(160deg, #1d2a21, #050806); box-shadow: var(--shadow), 0 0 0 1px rgba(134,239,172,.12);
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 26px; background: #08091a; }
.phone-a { right: 22%; top: 0; transform: rotate(-5deg); z-index: 2; animation: float 7s ease-in-out infinite; }
.phone-b { right: 0; top: 70px; transform: rotate(7deg) scale(.9); opacity: .9; animation: float 8s ease-in-out -3s infinite; }
@keyframes float { 50% { translate: 0 -12px; } }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { height: 420px; max-width: 460px; width: 100%; margin: 0 auto; }
  .phone { width: 190px; }
  .phone-a { right: auto; left: 8%; }
  .phone-b { right: 6%; }
}

/* ---------- sections ---------- */
section { scroll-margin-top: 80px; }
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--border); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px; position: relative; transition: border-color .25s, transform .25s, box-shadow .25s;
}
.card:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--border)); transform: translateY(-3px); box-shadow: var(--shadow); }
.card p { color: var(--text-dim); }

/* services */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.service-icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 20px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--g-400) 22%, transparent), color-mix(in srgb, var(--g-800) 30%, transparent));
  color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}
.service-icon svg { width: 26px; height: 26px; }
.ticks { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 26px; color: var(--text-dim); font-size: .96rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 8px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg) translateY(-3px);
}
@media (max-width: 900px) { .services { grid-template-columns: 1fr; } }

.chip {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px;
  font: 600 .74rem/1 var(--font-body); letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid var(--border); color: var(--text-dim); background: var(--surface-2);
}
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip-live { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.chip-dev { color: #f59e0b; border-color: rgba(245,158,11,.35); }
.chip-soon { color: var(--text-dim); }
.card .chip { position: absolute; top: 24px; right: 24px; }

/* games */
.games { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.game-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.game-art { position: relative; aspect-ratio: 1024 / 500; overflow: hidden; background: #08091a; }
.game-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.game-card:hover .game-art img { transform: scale(1.04); }
.game-art .chip { top: auto; bottom: 14px; right: 14px; backdrop-filter: blur(8px); background: rgba(5,8,6,.7); }
.game-body { padding: 26px 28px 28px; display: flex; flex-direction: column; flex: 1; }
.game-title { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.game-title img { width: 56px; height: 56px; border-radius: 14px; flex: none; }
.game-title h3 { margin: 0; }
.game-title span { font-size: .9rem; color: var(--text-dim); }
.game-body .btn-row { margin-top: auto; padding-top: 12px; }
.art-racing {
  display: grid; place-items: center; height: 100%;
  background: radial-gradient(circle at 70% 40%, rgba(34,211,238,.18), transparent 55%), linear-gradient(135deg, #12151a, #0f1115 60%, #062e18);
}
.art-racing svg { width: 86%; height: auto; }
@media (max-width: 860px) { .games { grid-template-columns: 1fr; } }

/* principles */
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.principle { background: var(--surface); padding: 30px 26px; }
.principle .num { font: 700 .85rem/1 var(--font-head); color: var(--accent); letter-spacing: .1em; margin-bottom: 18px; display: block; }
.principle p { color: var(--text-dim); margin: 0; font-size: .96rem; }
@media (max-width: 960px) { .principles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .principles { grid-template-columns: 1fr; } }

/* callout / contact */
.callout {
  position: relative; overflow: hidden; border-radius: 28px; padding: clamp(36px, 6vw, 72px);
  background: linear-gradient(135deg, var(--g-700) 0%, var(--g-900) 55%, #020403 100%);
  color: #f3f7f4; border: 1px solid rgba(134,239,172,.2);
}
.callout::after {
  content: ""; position: absolute; width: 520px; height: 520px; right: -140px; bottom: -260px;
  background: radial-gradient(closest-side, rgba(134,239,172,.35), transparent); pointer-events: none;
}
.callout h2 { color: #fff; }
.callout p { color: #c7dccd; max-width: 56ch; }
.callout .eyebrow { color: var(--g-300); }
.callout .btn-ghost { color: #fff; border-color: rgba(255,255,255,.3); background: rgba(255,255,255,.04); }
.callout .btn-ghost:hover { border-color: #fff; }
.contact-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: end; position: relative; z-index: 1; }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.contact-list { margin-top: 28px; }
.contact-list a, .contact-list span { color: #fff; text-decoration: none; display: flex; gap: 12px; align-items: center; font-weight: 500; word-break: break-word; }
.contact-list a:hover { color: var(--g-300); }
.contact-list svg { width: 20px; height: 20px; flex: none; color: var(--g-300); }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---------- game detail pages ---------- */
.game-hero { padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); position: relative; overflow: hidden; }
.game-hero-grid { display: grid; grid-template-columns: auto 1fr; gap: 32px; align-items: center; }
.game-hero .app-icon { width: 132px; height: 132px; border-radius: 30px; box-shadow: var(--shadow); }
.game-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); margin-bottom: 10px; }
.meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 26px; }
@media (max-width: 640px) { .game-hero-grid { grid-template-columns: 1fr; } .game-hero .app-icon { width: 96px; height: 96px; border-radius: 22px; } }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.features .card h3 { font-size: 1.1rem; letter-spacing: .02em; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr; } }

.shots {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 240px); gap: 18px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 4px 18px; margin: 0 -4px;
  scrollbar-width: thin; scrollbar-color: var(--g-700) transparent;
}
.shots figure { margin: 0; scroll-snap-align: start; }
.shots img { border-radius: 20px; border: 1px solid var(--border); aspect-ratio: 1 / 2; object-fit: cover; width: 100%; background: #08091a; }
.shots figcaption { font-size: .88rem; color: var(--text-dim); margin-top: 10px; text-align: center; }

.pricing { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pricing .card h3 { margin-bottom: 6px; }
.pricing .tag { font-size: .88rem; color: var(--accent); font-weight: 600; margin-bottom: 14px; display: block; }
.pricing .card.featured { border-color: color-mix(in srgb, var(--accent) 60%, var(--border)); background: linear-gradient(180deg, color-mix(in srgb, var(--g-500) 8%, var(--surface)), var(--surface)); }
@media (max-width: 900px) { .pricing { grid-template-columns: 1fr; } }

/* ---------- prose (legal pages) ---------- */
.prose { max-width: 760px; margin: 0 auto; padding: clamp(40px, 7vw, 80px) 20px; }
.prose h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.prose h2 { font-size: 1.45rem; margin-top: 2.2em; }
.prose p, .prose li { color: var(--text-dim); }
.prose strong { color: var(--text); }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .5em; }
.prose .updated { font-size: .92rem; color: var(--accent); font-weight: 600; }
.prose .summary { background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: var(--radius-sm); padding: 20px 22px; margin: 28px 0; }
.prose .summary p:last-child { margin: 0; }
.breadcrumb { font-size: .9rem; color: var(--text-dim); margin-bottom: 20px; }
.breadcrumb a { color: var(--text-dim); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 56px 0 32px; background: var(--bg); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; margin-bottom: 40px; }
.footer-grid h4 { font: 600 .8rem/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 16px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-grid a { color: var(--text); text-decoration: none; font-size: .96rem; }
.footer-grid a:hover { color: var(--accent); }
.footer-grid p { color: var(--text-dim); font-size: .95rem; max-width: 34ch; margin-top: 14px; }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 24px; border-top: 1px solid var(--border); font-size: .88rem; color: var(--text-dim); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- reveal on scroll ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

.center { text-align: center; }
.mt-lg { margin-top: 48px; }
.note { font-size: .9rem; color: var(--text-dim); }

/* ---------- contact form (sits on the dark green callout in both themes) ---------- */
.contact-grid.with-form { grid-template-columns: .9fr 1.1fr; align-items: start; gap: 48px; }
.contact-form { display: grid; gap: 16px; background: rgba(2, 8, 4, .45); border: 1px solid rgba(134,239,172,.18); border-radius: var(--radius); padding: clamp(20px, 3vw, 28px); }
.field { display: grid; gap: 6px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { font-size: .88rem; font-weight: 600; color: #e3efe6; }
.field label small { font-weight: 400; color: #9fbba8; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: #f3f7f4;
  background: rgba(0, 0, 0, .35); border: 1px solid rgba(134,239,172,.22); border-radius: var(--radius-sm);
  padding: 12px 14px; transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #86efac 50%), linear-gradient(135deg, #86efac 50%, transparent 50%); background-position: calc(100% - 20px) 55%, calc(100% - 15px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field select option { color: #06120a; background: #fff; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--g-400); box-shadow: 0 0 0 3px rgba(74,222,128,.25); }
.contact-form .btn { justify-self: start; }
.contact-form .btn:disabled { opacity: .6; cursor: wait; transform: none; }
.form-status { margin: 0; min-height: 1.4em; font-size: .95rem; color: #c7dccd; }
.form-status.is-ok { color: var(--g-300); font-weight: 600; }
.form-status.is-error { color: #fca5a5; font-weight: 600; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 860px) { .contact-grid.with-form { grid-template-columns: 1fr; gap: 28px; } }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } .contact-form .btn { justify-self: stretch; } }
