/* Copyright (c) 2025 Leveret Technologies Private Ltd. All rights reserved. */

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

:root {
  --bg: #0A0F0D;
  --surface: #141C18;
  --surface-2: #1E2A24;
  --surface-3: #2D3E35;
  --primary: #059669;
  --primary-light: #34D399;
  --accent: #D4AF37;
  --text: #FFFFFF;
  --text-muted: #9E9E9E;
  --text-dim: #616161;
  --border: rgba(255, 255, 255, 0.08);
  --max-width: 800px;
  --max-width-landing: 1080px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover { color: var(--primary); }

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

.container--wide {
  max-width: var(--max-width-landing);
}

/* Navigation */
.nav {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width-landing);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav__logo {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--text);
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nav__logo strong {
  color: var(--primary);
  font-weight: 700;
}

.nav__toggle {
  display: none;
  -webkit-appearance: none;
  appearance: none;
}

.nav__hamburger {
  display: none;
  cursor: pointer;
  width: 24px;
  height: 20px;
}

.nav__hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 1px;
  transition: all 0.3s;
  margin-bottom: 7px;
}

.nav__hamburger span:last-child {
  margin-bottom: 0;
}

.nav__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

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

.nav__links a:hover { color: var(--text); }

/* Hero */
.hero {
  text-align: center;
  padding: 6rem 0 4rem;
}

.hero__logo {
  font-size: 3.5rem;
  font-weight: 300;
  letter-spacing: 0.03em;
  margin-bottom: 0.25rem;
}

.hero__logo strong {
  color: var(--primary);
  font-weight: 800;
}

.hero__tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.hero__description {
  font-size: 1.25rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 3rem;
  line-height: 1.8;
}

/* Buttons */
.btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}

.btn--primary {
  background: var(--primary);
  color: var(--text);
}

.btn--primary:hover {
  background: #047857;
  color: var(--text);
}

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

.btn--outline:hover {
  border-color: var(--primary);
  color: var(--primary-light);
}

/* Features Grid */
.features {
  padding: 4rem 0;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  transition: border-color 0.2s;
}

.feature-card:hover {
  border-color: var(--surface-3);
}

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

.feature-card__title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.feature-card__text {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* Page Header (for legal/info pages) */
.page-header {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.page-header__title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.page-header__meta {
  color: var(--text-dim);
  font-size: 0.875rem;
}

/* Legal Content */
.legal {
  padding-bottom: 4rem;
}

.legal h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  color: var(--text);
}

.legal h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  color: var(--text);
}

.legal p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.legal ul, .legal ol {
  color: var(--text-muted);
  margin: 0.75rem 0 1rem 1.5rem;
}

.legal li {
  margin-bottom: 0.5rem;
}

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

/* Info Box */
.info-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  margin: 2rem 0;
}

.info-box--highlight {
  border-color: var(--primary);
  background: rgba(5, 150, 105, 0.05);
}

.info-box__title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.info-box p {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.info-box p:last-child {
  margin-bottom: 0;
}

/* Steps */
.steps {
  counter-reset: step;
  list-style: none;
  margin: 1.5rem 0;
  padding: 0;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.25rem;
  color: var(--text-muted);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  background: var(--surface-2);
  border: 1px solid var(--surface-3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-light);
}

/* Blog Filter */
.blog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1.5rem 0 0;
}

.blog-filter {
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--surface-3);
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.blog-filter:hover {
  border-color: var(--primary);
  color: var(--text);
}

.blog-filter--active {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--text);
}

.blog-card--hidden {
  display: none;
}

/* Blog Search */
.blog-search {
  width: 100%;
  max-width: 400px;
  padding: 0.625rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--surface-3);
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  font-size: 0.875rem;
  margin-top: 1rem;
  transition: border-color 0.2s;
}

.blog-search::placeholder {
  color: var(--text-dim);
}

.blog-search:focus {
  outline: none;
  border-color: var(--primary);
}

/* Blog */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding: 2rem 0 4rem;
  max-width: 1080px;
}

@media (max-width: 960px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

.blog-card {
  background: var(--surface);
  border: 1px solid var(--surface-3);
  border-radius: 16px;
  padding: 2rem;
  transition: border-color 0.2s;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  border-color: var(--surface-3);
}

.blog-card__tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}

.blog-card__title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.blog-card__title a {
  color: var(--text);
}

.blog-card__title a:hover {
  color: var(--primary-light);
}

.blog-card__excerpt {
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 1rem;
}

.blog-card__image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1rem;
}

.blog-card__meta {
  color: var(--text-dim);
  font-size: 0.8125rem;
}

/* Blog Post */
.article {
  padding-bottom: 4rem;
}

.article__hero {
  width: 100%;
  height: 350px;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 2rem;
}

@media (max-width: 640px) {
  .article__hero {
    height: 200px;
  }
}

.article p {
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  line-height: 1.8;
}

.article h2 {
  font-size: 1.375rem;
  font-weight: 600;
  margin: 2.5rem 0 1rem;
  color: var(--text);
}

.article h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 2rem 0 0.75rem;
  color: var(--text);
}

.article ul, .article ol {
  color: var(--text-muted);
  margin: 0.75rem 0 1.25rem 1.5rem;
  line-height: 1.8;
}

.article li {
  margin-bottom: 0.5rem;
}

.article strong {
  color: var(--text);
  font-weight: 600;
}

.article blockquote {
  border-left: 3px solid var(--primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--surface);
  border-radius: 0 8px 8px 0;
  color: var(--text-muted);
  font-style: italic;
}

.article__back {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-dim);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

.article__back:hover {
  color: var(--text-muted);
}

.article table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.article th, .article td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.article th {
  color: var(--text);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Article Sources */
.article__sources {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border-radius: 10px;
  border: 1px solid var(--border);
}

.article__sources h3 {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
}

.article__sources ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article__sources li {
  margin-bottom: 0.375rem;
}

.article__sources a {
  font-size: 0.875rem;
  color: var(--primary-light);
}

/* Related Articles */
.article__related {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.article__related h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.article__related ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article__related li {
  margin-bottom: 0.5rem;
}

.article__related a {
  color: var(--primary-light);
  font-size: 0.9375rem;
  font-weight: 500;
}

.article__related a:hover {
  color: var(--primary);
}

/* Showcase */
.showcase {
  padding: 4rem 0 5rem;
  text-align: center;
  overflow: hidden;
}

.showcase__title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.showcase__subtitle {
  color: var(--text-muted);
  font-size: 1.125rem;
  margin-bottom: 3rem;
}

.showcase__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 0 1rem;
}

.showcase__scroll::-webkit-scrollbar {
  display: none;
}

.showcase__track {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  min-width: min-content;
}

.showcase__phone {
  flex-shrink: 0;
  width: 200px;
  text-align: center;
}

.showcase__phone img {
  width: 200px;
  height: 433px;
  object-fit: cover;
  object-position: top;
  border-radius: 20px;
  border: 2px solid var(--surface-3);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s, box-shadow 0.3s;
}

.showcase__phone:hover img {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(5, 150, 105, 0.15);
}

.showcase__label {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .showcase__title { font-size: 1.5rem; }
  .showcase__track { justify-content: flex-start; padding: 0 0.5rem; }
  .showcase__phone { width: 160px; }
  .showcase__phone img { width: 160px; height: 347px; border-radius: 16px; }
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  margin-top: 4rem;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: var(--max-width-landing);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  flex-wrap: wrap;
}

.footer__links a {
  color: var(--text-dim);
  font-size: 0.875rem;
}

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

.footer__copy {
  color: var(--text-dim);
  font-size: 0.8125rem;
}

/* Responsive */
@media (max-width: 640px) {
  .hero { padding: 4rem 0 3rem; }
  .hero__logo { font-size: 2.5rem; }
  .hero__description { font-size: 1.0625rem; }
  .page-header__title { font-size: 1.5rem; }
  .footer__inner { flex-direction: column; text-align: center; }
  .footer__links { justify-content: center; }

  /* Hamburger menu */
  .nav__inner {
    position: relative;
  }

  .nav__hamburger {
    display: block;
    padding-top: 2px;
  }

  .nav__links {
    display: none;
    position: absolute;
    top: 100%;
    left: -1.5rem;
    right: -1.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem 1.5rem;
    gap: 0;
  }

  .nav__links li {
    border-bottom: 1px solid var(--border);
  }

  .nav__links li:last-child {
    border-bottom: none;
  }

  .nav__links a {
    display: block;
    padding: 0.75rem 0;
    font-size: 1rem;
  }

  .nav__toggle:checked ~ .nav__links {
    display: flex;
  }

  /* Animate hamburger to X */
  .nav__toggle:checked ~ .nav__hamburger span:nth-child(1) {
    -webkit-transform: translateY(9px) rotate(45deg);
    transform: translateY(9px) rotate(45deg);
  }
  .nav__toggle:checked ~ .nav__hamburger span:nth-child(2) {
    opacity: 0;
  }
  .nav__toggle:checked ~ .nav__hamburger span:nth-child(3) {
    -webkit-transform: translateY(-9px) rotate(-45deg);
    transform: translateY(-9px) rotate(-45deg);
  }
}
