/* ============================================================
   DDTApps Design System — Page sections
   Heroes, showcase, stats, value props, CTA, legal, contact.
   ============================================================ */

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  padding-top: clamp(6.5rem, 11vw, 8.5rem);
  padding-bottom: var(--section-y);
  overflow: hidden;
  isolation: isolate;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  z-index: -1;
  pointer-events: none;
}

.hero::before {
  width: 560px; height: 560px;
  top: -180px; right: -120px;
  background: radial-gradient(circle, var(--accent-glow), transparent 65%);
}

.hero::after {
  width: 420px; height: 420px;
  bottom: -160px; left: -140px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 22%, transparent), transparent 65%);
}

.hero__inner { max-width: 820px; }
.hero__inner--center { margin-inline: auto; text-align: center; }
.hero__inner--center .eyebrow { justify-content: center; }
.hero__inner--center .eyebrow::before { display: none; }
.hero__inner--center .lead { margin-inline: auto; }

.hero h1 {
  font-size: var(--fs-hero);
  margin-top: var(--sp-4);
}

.hero .lead {
  margin-top: var(--sp-5);
  max-width: 58ch;
}

.hero__actions {
  margin-top: var(--sp-7);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  align-items: center;
}
.hero__inner--center .hero__actions { justify-content: center; }

.hero__trust { margin-top: var(--sp-7); }

.hero__inner--center .hero__trust { justify-content: center; }

/* ---------------- Stats strip ---------------- */
.stats {
  border-block: 1px solid var(--line);
  background: var(--ink-950);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}

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

.stat {
  padding: var(--sp-6) var(--sp-4);
  text-align: center;
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: 0; }
@media (max-width: 799px) {
  .stat:nth-child(odd) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

.stat__value {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat__label {
  margin-top: var(--sp-1);
  font-size: var(--fs-micro);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-lo);
}

/* ---------------- Feature grid ---------------- */
.feature-card { min-height: 100%; }

/* ---------------- Steps (how it works) ---------------- */
.steps {
  display: grid;
  gap: var(--sp-5);
  counter-reset: step;
}

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

.step {
  position: relative;
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--glass);
  counter-increment: step;
}

.step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: var(--sp-4);
}

.step h3 { font-size: 1.1rem; margin-bottom: var(--sp-2); }
.step p { font-size: var(--fs-small); }

/* ---------------- Product page hero ---------------- */
.product-hero {
  position: relative;
  padding-top: clamp(6.5rem, 11vw, 8.5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  overflow: hidden;
  isolation: isolate;
}

.product-hero::before {
  content: "";
  position: absolute;
  width: 720px; height: 720px;
  top: -260px; right: -200px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow), transparent 65%);
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}

.product-hero__grid {
  display: grid;
  gap: var(--sp-7);
  align-items: center;
}

@media (min-width: 960px) {
  .product-hero__grid { grid-template-columns: 1.15fr 0.85fr; }
}

.product-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

.product-hero__logo {
  width: 64px; height: 64px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.6rem;
  color: #fff;
  background: var(--gradient);
  box-shadow: var(--shadow-accent);
  overflow: hidden;
}

.product-hero h1 { font-size: var(--fs-hero); }
.product-hero .lead { margin-top: var(--sp-5); }

.product-hero .store-badges { margin-top: var(--sp-6); }

/* Device mock frame (pure CSS art) */
.device-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 380px;
}

.device {
  position: relative;
  width: min(240px, 60vw);
  aspect-ratio: 9 / 19;
  border-radius: 36px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, var(--ink-700), var(--ink-900));
  box-shadow: var(--shadow-lg), inset 0 0 0 6px var(--ink-950);
  overflow: hidden;
}

.device::before {
  content: "";
  position: absolute;
  top: 12px; left: 50%;
  transform: translateX(-50%);
  width: 72px; height: 18px;
  border-radius: var(--r-pill);
  background: var(--ink-950);
}

.device__screen {
  position: absolute;
  inset: 8px;
  border-radius: 28px;
  background:
    radial-gradient(120% 90% at 80% 0%, var(--accent-glow), transparent 55%),
    linear-gradient(200deg, var(--ink-800), var(--ink-950));
  display: grid;
  place-items: center;
  overflow: hidden;
}

.device__glyph {
  width: 84px; height: 84px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: #fff;
  background: var(--gradient);
  box-shadow: var(--shadow-accent);
  overflow: hidden;
}

.device__glyph img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.device__shot {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.device__bars {
  position: absolute;
  bottom: 28px;
  left: 20px; right: 20px;
  display: grid;
  gap: 10px;
}

.device__bars span {
  height: 10px;
  border-radius: var(--r-pill);
  background: var(--glass-strong);
}
.device__bars span:nth-child(1) { width: 72%; }
.device__bars span:nth-child(2) { width: 48%; background: var(--accent-soft); }

.device--back {
  position: absolute;
  transform: rotate(-10deg) translateX(-58%) scale(0.86);
  opacity: 0.72;
}

.device--front { transform: rotate(6deg); }

/* ---------------- CTA band ---------------- */
.cta-band {
  position: relative;
  border-radius: var(--r-xl);
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(90% 140% at 50% -30%, var(--accent-soft), transparent 60%),
    var(--ink-850);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: auto -10% -60% -10%;
  height: 120%;
  background: radial-gradient(50% 50% at 50% 100%, var(--accent-glow), transparent 70%);
  z-index: -1;
}

.cta-band h2 { max-width: 20ch; margin-inline: auto; }
.cta-band .lead { margin: var(--sp-4) auto 0; max-width: 52ch; }
.cta-band .hero__actions { justify-content: center; }

/* ---------------- Legal pages ---------------- */
.legal-hero {
  padding-top: clamp(6rem, 10vw, 7.5rem);
  padding-bottom: var(--sp-7);
  border-bottom: 1px solid var(--line);
}

.legal-hero p { margin-top: var(--sp-3); font-size: var(--fs-small); color: var(--text-lo); }

.legal-layout {
  display: grid;
  gap: var(--sp-7);
  padding-block: var(--sp-7) var(--section-y);
}

@media (min-width: 960px) {
  .legal-layout { grid-template-columns: 240px 1fr; gap: var(--sp-8); }
}

.legal-nav { display: none; }

@media (min-width: 960px) {
  .legal-nav {
    display: block;
    position: sticky;
    top: 100px;
    align-self: start;
  }

  .legal-nav ul { display: grid; gap: var(--sp-2); }

  .legal-nav a {
    display: block;
    padding: var(--sp-2) var(--sp-3);
    font-size: var(--fs-small);
    color: var(--text-lo);
    border-left: 2px solid var(--line);
    transition: color var(--dur-fast) var(--ease-out),
                border-color var(--dur-fast) var(--ease-out);
  }

  .legal-nav a:hover, .legal-nav a.is-active {
    color: var(--text-hi);
    border-left-color: var(--accent);
  }
}

.legal-body { max-width: 72ch; }

.legal-body section { margin-bottom: var(--sp-7); scroll-margin-top: 100px; }

.legal-body h2 {
  font-size: 1.35rem;
  margin-bottom: var(--sp-4);
  padding-top: var(--sp-2);
}

.legal-body h3 {
  font-size: 1.05rem;
  margin: var(--sp-5) 0 var(--sp-3);
}

.legal-body p, .legal-body li { font-size: 0.95rem; }

.legal-body p + p { margin-top: var(--sp-3); }

.legal-body ul {
  list-style: disc;
  padding-left: var(--sp-5);
  margin-top: var(--sp-3);
  display: grid;
  gap: var(--sp-2);
}

.legal-body a {
  color: var(--accent-hi);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-body .legal-meta {
  font-size: var(--fs-micro);
  color: var(--text-lo);
  margin-bottom: var(--sp-6);
}

/* ---------------- Contact ---------------- */
.contact-grid {
  display: grid;
  gap: var(--sp-7);
  align-items: start;
}

@media (min-width: 960px) {
  .contact-grid { grid-template-columns: 0.9fr 1.1fr; }
}

.contact-card {
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background: var(--glass);
}

.contact-card + .contact-card { margin-top: var(--sp-5); }

.contact-card__row {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
}

.contact-card__row + .contact-card__row {
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--line);
}

.contact-card h3 { font-size: 1rem; margin-bottom: var(--sp-1); }
.contact-card p, .contact-card a { font-size: var(--fs-small); }
.contact-card a { color: var(--accent-hi); }
.contact-card a:hover { text-decoration: underline; }

.form-shell {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
  background: var(--glass);
}

.form-note {
  margin-top: var(--sp-4);
  font-size: var(--fs-micro);
  color: var(--text-lo);
  text-align: center;
}

/* ---------------- Pricing section anchor offset ---------------- */
[id] { scroll-margin-top: 90px; }
