/* ========================================
   Dunhuang Shot: Cinnabar & Gold
   Mobile-First Stylesheet
   ======================================== */

/* ========================================
   CSS Variables - Dunhuang Cinnabar & Gold Palette
   ======================================== */
:root {
  /* Primary: Cinnabar Red */
  --cinnabar-primary: #8B2500;
  --cinnabar-medium: #B33000;
  --cinnabar-light: #CC4A1F;
  
  /* Secondary: Ancient Gold */
  --gold-primary: #B8860B;
  --gold-light: #DAA520;
  --gold-pale: #EDD382;
  
  /* Accent: Apsara Ochre */
  --ochre-accent: #CC7722;
  --ochre-light: #E69A3C;
  
  /* Neutral: Stone & Silk */
  --stone-dark: #3E2723;
  --stone-medium: #5D4037;
  --silk-cream: #FFF8E7;
  --silk-white: #FFFEF9;
  --stone-bg: #F5EBD7;
  
  /* Shadows & Depth */
  --shadow-soft: 0 2px 8px rgba(62, 39, 35, 0.15);
  --shadow-medium: 0 4px 16px rgba(62, 39, 35, 0.2);
  --shadow-strong: 0 8px 24px rgba(62, 39, 35, 0.25);
  
  /* Spacing */
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 24px;
  --spacing-lg: 32px;
  --spacing-xl: 48px;
  --spacing-xxl: 64px;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  
  /* Typography */
  --font-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-serif: Georgia, 'Times New Roman', serif;
}

/* ========================================
   Base Styles
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-base);
  font-size: 16px;
  line-height: 1.6;
  color: var(--stone-dark);
  background-color: var(--silk-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ========================================
   1. Sticky Header (Mobile: 48px, Desktop: 64px)
   ======================================== */
.sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  background: linear-gradient(135deg, var(--silk-white) 0%, var(--stone-bg) 100%);
  border-bottom: 2px solid var(--gold-pale);
  box-shadow: var(--shadow-soft);
  z-index: 1000;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  padding: 0 var(--spacing-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 2px solid var(--gold-primary);
}

.header-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--cinnabar-primary);
  display: none;
}

.header-nav {
  display: none;
}

.header-cta-mobile {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cinnabar-primary), var(--cinnabar-medium));
  color: var(--silk-white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.header-cta-mobile:active {
  transform: scale(0.95);
  box-shadow: 0 0 12px rgba(139, 37, 0, 0.4);
}

/* ========================================
   2. Hero Section
   ======================================== */
.hero {
  padding-top: 64px;
  padding-bottom: var(--spacing-xl);
  background: linear-gradient(180deg, var(--silk-white) 0%, var(--stone-bg) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(184, 134, 11, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
  position: relative;
  z-index: 1;
}

.hero-content {
  text-align: center;
}

.hero-icon-wrapper {
  margin: 0 auto var(--spacing-md);
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: templeFloat 6s ease-in-out infinite;
}

@keyframes templeFloat {
  0%, 100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-12px) scale(1.02);
  }
}

.hero-icon {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  border: 3px solid var(--gold-primary);
  box-shadow: 0 0 20px rgba(184, 134, 11, 0.3), var(--shadow-medium);
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--cinnabar-primary);
  margin-bottom: var(--spacing-sm);
  letter-spacing: 0.02em;
}

.hero-subtitle {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--gold-primary);
  margin-bottom: var(--spacing-md);
  letter-spacing: 0.03em;
}

.hero-description {
  font-size: 16px;
  line-height: 1.7;
  color: var(--stone-medium);
  margin-bottom: var(--spacing-lg);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xl);
}

.hero-visual {
  margin-top: var(--spacing-lg);
}

.hero-banner {
  width: 100%;
  border-radius: var(--radius-md);
  border: 3px solid var(--gold-pale);
  box-shadow: var(--shadow-medium);
}

/* ========================================
   Download Buttons - Cinnabar Lacquer Badge
   ======================================== */
.download-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  min-height: 56px;
  border: 2px solid;
}

.download-button-google {
  background: linear-gradient(135deg, var(--cinnabar-primary) 0%, var(--cinnabar-medium) 50%, var(--ochre-accent) 100%);
  color: var(--silk-white);
  border-color: var(--cinnabar-light);
  box-shadow: 0 4px 12px rgba(139, 37, 0, 0.3);
}

.download-button-google:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(139, 37, 0, 0.4);
}

.download-button-google:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(139, 37, 0, 0.35);
}

.download-button-apple {
  background: #2a2a2a;
  color: rgba(255, 255, 255, 0.55);
  border-color: #444;
  opacity: 0.55;
  filter: grayscale(0.6);
  cursor: not-allowed;
  position: relative;
}

.download-button-apple .coming-soon-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: var(--stone-medium);
  color: var(--silk-white);
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.store-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.button-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.button-label {
  font-size: 11px;
  font-weight: 500;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.coming-soon-label {
  opacity: 0.7;
}

.button-store {
  font-size: 16px;
  font-weight: 700;
}

.download-button-large {
  min-height: 64px;
  padding: 18px 32px;
}

.download-button-large .store-icon {
  width: 36px;
  height: 36px;
}

.download-button-large .button-store {
  font-size: 18px;
}

/* ========================================
   3. Features Section
   ======================================== */
.features {
  padding: var(--spacing-xxl) 0;
  background: var(--silk-white);
}

.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

.section-title {
  font-family: var(--font-serif);
  font-size: 28px;
  font-weight: 700;
  text-align: center;
  color: var(--cinnabar-primary);
  margin-bottom: var(--spacing-sm);
  letter-spacing: 0.02em;
}

.section-subtitle {
  font-size: 16px;
  text-align: center;
  color: var(--stone-medium);
  margin-bottom: var(--spacing-xl);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--spacing-md);
}

.feature-card {
  background: linear-gradient(135deg, var(--silk-cream) 0%, var(--silk-white) 100%);
  padding: var(--spacing-lg);
  border-radius: var(--radius-md);
  border: 2px solid var(--gold-pale);
  box-shadow: var(--shadow-soft);
  transition: all 0.4s ease;
  opacity: 0;
  transform: translateY(20px);
}

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

.feature-card:hover {
  border-color: var(--gold-primary);
  box-shadow: var(--shadow-medium);
  transform: translateY(-4px);
}

.feature-icon {
  font-size: 48px;
  margin-bottom: var(--spacing-sm);
  line-height: 1;
}

.feature-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--cinnabar-medium);
  margin-bottom: var(--spacing-xs);
}

.feature-description {
  font-size: 15px;
  line-height: 1.7;
  color: var(--stone-medium);
}

/* ========================================
   5. Download CTA Section
   ======================================== */
.download-cta {
  padding: var(--spacing-xxl) 0;
  background: linear-gradient(135deg, var(--cinnabar-primary) 0%, var(--cinnabar-medium) 50%, var(--ochre-accent) 100%);
  position: relative;
  overflow: hidden;
}

.download-cta::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1000px;
  height: 1000px;
  background: radial-gradient(circle, rgba(218, 165, 32, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

.cta-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
  text-align: center;
  position: relative;
  z-index: 1;
}

.cta-title {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 700;
  color: var(--silk-white);
  margin-bottom: var(--spacing-sm);
  letter-spacing: 0.02em;
}

.cta-subtitle {
  font-size: 18px;
  color: var(--gold-pale);
  margin-bottom: var(--spacing-lg);
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
  max-width: 400px;
  margin: 0 auto;
}

.cta-buttons .download-button-google {
  background: var(--silk-white);
  color: var(--cinnabar-primary);
  border-color: var(--gold-primary);
}

.cta-buttons .download-button-google:hover {
  background: var(--silk-cream);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ========================================
   Mobile Sticky CTA
   ======================================== */
.mobile-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-sm);
  background: linear-gradient(to top, var(--silk-white) 0%, rgba(255, 255, 255, 0.95) 100%);
  border-top: 2px solid var(--gold-pale);
  box-shadow: 0 -4px 16px rgba(62, 39, 35, 0.1);
  z-index: 999;
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.4s ease;
}

.mobile-sticky-cta.visible {
  opacity: 1;
  transform: translateY(0);
}

.sticky-cta-button {
  display: block;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--cinnabar-primary), var(--cinnabar-medium));
  color: var(--silk-white);
  text-align: center;
  font-weight: 700;
  font-size: 16px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(139, 37, 0, 0.3);
  transition: all 0.3s ease;
}

.sticky-cta-button:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(139, 37, 0, 0.35);
}

/* ========================================
   6. About Section
   ======================================== */
.about {
  padding: var(--spacing-xxl) 0;
  background: linear-gradient(180deg, var(--stone-bg) 0%, var(--silk-white) 100%);
}

.about-text {
  font-size: 16px;
  line-height: 1.8;
  color: var(--stone-medium);
  margin-bottom: var(--spacing-md);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.about-contact {
  text-align: center;
  font-size: 15px;
  color: var(--stone-medium);
}

.contact-link {
  color: var(--cinnabar-medium);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.contact-link:hover {
  color: var(--cinnabar-primary);
}

/* ========================================
   7. Footer
   ======================================== */
.footer {
  padding: var(--spacing-xl) 0 var(--spacing-md);
  background: var(--stone-dark);
  color: var(--silk-cream);
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: var(--spacing-md);
}

.footer-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--gold-primary);
}

.footer-brand-name {
  font-family: var(--font-serif);
  font-size: 16px;
  font-weight: 600;
  color: var(--gold-light);
}

.footer-contact {
  margin-bottom: var(--spacing-sm);
  font-size: 14px;
}

.footer-legal {
  margin-bottom: var(--spacing-sm);
  font-size: 14px;
}

.footer-separator {
  margin: 0 var(--spacing-xs);
  color: var(--gold-pale);
}

.footer-link {
  color: var(--gold-pale);
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

.footer-copyright {
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(218, 165, 32, 0.3);
  font-size: 13px;
  color: var(--stone-bg);
}

/* ========================================
   Desktop Responsive (≥768px)
   ======================================== */
@media (min-width: 768px) {
  /* Header */
  .sticky-header {
    height: 64px;
  }
  
  .header-icon {
    width: 40px;
    height: 40px;
  }
  
  .header-title {
    display: block;
    font-size: 16px;
  }
  
  .header-nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
  }
  
  .nav-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--stone-medium);
    transition: color 0.3s ease;
  }
  
  .nav-link:hover {
    color: var(--cinnabar-primary);
  }
  
  .nav-cta {
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--cinnabar-primary), var(--cinnabar-medium));
    color: var(--silk-white);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
  }
  
  .nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 37, 0, 0.3);
  }
  
  .header-cta-mobile {
    display: none;
  }
  
  /* Hero */
  .hero {
    padding-top: 96px;
  }
  
  .hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
  }
  
  .hero-content {
    text-align: left;
  }
  
  .hero-icon-wrapper {
    margin-left: 0;
    width: 140px;
    height: 140px;
  }
  
  .hero-title {
    font-size: 36px;
  }
  
  .hero-subtitle {
    font-size: 20px;
  }
  
  .hero-description {
    margin-left: 0;
    margin-right: 0;
  }
  
  .hero-buttons {
    flex-direction: row;
    gap: var(--spacing-sm);
  }
  
  .hero-visual {
    margin-top: 0;
  }
  
  /* Features */
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
  }
  
  .section-title {
    font-size: 32px;
  }
  
  /* CTA */
  .cta-title {
    font-size: 40px;
  }
  
  .cta-buttons {
    flex-direction: row;
    max-width: 600px;
  }
  
  /* Mobile Sticky CTA hidden on desktop */
  .mobile-sticky-cta {
    display: none;
  }
  
  /* Footer */
  .footer-brand-name {
    font-size: 18px;
  }
}

/* ========================================
   Large Desktop (≥1024px)
   ======================================== */
@media (min-width: 1024px) {
  .hero-title {
    font-size: 42px;
  }
  
  .hero-subtitle {
    font-size: 22px;
  }
  
  .section-title {
    font-size: 36px;
  }
  
  .cta-title {
    font-size: 48px;
  }
}
