/* Custom Properties & Apple-inspired Theme */
:root {
  --bg-color: #f5f5f7;
  --text-color: #1d1d1f;
  --text-muted: #6e6e73;
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.08);
  --card-shadow: 0 6px 24px rgba(0, 0, 0, 0.04);
  --tag-bg: rgba(0, 0, 0, 0.05);
  --tag-color: #515154;
  --stat-gradient: linear-gradient(180deg, #1d1d1f 0%, #434344 100%);
  --headline-gradient: linear-gradient(180deg, #1d1d1f 0%, #515154 100%);
  --iphone-chassis-bg: linear-gradient(145deg, #242427 0%, #121214 45%, #1e1e21 100%);
  --iphone-rim: rgba(255, 255, 255, 0.16);
  --iphone-button-bg: #1c1c1f;
  --iphone-shadow: 0 35px 75px -15px rgba(0, 0, 0, 0.42), 0 12px 28px -10px rgba(0, 0, 0, 0.22);
  --badge-sweet-spot: #f3e5c0;
  --badge-sweet-spot-text: #3c3218;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #000000;
    --text-color: #f5f5f7;
    --text-muted: #86868b;
    --card-bg: #161618;
    --card-border: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 6px 30px rgba(0, 0, 0, 0.6);
    --tag-bg: rgba(255, 255, 255, 0.08);
    --tag-color: #a1a1a6;
    --stat-gradient: linear-gradient(180deg, #ffffff 0%, #a1a1a6 100%);
    --headline-gradient: linear-gradient(180deg, #ffffff 0%, #b0b0b5 100%);
    --iphone-chassis-bg: linear-gradient(145deg, #28282c 0%, #101012 45%, #222225 100%);
    --iphone-rim: rgba(255, 255, 255, 0.22);
    --iphone-button-bg: #222225;
    --iphone-shadow: 0 35px 85px -15px rgba(0, 0, 0, 0.95), 0 12px 28px -8px rgba(0, 0, 0, 0.7);
    --badge-sweet-spot: #423b28;
    --badge-sweet-spot-text: #f5e4bd;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

/* Layout Containers */
.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 28px;
}

/* Header */
header {
  padding: 24px 0;
  border-bottom: 1px solid rgba(128, 128, 128, 0.12);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-title {
  font-family: Georgia, serif;
  font-size: 2.1rem;
  font-weight: normal;
  letter-spacing: 1.5px;
}

.brand-title a {
  color: var(--text-color);
  text-decoration: none;
}

.lang-switcher {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
}

.lang-switcher a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s ease;
}

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

.lang-switcher a.active {
  color: var(--text-color);
  font-weight: 700;
}

/* Hero Section */
.hero-section {
  padding: 70px 0 60px 0;
  text-align: center;
}

.hero-icon-wrapper {
  margin-bottom: 24px;
}

.hero-app-icon {
  width: 110px;
  height: 110px;
  border-radius: 25px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-app-icon:hover {
  transform: scale(1.05) translateY(-3px);
}

.hero-tagline {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.hero-headline {
  font-size: 3.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  max-width: 860px;
  margin: 0 auto 20px auto;
  background: var(--headline-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.25rem;
  line-height: 1.55;
  max-width: 620px;
  margin: 0 auto 36px auto;
  color: var(--text-muted);
}

.hero-cta {
  margin-bottom: 60px;
}

.app-store-button {
  display: inline-block;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.app-store-button:hover {
  transform: scale(1.03);
  opacity: 0.92;
}

.app-store-button img {
  height: 52px;
  width: auto;
}

.hero-device-wrapper {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

/* iPhone 18 Pro Real Hardware Frame */
.iphone-device {
  position: relative;
  width: 280px;
  max-width: 100%;
  margin: 0 auto;
}

.iphone-device-large {
  width: 300px;
}

.iphone-chassis {
  position: relative;
  background: var(--iphone-chassis-bg);
  padding: 8px;
  border-radius: 50px;
  box-shadow:
    0 0 0 1px var(--iphone-rim),
    0 0 0 2px rgba(0, 0, 0, 0.35),
    var(--iphone-shadow);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.iphone-chassis:hover {
  transform: translateY(-6px) scale(1.02);
}

/* Hardware Buttons */
.iphone-btn-power {
  position: absolute;
  right: -3px;
  top: 130px;
  width: 3px;
  height: 54px;
  background: var(--iphone-button-bg);
  border-radius: 0 2px 2px 0;
}

.iphone-btn-action {
  position: absolute;
  left: -3px;
  top: 80px;
  width: 3px;
  height: 26px;
  background: var(--iphone-button-bg);
  border-radius: 2px 0 0 2px;
}

.iphone-btn-vol-up {
  position: absolute;
  left: -3px;
  top: 120px;
  width: 3px;
  height: 40px;
  background: var(--iphone-button-bg);
  border-radius: 2px 0 0 2px;
}

.iphone-btn-vol-down {
  position: absolute;
  left: -3px;
  top: 172px;
  width: 3px;
  height: 40px;
  background: var(--iphone-button-bg);
  border-radius: 2px 0 0 2px;
}

/* Screen Display */
.iphone-screen {
  position: relative;
  overflow: hidden;
  border-radius: 42px;
  background: #000;
  line-height: 0;
  aspect-ratio: 690 / 1499;
  box-shadow: inset 0 0 0 1.5px rgba(0, 0, 0, 0.4);
}

.iphone-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Dynamic Island */
.iphone-island {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 70px;
  height: 19px;
  background: #000000;
  border-radius: 20px;
  z-index: 6;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.iphone-island::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: radial-gradient(circle, #0e1e38 30%, #050a12 70%);
  box-shadow: inset 0 0 1px rgba(255, 255, 255, 0.25);
}

/* Apple-Style Stats Numbers */
.stats-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 60px 0 100px 0;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 32px 20px;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: transform 0.25s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
}

.stat-number {
  display: block;
  font-size: 3.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 10px;
  background: var(--stat-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  display: block;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 6px;
}

.stat-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.45;
}

/* Section Tag & Headers */
.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 30px;
  background: var(--tag-bg);
  color: var(--tag-color);
  margin-bottom: 14px;
}

/* Alternating Feature Rows (Apple Story Showcase) */
.feature-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 70px;
  margin: 110px 0;
}

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

.feature-content {
  flex: 1;
  max-width: 480px;
}

.feature-content h3 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text-color);
}

.feature-content p {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
}

.feature-bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-bullet-list li {
  font-size: 0.98rem;
  color: var(--text-color);
  display: flex;
  align-items: center;
  gap: 10px;
}

.feature-bullet-list li::before {
  content: "✓";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--tag-bg);
  color: var(--text-color);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.feature-visual {
  flex: 0 0 280px;
  display: flex;
  justify-content: center;
}

/* Full Width Optical Science Banner */
.optical-science-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  padding: 48px 40px;
  margin: 90px 0;
  box-shadow: var(--card-shadow);
  text-align: center;
}

.optical-science-card h3 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.optical-science-card p {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 680px;
  margin: 0 auto 32px auto;
}

.aperture-scale {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  max-width: 720px;
  margin: 0 auto;
}

.aperture-step {
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--tag-bg);
  text-align: center;
  flex: 1;
  min-width: 110px;
}

.aperture-val {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", monospace;
  font-size: 1.2rem;
  font-weight: 700;
  display: block;
}

.aperture-note {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-top: 4px;
  display: block;
}

.aperture-step.optimal {
  background: var(--badge-sweet-spot);
  color: var(--badge-sweet-spot-text);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  flex: 1.4;
}

.aperture-step.optimal .aperture-note {
  color: var(--badge-sweet-spot-text);
  font-weight: 700;
}

/* Call to Action */
.cta-section {
  text-align: center;
  padding: 70px 32px;
  margin: 80px 0 60px 0;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 28px;
  box-shadow: var(--card-shadow);
}

.cta-section h2 {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
}

.cta-section p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 32px auto;
  line-height: 1.5;
}

/* Footer */
footer {
  margin-top: 60px;
  padding: 40px 0 60px 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  border-top: 1px solid rgba(128, 128, 128, 0.12);
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Privacy Page Specific */
.privacy-content {
  padding: 60px 0;
  max-width: 760px;
}

.privacy-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.privacy-content h2 {
  font-size: 1.45rem;
  font-weight: 700;
  margin-top: 36px;
  margin-bottom: 14px;
}

.privacy-content p {
  font-size: 1.05rem;
  color: var(--text-color);
  line-height: 1.6;
  margin-bottom: 18px;
}

/* Subtle Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.stagger-1 { transition-delay: 0.06s; }
.stagger-2 { transition-delay: 0.12s; }
.stagger-3 { transition-delay: 0.18s; }
.stagger-4 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .iphone-chassis:hover,
  .hero-app-icon:hover,
  .stat-card:hover {
    transform: none !important;
  }
}

/* Responsive Media Queries */
@media (max-width: 900px) {
  .stats-section {
    grid-template-columns: repeat(2, 1fr);
  }
  .feature-row {
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .hero-headline {
    font-size: 2.3rem;
  }
  .hero-description {
    font-size: 1.1rem;
  }
  .stat-number {
    font-size: 3rem;
  }
  .feature-row,
  .feature-row.reverse {
    flex-direction: column;
    text-align: center;
    gap: 36px;
    margin: 80px 0;
  }
  .feature-content {
    max-width: 100%;
  }
  .feature-bullet-list {
    align-items: center;
  }
  .optical-science-card {
    padding: 36px 20px;
  }
  .aperture-scale {
    flex-direction: column;
    gap: 10px;
  }
  .aperture-step {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .stats-section {
    grid-template-columns: 1fr;
  }
  .hero-headline {
    font-size: 1.95rem;
  }
  .iphone-device {
    width: 250px;
  }
}
