/* Home landing — matches CalculatorDrive promo banner */

.landing--home {
  font-family: var(--cd-font-ui);
  font-size: var(--cd-text-base);
  color: var(--cd-text);
  background: var(--cd-surface-elevated);
  overflow-x: clip;
}

/* —— Hero —— */
.lp-hero {
  position: relative;
  padding-block: clamp(1.5rem, 4vw, 2.5rem) clamp(2rem, 5vw, 3rem);
  padding-inline: max(1rem, env(safe-area-inset-left, 0px)) max(1rem, env(safe-area-inset-right, 0px));
}

.lp-hero__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.lp-hero__blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(0);
}

.lp-hero__blob--1 {
  width: min(420px, 55vw);
  height: min(420px, 55vw);
  top: -12%;
  right: -8%;
  background: radial-gradient(circle, rgba(26, 107, 255, 0.35) 0%, rgba(26, 107, 255, 0.08) 55%, transparent 70%);
}

.lp-hero__blob--2 {
  width: min(280px, 40vw);
  height: min(280px, 40vw);
  bottom: 5%;
  left: -5%;
  background: radial-gradient(circle, rgba(26, 107, 255, 0.2) 0%, transparent 65%);
}

.lp-hero__symbols {
  position: absolute;
  inset: 0;
  display: flex;
  flex-wrap: wrap;
  align-content: space-around;
  justify-content: space-around;
  padding: 8%;
  font-size: clamp(1.25rem, 3vw, 2rem);
  font-weight: 300;
  color: rgba(26, 107, 255, 0.12);
  letter-spacing: 0.2em;
  line-height: 2;
}

.lp-hero__dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(15, 39, 68, 0.12) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.5;
  mask-image: linear-gradient(180deg, black 20%, transparent 90%);
}

.lp-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.lp-hero__copy {
  width: 100%;
}

/* Brand */
.lp-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  margin-bottom: 1.25rem;
}

.lp-brand__mark {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  width: 44px;
  height: 44px;
  padding: 4px;
  background: linear-gradient(135deg, #e8f1ff, #fff);
  border: 2px solid var(--cd-accent);
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(26, 107, 255, 0.2);
}

.lp-brand__mark span {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--cd-accent);
  line-height: 1;
}

.lp-brand__text {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 4px;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lp-brand__calc {
  color: var(--cd-text);
}

.lp-brand__drive {
  color: var(--cd-accent);
  text-decoration: underline;
  text-decoration-color: var(--cd-accent);
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}

/* Headline */
.lp-hero__title {
  font-family: var(--cd-font-ui, 'Inter', sans-serif);
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--cd-text);
  margin: 0 0 0.75rem;
}

.lp-hero__title-accent {
  display: block;
  color: var(--cd-accent);
}

@media (min-width: 640px) {
  .lp-hero__title-accent {
    display: inline;
  }
}

.lp-hero__lead {
  font-size: clamp(0.9375rem, 2.2vw, 1.125rem);
  color: var(--cd-text-secondary);
  line-height: 1.55;
  margin: 0 0 1.5rem;
  max-width: 28rem;
}

/* Hero search */
.lp-hero__search-block {
  margin-bottom: 1.75rem;
  max-width: 100%;
}

.landing--home .lp-hero__search.landing-search {
  flex-direction: row;
  position: relative;
  align-items: stretch;
  gap: 0;
  margin: 0;
  max-width: 100%;
}

.landing--home .lp-hero__search .landing-search__field {
  flex: 1;
  min-width: 0;
}

.landing--home .lp-hero__search .landing-search__input {
  min-height: 56px;
  padding: 16px 120px 16px 52px;
  font-size: 16px;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  background: var(--cd-surface-elevated);
  box-shadow: 0 4px 20px rgba(15, 39, 68, 0.08);
}

.landing--home .lp-hero__search .landing-search__input:focus {
  border-color: var(--cd-accent);
  box-shadow: 0 0 0 4px rgba(26, 107, 255, 0.15), 0 4px 20px rgba(15, 39, 68, 0.08);
}

.landing--home .lp-hero__search .landing-search__icon {
  left: 20px;
  font-size: 1.0625rem;
  color: #94a3b8;
}

[dir="rtl"] .landing--home .lp-hero__search .landing-search__input {
  padding: 16px 52px 16px 120px;
}

[dir="rtl"] .landing--home .lp-hero__search .landing-search__icon {
  left: auto;
  right: 20px;
}

.landing--home .lp-hero__search .landing-search__btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: auto;
  min-width: 48px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 10px;
  background: var(--cd-accent);
}

[dir="rtl"] .landing--home .lp-hero__search .landing-search__btn {
  right: auto;
  left: 6px;
}

.landing--home .lp-hero__search .landing-search__btn-icon {
  display: none;
}

@media (max-width: 479px) {
  .landing--home .lp-hero__search .landing-search__btn-text {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .landing--home .lp-hero__search .landing-search__btn {
    width: 44px;
    padding: 10px;
  }

  .landing--home .lp-hero__search .landing-search__btn-icon {
    display: block;
  }

  .landing--home .lp-hero__search .landing-search__input {
    padding-right: 56px;
  }

  [dir="rtl"] .landing--home .lp-hero__search .landing-search__input {
    padding-right: 52px;
    padding-left: 56px;
  }
}

/* Category circles */
.lp-cats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.75rem, 3vw, 1.25rem);
  margin-bottom: 1.25rem;
}

.lp-cat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 64px;
  max-width: 88px;
  text-decoration: none;
  color: var(--cd-text);
  -webkit-tap-highlight-color: transparent;
}

.lp-cat__icon {
  width: clamp(52px, 12vw, 64px);
  height: clamp(52px, 12vw, 64px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease;
}

.lp-cat__label {
  font-size: clamp(0.625rem, 1.8vw, 0.75rem);
  font-weight: 600;
  text-align: center;
  line-height: 1.25;
}

.lp-cat--math .lp-cat__icon { background: linear-gradient(145deg, #3d8bff, var(--cd-math)); }
.lp-cat--finance .lp-cat__icon { background: linear-gradient(145deg, #22c55e, var(--cd-finance)); }
.lp-cat--health .lp-cat__icon { background: linear-gradient(145deg, #a855f7, var(--cd-health)); }
.lp-cat--lifestyle .lp-cat__icon { background: linear-gradient(145deg, #fb923c, var(--cd-lifestyle)); }
.lp-cat--more .lp-cat__icon { background: linear-gradient(145deg, #2dd4bf, var(--cd-more)); }

@media (hover: hover) {
  .lp-cat:hover .lp-cat__icon {
    transform: translateY(-3px) scale(1.05);
  }
}

/* URL button */
.lp-url-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  background: var(--cd-navy);
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(15, 39, 68, 0.35);
  transition: background 0.2s ease, transform 0.2s ease;
}

.lp-url-btn i {
  font-size: 1rem;
  opacity: 0.9;
}

@media (hover: hover) {
  .lp-url-btn:hover {
    background: var(--cd-navy-dark);
    transform: translateY(-1px);
  }
}

/* Script tagline */
.lp-tagline {
  font-family: 'Dancing Script', 'Segoe Script', cursive;
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--cd-accent);
  margin: 0;
  line-height: 1.3;
  text-decoration: underline;
  text-decoration-style: wavy;
  text-underline-offset: 6px;
  text-decoration-color: rgba(26, 107, 255, 0.45);
}

/* —— Trust bar —— */
.lp-trust {
  background: var(--cd-navy);
  padding-block: 1rem;
  padding-inline: max(1rem, env(safe-area-inset-left, 0px)) max(1rem, env(safe-area-inset-right, 0px));
}

.lp-trust__list {
  list-style: none;
  margin: 0 auto;
  padding: 0;
  max-width: 1240px;
  display: flex;
  overflow-x: auto;
  gap: 1.5rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.lp-trust__list::-webkit-scrollbar {
  display: none;
}

@media (min-width: 768px) {
  .lp-trust__list {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    overflow-x: visible;
  }
}

.lp-trust__list li {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: clamp(0.8125rem, 2vw, 0.9375rem);
  font-weight: 600;
  color: #fff;
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .lp-trust__list li {
    white-space: normal;
  }
}

.lp-trust__icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.9375rem;
}

/* —— Popular categories —— */
.lp-popular {
  padding-block: clamp(2.5rem, 6vw, 4rem);
  padding-inline: max(1rem, env(safe-area-inset-left, 0px)) max(1rem, env(safe-area-inset-right, 0px));
  background: #f1f5f9;
}

.lp-popular__inner {
  max-width: 1240px;
  margin: 0 auto;
}

.lp-popular__title {
  font-family: var(--cd-font-ui, 'Inter', sans-serif);
  font-size: clamp(1.375rem, 3.5vw, 1.75rem);
  font-weight: 800;
  color: var(--cd-text);
  margin: 0 0 1.5rem;
  text-align: center;
}

@media (min-width: 640px) {
  .lp-popular__title {
    text-align: left;
  }
}

.lp-popular__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

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

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

@media (min-width: 1024px) {
  .lp-popular__grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.lp-pop-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem 1rem;
  background: var(--cd-surface-elevated);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  text-decoration: none;
  color: var(--cd-text);
  box-shadow: 0 4px 20px rgba(15, 39, 68, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

@media (hover: hover) {
  .lp-pop-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(15, 39, 68, 0.12);
  }
}

.lp-pop-card__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
  color: #fff;
  margin-bottom: 12px;
}

.lp-pop-card--math .lp-pop-card__icon { background: linear-gradient(145deg, #3d8bff, var(--cd-math)); }
.lp-pop-card--finance .lp-pop-card__icon { background: linear-gradient(145deg, #22c55e, var(--cd-finance)); }
.lp-pop-card--health .lp-pop-card__icon { background: linear-gradient(145deg, #a855f7, var(--cd-health)); }
.lp-pop-card--lifestyle .lp-pop-card__icon { background: linear-gradient(145deg, #fb923c, var(--cd-lifestyle)); }
.lp-pop-card--more .lp-pop-card__icon { background: linear-gradient(145deg, #2dd4bf, var(--cd-more)); }

.lp-pop-card__name {
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.3;
}

.lp-pop-card__count {
  font-size: 0.75rem;
  color: var(--cd-text-secondary);
  font-weight: 500;
}

/* —— Stats —— */
.lp-stats {
  padding-block: clamp(2rem, 5vw, 3rem);
  padding-inline: max(1rem, env(safe-area-inset-left, 0px)) max(1rem, env(safe-area-inset-right, 0px));
  background: var(--cd-surface-elevated);
}

.lp-stats__inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

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

.lp-stat {
  text-align: center;
  padding: 1.5rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.lp-stat__num {
  font-family: var(--cd-font-ui, 'Inter', sans-serif);
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 800;
  color: var(--cd-accent);
  letter-spacing: -0.02em;
}

.lp-stat__label {
  font-size: 0.875rem;
  color: var(--cd-text-secondary);
  margin-top: 4px;
  font-weight: 500;
}

/* —— Bottom CTA —— */
.lp-bottom-cta {
  padding-block: clamp(2.5rem, 6vw, 4rem);
  padding-inline: max(1rem, env(safe-area-inset-left, 0px)) max(1rem, env(safe-area-inset-right, 0px));
  background: linear-gradient(180deg, #f8fafc 0%, #eef4ff 100%);
}

.lp-bottom-cta__inner {
  max-width: 36rem;
  margin: 0 auto;
  text-align: center;
}

.lp-bottom-cta__inner h2 {
  font-family: var(--cd-font-ui, 'Inter', sans-serif);
  font-size: clamp(1.375rem, 3.5vw, 1.75rem);
  font-weight: 800;
  margin: 0 0 0.75rem;
  color: var(--cd-text);
}

.lp-bottom-cta__inner p {
  color: var(--cd-text-secondary);
  margin: 0 0 1.5rem;
  line-height: 1.6;
}

.lp-bottom-cta__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 480px) {
  .lp-bottom-cta__actions {
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
  }
}

.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.lp-btn--primary {
  background: var(--cd-accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(26, 107, 255, 0.35);
}

.lp-btn--outline {
  background: transparent;
  color: var(--cd-navy);
  border: 2px solid var(--cd-navy);
}

@media (hover: hover) {
  .lp-btn--primary:hover {
    background: #1558d6;
    transform: translateY(-2px);
  }

  .lp-btn--outline:hover {
    background: var(--cd-navy);
    color: #fff;
    transform: translateY(-2px);
  }
}

/* Reveal (shared with landing.js) */
.landing--home .landing-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.landing--home .landing-reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .landing--home .landing-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 359px) {
  .lp-cats {
    justify-content: center;
  }

  .lp-cat {
    min-width: 56px;
  }
}
