/* ============================================
   Akrivos - Custom Stylesheet
   Built on modern-normalize
   ============================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* Design Tokens */
:root {
  /* Colors - blue palette */
  --brand: #2563eb;
  --brand-hover: #60a5fa;
  --brand-gradient: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
  --bg: #0f1117;
  --bg-card: #1a1d27;
  --bg-elevated: #22253a;
  --text: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: #2d3148;
  --border-subtle: #1e2235;

  /* Sizing */
  --container: 1100px;
  --container-narrow: 800px;
  --container-xs: 640px;
  --nav-height: 64px;
  --radius: 12px;
  --radius-sm: 8px;

  /* Transitions */
  --ease: 0.2s ease;
}

/* Base Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Noise grain overlay */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

main {
  flex: 1;
}

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

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--ease);
}

a:hover {
  color: var(--brand-hover);
}

ul, ol {
  list-style: none;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  color: var(--text);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }

p {
  color: var(--text-secondary);
  line-height: 1.7;
}

strong {
  color: var(--text);
  font-weight: 600;
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-xs {
  max-width: var(--container-xs);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navigation */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(15, 17, 23, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-container {
  max-width: var(--container);
  height: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  text-decoration: none;
}

.nav-brand:hover {
  color: var(--text);
  opacity: 0.85;
}

.nav-brand span {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links li {
  display: flex;
}

.nav-links a {
  padding: 0.45rem 0.8rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: color var(--ease), background var(--ease);
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(37, 99, 235, 0.08);
}

.nav-links a[aria-current="page"] {
  color: var(--brand);
  background: rgba(37, 99, 235, 0.1);
}

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
  color: var(--text);
  line-height: 0;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  fill: none;
}

.nav-toggle .icon-close { display: none; }
.nav-toggle.active .icon-menu { display: none; }
.nav-toggle.active .icon-close { display: block; }

/* Hero Sections */
.hero {
  position: relative;
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  overflow: hidden;
}

/* Dot grid pattern behind hero */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(37, 99, 235, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 60% 70% at 50% 30%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 30%, black 20%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Blue glow behind hero heading */
.hero::after {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero .tagline {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 580px;
  margin: 0 auto 2.25rem;
  line-height: 1.7;
}

.hero-home h1 span {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease);
  line-height: 1.4;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--brand);
  box-shadow: inset 0 0 0 1.5px var(--brand);
}

.btn-outline:hover {
  color: var(--brand-hover);
  background: rgba(37, 99, 235, 0.06);
  box-shadow: inset 0 0 0 1.5px var(--brand-hover);
  transform: translateY(-1px);
}

.btn-donate {
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
  color: #fff;
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.25);
}

.btn-donate:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.35);
}

.btn-lg {
  padding: 0.85rem 2.25rem;
  font-size: 1.05rem;
}

/* Sections */
.section {
  padding: 5rem 1.5rem;
}

.section-alt {
  background: var(--bg-card);
  position: relative;
}

/* Diagonal line texture on alt sections */
.section-alt::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 40px,
    rgba(37, 99, 235, 0.02) 40px,
    rgba(37, 99, 235, 0.02) 41px
  );
  pointer-events: none;
}

.section-alt > * {
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  margin-bottom: 0.75rem;
}

.section-header p {
  max-width: 520px;
  margin: 0 auto;
}

/* Feature Cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
  position: relative;
  overflow: hidden;
}

/* Top edge highlight on cards */
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.3), transparent);
  opacity: 0;
  transition: opacity var(--ease);
}

.feature-card:hover::before {
  opacity: 1;
}

.section-alt .feature-card {
  background: var(--bg-elevated);
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  border-color: rgba(37, 99, 235, 0.2);
}

.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(37, 99, 235, 0.08);
  margin-bottom: 1rem;
  color: var(--brand);
}

.feature-icon svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 1.75;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  margin-bottom: 0.5rem;
}

.feature-card p {
  font-size: 0.9rem;
  line-height: 1.65;
}

/* Product Cards (Software page) */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.25rem 2rem;
  text-align: center;
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.3), transparent);
  opacity: 0;
  transition: opacity var(--ease);
}

.product-card:hover::before {
  opacity: 1;
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25), 0 0 40px rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.2);
}

.product-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 16px;
  background: var(--brand-gradient);
  color: #fff;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.2);
}

.product-icon svg {
  width: 30px;
  height: 30px;
  stroke: #fff;
}

.product-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.product-card .product-desc {
  font-size: 0.92rem;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.product-card .platforms {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.products-note {
  text-align: center;
  color: var(--text-muted);
  margin-top: 2.5rem;
  font-size: 0.92rem;
}

/* Badge */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 50px;
  background: rgba(37, 99, 235, 0.12);
  color: var(--brand);
  margin-bottom: 0.75rem;
}

.badge-amber {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

/* Legal / Policy Content */
.legal-content {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.legal-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 1.3rem;
}

.legal-content h2:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.legal-content h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.legal-content p {
  margin-bottom: 1rem;
  line-height: 1.8;
  font-size: 0.95rem;
}

.legal-content ul,
.legal-content ol {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-content ol {
  list-style: decimal;
}

.legal-content li {
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
  line-height: 1.75;
}

.legal-content a {
  word-break: break-word;
}

/* About Page */
.about-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.about-content p {
  font-size: 1.02rem;
  line-height: 1.85;
  margin-bottom: 1.25rem;
}

.about-content h2 {
  margin-top: 2.75rem;
  margin-bottom: 0.75rem;
  font-size: 1.4rem;
}

.about-highlight {
  background: var(--bg-card);
  border-left: 3px solid var(--brand);
  padding: 1.25rem 1.75rem;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.75rem 0;
}

.about-highlight p {
  margin: 0;
  font-size: 1.08rem;
  color: var(--text);
  font-weight: 500;
  line-height: 1.7;
}

/* Donate Page */
.donate-hero {
  padding-bottom: 2rem;
}

.donate-content {
  text-align: center;
  max-width: var(--container-xs);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.donate-content p {
  font-size: 1.02rem;
  margin-bottom: 1.25rem;
}

.donate-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.donate-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.4), transparent);
}

.donate-card h3 {
  margin-bottom: 0.75rem;
}

.donate-card p {
  margin-bottom: 1.75rem;
}

/* Contact Page */
.contact-content {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 0 1.5rem;
}

.contact-content p {
  font-size: 1.02rem;
  margin-bottom: 1.75rem;
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--brand);
  transition: all var(--ease);
}

.contact-email svg {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.contact-email:hover {
  color: var(--brand-hover);
  background: var(--bg-elevated);
  border-color: var(--brand);
  box-shadow: 0 0 30px rgba(37, 99, 235, 0.1);
}

/* CTA Banner */
.cta-banner {
  text-align: center;
  padding: 4rem 1.5rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}

.cta-banner h2 {
  margin-bottom: 0.65rem;
}

.cta-banner p {
  margin-bottom: 1.5rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem;
}

.footer-container {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.footer-brand span {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-text {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  font-size: 0.88rem;
  transition: color var(--ease);
}

.footer-links a:hover {
  color: var(--text);
}

/* Responsive */
@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    background: rgba(15, 17, 23, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 1.5rem 1rem;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 0.65rem 0.5rem;
    width: 100%;
    font-size: 0.95rem;
  }

  .hero {
    padding: 3.5rem 1.5rem 3rem;
  }

  .section {
    padding: 3.5rem 1.5rem;
  }

  .cta-banner {
    padding: 3rem 1.5rem;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .products-grid {
    grid-template-columns: 1fr;
  }

  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.75rem;
  }

  .hero .tagline {
    font-size: 0.95rem;
  }

  .btn-lg {
    padding: 0.75rem 1.75rem;
    font-size: 0.95rem;
  }

  .feature-card {
    padding: 1.25rem;
  }
}
