/* Tuman VPN - Design System */

/* Custom Fonts */
@font-face {
  font-family: 'Nothing Font';
  src: url('../assets/fonts/NothingFont.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

/* Design Tokens */
:root {
  /* Colors - matching Figma exactly */
  --color-bg: #080808;
  --color-bg-card: rgba(24, 26, 27, 0.05);
  --color-bg-card-hover: rgba(24, 26, 27, 0.15);
  --color-text: #d9d6d1;
  --color-text-muted: #a8a095;
  --color-text-secondary: rgba(232, 230, 227, 0.6);
  --color-accent: #358d67;
  --color-accent-blue: #007acc;
  --color-accent-hover: #3a9d72;
  --color-border: rgba(48, 52, 54, 0.1);
  --color-link: #3391ff;

  /* Typography */
  --font-family: 'SF Mono', SFMono-Regular, ui-monospace, Menlo, Monaco, 'Cascadia Mono', monospace;
  --font-title: 'Nothing Font', var(--font-family);
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.5rem;
  --font-size-2xl: 2rem;
  --font-size-3xl: 2.5rem;

  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Container */
  --container-max: 1200px;
  --container-padding: 1rem;
}

/* Base Styles */
html {
  font-size: 16px;
  scroll-behavior: smooth;
}

/* Product Page - Scroll Snap */
html:has(.product-page) {
  overflow: hidden;
}

.product-page {
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  height: 100vh;
}

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(8, 8, 8, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: none;
}

.header__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
}

.header__right {
  position: absolute;
  right: 0;
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.header__left {
  position: absolute;
  left: 0;
  display: flex;
  align-items: center;
}

/* Product page: header logo hidden by default, animated on scroll */
.product-page .header__left {
  opacity: 0;
  transform: translateX(-10px);
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.product-page .header__left.visible {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.product-page .header__left.visible .header__logo {
  opacity: 0.7;
}

.header__left .header__logo {
  opacity: 0.7;
  transition: opacity 0.2s;
}

.header__left .header__logo:hover {
  opacity: 1;
}

.header__left .header__logo img {
  height: 24px;
  width: auto;
}

.header__logo {
  display: flex;
  align-items: center;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.header__logo:hover {
  opacity: 1;
}

.header__logo img {
  height: 24px;
  width: auto;
}

.header__nav {
  display: none;
  gap: var(--space-xl);
}

.header__nav a {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-secondary);
  transition: color 0.2s;
}

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

.header__nav a.active {
  color: var(--color-text);
}

.header__lang {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  cursor: pointer;
  font-size: var(--font-size-sm);
  color: var(--color-text);
  transition: background 0.2s;
}

.header__lang:hover {
  background: var(--color-bg-card-hover);
}

.header__lang svg {
  width: 16px;
  height: 16px;
}

/* Main Content */
main {
  flex: 1;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--space-3xl) 0;
  padding-top: calc(60px + var(--space-3xl)); /* Account for fixed header */
  padding-bottom: 120px;
  box-sizing: border-box;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.hero__logo {
  width: 180px;
  height: auto;
  margin: 0 auto var(--space-lg);
}

.hero__title {
  font-family: var(--font-title);
  font-size: 72px;
  font-weight: 400;
  line-height: 72px;
  letter-spacing: 8px;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: var(--space-lg);
}

.hero__tagline {
  font-family: var(--font-family);
  font-size: 24px;
  font-weight: 300;
  line-height: 32px;
  color: #fff;
  margin-bottom: var(--space-sm);
  white-space: nowrap;
}

.hero__subtitle {
  font-family: var(--font-family);
  font-size: 18px;
  font-weight: 400;
  line-height: 28px;
  color: rgba(232, 230, 227, 0.60);
  margin-bottom: var(--space-3xl);
  white-space: nowrap;
}

/* Download Buttons */
.download-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.download-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background: transparent;
  border: 1px solid #fff;
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.download-btn:hover {
  background: var(--color-bg-card-hover);
  border-color: var(--color-text-muted);
}

.download-btn--badge {
  padding: 0;
  background: transparent;
  border: none;
}

.download-btn--badge:hover {
  background: transparent;
  border: none;
  opacity: 0.9;
}

.download-btn--badge img {
  height: 56px;
  width: auto;
}

.download-btn__icon {
  height: 32px;
  width: auto;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  will-change: transform;
  animation: float 3s ease-in-out infinite;
  z-index: 2;
}

.scroll-indicator img {
  width: 54px;
  height: 70px;
}

@keyframes float {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(10px);
  }
}

/* Features Section */
.features {
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--space-3xl) 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.features__header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.features__title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--space-md);
  letter-spacing: 0.1em;
}

.features__subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.features__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
}

.feature-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  transition: all 0.3s;
}

/* Blue card (Lightning Fast) */
.feature-card--blue {
  border-color: rgba(0, 107, 179, 0.25);
  box-shadow: 0 0 20px 0 rgba(0, 122, 204, 0.5);
}

.feature-card--blue .feature-card__icon {
  background: rgba(0, 122, 204, 0.13);
  box-shadow: 0 4px 15px 0 rgba(0, 122, 204, 0.5);
}

.feature-card--blue .feature-card__icon svg {
  color: #007acc;
}

/* Green card (Top Performance) */
.feature-card--green {
  border-color: rgba(47, 126, 81, 0.25);
  box-shadow: 0 0 20px 0 rgba(53, 141, 103, 0.5);
}

.feature-card--green .feature-card__icon {
  background: rgba(53, 141, 103, 0.13);
  box-shadow: 0 4px 15px 0 rgba(53, 141, 103, 0.5);
}

.feature-card--green .feature-card__icon svg {
  color: #358d67;
}

/* Gray card (Smart Algorithms) */
.feature-card--gray {
  border-color: rgba(232, 230, 227, 0.6);
  box-shadow: 0 0 20px 0 rgba(125, 125, 125, 0.5);
}

.feature-card--gray .feature-card__icon {
  background: rgba(123, 123, 123, 0.13);
  box-shadow: 0 4px 15px 0 rgba(125, 125, 125, 0.5);
}

.feature-card--gray .feature-card__icon svg {
  color: #a8a095;
}

.feature-card:hover {
  transform: translateY(-4px);
}

.feature-card__icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-md);
}

.feature-card__icon img {
  width: 28px;
  height: 28px;
}

.feature-card__title {
  font-size: var(--font-size-base);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.feature-card__description {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Footer - Default (for content pages) */
.footer {
  padding: var(--space-2xl) 0;
  text-align: center;
  border-top: 1px solid var(--color-border);
}

/* Footer - Simple (copyright only) */
.footer--simple {
  padding: var(--space-lg) 0;
  margin-top: auto;
}

.footer--simple .footer__copyright {
  margin: 0;
}

/* Footer - Product Page (with CTA, full height, snap) */
.product-page .footer {
  min-height: 100vh;
  min-height: 100dvh;
  padding: var(--space-3xl) 0;
  border-top: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.product-page .footer > .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  min-height: calc(100vh - var(--space-3xl) * 2);
}

.product-page .footer__info {
  margin-top: auto;
  padding-bottom: var(--space-md);
}

/* Footer CTA (Product page only) */
.footer__cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: var(--space-3xl);
}

.footer__cta-title {
  font-size: var(--font-size-xl);
  font-weight: 600;
  margin-bottom: var(--space-md);
  line-height: 1.3;
}

.footer__cta-subtitle {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
}

.footer__cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg) var(--space-2xl);
  background: linear-gradient(135deg, #358d67, #007acc);
  color: var(--color-text);
  font-weight: 500;
  font-size: var(--font-size-base);
  border-radius: var(--radius-xl);
  box-shadow:
    0 10px 40px 0 rgba(53, 141, 103, 0.4),
    0 10px 40px 0 rgba(0, 122, 204, 0.4);
  transition: all 0.3s;
}

.footer__cta-button:hover {
  transform: translateY(-2px);
  box-shadow:
    0 15px 50px 0 rgba(53, 141, 103, 0.5),
    0 15px 50px 0 rgba(0, 122, 204, 0.5);
}

/* Footer Info */
.footer__info {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-xl);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.footer__logo {
  height: 32px;
  width: auto;
  margin: 0 auto var(--space-lg);
  opacity: 0.7;
}

.footer__notice {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-md);
}

.footer__links {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.footer__links a {
  font-size: var(--font-size-xs);
  color: var(--color-link);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: opacity 0.2s;
}

.footer__links a:hover {
  opacity: 0.8;
}

.footer__social {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.footer__social a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  transition: all 0.2s;
}

.footer__social a:hover {
  border-color: var(--color-text-muted);
  background: var(--color-bg-card);
}

.footer__social img {
  width: 20px;
  height: 20px;
}

.footer__contact {
  margin-top: var(--space-xl);
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  text-align: center;
  line-height: 1.8;
}

.footer__contact a {
  color: var(--color-link);
  transition: color 0.2s;
}

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

.footer__copyright {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Content Page */
.content-page {
  padding: var(--space-3xl) 0;
}

.content-page__title {
  font-size: var(--font-size-2xl);
  font-weight: 600;
  text-align: center;
  margin-bottom: var(--space-2xl);
  letter-spacing: 0.1em;
}

.content-page__body {
  max-width: 800px;
  margin: 0 auto;
  font-size: var(--font-size-sm);
  color: var(--color-text-secondary);
  line-height: 1.8;
}

.content-page__body p {
  margin-bottom: var(--space-lg);
}

.content-page__body a {
  color: var(--color-accent);
  text-decoration: underline;
}

.content-page__body a:hover {
  opacity: 0.8;
}

.content-page__body h2 {
  font-size: var(--font-size-lg);
  color: var(--color-text);
  margin-top: var(--space-2xl);
  margin-bottom: var(--space-md);
}

.content-page__body ul,
.content-page__body ol {
  margin-left: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.content-page__body li {
  margin-bottom: var(--space-sm);
}

/* Social icons in content pages */
.content-social {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-md);
}

.content-social a {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  transition: all 0.2s;
}

.content-social a:hover {
  border-color: var(--color-text-muted);
  background: var(--color-bg-card);
}

.content-social img {
  width: 24px;
  height: 24px;
}

/* Responsive */

/* Mobile-first adjustments */
@media (max-width: 639px) {
  .hero {
    padding-top: var(--space-3xl);
    padding-bottom: 140px; /* Shift content up on mobile too */
  }

  .hero__logo {
    width: 140px;
  }

  .hero__title {
    font-size: 36px;
    line-height: 36px;
    letter-spacing: 4px;
  }

  .hero__tagline {
    font-size: 16px;
    line-height: 24px;
    padding: 0 var(--space-md);
    white-space: normal;
  }

  .hero__subtitle {
    font-size: 14px;
    line-height: 22px;
    padding: 0 var(--space-md);
    white-space: normal;
  }

  .download-buttons {
    flex-direction: column;
    align-items: center;
    gap: var(--space-sm);
  }

  .download-btn--badge img {
    height: 48px;
  }

  .scroll-indicator {
    bottom: 50px;
  }

  .scroll-indicator img {
    width: 40px;
    height: 52px;
  }
}

@media (min-width: 640px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  :root {
    --container-padding: 2rem;
  }

  .header__nav {
    display: flex;
  }

  .hero__logo {
    width: 220px;
  }

  .hero__title {
    font-size: var(--font-size-3xl);
  }

  .features__title {
    font-size: var(--font-size-2xl);
  }

  .cta__title {
    font-size: var(--font-size-2xl);
  }
}

@media (min-width: 1024px) {
  .features__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================
   ANIMATIONS
   ============================================ */

/* Accessibility - Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Hero Logo - Breathing Glow + Subtle Movement */
.hero__logo {
  will-change: transform, filter;
  animation: logo-alive 6s ease-in-out infinite;
}

@keyframes logo-alive {
  0%, 100% {
    filter: drop-shadow(0 0 6px rgba(53, 141, 103, 0.25))
            drop-shadow(0 0 15px rgba(0, 122, 204, 0.12));
    transform: scale(1) translateY(0) rotate(0deg);
  }
  25% {
    filter: drop-shadow(0 0 12px rgba(53, 141, 103, 0.4))
            drop-shadow(0 0 25px rgba(0, 122, 204, 0.2));
    transform: scale(1.02) translateY(-6px) rotate(1deg);
  }
  50% {
    filter: drop-shadow(0 0 8px rgba(53, 141, 103, 0.3))
            drop-shadow(0 0 18px rgba(0, 122, 204, 0.15));
    transform: scale(1.01) translateY(-2px) rotate(0deg);
  }
  75% {
    filter: drop-shadow(0 0 12px rgba(53, 141, 103, 0.4))
            drop-shadow(0 0 25px rgba(0, 122, 204, 0.2));
    transform: scale(1.02) translateY(-6px) rotate(-1deg);
  }
}

/* Header Logo - Hover Effect */
.header__logo img {
  transition: filter 0.3s ease, transform 0.3s ease;
}

.header__logo:hover img {
  filter: drop-shadow(0 0 10px rgba(53, 141, 103, 0.4));
  transform: scale(1.05);
}

/* Footer Logo - Hover Effect */
.footer__logo {
  transition: opacity 0.3s ease, filter 0.3s ease;
}

.footer__logo:hover {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(53, 141, 103, 0.3));
}

/* ============================================
   FOG EFFECT - Optimized & Subtle
   ============================================ */

.hero {
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  width: 150%;
  height: 150%;
  top: -25%;
  left: -25%;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}

/* Primary fog layer - gentle drift */
.hero::before {
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%,
      rgba(53, 141, 103, 0.06) 0%,
      transparent 50%),
    radial-gradient(ellipse 70% 50% at 80% 70%,
      rgba(0, 122, 204, 0.05) 0%,
      transparent 45%);
  animation: fog-drift 30s ease-in-out infinite;
}

/* Secondary fog layer - slower counter-drift */
.hero::after {
  background:
    radial-gradient(ellipse 60% 50% at 70% 25%,
      rgba(53, 141, 103, 0.04) 0%,
      transparent 45%),
    radial-gradient(ellipse 80% 60% at 30% 75%,
      rgba(0, 122, 204, 0.05) 0%,
      transparent 50%);
  animation: fog-drift 40s ease-in-out infinite reverse;
}

@keyframes fog-drift {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(5%, -3%); }
}

/* Ensure hero content stays above fog */
.hero > .container {
  position: relative;
  z-index: 1;
}

/* ============================================
   FEATURE CARDS - Scroll Reveal
   ============================================ */

.feature-card {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease, transform 0.5s ease;
  will-change: opacity, transform;
}

.feature-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-card:nth-child(1) { transition-delay: 0s; }
.feature-card:nth-child(2) { transition-delay: 0.15s; }
.feature-card:nth-child(3) { transition-delay: 0.3s; }
