/* Lingoria Homepage — standalone styles */

:root {
  --bg-from: #0f172a;
  --bg-mid: #1e293b;
  --bg-to: #334155;
  --text-primary: #f9fafb;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border: #334155;
  --border-hover: #0ea5e9;
  --cyan: #0ea5e9;
  --cyan-dark: #0369a1;
  --teal: #10b981;
  --teal-dark: #059669;
  --orange: #f59e0b;
  --orange-dark: #f97316;
  --surface: rgba(15, 23, 42, 0.6);
  --surface-header: rgba(15, 23, 42, 0.8);
  --max-width: 72rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.25rem;
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-primary);
  background: linear-gradient(135deg, var(--bg-from) 0%, var(--bg-mid) 50%, var(--bg-to) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: rgba(51, 65, 85, 0.3);
}

::-webkit-scrollbar-thumb {
  background: var(--cyan);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--teal);
}

/* Layout */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: var(--surface-header);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 4rem;
}

.logo {
  display: flex;
  align-items: center;
}

.logo__img {
  display: block;
  width: auto;
  height: 2.5rem;
}

.footer .logo__img {
  height: 2.25rem;
}

.nav__links {
  display: none;
  align-items: center;
  gap: 2rem;
}

.nav__link {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav__link:hover {
  color: var(--cyan);
}

.nav__cta {
  display: none;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-lg);
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  transition: transform 0.2s, box-shadow 0.2s;
}

.nav__cta:hover {
  transform: scale(1.03);
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.35);
}

.nav__toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.5rem;
  border: none;
  border-radius: var(--radius-lg);
  background: transparent;
  cursor: pointer;
}

.nav__toggle span {
  display: block;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav__toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav__toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav__toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav__mobile {
  display: none;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 1.5rem 1rem;
  border-top: 1px solid var(--border);
}

.nav__mobile.is-open {
  display: flex;
}

.nav__mobile .nav__link {
  padding: 0.75rem 0;
}

@media (min-width: 768px) {
  .nav__links {
    display: flex;
  }

  .nav__cta {
    display: inline-flex;
  }

  .nav__toggle {
    display: none;
  }

  .nav__mobile {
    display: none !important;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border: none;
  border-radius: var(--radius-lg);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: scale(1.03);
}

.btn--orange {
  background: linear-gradient(135deg, var(--orange), var(--orange-dark));
  box-shadow: 0 0 20px rgba(14, 165, 233, 0.25);
}

.btn--orange:hover {
  box-shadow: 0 0 28px rgba(245, 158, 11, 0.45);
}

.btn--cyan {
  background: linear-gradient(135deg, var(--cyan), var(--teal));
}

.btn--cyan:hover {
  box-shadow: 0 0 24px rgba(14, 165, 233, 0.45);
}

.btn--teal {
  background: linear-gradient(135deg, var(--teal), var(--teal-dark));
}

.btn--teal:hover {
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.4);
}

.btn--outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-primary);
}

.btn--outline:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(14, 165, 233, 0.2);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-store {
  min-width: 12.5rem;
  padding: 1.125rem 1.75rem;
  text-align: left;
}

.btn-store__label {
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.75);
}

.btn-store__name {
  font-size: 1.125rem;
  font-weight: 700;
}

/* Hero */
.hero {
  min-height: calc(100vh - 4rem);
  display: flex;
  align-items: center;
  padding-block: 4rem;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}

.hero__content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  padding: 0.375rem 0.875rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--cyan);
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.25);
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero__title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  max-width: 32rem;
  font-size: clamp(1.0625rem, 2vw, 1.25rem);
  color: var(--text-secondary);
}

.hero__social-proof {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.hero__social-proof strong {
  color: var(--text-secondary);
}

/* Article mockup */
.hero__visual {
  display: flex;
  justify-content: center;
}

.article-mockup {
  position: relative;
  width: 100%;
  max-width: 26rem;
}

.article-mockup__glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle, rgba(14, 165, 233, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.article-mockup__card {
  position: relative;
  padding: 1.5rem;
  border-radius: var(--radius-2xl);
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.4);
}

.article-mockup__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.tag {
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  font-family: ui-monospace, monospace;
}

.tag--ai {
  color: #c084fc;
  background: rgba(168, 85, 247, 0.2);
}

.tag--react {
  color: #fb923c;
  background: rgba(249, 115, 22, 0.2);
}

.tag--level {
  color: #38bdf8;
  background: rgba(14, 165, 233, 0.2);
}

.article-mockup__title {
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.35;
}

.article-mockup__body {
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.article-mockup__body .highlight {
  position: relative;
  padding: 0 0.125rem;
  border-radius: 3px;
  color: var(--text-primary);
  background: rgba(14, 165, 233, 0.25);
  cursor: pointer;
  transition: background 0.3s, box-shadow 0.3s;
}

.article-mockup__body .highlight.is-active {
  background: rgba(14, 165, 233, 0.45);
  box-shadow: 0 0 12px rgba(14, 165, 233, 0.5);
}

.article-mockup__tooltip {
  position: absolute;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-lg);
  font-size: 0.75rem;
  white-space: nowrap;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.article-mockup__tooltip.is-visible {
  opacity: 1;
}

.article-mockup__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.article-mockup__stat {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.article-mockup__stat strong {
  display: block;
  font-family: ui-monospace, monospace;
  font-size: 1.125rem;
  color: var(--teal);
}

.article-mockup__action {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-lg);
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--cyan), var(--cyan-dark));
}

@media (min-width: 1024px) {
  .hero__grid {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
  }
}

/* Section common */
.section {
  padding-block: 5rem;
}

.section--alt {
  background: rgba(30, 41, 59, 0.3);
}

.section__header {
  text-align: center;
  margin-bottom: 4rem;
}

.section__title {
  margin-bottom: 1rem;
  font-size: clamp(1.875rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section__subtitle {
  max-width: 36rem;
  margin-inline: auto;
  font-size: 1.125rem;
  color: var(--text-secondary);
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.step-card {
  padding: 2rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(8px);
  transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
}

.step-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(14, 165, 233, 0.12);
}

.step-card__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.step-card__badge {
  display: inline-block;
  margin-bottom: 1rem;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
}

.step-card__badge--cyan {
  background: linear-gradient(135deg, var(--cyan), transparent);
}

.step-card__badge--teal {
  background: linear-gradient(135deg, var(--teal), transparent);
}

.step-card__badge--orange {
  background: linear-gradient(135deg, var(--orange), transparent);
}

.step-card__title {
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.step-card__desc {
  color: var(--text-secondary);
  line-height: 1.7;
}

@media (min-width: 768px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Features */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.feature-card {
  padding: 2rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  transition: border-color 0.3s, transform 0.3s;
}

.feature-card:hover {
  border-color: var(--border-hover);
  transform: scale(1.02);
}

.feature-card__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature-card__title {
  margin-bottom: 0.75rem;
  font-size: 1.375rem;
  font-weight: 700;
}

.feature-card__desc {
  color: var(--text-secondary);
  line-height: 1.7;
}

@media (min-width: 768px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Gamification strip */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  padding: 2rem;
  border-radius: var(--radius-2xl);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
}

.stat-item {
  text-align: center;
}

.stat-item__value {
  font-family: ui-monospace, monospace;
  font-size: 2rem;
  font-weight: 700;
  color: var(--cyan);
}

.stat-item__label {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

@media (min-width: 640px) {
  .stats-strip {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* CTA section */
.cta-section {
  padding-block: 5rem;
  border-block: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08), rgba(16, 185, 129, 0.08));
}

.cta-section__inner {
  text-align: center;
}

.cta-section__title {
  margin-bottom: 1rem;
  font-size: clamp(1.875rem, 4vw, 3rem);
  font-weight: 800;
}

.cta-section__subtitle {
  margin-bottom: 3rem;
  font-size: 1.25rem;
  color: var(--text-secondary);
}

.cta-section__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.cta-section__chrome {
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.cta-section__chrome-title {
  margin-bottom: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.cta-section__chrome-desc {
  max-width: 32rem;
  margin: 0 auto 1.5rem;
  color: var(--text-secondary);
}

/* Footer */
.footer {
  padding-block: 3rem;
  border-top: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.5);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer__tagline {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer__heading {
  margin-bottom: 1rem;
  font-weight: 700;
}

.footer__links li + li {
  margin-top: 0.5rem;
}

.footer__links a {
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer__links a:hover {
  color: var(--cyan);
}

.footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer__bottom {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* Legal / policy pages */
.legal-page {
  padding-block: 3rem 5rem;
}

.legal-page__header {
  margin-bottom: 2.5rem;
}

.legal-page__back {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--cyan);
  transition: color 0.2s;
}

.legal-page__back:hover {
  color: var(--teal);
}

.legal-page__title {
  margin-bottom: 0.75rem;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.legal-page__meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.legal-content {
  width: 100%;
  padding: 2.5rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

.legal-content > * + * {
  margin-top: 1rem;
}

.legal-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
}

.legal-content h2:first-of-type {
  margin-top: 1.5rem;
}

.legal-content p,
.legal-content li {
  color: var(--text-secondary);
  line-height: 1.75;
}

.legal-content ul {
  list-style: disc;
  padding-left: 1.5rem;
}

.legal-content li + li {
  margin-top: 0.5rem;
}

.legal-content a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.legal-content a:hover {
  color: var(--teal);
}

.legal-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

@media (max-width: 640px) {
  .legal-content {
    padding: 1.5rem;
  }
}

/* Cookie consent banner */
.cookie-banner {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 200;
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1px solid var(--border);
  background: var(--surface-header);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
  transform: translateY(100%);
  transition: transform 0.35s ease;
}

.cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-banner__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.cookie-banner__text {
  flex: 1 1 18rem;
}

.cookie-banner__title {
  margin-bottom: 0.375rem;
  font-size: 1rem;
  font-weight: 700;
}

.cookie-banner__desc {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.cookie-banner__desc a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-banner__desc a:hover {
  color: var(--teal);
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  flex-shrink: 0;
}

.cookie-banner__btn {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
}

@media (max-width: 640px) {
  .cookie-banner__actions {
    width: 100%;
  }

  .cookie-banner__btn {
    flex: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero__badge-dot {
    animation: none;
  }

  .btn:hover,
  .step-card:hover,
  .feature-card:hover {
    transform: none;
  }

  .cookie-banner {
    transition: none;
  }
}
