:root {
  --green: #34C759;
  --green-dark: #248A3D;
  --green-light: #E8F8ED;
  --dark: #1C1C1E;
  --gray: #6E6E73;
  --light-gray: #F2F2F7;
  --white: #FFFFFF;
  --radius: 14px;
  --shadow: 0 2px 20px rgba(0,0,0,0.08);
  --max-width: 900px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--light-gray);
  color: var(--dark);
  line-height: 1.6;
}

/* NAV */
header {
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--dark);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--green);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  color: var(--gray);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover { color: var(--green); }

.lang-btn {
  background: var(--light-gray);
  border: none;
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--dark);
  transition: background 0.2s;
}

.lang-btn:hover { background: #E5E5EA; }

/* LANGUAGE SWITCHING */
.en { display: none; }
body.lang-en .sv { display: none; }
body.lang-en .en { display: block; }
body.lang-en .en-inline { display: inline; }
body:not(.lang-en) .sv-inline { display: inline; }
.en-inline { display: none; }

/* MAIN */
main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* HERO */
.hero {
  text-align: center;
  padding: 60px 24px 50px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.hero-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(145deg, #4CD964, #34C759);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 24px;
  box-shadow: 0 8px 24px rgba(52,199,89,0.3);
}

.hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.hero p {
  font-size: 1.1rem;
  color: var(--gray);
  max-width: 520px;
  margin: 0 auto 28px;
}

.appstore-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--dark);
  color: var(--white);
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s, transform 0.15s;
}

.appstore-btn:hover { background: #333; transform: translateY(-1px); }

/* CARDS */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 16px;
}

.card h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.card p { color: var(--gray); font-size: 0.95rem; }

/* FEATURES GRID */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.feature {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  text-align: center;
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 12px;
}

.feature h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.feature p { font-size: 0.88rem; color: var(--gray); }

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--light-gray);
  padding: 18px 0;
}

.faq-item:last-child { border-bottom: none; }

.faq-question {
  font-weight: 600;
  font-size: 0.97rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-question::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--green);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq-item.open .faq-question::after { transform: rotate(45deg); }

.faq-answer {
  display: none;
  color: var(--gray);
  font-size: 0.92rem;
  margin-top: 10px;
  line-height: 1.7;
}

.faq-item.open .faq-answer { display: block; }

/* CONTACT */
.contact-box {
  background: var(--green-light);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  margin-top: 16px;
}

.contact-box a {
  color: var(--green-dark);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  word-break: break-all;
}

.contact-box a:hover { text-decoration: underline; }

.contact-box p { color: var(--gray); font-size: 0.9rem; margin-bottom: 10px; }

/* BADGE */
.badge {
  display: inline-block;
  background: var(--green-light);
  color: var(--green-dark);
  border-radius: 6px;
  padding: 2px 10px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
}

/* SECTION TITLE */
.section-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 16px;
  margin-top: 32px;
}

/* PROSE */
.prose p { color: var(--gray); font-size: 0.93rem; margin-bottom: 12px; }
.prose h3 { font-size: 1rem; font-weight: 700; margin: 20px 0 6px; }
.prose ul { padding-left: 18px; color: var(--gray); font-size: 0.93rem; }
.prose ul li { margin-bottom: 4px; }

/* FOOTER */
footer {
  text-align: center;
  padding: 32px 24px;
  color: var(--gray);
  font-size: 0.85rem;
}

footer a { color: var(--gray); text-decoration: underline; }

/* LANGUAGE SPECIFICITY FIXES — placed last to win all cascade conflicts */

/* FAQ questions: hide non-active language (overrides .faq-question { display: flex }) */
.faq-question.en { display: none; }
body.lang-en .faq-question.sv { display: none; }
body.lang-en .faq-question.en { display: flex; }

/* FAQ answers: always hidden by default regardless of language mode */
.faq-answer.en { display: none; }
body.lang-en .faq-answer.en { display: none; }

/* FAQ answers when open: show only active language */
.faq-item.open .faq-answer.sv { display: block; }
.faq-item.open .faq-answer.en { display: none; }
body.lang-en .faq-item.open .faq-answer.sv { display: none; }
body.lang-en .faq-item.open .faq-answer.en { display: block; }

/* Badge language visibility (overrides .badge { display: inline-block }) */
.badge.en { display: none; }
body.lang-en .badge.sv { display: none; }
body.lang-en .badge.en { display: inline-block; }

/* Prose blocks language visibility */
.prose.en { display: none; }
body.lang-en .prose.sv { display: none; }
body.lang-en .prose.en { display: block; }

/* Feature h3/p language visibility (overrides browser block default) */
.feature h3.en,
.feature p.en { display: none; }
body.lang-en .feature h3.sv,
body.lang-en .feature p.sv { display: none; }
body.lang-en .feature h3.en { display: block; }
body.lang-en .feature p.en { display: block; }

/* Inline language elements */
body.lang-en .sv-inline { display: none; }

/* RESPONSIVE */
@media (max-width: 600px) {
  .hero h1 { font-size: 1.8rem; }
  .nav-links a { display: none; }
}
