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

:root {
  --purple: #733FFF;
  --pink: #FF597F;
  --teal: #33D9B2;
  --bg: #0A0A14;
  --bg2: #12121E;
  --card: rgba(255,255,255,0.04);
  --card-border: rgba(255,255,255,0.08);
  --text: #FFFFFF;
  --text-sec: rgba(255,255,255,0.65);
  /* Tydligare än 0.38 för AA-kontrast (normal text) mot --bg / kort */
  --text-ter: rgba(255,255,255,0.70);
  --radius: 20px;
  --radius-sm: 14px;
  --grad: linear-gradient(135deg, var(--purple), var(--pink));
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ===== GRADIENT BLOBS ===== */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.18;
  pointer-events: none;
  z-index: 0;
}
.blob-1 { width: 600px; height: 600px; background: var(--purple); top: -150px; left: -150px; }
.blob-2 { width: 500px; height: 500px; background: var(--pink); bottom: 0; right: -100px; }
.blob-3 { width: 400px; height: 400px; background: var(--teal); top: 50%; left: 40%; }

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(10,10,20,0.7);
  border-bottom: 1px solid var(--card-border);
  padding: 0 5%;
  transition: box-shadow 0.2s;
}
nav.scrolled { box-shadow: 0 4px 30px rgba(0,0,0,0.3); }
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
  text-decoration: none;
  color: var(--text);
}
.nav-logo svg, .nav-logo img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; }
.nav-right { display: flex; align-items: center; gap: 16px; }
.lang-btn {
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--text-sec);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.lang-btn:hover { background: rgba(255,255,255,0.08); color: var(--text); }
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--text-sec);
  border-radius: 100px;
  padding: 6px 14px 6px 12px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}
.back-btn svg { width: 14px; height: 14px; }
.back-btn:hover { background: rgba(255,255,255,0.08); color: var(--text); transform: translateX(-2px); }
.appstore-btn {
  background: var(--grad);
  color: white;
  border: none;
  border-radius: 100px;
  padding: 8px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
}
.appstore-btn:hover { opacity: 0.85; transform: translateY(-1px); }

/* ===== HERO ===== */
.hero {
  position: relative;
  z-index: 1;
  padding: 140px 5% 80px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(115,63,255,0.15);
  border: 1px solid rgba(115,63,255,0.3);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #A88BFF;
  margin-bottom: 24px;
}
.hero-badge > span:empty { width: 6px; height: 6px; background: var(--purple); border-radius: 50%; display: inline-block; flex-shrink: 0; }
.hero-title-wrap {
  display: inline-flex;
  align-items: flex-end;
  gap: 14px;
}
.hero h1 {
  font-size: clamp(40px, 5vw, 64px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 20px;
}
.hero-title-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  object-fit: cover;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(115,63,255,0.35);
}
.hero h1 .grad-text { background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.hero p.lead {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--text-sec);
  max-width: 480px;
  margin-bottom: 40px;
  line-height: 1.7;
}
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.btn-primary {
  background: var(--grad);
  color: white;
  border: none;
  border-radius: 100px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 8px 32px rgba(115,63,255,0.35);
}
.btn-primary:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 12px 40px rgba(115,63,255,0.45); }
.btn-secondary {
  background: var(--card);
  border: 1px solid var(--card-border);
  color: var(--text);
  border-radius: 100px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}
.btn-secondary:hover { background: rgba(255,255,255,0.08); }
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--card-border);
}
.stat-item { display: flex; flex-direction: column; gap: 2px; }
.stat-num { font-size: 26px; font-weight: 800; background: var(--grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-label { font-size: 13px; color: var(--text-ter); }

/* Phone mockup */
.hero-visual { display: flex; justify-content: center; align-items: center; position: relative; }
.phone-mockup {
  width: 280px;
  background: #1A1A2E;
  border-radius: 48px;
  border: 2px solid rgba(255,255,255,0.12);
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.6), 0 0 60px rgba(115,63,255,0.2);
  position: relative;
  flex-shrink: 0;
}
.phone-mockup img { width: 100%; height: auto; display: block; }
.phone-glow {
  position: absolute;
  inset: -30px;
  background: radial-gradient(ellipse at center, rgba(115,63,255,0.25) 0%, transparent 70%);
  z-index: -1;
  border-radius: 50%;
}
/* Photorealistic iPhone mockup (PNG-based) — same pattern as .watch-real */
.phone-real {
  position: relative;
  display: block;
  width: 100%;
}
.phone-real-frame {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 2;
  pointer-events: none;
  user-select: none;
}
.phone-real-screen {
  position: absolute;
  top: 2.5%;
  left: 4.35%;
  width: 91.3%;
  height: 95%;
  border-radius: 7%/3.5%;
  object-fit: cover;
  z-index: 1;
  background: #000;
}
.phone-real.phone-real--second {
  width: 240px;
  margin-left: -60px;
  margin-top: 60px;
  opacity: 0.92;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.5));
}
.watch-real.watch-real--hero {
  width: 150px;
  flex-shrink: 0;
  margin-left: -24px;
  align-self: center;
  z-index: 2;
  filter: drop-shadow(0 24px 40px rgba(0,0,0,0.5)) drop-shadow(0 0 30px rgba(115,63,255,0.18));
  --disp-top: 22%;
  --disp-left: 13%;
  --disp-width: 74%;
  --disp-height: 56%;
  --disp-radius: 8%;
}

/* ===== SECTION BASE ===== */
section { position: relative; z-index: 1; padding: 100px 5%; }
.section-label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  /* Ljusare lila mot mörk bakgrund — AA-kontrast (vs. #733FFF direkt på --bg) */
  color: #B8A3FF;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 16px;
}
.section-sub {
  font-size: clamp(15px, 1.8vw, 18px);
  color: var(--text-sec);
  max-width: 560px;
  line-height: 1.7;
}
.section-header { margin-bottom: 64px; }
.container { max-width: 1100px; margin: 0 auto; }

/* ===== FEATURES ===== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  cursor: default;
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(115,63,255,0.3);
  box-shadow: 0 20px 50px rgba(115,63,255,0.1);
}
.feature-icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 24px;
  background: rgba(115,63,255,0.12);
  border: 1px solid rgba(115,63,255,0.2);
}
.feature-card:nth-child(2) .feature-icon { background: rgba(255,89,127,0.12); border-color: rgba(255,89,127,0.2); }
.feature-card:nth-child(3) .feature-icon { background: rgba(51,217,178,0.12); border-color: rgba(51,217,178,0.2); }
.feature-card:nth-child(4) .feature-icon { background: rgba(115,63,255,0.12); border-color: rgba(115,63,255,0.2); }
.feature-card:nth-child(5) .feature-icon { background: rgba(255,89,127,0.14); border-color: rgba(255,89,127,0.25); }
.feature-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.3px; }
.feature-card p { font-size: 15px; color: var(--text-sec); line-height: 1.65; }
.health-icon svg {
  width: 24px;
  height: 24px;
  fill: #FF3B5C;
  display: block;
}

/* ===== HOW IT WORKS ===== */
.how-section { background: linear-gradient(180deg, transparent, rgba(115,63,255,0.05), transparent); }
.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  position: relative;
}
.step-card {
  position: relative;
  padding: 36px 28px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
}
.step-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--grad);
}
.step-number {
  font-size: 64px;
  font-weight: 900;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0.25;
  position: absolute;
  top: 16px; right: 20px;
  line-height: 1;
}
.step-card h3 { font-size: 20px; font-weight: 700; margin-bottom: 12px; letter-spacing: -0.3px; }
.step-card p { font-size: 15px; color: var(--text-sec); line-height: 1.65; }
.step-card .step-icon { font-size: 28px; margin-bottom: 16px; }

/* ===== SCREENSHOTS ===== */
.screenshots-section { overflow: hidden; }
.screenshots-scroll {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 20px 0 40px;
  scrollbar-width: thin;
  scrollbar-color: rgba(115,63,255,0.3) transparent;
  -webkit-overflow-scrolling: touch;
  cursor: grab;
}
.screenshots-scroll:active { cursor: grabbing; }
.screenshots-scroll::-webkit-scrollbar { height: 4px; }
.screenshots-scroll::-webkit-scrollbar-track { background: transparent; }
.screenshots-scroll::-webkit-scrollbar-thumb { background: rgba(115,63,255,0.3); border-radius: 2px; }
.screenshot-item {
  flex-shrink: 0;
  width: 200px;
}
.phone-real.phone-real--gallery {
  width: 100%;
  filter: drop-shadow(0 24px 48px rgba(0,0,0,0.55)) drop-shadow(0 0 24px rgba(115,63,255,0.12));
}
.screenshot-label {
  text-align: center;
  margin-top: 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-ter);
}

/* ===== WATCH SECTION ===== */
.watch-section {
  background: linear-gradient(135deg, rgba(115,63,255,0.08) 0%, rgba(255,89,127,0.05) 100%);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}
.watch-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(51,217,178,0.12);
  border: 1px solid rgba(51,217,178,0.25);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  margin-bottom: 20px;
  letter-spacing: 0.3px;
}

/* Watch Ultra gallery – horisontell scroll med fotorealistiska mockups */
.watch-real-scroll { gap: 28px; padding: 28px 0 48px; }
.watch-real-item {
  flex-shrink: 0;
  width: 220px;
  padding: 0 8px;
}
.watch-real.watch-real--gallery {
  width: 100%;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.55)) drop-shadow(0 0 30px rgba(115,63,255,0.15));
  --disp-top: 22%;
  --disp-left: 13%;
  --disp-width: 74%;
  --disp-height: 56%;
  --disp-radius: 8%;
}

/* ===== Photorealistic Apple Watch mockup (PNG-based) =====
   Markup:
     <div class="watch-real" style="--disp-top:28%; --disp-left:18%; --disp-width:64%; --disp-height:42%; --disp-radius:14%;">
       <img class="watch-real-screen" src="screenshots/watch/foo.png" alt="">
       <img class="watch-real-frame" src="mockups/watch-ultra3-case-only.png" alt="">
     </div>
   The frame PNG sizes the container and sits on top with a transparent display cutout.
   Screen img is positioned behind via the --disp-* custom properties (tune per mockup). */
.watch-real {
  position: relative;
  display: block;
  width: 100%;
}
.watch-real-frame {
  display: block;
  width: 100%;
  height: auto;
  position: relative;
  z-index: 2;
  pointer-events: none;
  user-select: none;
}
.watch-real-screen {
  position: absolute;
  top: var(--disp-top, 28%);
  left: var(--disp-left, 18%);
  width: var(--disp-width, 64%);
  height: var(--disp-height, 42%);
  border-radius: var(--disp-radius, 14%);
  object-fit: cover;
  z-index: 1;
  background: #000;
}

/* Feature cards under gallery */
.watch-features-grid {
  max-width: 1100px;
  margin: 24px auto 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.watch-feature {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-sm);
}
.watch-feature-icon {
  width: 38px; height: 38px;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(115,63,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.watch-feature h4 { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.watch-feature p { font-size: 13px; color: var(--text-sec); line-height: 1.5; }

/* ===== CTA SECTION ===== */
.cta-section {
  text-align: center;
  padding: 120px 5%;
}
.cta-card {
  max-width: 680px;
  margin: 0 auto;
  background: linear-gradient(135deg, rgba(115,63,255,0.12), rgba(255,89,127,0.08));
  border: 1px solid rgba(115,63,255,0.2);
  border-radius: 32px;
  padding: 64px 48px;
  position: relative;
  overflow: hidden;
}
.cta-card::before {
  content: '';
  position: absolute;
  top: -60px; left: 50%; right: 0;
  transform: translateX(-50%);
  width: 300px; height: 200px;
  background: radial-gradient(ellipse, rgba(115,63,255,0.2) 0%, transparent 70%);
}
.cta-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: cover;
  margin: 0 auto 18px;
  display: block;
  box-shadow: 0 12px 34px rgba(115,63,255,0.35);
}
.cta-card h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 800; letter-spacing: -1px; margin-bottom: 16px; line-height: 1.2; }
.cta-card p { font-size: 17px; color: var(--text-sec); margin-bottom: 36px; line-height: 1.6; }
.cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--card-border);
  padding: 40px 5%;
  position: relative;
  z-index: 1;
}
.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-sec);
  text-decoration: none;
}
.footer-logo img { border-radius: 6px; object-fit: cover; }
.footer-copy { font-size: 13px; color: rgba(255, 255, 255, 0.75); }
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.80);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-links a:hover { color: rgba(255, 255, 255, 0.95); }

/* ===== SCROLL ANIMATIONS ===== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: none; }
.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }
.fade-up:nth-child(4) { transition-delay: 0.3s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; }
  .phone-real--second { display: none; }
  .phone-mockup { width: 240px; }
  .watch-real.watch-real--hero { width: 120px; margin-left: -16px; }

  /* Tunga GPU-effekter av på mobil för att hålla sidan snabb */
  .blob { display: none; }
  nav {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(10,10,20,0.92);
  }
  .phone-glow { display: none; }
}
@media (max-width: 600px) {
  section { padding: 70px 5%; }
  .hero { padding: 122px 5% 60px; }
  .hero-title-wrap { gap: 10px; }
  .hero-title-icon { width: 44px; height: 44px; border-radius: 12px; margin-bottom: 20px; }
  .cta-icon { width: 56px; height: 56px; border-radius: 14px; margin-bottom: 14px; }
  .hero-stats { flex-wrap: wrap; gap: 20px; }
  .cta-card { padding: 40px 24px; }
  .features-grid { grid-template-columns: 1fr; }
  .watch-features-grid { grid-template-columns: 1fr; }
  nav {
    padding: max(10px, env(safe-area-inset-top)) 14px 10px;
    background: linear-gradient(180deg, rgba(10,10,20,0.96), rgba(10,10,20,0.82));
    border-bottom-color: rgba(255,255,255,0.06);
  }
  .nav-inner {
    height: auto;
    min-height: 50px;
    gap: 10px;
    padding: 6px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 22px;
    background: rgba(255,255,255,0.045);
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  }
  .nav-logo {
    gap: 8px;
    min-width: 0;
    font-size: 15px;
    flex: 1;
  }
  .nav-logo img { width: 30px; height: 30px; border-radius: 9px; }
  .nav-right { gap: 8px; flex-shrink: 0; }
  .back-btn {
    padding: 7px 11px 7px 9px;
    font-size: 13px;
    background: rgba(255,255,255,0.06);
  }
  .lang-btn {
    width: 44px;
    height: 34px;
    padding: 0;
    font-size: 0;
    background: rgba(255,255,255,0.06);
  }
  .lang-btn::after {
    content: "EN";
    font-size: 13px;
    font-weight: 700;
  }
  html[lang="en"] .lang-btn::after { content: "SV"; }
  .nav-right .appstore-btn { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}
