/* ===== ClearDebt — single-page landing (Pay-style) ===== */

:root {
  --cd-peach: #f3e4d8;
  --cd-peach-deep: #f5e6dc;
  --cd-ink: #141414;
  --cd-muted: rgba(20, 20, 20, 0.55);
  --cd-border: rgba(20, 20, 20, 0.14);
  --cd-hero-bg:
    radial-gradient(ellipse 80% 60% at 20% 30%, #e8f5e9 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 70% 20%, #fff3e0 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 50% 80%, #ffe0b2 0%, transparent 50%),
    #fafaf9;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}

.page-cleardebt {
  font-family:
    "Plus Jakarta Sans",
    system-ui,
    -apple-system,
    sans-serif;
  color: var(--cd-ink);
}

body.page-cleardebt {
  padding-top: 0;
  background: var(--cd-hero-bg);
}

main {
  flex-grow: 1;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 8px 12px;
  background: #fff;
  color: var(--cd-ink);
  border: 1px solid var(--cd-border);
  border-radius: 8px;
  z-index: 200;
}

.cd-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
}

.cd-header.is-scrolled {
  background: rgba(250, 250, 249, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(20, 20, 20, 0.06);
}

.cd-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--site-header-h);
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  position: relative;
}

.cd-header__brand {
  flex-shrink: 0;
}

.page-cleardebt .site-header__brand img {
  height: 34px;
  width: auto;
  filter: brightness(0.15);
}

.cd-header__nav {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
  margin: 0 12px 0 auto;
  padding: 0;
  flex-shrink: 0;
}

@media (min-width: 1200px) {
  .cd-header__nav:not(.cd-header__nav--mobile) {
    position: absolute;
    left: 50%;
    margin: 0;
    transform: translateX(-50%);
  }
}

.cd-header__nav--mobile {
  display: none;
}

.cd-header__nav a {
  color: var(--cd-ink);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
}

.cd-header__nav a:hover,
.cd-header__nav a:focus {
  color: var(--cd-muted);
}

.cd-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 24px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--cd-ink);
  text-decoration: none;
  border: 1px solid var(--cd-ink);
  border-radius: var(--radius-pill);
  background: transparent;
  transition:
    background 0.15s ease,
    color 0.15s ease;
  flex-shrink: 0;
}

.cd-header__cta:hover {
  background: var(--cd-ink);
  color: #fff;
}

.cd-header__menu {
  display: none;
}

.cd-header__cta--desktop {
  display: none;
}

.page-cleardebt .site-header__toggle {
  display: none;
}

.page-cleardebt .theme-toggle--header {
  flex-shrink: 0;
  margin-left: 4px;
}

@media (max-width: 900px) {
  .page-cleardebt .theme-toggle--header {
    display: none;
  }
}

@media (min-width: 901px) {
  .page-cleardebt .theme-toggle--menu {
    display: none;
  }
}

.page-cleardebt .site-header.is-hidden {
  transform: none;
  pointer-events: auto;
}

/* Legal subpages */
.cd-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 4rem;
  padding: 8px 0;
}

.cd-nav__brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}

.cd-nav__brand img {
  height: 28px;
  width: auto;
  filter: brightness(0.15);
}

.cd-nav--legal {
  position: static;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.legal a {
  color: #0ea5e9;
}

/* Hero */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  background: var(--cd-hero-bg);
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 58fr 42fr;
  align-items: stretch;
  height: 100%;
  min-height: 0;
  max-width: 1440px;
  margin-inline: auto;
}

.hero__copy {
  position: relative;
  z-index: 2;
  align-self: center;
  padding: calc(var(--site-header-h) + clamp(32px, 5vw, 64px))
    clamp(24px, 5vw, 64px) clamp(48px, 6vw, 80px) clamp(24px, 5vw, 80px);
}

.hero__title {
  margin: 0 0 24px;
  max-width: 16ch;
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--cd-ink);
}

.hero__title-accent {
  text-decoration: underline;
  text-decoration-color: #0ea5e9;
  text-decoration-thickness: 0.1em;
  text-underline-offset: 0.06em;
}

.hero__subtitle {
  margin: 0 0 36px;
  max-width: 42ch;
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  font-weight: 400;
  line-height: 1.65;
  color: var(--cd-muted);
}

.hero__stores {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.store-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--cd-ink);
  text-decoration: none;
  border: 1px solid var(--cd-ink);
  border-radius: var(--radius-pill);
  background: transparent;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    transform 0.15s ease;
}

.store-pill:hover {
  background: var(--cd-ink);
  color: #fff;
  transform: translateY(-1px);
}

.store-pill__icon {
  flex-shrink: 0;
}

/* Social proof */
.hero-social {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hero-social__avatars {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.hero-social__avatars img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 3px solid #f5ebe3;
  object-fit: cover;
  margin-left: -14px;
  box-shadow: 0 0 0 1px rgba(20, 20, 20, 0.04);
}

.hero-social__avatars img:first-child {
  margin-left: 0;
}

.hero-social__stat {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding-right: 20px;
  text-align: left;
}

.hero-social__stat strong {
  font-size: clamp(1.625rem, 2.8vw, 2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--cd-ink);
}

.hero-social__stat span {
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--cd-muted);
}

.hero-social__stat span::before {
  content: "• ";
}

.hero-social__sparkle {
  position: absolute;
  top: -10px;
  right: 0;
  color: var(--cd-ink);
  pointer-events: none;
}

/* Decorative sparkle */
.hero__sparkle {
  color: var(--cd-ink);
  pointer-events: none;
}

/* Right visual panel */
.hero__visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  min-width: 0;
  min-height: 0;
  height: 100%;
  max-height: 100%;
  overflow: visible;
}

.hero__visual-bg {
  display: none;
}

.hero__visual picture {
  display: block;
  height: 100%;
  line-height: 0;
}

.hero__phone {
  position: relative;
  z-index: 1;
  display: block;
  flex-shrink: 0;
  height: min(70%, calc(100vw / (1024 / 682) * 0.88));
  width: auto;
  max-width: none;
  max-height: 100%;
  object-fit: contain;
  object-position: bottom right;
}

.hero__sparkle--visual {
  position: absolute;
  right: clamp(16px, 4vw, 48px);
  top: 38%;
  z-index: 2;
}

/* Background grid overlay */
.hero__grid-bg {
  position: absolute;
  inset: auto 0 0 0;
  height: 45%;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(20, 20, 20, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 20, 20, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to top, rgba(0, 0, 0, 0.35), transparent 70%);
  -webkit-mask-image: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.35),
    transparent 70%
  );
}

/* Footer */
.page-cleardebt .site-footer {
  background: #111;
  margin-top: 0;
}

.site-footer__logo {
  display: block;
  width: 140px;
  height: auto;
  margin-bottom: 12px;
}

.cd-footer-disclaimer p {
  margin: 0;
  font-size: 0.8125rem;
  color: var(--footer-muted);
  max-width: 72ch;
  line-height: 1.55;
}

/* Responsive — header mobile */
@media (max-width: 900px) {
  .cd-header__nav:not(.cd-header__nav--mobile) {
    display: none;
  }

  .page-cleardebt .site-header__toggle {
    display: inline-flex;
  }

  .cd-header__menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    padding: 20px var(--gutter) 24px;
    background: rgba(250, 250, 249, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--cd-border);
    gap: 20px;
  }

  .cd-header__menu.is-open {
    display: flex;
  }

  .cd-header__nav--mobile {
    display: flex;
    position: static;
    transform: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .cd-header__menu .cd-header__cta {
    width: 100%;
  }
}

@media (min-width: 1024px) {
  .cd-header__cta--desktop {
    display: inline-flex;
    margin-left: 8px;
  }
}

/* Hide hero image below desktop breakpoint */
@media (max-width: 1024px), (max-height: 822px) {
  .hero__visual {
    display: none;
  }
}

/* Responsive — hero stack */
@media (max-width: 1023px) {
  .hero__grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .hero {
    min-height: auto;
  }

  .hero__copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-bottom: 32px;
    padding-inline: var(--gutter);
  }

  .hero__title {
    max-width: none;
  }

  .hero__subtitle {
    margin-inline: auto;
  }

  .hero__stores {
    justify-content: center;
  }

  .hero-social {
    align-self: center;
    justify-content: center;
  }

  .hero__sparkle--visual {
    display: none;
  }
}

@media (max-width: 767px) {
  .hero {
    height: auto;
    min-height: auto;
  }

  .hero__grid {
    height: auto;
  }

  .site-footer__brand {
    text-align: center;
  }

  .site-footer__logo {
    margin-inline: auto;
  }
}

@media (max-width: 560px) {
  .hero__stores {
    flex-direction: column;
    align-items: stretch;
  }

  .store-pill {
    justify-content: center;
  }

  .cd-footer-disclaimer p {
    text-align: center;
    margin-inline: auto;
  }
}

[data-theme="dark"] {
  --cd-peach: #2a2420;
  --cd-peach-deep: #1f1b18;
  --cd-ink: var(--text);
  --cd-muted: var(--text-muted);
  --cd-border: var(--border);
  --cd-hero-bg: var(--bg-page);
}

[data-theme="dark"] .cd-header.is-scrolled {
  background: var(--header-bg);
  box-shadow: 0 1px 0 var(--border);
}

[data-theme="dark"] .page-cleardebt .site-header__brand img {
  filter: brightness(0) invert(1);
}

@media (max-width: 900px) {
  [data-theme="dark"] .cd-header__menu {
    background: var(--header-bg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .store-pill {
    transition: none;
  }
}
