/*
  iBlock - Public Website Stylesheet
  Modern, responsive, SEO-friendly dark purple theme
*/

/* ────────────────────────────────────────────────────────────
   CSS VARIABLES
   ──────────────────────────────────────────────────────────── */
:root {
  --color-bg: #1a1635;
  --color-bg-alt: #211b4d;
  --color-surface: rgba(30, 27, 75, 0.7);
  --color-primary: #4a3b8c;
  --color-primary-light: #5a4bc2;
  --color-accent-green: #4ade80;
  --color-accent-blue: #60a5fa;
  --color-accent-orange: #fbbf24;
  --color-accent-red: #f87171;
  --color-text: #ffffff;
  --color-text-muted: rgba(255, 255, 255, 0.7);
  --color-text-dim: rgba(255, 255, 255, 0.5);
  --color-border: rgba(255, 255, 255, 0.18);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
  --transition: 0.3s ease;
  --max-width: 1200px;
  --header-height: 72px;
}

/* ────────────────────────────────────────────────────────────
   RESET & BASE
   ──────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Oxygen,
    Ubuntu,
    Cantarell,
    sans-serif;
  background: linear-gradient(
    180deg,
    var(--color-bg) 0%,
    var(--color-bg-alt) 100%
  );
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent-blue);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover,
a:focus {
  color: var(--color-accent-green);
  text-decoration: underline;
}

button {
  cursor: pointer;
  font-family: inherit;
}

ul,
ol {
  list-style: none;
}

/* ────────────────────────────────────────────────────────────
   TYPOGRAPHY
   ──────────────────────────────────────────────────────────── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
}
h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}
h3 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}
h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1rem;
  color: var(--color-text-muted);
}

.text-center {
  text-align: center;
}
.text-gradient {
  background: linear-gradient(
    135deg,
    var(--color-accent-green),
    var(--color-accent-blue)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.section {
  padding: 5rem 0;
}

.section-alt {
  background: rgba(0, 0, 0, 0.15);
}

.section-header {
  max-width: 700px;
  margin: 0 auto 3rem;
  text-align: center;
}

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

.section-header p {
  font-size: 1.125rem;
}

/* ────────────────────────────────────────────────────────────
   HEADER & NAVIGATION
   ──────────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(26, 22, 53, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-text);
  text-decoration: none;
}

.logo:hover {
  color: var(--color-text);
  text-decoration: none;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: linear-gradient(
    135deg,
    var(--color-accent-red),
    var(--color-accent-blue)
  );
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.main-nav a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-full);
  transition: all var(--transition);
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a:focus,
.main-nav a.active {
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.nav-cta {
  background: linear-gradient(
    135deg,
    var(--color-accent-green),
    var(--color-accent-blue)
  ) !important;
  color: var(--color-bg) !important;
  font-weight: 700 !important;
}

.nav-cta:hover {
  opacity: 0.9;
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--color-text);
  padding: 0.5rem;
}

.mobile-menu-toggle .icon {
  width: 28px;
  height: 28px;
}

/* ────────────────────────────────────────────────────────────
   HERO
   ──────────────────────────────────────────────────────────── */
.hero {
  padding-top: calc(var(--header-height) + 5rem);
  padding-bottom: 5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 20%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(74, 59, 140, 0.4) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  bottom: 10%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(96, 165, 250, 0.25) 0%,
    transparent 70%
  );
  border-radius: 50%;
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

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

.hero-content .subtitle {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  max-width: 540px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 1rem;
  border: none;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    opacity var(--transition);
  text-decoration: none;
}

.btn:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--color-accent-green),
    var(--color-accent-blue)
  );
  color: var(--color-bg);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  backdrop-filter: blur(8px);
}

.btn-large {
  padding: 1rem 2.25rem;
  font-size: 1.125rem;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-accent-orange);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--color-text-dim);
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-mockup {
  width: 280px;
  height: 560px;
  border-radius: 36px;
  background: linear-gradient(180deg, #2d2666 0%, #1a1635 100%);
  border: 8px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.phone-mockup::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 160px;
  height: 160px;
  background: linear-gradient(
    135deg,
    var(--color-accent-red),
    var(--color-accent-orange),
    var(--color-accent-green),
    var(--color-accent-blue)
  );
  border-radius: var(--radius-md);
  opacity: 0.9;
}

.phone-mockup::after {
  content: "▶";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: white;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ────────────────────────────────────────────────────────────
   CARDS & GRIDS
   ──────────────────────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    border-color var(--transition);
  backdrop-filter: blur(8px);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 255, 255, 0.3);
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 1.25rem;
}

.card h3 {
  margin-bottom: 0.75rem;
  color: var(--color-text);
}

.card p {
  margin-bottom: 0;
  color: var(--color-text-muted);
}

/* ────────────────────────────────────────────────────────────
   FEATURES
   ──────────────────────────────────────────────────────────── */
.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 5rem;
}

.feature-row:last-child {
  margin-bottom: 0;
}

.feature-row.reverse {
  direction: rtl;
}

.feature-row.reverse > * {
  direction: ltr;
}

.feature-visual {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

.feature-list {
  margin-top: 1.5rem;
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--color-text-muted);
}

.feature-list li::before {
  content: "✓";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.2);
  color: var(--color-accent-green);
  font-weight: 700;
  flex-shrink: 0;
}

/* ────────────────────────────────────────────────────────────
   DOWNLOAD PAGE
   ──────────────────────────────────────────────────────────── */
.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.download-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  transition: all var(--transition);
}

.download-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 255, 255, 0.3);
}

.download-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

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

.download-card p {
  margin-bottom: 1.5rem;
  min-height: 3rem;
}

/* ────────────────────────────────────────────────────────────
   UPDATES / CHANGELOG
   ──────────────────────────────────────────────────────────── */
.updates-list {
  max-width: 800px;
  margin: 0 auto;
}

.update-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  margin-bottom: 1.5rem;
  transition: all var(--transition);
}

.update-item:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.update-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.update-version {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-accent-green);
}

.update-date {
  color: var(--color-text-dim);
  font-size: 0.875rem;
}

.update-item ul {
  list-style: disc;
  padding-left: 1.25rem;
}

.update-item li {
  color: var(--color-text-muted);
  margin-bottom: 0.5rem;
}

/* ────────────────────────────────────────────────────────────
   LEGAL PAGES (Privacy, Terms)
   ──────────────────────────────────────────────────────────── */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
}

.legal-content h2 {
  margin-top: 2rem;
  color: var(--color-text);
}

.legal-content h3 {
  margin-top: 1.5rem;
  color: var(--color-text);
}

.legal-content p,
.legal-content li {
  color: var(--color-text-muted);
}

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

.legal-content li {
  margin-bottom: 0.5rem;
}

.legal-content a {
  color: var(--color-accent-blue);
}

.legal-date {
  color: var(--color-text-dim);
  font-size: 0.875rem;
  margin-bottom: 2rem;
  display: block;
}

/* ────────────────────────────────────────────────────────────
   CONTACT PAGE
   ──────────────────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-info .info-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1rem;
  transition: all var(--transition);
}

.contact-info .info-card:hover {
  border-color: rgba(255, 255, 255, 0.3);
}

.contact-info .info-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.contact-info .info-card p {
  margin-bottom: 0;
}

.contact-form {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  background: rgba(0, 0, 0, 0.2);
  color: var(--color-text);
  font-family: inherit;
  font-size: 1rem;
  transition:
    border-color var(--transition),
    box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--color-accent-blue);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--color-text-dim);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-status {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  display: none;
}

.form-status.success {
  display: block;
  background: rgba(74, 222, 128, 0.15);
  border: 1px solid rgba(74, 222, 128, 0.3);
  color: var(--color-accent-green);
}

.form-status.error {
  display: block;
  background: rgba(248, 113, 113, 0.15);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: var(--color-accent-red);
}

/* ────────────────────────────────────────────────────────────
   FOOTER
   ──────────────────────────────────────────────────────────── */
.site-footer {
  background: rgba(0, 0, 0, 0.25);
  border-top: 1px solid var(--color-border);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--color-text-muted);
  margin-top: 1rem;
  max-width: 300px;
}

.footer-links h4 {
  font-size: 1rem;
  margin-bottom: 1.25rem;
  color: var(--color-text);
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  text-decoration: none;
}

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

.social-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  transition: all var(--transition);
  text-decoration: none;
}

.social-links a:hover {
  background: var(--color-accent-blue);
  color: white;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--color-text-dim);
  font-size: 0.875rem;
}

/* ────────────────────────────────────────────────────────────
   BREADCRUMBS
   ──────────────────────────────────────────────────────────── */
.breadcrumbs {
  padding-top: calc(var(--header-height) + 1.5rem);
  padding-bottom: 1.5rem;
  background: rgba(0, 0, 0, 0.15);
  border-bottom: 1px solid var(--color-border);
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.breadcrumbs li:not(:last-child)::after {
  content: "›";
  margin-left: 0.5rem;
  color: var(--color-text-dim);
}

.breadcrumbs a {
  color: var(--color-text-muted);
}

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

/* ────────────────────────────────────────────────────────────
   PAGE HEADER
   ──────────────────────────────────────────────────────────── */
.page-header {
  padding: 3rem 0 4rem;
  text-align: center;
}

.page-header h1 {
  margin-bottom: 0.75rem;
}

.page-header p {
  font-size: 1.125rem;
  max-width: 600px;
  margin: 0 auto;
}

/* ────────────────────────────────────────────────────────────
   RESPONSIVE
   ──────────────────────────────────────────────────────────── */
@media (max-width: 992px) {
  .hero-inner,
  .feature-row,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .feature-row.reverse {
    direction: ltr;
  }

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

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

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 22, 53, 0.98);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--color-border);
    padding: 1.5rem;
    transform: translateX(100%);
    transition: transform var(--transition);
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .main-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .main-nav a {
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
  }

  .hero {
    padding-top: calc(var(--header-height) + 3rem);
    padding-bottom: 3rem;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .hero-stats {
    gap: 1.5rem;
  }

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

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

@media (max-width: 480px) {
  .section {
    padding: 3rem 0;
  }

  .card {
    padding: 1.25rem;
  }

  .phone-mockup {
    width: 220px;
    height: 440px;
  }
}

/* ────────────────────────────────────────────────────────────
   ACCESSIBILITY
   ──────────────────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--color-accent-blue);
  outline-offset: 2px;
}

/* ────────────────────────────────────────────────────────────
   ANIMATIONS
   ──────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}
