/* =========================================================================
   UK TECHNOLOGY â€” SHARED STYLESHEET
   -------------------------------------------------------------------------
   Sections in this file:
   1. Theme tokens (dark default + light override)
   2. Reset & base
   3. Layout helpers
   4. Header / navigation
   5. Buttons & badges
   6. Hero
   7. Cards (apps, features, contact)
   8. Sections generic (about, privacy, terms)
   9. Forms
   10. Footer
   11. Scroll reveal + utilities
   12. Responsive
   ========================================================================= */

/* ---------- 1. THEME TOKENS ---------- */
:root,
[data-theme="dark"] {
  --bg: #0B0F17;
  --surface: #121826;
  --surface-2: #1A2233;
  --border: rgba(255, 255, 255, 0.09);
  --text: #EDF1F7;
  --muted: #93A0B4;
  --primary: #4C7EFF;
  --primary-strong: #6E97FF;
  --accent: #2DD4BF;
  --success: #2DD4BF;
  --danger: #FF6B6B;
  --shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
}

[data-theme="light"] {
  --bg: #FFFFFF;
  --surface: #F5F7FB;
  --surface-2: #ECF0F6;
  --border: rgba(15, 23, 42, 0.09);
  --text: #10131A;
  --muted: #5B6472;
  --primary: #2F5FE0;
  --primary-strong: #244CBB;
  --accent: #0EA394;
  --success: #0EA394;
  --danger: #E0453B;
  --shadow: 0 20px 40px -24px rgba(15, 23, 42, 0.18);
}

/* ---------- 2. RESET & BASE ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  line-height: 1.65;
  transition: background .25s ease, color .25s ease;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: 'Sora', sans-serif; font-weight: 600; letter-spacing: -0.01em; }
::selection { background: var(--accent); color: #06110E; }
.mono { font-family: 'JetBrains Mono', monospace; }
.muted { color: var(--muted); }

/* ---------- 3. LAYOUT HELPERS ---------- */
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 28px; }
.page-hero { padding: 150px 0 60px; }
.page-hero h1 { font-size: clamp(2rem, 5vw, 3rem); max-width: 760px; }
.page-hero p { margin-top: 16px; color: var(--muted); max-width: 620px; font-size: 1.05rem; }
section { padding: 90px 0; }
.section-alt { background: var(--surface); }
.section-head { max-width: 620px; margin-bottom: 46px; }
.eyebrow {
  font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--accent);
  letter-spacing: 0.08em; display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
}
.eyebrow::before { content: ''; width: 22px; height: 1px; background: var(--accent); }
.section-head h2 { font-size: 1.85rem; }
.section-head p { margin-top: 14px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

/* ---------- 4. HEADER / NAV ---------- */
header.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1140px; margin: 0 auto; padding: 16px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1.08rem; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(145deg, var(--primary), var(--accent));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif; font-weight: 700; font-size: 0.95rem;
}
nav#primary-nav { display: flex; align-items: center; gap: 30px; }
nav#primary-nav a { font-size: 0.92rem; color: var(--muted); padding: 6px 0; position: relative; }
nav#primary-nav a:hover, nav#primary-nav a.active { color: var(--text); }
nav#primary-nav a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--accent);
}
.nav-actions { display: flex; align-items: center; gap: 14px; }

.theme-toggle {
  width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.theme-toggle svg { width: 18px; height: 18px; stroke: var(--text); }

#hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
#hamburger span { width: 22px; height: 2px; background: var(--text); transition: transform .2s ease, opacity .2s ease; }
#hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#hamburger.active span:nth-child(2) { opacity: 0; }
#hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- 5. BUTTONS & BADGES ---------- */
.btn {
  font-family: 'Inter', sans-serif; font-weight: 600; font-size: 0.92rem;
  padding: 13px 26px; border-radius: 8px; display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); transition: all .2s ease; cursor: pointer;
}
.btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn.primary:hover { background: var(--primary-strong); }
.btn.ghost { background: transparent; color: var(--text); }
.btn.ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn.block { width: 100%; justify-content: center; }

.play-badge img { height: 44px; }

.tag {
  font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--accent);
  border: 1px solid var(--border); border-radius: 20px; padding: 3px 10px; display: inline-block;
}

/* ---------- 6. HERO ---------- */
.hero { padding: 170px 0 100px; }
.hero h1 { font-size: clamp(2.4rem, 5.8vw, 4rem); line-height: 1.08; max-width: 820px; }
.hero h1 .accent { color: var(--primary); }
.hero p.lead { margin-top: 22px; color: var(--muted); font-size: 1.1rem; max-width: 560px; }
.hero-actions { margin-top: 36px; display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats {
  margin-top: 64px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  border-top: 1px solid var(--border); padding-top: 28px; max-width: 620px;
}
.hero-stats .stat b { font-family: 'Sora', sans-serif; font-size: 1.6rem; display: block; }
.hero-stats .stat span { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--muted); }

/* ---------- 7. CARDS ---------- */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 28px; transition: border-color .2s ease, transform .2s ease;
}
.card:hover { border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); transform: translateY(-3px); }

.app-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 28px; display: flex; flex-direction: column; gap: 16px; transition: border-color .2s ease, transform .2s ease; }
.app-card:hover { border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); transform: translateY(-3px); }
.app-top { display: flex; align-items: center; gap: 14px; }
.app-icon {
  width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(150deg, var(--primary), var(--accent)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: 'Sora', sans-serif; font-weight: 700;
}
.app-name { font-size: 1.02rem; }
.app-tag { font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; color: var(--accent); }
.app-desc { color: var(--muted); font-size: 0.92rem; flex: 1; }

.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 26px; }
.feature-icon {
  width: 42px; height: 42px; border-radius: 10px; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
}
.feature-icon svg { width: 20px; height: 20px; stroke: var(--primary); }
.feature-card h3 { font-size: 1.02rem; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 0.9rem; }

.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 26px; transition: transform .2s ease, border-color .2s ease; }
.contact-card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--primary) 50%, var(--border)); }
.contact-label { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.contact-value { font-weight: 500; }

.team-card { text-align: center; }
.team-avatar {
  width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 16px;
  background: linear-gradient(150deg, var(--primary), var(--accent)); color: #fff;
  display: flex; align-items: center; justify-content: center; font-family: 'Sora', sans-serif; font-weight: 700; font-size: 1.4rem;
}

/* ---------- 8. GENERIC CONTENT SECTIONS (privacy/terms/about) ---------- */
.prose h2 { font-size: 1.2rem; margin: 34px 0 10px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--muted); font-size: 0.96rem; margin-bottom: 10px; }
.prose ul { padding-left: 20px; list-style: disc; }
.prose strong { color: var(--text); }
.last-updated { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: var(--muted); margin-bottom: 34px; display: block; }

.values-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

/* ---------- 9. FORMS ---------- */
.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-size: 0.85rem; margin-bottom: 8px; color: var(--muted); }
.form-field input, .form-field textarea {
  width: 100%; padding: 13px 14px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-family: 'Inter', sans-serif; font-size: 0.95rem;
}
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--primary); }
#form-status { margin-top: 14px; font-size: 0.88rem; min-height: 20px; }

/* ---------- 10. FOOTER ---------- */
footer.site-footer { border-top: 1px solid var(--border); padding: 56px 0 34px; background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 40px; }
.footer-col h4 { font-size: 0.85rem; margin-bottom: 16px; color: var(--text); }
.footer-col a { display: block; color: var(--muted); font-size: 0.88rem; margin-bottom: 10px; }
.footer-col a:hover { color: var(--text); }
.footer-brand p { color: var(--muted); font-size: 0.9rem; margin-top: 12px; max-width: 260px; }
.social-row { display: flex; gap: 12px; margin-top: 16px; }
.social-row a {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.social-row a:hover { border-color: var(--primary); }
.social-row svg { width: 16px; height: 16px; stroke: var(--muted); }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 24px; display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 10px; font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--muted);
}
.made-with { color: var(--danger); }

/* ---------- 11. SCROLL REVEAL + UTILITIES ---------- */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.center { text-align: center; }
.cta-banner {
  background: linear-gradient(120deg, color-mix(in srgb, var(--primary) 18%, var(--surface)), var(--surface));
  border: 1px solid var(--border); border-radius: 16px; padding: 54px; text-align: center;
}
.cta-banner h2 { font-size: 1.6rem; margin-bottom: 14px; }
.cta-banner p { color: var(--muted); max-width: 480px; margin: 0 auto 26px; }

/* ---------- 12. RESPONSIVE ---------- */
@media (max-width: 900px) {
  .grid-2, .grid-3, .values-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  nav#primary-nav {
    position: fixed; top: 68px; left: 0; right: 0; bottom: 0;
    background: var(--bg); flex-direction: column; align-items: flex-start; gap: 4px;
    padding: 24px 28px; transform: translateX(100%); transition: transform .25s ease; overflow-y: auto;
  }
  nav#primary-nav.open { transform: translateX(0); }
  nav#primary-nav a { padding: 14px 0; font-size: 1.02rem; width: 100%; border-bottom: 1px solid var(--border); }
  #hamburger { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; }
}
