/* ========================================
   Sapor Landing Page — Main Styles
   Mobile-first, flexbox/grid layout
   ======================================== */

/* ---- Base ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

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

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

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--color-text);
}

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

/* ---- Section ---- */
.section {
  padding: var(--section-py) 0;
}

.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-primary);
  margin-bottom: var(--space-xs);
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.section-desc {
  font-size: 1rem;
  color: var(--color-text-light);
  max-width: 560px;
}

@media (min-width: 1024px) {
  .section-title {
    font-size: 2.5rem;
  }
  .section-desc {
    font-size: 1.125rem;
  }
}

/* ========================================
   Header (sticky)
   ======================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  z-index: 1000;
  transition: background var(--transition-base), box-shadow var(--transition-base);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  position: relative;
}

/* Mobile: logo centered, hamburger left */
@media (max-width: 1023px) {
  .site-header .container {
    justify-content: center;
  }
  .hamburger {
    position: absolute;
    left: var(--container-px);
  }
}

.header-logo img {
  height: 28px;
  width: auto;
}

.header-scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: var(--shadow-sm);
}

.site-header.menu-open {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  box-shadow: none;
}

/* Desktop nav: hidden on mobile, shown on desktop */
.header-nav {
  display: none;
}

.header-nav a {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-text-light);
  transition: color var(--transition-fast);
}

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

/* Hamburger button: shown on mobile only */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

.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);
}

/* Mobile nav overlay */
.header-nav.mobile-open {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 1050;
}

.header-nav.mobile-open a {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
}

.header-nav.mobile-open a:hover {
  color: var(--color-primary);
}

@media (min-width: 1024px) {
  .header-logo img {
    height: 32px;
  }
  .hamburger {
    display: none;
  }
  .header-nav {
    display: flex;
    gap: var(--space-lg);
  }
  .header-nav.mobile-open {
    display: flex;
    flex-direction: row;
    position: static;
    background: none;
    backdrop-filter: none;
  }
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  padding-top: calc(var(--header-height) + var(--space-xl));
  padding-bottom: var(--space-3xl);
  background: linear-gradient(135deg, var(--color-bg) 60%, var(--color-primary-bg) 100%);
  overflow: hidden;
  position: relative;
}

.hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-xl);
}

.hero-content {
  max-width: 560px;
}

.hero-content .section-label {
  font-size: 0.875rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: var(--space-md);
}

.hero-title .highlight {
  color: var(--color-primary);
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-light);
  margin-bottom: var(--space-lg);
  line-height: 1.7;
}

.hero-image {
  position: relative;
  width: 260px;
  flex-shrink: 0;
}

.hero-image img {
  width: 100%;
  animation: float 4s ease-in-out infinite;
}

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

@media (min-width: 1024px) {
  .hero {
    padding-top: calc(var(--header-height) + var(--space-4xl));
    padding-bottom: var(--space-4xl);
  }
  .hero .container {
    flex-direction: row;
    text-align: left;
    justify-content: space-between;
  }
  .hero-title {
    font-size: 3.25rem;
  }
  .hero-subtitle {
    font-size: 1.2rem;
  }
  .hero-image {
    width: 360px;
  }
}

/* ========================================
   Store Buttons
   ======================================== */
.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
}

@media (min-width: 1024px) {
  .hero .store-buttons {
    justify-content: flex-start;
  }
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-lg);
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
  white-space: nowrap;
}

.store-btn:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-purple);
}

.store-btn img {
  height: 20px;
  width: auto;
}

/* Inverted variant for dark backgrounds */
.store-btn--light {
  background: var(--color-white);
  color: var(--color-primary);
}

.store-btn--light:hover {
  background: #F0E6FF;
  box-shadow: 0 4px 24px rgba(255, 255, 255, 0.2);
}

.store-btn--light img {
  filter: brightness(0) saturate(100%) invert(15%) sepia(90%) saturate(6000%) hue-rotate(265deg);
}

/* QR codes */
.qr-block {
  display: none;
}

@media (min-width: 1024px) {
  .qr-block {
    display: flex;
    gap: var(--space-lg);
    margin-top: var(--space-md);
  }
  .hero .qr-block {
    justify-content: flex-start;
  }
}

.qr-item {
  text-align: center;
}

.qr-item img {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-sm);
  border: 1px solid #eee;
}

.qr-item span {
  display: block;
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* ========================================
   About / What is Sapor
   ======================================== */
.about {
  background: var(--color-primary-bg);
}

.about .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-xl);
}

.about-image {
  width: 180px;
  flex-shrink: 0;
}

.about-text {
  max-width: 600px;
}

.about-text .section-title {
  color: var(--color-primary);
}

.about-text p {
  margin-top: var(--space-sm);
  line-height: 1.8;
}

@media (min-width: 1024px) {
  .about .container {
    flex-direction: row;
    text-align: left;
  }
  .about-image {
    width: 240px;
  }
}

/* ========================================
   Features Section
   ======================================== */
.features {
  background: var(--color-bg);
}

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

.feature-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
  padding: var(--space-xl) 0;
}

.feature-row:nth-child(even) {
  background: var(--color-primary-bg);
  border-radius: var(--radius-lg);
  padding-left: var(--space-sm);
  padding-right: var(--space-sm);
}

.feature-image {
  width: 200px;
  flex-shrink: 0;
}

.feature-image img {
  border-radius: var(--radius-md);
}

.feature-text {
  text-align: center;
  max-width: 480px;
}

.feature-text h3 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
  color: var(--color-primary);
}

.feature-text .feature-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: var(--color-white);
  margin-bottom: var(--space-xs);
}

.feature-text p {
  color: var(--color-text-light);
  line-height: 1.7;
}

@media (min-width: 1024px) {
  .feature-row {
    flex-direction: row;
    gap: var(--space-3xl);
    padding: var(--space-xl) var(--space-lg);
  }
  .feature-row:nth-child(even) {
    flex-direction: row-reverse;
  }
  .feature-image {
    width: 280px;
  }
  .feature-text {
    text-align: left;
  }
  .feature-text h3 {
    font-size: 1.6rem;
  }
}

/* ========================================
   Social Section
   ======================================== */
.social {
  background: var(--color-bg);
}

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

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

.social-card {
  text-align: center;
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  background: var(--color-primary-bg);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.social-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.social-card img {
  width: 100px;
  margin: 0 auto var(--space-sm);
}

.social-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.social-card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}

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

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

/* ========================================
   Web Edit Section
   ======================================== */
.web-edit {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-dark-purple) 100%);
  color: var(--color-white);
}

.web-edit .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-xl);
}

.web-edit-image {
  width: 160px;
  flex-shrink: 0;
}

.web-edit-text {
  max-width: 560px;
}

.web-edit-text .section-label {
  color: rgba(255, 255, 255, 0.7);
}

.web-edit-text .section-title {
  color: var(--color-white);
}

.web-edit-text p {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
  margin-top: var(--space-sm);
}

.web-edit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: var(--space-md);
  padding: 14px 32px;
  background: var(--color-white);
  color: var(--color-primary);
  border-radius: var(--radius-lg);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.web-edit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(255, 255, 255, 0.25);
}

@media (min-width: 1024px) {
  .web-edit .container {
    flex-direction: row;
    text-align: left;
  }
  .web-edit-image {
    width: 220px;
  }
}

/* ========================================
   Download CTA Section
   ======================================== */
.download-cta {
  background: linear-gradient(160deg, var(--color-dark-purple) 0%, var(--color-dark) 100%);
  color: var(--color-white);
  text-align: center;
}

.download-cta .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.download-cta-image {
  width: 140px;
}

.download-cta .section-title {
  color: var(--color-white);
  font-size: 2rem;
}

.download-cta .section-desc {
  color: rgba(255, 255, 255, 0.75);
  margin: 0 auto var(--space-md);
}

.download-cta .store-buttons {
  justify-content: center;
}

.download-cta .qr-block {
  justify-content: center;
}

.download-cta .qr-item span {
  color: rgba(255, 255, 255, 0.6);
}

.download-cta .qr-item img {
  border-color: rgba(255, 255, 255, 0.15);
}

@media (min-width: 1024px) {
  .download-cta .section-title {
    font-size: 2.75rem;
  }
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
  background: var(--color-dark);
  color: rgba(255, 255, 255, 0.5);
  padding: var(--space-xl) 0;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  text-align: center;
}

.footer-mascot {
  width: 80px;
  opacity: 0.7;
}

.footer-links {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color var(--transition-fast);
}

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

.footer-copy {
  font-size: 0.8rem;
}

/* ========================================
   Scroll Reveal Animation
   ======================================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* ========================================
   Utility
   ======================================== */
.desktop-only {
  display: none !important;
}

.mobile-only {
  display: block !important;
}

@media (min-width: 1024px) {
  .desktop-only {
    display: block !important;
  }
  .mobile-only {
    display: none !important;
  }
}
