/* =============================================
   Karadas.it — Landing Page Styles
   ============================================= */

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

:root {
  --color-bg: #0f1117;
  --color-bg-card: #1a1d27;
  --color-bg-card-hover: #20243a;
  --color-border: #2a2d3e;
  --color-accent: #6c63ff;
  --color-accent-light: #8b84ff;
  --color-accent-glow: rgba(108, 99, 255, 0.15);
  --color-text-primary: #f0f0f5;
  --color-text-secondary: #9095a8;
  --color-text-muted: #5a5f72;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 14px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- Typography ---- */

h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---- Layout ---- */

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Nav ---- */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 17, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-logo {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--color-text-primary);
}

.nav-logo span {
  color: var(--color-accent-light);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  transition: color var(--transition);
}

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

/* ---- Hero ---- */

.hero {
  padding: 120px 0 100px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(108, 99, 255, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-accent-glow);
  border: 1px solid rgba(108, 99, 255, 0.3);
  color: var(--color-accent-light);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 28px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero-badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--color-accent-light);
  border-radius: 50%;
}

.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 800;
  color: var(--color-text-primary);
  max-width: 760px;
  margin: 0 auto 20px;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--color-accent-light), #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--color-text-secondary);
  max-width: 560px;
  margin: 0 auto 44px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 0 24px rgba(108, 99, 255, 0.35);
}

.btn-primary:hover {
  background: var(--color-accent-light);
  box-shadow: 0 0 32px rgba(108, 99, 255, 0.5);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  color: var(--color-text-primary);
  border-color: var(--color-text-muted);
  transform: translateY(-1px);
}

/* ---- Section shared ---- */

section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-accent-light);
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  color: var(--color-text-primary);
  margin-bottom: 14px;
}

.section-header p {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* ---- Apps Section ---- */

#apps {
  border-top: 1px solid var(--color-border);
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.app-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.app-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(108, 99, 255, 0.06), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
}

.app-card:hover {
  border-color: rgba(108, 99, 255, 0.4);
  background: var(--color-bg-card-hover);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

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

.app-card-icon {
  width: 44px;
  height: 44px;
  background: var(--color-accent-glow);
  border: 1px solid rgba(108, 99, 255, 0.25);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.app-card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text-primary);
}

.app-card-desc {
  font-size: 0.92rem;
  color: var(--color-text-secondary);
  line-height: 1.65;
  flex: 1;
}

.app-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-accent-light);
  transition: gap var(--transition);
  margin-top: 4px;
}

/* Stretch the link to cover the entire card */
.app-card-link::after {
  content: '';
  position: absolute;
  inset: 0;
}

.app-card:hover .app-card-link {
  gap: 10px;
}

.app-card-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* Loading & error states */
.apps-loading,
.apps-error {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.apps-error {
  color: #f87171;
}

/* ---- About ---- */

#about {
  border-top: 1px solid var(--color-border);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-text h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 18px;
}

.about-text p {
  color: var(--color-text-secondary);
  margin-bottom: 14px;
  line-height: 1.75;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-text-primary);
  letter-spacing: -0.03em;
}

.stat-number span {
  color: var(--color-accent-light);
}

.stat-label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ---- Footer ---- */

footer {
  border-top: 1px solid var(--color-border);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.footer-logo span {
  color: var(--color-accent-light);
}

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

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  transition: color var(--transition);
}

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

/* ---- Responsive ---- */

@media (max-width: 768px) {
  .hero {
    padding: 80px 0 70px;
  }

  .about-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .nav-links {
    display: none;
  }

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

@media (max-width: 480px) {
  .apps-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
  }
}
