/* ═══ iOS 17 System Palette ═══ */
:root {
  --bg:       #F2F2F7;
  --surface:  #FFFFFF;
  --label:    #000000;
  --label-inv:#FFFFFF;
  --second:   #8E8E93;
  --third:    #C7C7CC;
  --sep:      rgba(60,60,67,0.1);
  --fill:     rgba(120,120,128,0.06);
  --green:    #2D9A4F;
  --green-soft:#E6F4EB;
  --green-d:  #1E7A38;
  --red:      #FF3B30;
  --orange:   #FF9500;
  --sh:       0 1px 3px rgba(0,0,0,0.04);
  --sh-hover: 0 8px 30px rgba(0,0,0,0.07);
  --r:        20px;
  --r-sm:     14px;
  --r-lg:     28px;
}

[data-theme="dark"] {
  --bg:       #000000;
  --surface:  #1C1C1E;
  --label:    #FFFFFF;
  --label-inv:#000000;
  --second:   #8E8E93;
  --third:    #48484A;
  --sep:      rgba(84,84,88,0.3);
  --fill:     rgba(120,120,128,0.2);
  --green:    #4ADE6F;
  --green-soft:#1A2E22;
  --green-d:  #3CC45E;
  --red:      #FF453A;
  --orange:   #FF9F0A;
  --sh:       0 1px 3px rgba(0,0,0,0.2);
  --sh-hover: 0 8px 30px rgba(0,0,0,0.3);
}

/* ═══ Base ═══ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--label);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
}

main {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: 64px 0;
}

/* ═══ Nav ═══ */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 0.5px solid var(--sep);
  transition: background 0.3s;
}

.nav-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 20px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-right a {
  font-size: 14px;
  font-weight: 500;
  color: var(--second);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-right a:hover { color: var(--label); }

.nav-cta {
  background: var(--green) !important;
  color: #fff !important;
  padding: 6px 16px !important;
  border-radius: 999px;
  font-weight: 600 !important;
  transition: opacity 0.2s;
}

.nav-cta:hover { opacity: 0.85; }

.theme-toggle {
  background: var(--fill);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 17px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.theme-toggle:hover { background: var(--sep); }
.toggle-icon { font-size: 16px; line-height: 1; }

/* ═══ Hero ═══ */
.hero {
  padding: 80px 0 40px;
  text-align: center;
}

.chip {
  display: inline-block;
  background: var(--green-soft);
  color: var(--green);
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(40px, 6.5vw, 64px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -2px;
  margin-bottom: 16px;
}

.accent { color: var(--green); }

.hero-sub {
  font-size: 18px;
  color: var(--second);
  max-width: 500px;
  margin: 0 auto 36px;
  line-height: 1.55;
}

.hero-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ═══ Buttons ═══ */
.btn-fill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--green);
  color: #fff;
  padding: 14px 32px;
  border-radius: var(--r-sm);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 2px 12px rgba(45,154,79,0.25);
}

.btn-fill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(45,154,79,0.3);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  background: var(--surface);
  color: var(--label);
  padding: 14px 32px;
  border-radius: var(--r-sm);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--sh);
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-ghost:hover {
  transform: translateY(-1px);
  box-shadow: var(--sh-hover);
}

/* ═══ Stats ═══ */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  padding: 24px 0 48px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--r);
  padding: 24px 16px;
  text-align: center;
  box-shadow: var(--sh);
  transition: background 0.3s, box-shadow 0.3s;
}

.stat-val {
  display: block;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--green);
}

.stat-lbl {
  display: block;
  font-size: 13px;
  color: var(--second);
  font-weight: 500;
  margin-top: 4px;
}

/* ═══ Section heads ═══ */
.section-head {
  text-align: center;
  margin-bottom: 40px;
}

.label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 8px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -1px;
}

.section-sub {
  font-size: 15px;
  color: var(--second);
  margin-top: 6px;
}

/* ═══ Grids ═══ */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

/* ═══ Feature cards ═══ */
.card {
  background: var(--surface);
  border-radius: var(--r);
  padding: 28px;
  box-shadow: var(--sh);
  transition: transform 0.2s, box-shadow 0.2s, background 0.3s;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--sh-hover);
}

.card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--fill);
  font-size: 24px;
  margin-bottom: 16px;
}

.card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.2px;
}

.card p {
  font-size: 14px;
  color: var(--second);
  line-height: 1.5;
}

/* ═══ Steps ═══ */
.step-card {
  text-align: center;
  padding: 28px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--label);
  color: var(--label-inv);
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 16px;
  transition: background 0.3s, color 0.3s;
}

.step-card h3 {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

.step-card p {
  font-size: 14px;
  color: var(--second);
  line-height: 1.5;
}

/* ═══ AI Block ═══ */
/* În loc de var(--label), folosim o culoare care rămâne închisă sau se adaptează logic */
.ai-block {
  background: #1C1C1E; /* O culoare închisă fixă (iOS Dark Gray) pentru contrast maxim */
  border-radius: var(--r-lg);
  padding: 52px;
  display: flex;
  gap: 40px;
  align-items: center;
  flex-wrap: wrap;
  transition: background 0.3s;
}

.ai-info { flex: 1; min-width: 260px; }

.ai-info h2 {
  font-size: 32px;
  font-weight: 800;
  color: var(--label-inv);
  letter-spacing: -0.8px;
  margin-bottom: 14px;
}

.ai-info p {
  font-size: 15px;
  color: rgba(255,255,255,0.55);
  line-height: 1.55;
  margin-bottom: 6px;
}

[data-theme="dark"] .ai-info h2 { color: #FFFFFF; }
[data-theme="dark"] .ai-info p { color: rgba(255,255,255,0.55); }

.ai-stack {
  display: block;
  font-size: 12px;
  color: rgba(255,255,255,0.25);
  margin-top: 14px;
}

[data-theme="dark"] .ai-stack { color: rgba(255,255,255,0.25); }

.ai-chat {
  flex: 1;
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bubble {
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.5;
  max-width: 88%;
}

.bubble.user {
  background: var(--green);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.bubble.bot {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.bubble.bot b { color: #fff; }

/* ═══ Results ═══ */
.result-card {
  background: var(--surface);
  border-radius: var(--r);
  padding: 28px;
  text-align: center;
  box-shadow: var(--sh);
  transition: background 0.3s, box-shadow 0.3s;
}

.result-num {
  display: block;
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--green);
}

.result-num small {
  font-size: 20px;
  color: var(--second);
}

.result-lbl {
  display: block;
  font-size: 15px;
  color: var(--label);
  font-weight: 500;
  margin-top: 2px;
}

.result-detail {
  display: block;
  font-size: 12px;
  color: var(--third);
  margin-top: 4px;
}

/* ═══ Download ═══ */
.dl-block {
  background: var(--green);
  border-radius: var(--r-lg);
  padding: 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.dl-block::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 340px;
  height: 340px;
  background: rgba(255,255,255,0.07);
  border-radius: 50%;
  pointer-events: none;
}

.dl-block h2 {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.8px;
  margin-bottom: 8px;
  position: relative;
}

.dl-block p {
  font-size: 16px;
  color: rgba(255,255,255,0.7);
  margin-bottom: 28px;
  position: relative;
}

.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  color: var(--green);
  padding: 16px 40px;
  border-radius: var(--r-sm);
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  position: relative;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transition: transform 0.15s, box-shadow 0.15s;
}

.dl-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
}

[data-theme="dark"] .dl-btn {
  color: #1E7A38;
}

/* ═══ Tech ═══ */
.tech-bar {
  text-align: center;
  padding: 32px 0 48px;
}

.tech-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--third);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 16px;
  display: block;
}

.tech-pills {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tech-pills span {
  background: var(--surface);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--second);
  box-shadow: var(--sh);
  transition: background 0.3s;
}

/* ═══ Footer ═══ */
footer {
  padding: 32px 20px;
  text-align: center;
  border-top: 0.5px solid var(--sep);
}

footer p {
  font-size: 12px;
  color: var(--third);
  line-height: 1.7;
}

/* ═══ Animations ═══ */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-in.vis {
  opacity: 1;
  transform: translateY(0);
}

/* ═══ Mobile ═══ */
@media (max-width: 700px) {
  .hero { padding: 56px 0 32px; }
  .hero h1 { letter-spacing: -1px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .ai-block { padding: 32px; }
  .dl-block { padding: 40px 24px; }
  .nav-right a:not(.nav-cta) { display: none; }
  .nav-right { gap: 12px; }
}

@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card { padding: 18px 12px; }
  .stat-val { font-size: 26px; }
}
