/* Landing page — port of the Lovable-generated design.
   Tokens are OKLCH, ported 1:1 from the original src/styles.css. */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Space+Grotesk:wght@500;600;700;800&display=swap");

:root {
  --background: oklch(0.985 0.008 95);
  --foreground: oklch(0.18 0.02 240);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.18 0.02 240);
  --muted: oklch(0.94 0.008 95);
  --muted-foreground: oklch(0.48 0.02 240);
  --border: oklch(0.88 0.01 240);
  --positive: oklch(0.62 0.16 165);
  --positive-foreground: oklch(0.32 0.12 165);
  --positive-bg: oklch(0.93 0.06 165);
  --negative: oklch(0.55 0.18 25);
  --negative-foreground: oklch(0.42 0.18 25);
  --negative-bg: oklch(0.93 0.05 25);
  --primary-foreground: oklch(0.12 0.02 240);
  --radius: 0.875rem;
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
}

:root.dark {
  --background: oklch(0.18 0.018 220);
  --foreground: oklch(0.96 0.005 240);
  --card: oklch(0.22 0.018 220);
  --card-foreground: oklch(0.96 0.005 240);
  --muted: oklch(0.26 0.018 220);
  --muted-foreground: oklch(0.7 0.02 240);
  --border: oklch(0.3 0.015 220);
  --positive: oklch(0.82 0.17 165);
  --positive-foreground: oklch(0.85 0.17 165);
  --positive-bg: oklch(0.32 0.07 165);
  --negative: oklch(0.7 0.16 25);
  --negative-foreground: oklch(0.75 0.18 25);
  --negative-bg: oklch(0.3 0.08 25);
  --primary-foreground: oklch(0.18 0.018 220);
}

* { box-sizing: border-box; border-color: var(--border); }
html, body {
  margin: 0;
  padding: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

.font-display { font-family: var(--font-display); }
.muted { color: var(--muted-foreground); }

.container { max-width: 72rem; margin: 0 auto; padding: 0 1.25rem; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
  background: color-mix(in oklab, var(--background) 80%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  max-width: 72rem;
  margin: 0 auto;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.025em;
}
.wordmark img { width: 1.75rem; height: 1.75rem; border-radius: 0.5rem; }

.toggles { display: inline-flex; align-items: center; gap: 0.5rem; }
.lang-pill {
  display: inline-flex;
  align-items: center;
  background: color-mix(in oklab, var(--card) 60%, transparent);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.125rem;
  font-size: 0.75rem;
  font-weight: 500;
  backdrop-filter: blur(10px);
}
.lang-pill button {
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  color: var(--muted-foreground);
  transition: color 0.15s, background 0.15s;
}
.lang-pill button[aria-pressed="true"] {
  background: var(--foreground);
  color: var(--background);
}
.lang-pill button:not([aria-pressed="true"]):hover { color: var(--foreground); }
.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2rem;
  width: 2rem;
  border-radius: 9999px;
  background: color-mix(in oklab, var(--card) 60%, transparent);
  border: 1px solid var(--border);
  color: var(--foreground);
  transition: background 0.15s;
}
.theme-btn:hover { background: var(--muted); }
.theme-btn svg { width: 1rem; height: 1rem; }
.theme-btn .icon-sun { display: none; }
:root.dark .theme-btn .icon-sun { display: inline; }
:root.dark .theme-btn .icon-moon { display: none; }

/* Sections */
section.with-border { border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent); }
.section-inner { max-width: 72rem; margin: 0 auto; padding: 5rem 1.25rem; }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero-glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(60% 50% at 20% 0%, color-mix(in oklab, var(--positive) 18%, transparent), transparent 60%);
}
.hero-inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 4rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 3rem;
}
.hero-mockup { display: none; }
@media (min-width: 768px) {
  .hero-inner { grid-template-columns: 1fr 1fr; padding-top: 6rem; padding-bottom: 6rem; }
  .hero-mockup { display: block; padding-left: 2rem; }
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted-foreground);
}
.eyebrow .dot {
  height: 0.375rem;
  width: 0.375rem;
  border-radius: 9999px;
  background: var(--positive);
}
.hero h1 {
  margin: 1.25rem 0 0;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  line-height: 1.1;
}
.hero h1 .accent { color: var(--positive); display: block; }
.hero .sub {
  margin-top: 1.25rem;
  max-width: 36rem;
  color: var(--muted-foreground);
  font-size: clamp(1rem, 2vw, 1.125rem);
}
.cta-stack { margin-top: 2rem; display: flex; flex-direction: column; align-items: flex-start; gap: 0.75rem; }
.cta-secondary { color: var(--muted-foreground); font-size: 0.875rem; }

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 9999px;
  padding: 0.875rem 1.75rem;
  font-weight: 600;
  background: var(--positive);
  color: var(--primary-foreground);
  box-shadow: 0 10px 30px -10px color-mix(in oklab, var(--positive) 60%, transparent);
  transition: transform 0.15s;
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-primary .arrow { transition: transform 0.15s; }
.btn-primary:hover .arrow { transform: translateX(2px); }

/* Phone mockup */
.mockup-wrap { position: relative; margin: 0 auto; width: 100%; max-width: 320px; }
.mockup-glow {
  position: absolute;
  inset: -2rem;
  z-index: -1;
  border-radius: 3rem;
  opacity: 0.6;
  filter: blur(60px);
  background: radial-gradient(60% 50% at 50% 30%, color-mix(in oklab, var(--positive) 35%, transparent), transparent 70%);
}
.mockup-frame {
  overflow: hidden;
  border-radius: 2.5rem;
  border: 1px solid oklch(0.28 0.015 220);
  padding: 0.5rem;
  background: oklch(0.14 0.018 220);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}
.mockup-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 883 / 1152;
  border-radius: 2rem;
}

/* HowItWorks */
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  font-size: clamp(1.875rem, 4vw, 2.25rem);
  margin: 0;
}
.grid-3 {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card {
  border-radius: 1rem;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1.5rem;
}
.card .step-num {
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--positive);
}
.card h3 {
  margin: 0.75rem 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
}
.card p { margin: 0.5rem 0 0; color: var(--muted-foreground); font-size: 0.875rem; }

/* Rules */
.rules-section { background: color-mix(in oklab, var(--muted) 30%, transparent); }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--positive-foreground);
}
.pill .dot {
  height: 0.375rem;
  width: 0.375rem;
  border-radius: 9999px;
  background: var(--positive);
}
.rules-section .sub { max-width: 42rem; margin-top: 0.75rem; color: var(--muted-foreground); }
.rules-section .section-title { margin-top: 1rem; }
.rules-grid {
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (min-width: 640px) { .rules-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .rules-grid { grid-template-columns: repeat(5, 1fr); } }
.tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 1rem;
  border: 1px solid var(--border);
  padding: 1rem;
  min-height: 110px;
}
.tile.pos {
  background: var(--positive-bg);
  border-color: color-mix(in oklab, var(--positive) 25%, transparent);
}
.tile.neg {
  background: var(--negative-bg);
  border-color: color-mix(in oklab, var(--negative) 25%, transparent);
}
.tile.placeholder {
  border-style: dashed;
  border-width: 2px;
  border-color: color-mix(in oklab, var(--foreground) 25%, transparent);
  background: color-mix(in oklab, var(--foreground) 4%, transparent);
}
.tile .label {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--foreground);
}
.tile.placeholder .label { color: var(--muted-foreground); }
.tile .value {
  margin: 0.5rem 0 0;
  text-align: right;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
}
.tile.pos .value { color: var(--positive-foreground); }
.tile.neg .value { color: var(--negative-foreground); }
.tile.placeholder .value { color: var(--muted-foreground); }

/* Why */
.why-card {
  border-radius: 1rem;
  border: 1px solid var(--border);
  padding: 1.5rem;
}
.why-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.25rem;
  width: 2.25rem;
  border-radius: 0.75rem;
  background: var(--positive-bg);
  color: var(--positive-foreground);
  font-family: var(--font-display);
  font-weight: 700;
}
.why-card h3 {
  margin: 1rem 0 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.25rem;
}
.why-card p { margin: 0.5rem 0 0; color: var(--muted-foreground); font-size: 0.875rem; }

/* Final CTA */
.final-section .section-inner {
  max-width: 48rem;
  text-align: center;
  padding: 6rem 1.25rem;
}
.final-section h2 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  font-size: clamp(2.25rem, 5vw, 3rem);
  margin: 0;
}
.final-section .sub { margin-top: 1rem; color: var(--muted-foreground); }
.final-cta-wrap { margin-top: 2rem; display: flex; justify-content: center; }

/* Footer */
.site-footer { border-top: 1px solid color-mix(in oklab, var(--border) 60%, transparent); }
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 2.5rem 1.25rem;
  max-width: 72rem;
  margin: 0 auto;
}
@media (min-width: 640px) { .footer-inner { flex-direction: row; } }
.footer-tag { font-size: 0.875rem; color: var(--muted-foreground); margin: 0; }
.footer-link {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 9999px;
  padding: 0.375rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background 0.15s;
}
.footer-link:hover { background: var(--muted); }
