/**
 * Homepage-only marketing styles. Deliberately more expressive than
 * assets/css/components.css — gradients, glass, floating blobs — because
 * this is a landing page, not a working color tool. The tool pages keep the
 * calm, neutral interface (tokens/base/layout/components.css) so extracted
 * colors stay the visual focus there.
 */

/* ---------- Gradient + glass primitives ---------- */

.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.glass-card {
  background: color-mix(in srgb, var(--color-surface) 72%, transparent);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid color-mix(in srgb, var(--color-border) 60%, transparent);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

.btn--gradient {
  background: var(--gradient-brand);
  color: #fff;
  border: none;
  box-shadow: 0 12px 24px -8px color-mix(in srgb, var(--brand-purple) 55%, transparent);
}

.btn--gradient:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.btn--glass {
  background: color-mix(in srgb, var(--color-surface) 60%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn--glass:hover {
  border-color: var(--brand-purple);
  color: var(--brand-purple);
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  background: color-mix(in srgb, var(--brand-purple) 10%, var(--color-surface));
  border: 1px solid color-mix(in srgb, var(--brand-purple) 25%, var(--color-border));
  color: var(--brand-purple);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: var(--space-5);
}

.eyebrow-pill svg { width: 16px; height: 16px; }

.eyebrow {
  display: block;
  color: var(--brand-purple);
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}

.section-heading {
  max-width: 640px;
  margin-bottom: var(--space-6);
}

.section-heading h2 { margin-bottom: 0; }

.section--tinted {
  background: var(--color-surface-alt);
  border-block: 1px solid var(--color-border);
}

/* ---------- Scroll-reveal (respects prefers-reduced-motion) ---------- */

[data-animate] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: calc(var(--reveal-delay, 0) * 1ms);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-animate] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Hero ---------- */

.hero-premium {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-7);
}

@media (min-width: 1024px) {
  .hero-premium { padding-block: var(--space-8); }
}

.hero-premium__blobs {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.35;
  animation: float 18s ease-in-out infinite;
}

.blob--purple { width: 380px; height: 380px; background: var(--brand-purple); top: -80px; right: 10%; }
.blob--pink { width: 320px; height: 320px; background: var(--brand-pink); top: 30%; right: -60px; animation-delay: -4s; }
.blob--orange { width: 260px; height: 260px; background: var(--brand-orange); bottom: -60px; left: 8%; animation-delay: -9s; }
.blob--teal { width: 220px; height: 220px; background: var(--brand-teal); top: 10%; left: -40px; animation-delay: -13s; }

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -30px) scale(1.06); }
  66% { transform: translate(-15px, 20px) scale(0.96); }
}

@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
}

.hero-premium__grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: var(--space-7);
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-premium__grid { grid-template-columns: 1.05fr 0.95fr; }
}

.hero-premium__title {
  font-size: clamp(2.25rem, 1.7rem + 2.6vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-5);
}

.hero-premium__lead {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 52ch;
  margin-bottom: var(--space-6);
}

.hero-premium__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.hero-premium__actions .btn {
  min-height: 52px;
  padding-inline: var(--space-6);
  font-size: 1rem;
}

.trust-row {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.trust-row li {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.trust-row svg {
  width: 18px;
  height: 18px;
  color: var(--brand-teal);
  flex-shrink: 0;
}

/* ---------- Hero live demo card ---------- */

.hero-demo {
  padding: var(--space-5);
  max-width: 440px;
  margin-inline: auto;
}

.hero-demo__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.hero-demo__title {
  font-weight: 700;
  font-size: 0.95rem;
}

.badge--live {
  background: color-mix(in srgb, var(--color-success) 14%, transparent);
  color: var(--color-success);
}

.hero-demo__palette {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-5);
}

.hero-demo__palette .swatch {
  min-height: 64px;
  aspect-ratio: auto;
}

.hero-demo__picker {
  margin-bottom: var(--space-4);
}

.hero-demo__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.hue-slider {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  appearance: none;
  background: linear-gradient(90deg, red, yellow, lime, cyan, blue, magenta, red);
  cursor: pointer;
}

.hue-slider::-webkit-slider-thumb {
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--color-text);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.hue-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--color-text);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.hero-demo__result {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.hero-demo__swatch {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  flex-shrink: 0;
  border: 1px solid var(--color-border);
}

.hero-demo__hex {
  display: block;
  font-family: var(--font-family-mono);
  font-weight: 700;
}

.hero-demo__contrast {
  display: block;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* ---------- Popular tools (premium cards) ---------- */

.tools-grid-premium {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
  margin-bottom: var(--space-7);
}

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

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

.tool-card-premium {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  color: var(--color-text);
  height: 100%;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
  position: relative;
  overflow: hidden;
}

.tool-card-premium::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--tool-accent, var(--gradient-brand));
  opacity: 0;
  transition: opacity var(--transition-base);
}

.tool-card-premium:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
  color: var(--color-text);
}

.tool-card-premium:hover::before {
  opacity: 0.06;
}

.tool-card-premium__icon-wrap {
  position: relative;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tool-accent, var(--gradient-brand));
  z-index: 1;
}

.tool-card-premium__icon-wrap svg {
  width: 24px;
  height: 24px;
  color: #fff;
}

.tool-card-premium__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  position: relative;
  z-index: 1;
}

.tool-card-premium__desc {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin: 0;
  flex-grow: 1;
  position: relative;
  z-index: 1;
}

.tool-card-premium__cta {
  color: var(--brand-purple);
  font-weight: 600;
  font-size: 0.85rem;
  position: relative;
  z-index: 1;
}

.tools-more h3 {
  font-size: 1rem;
  margin-bottom: var(--space-4);
  color: var(--color-text-muted);
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.chip-soon {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  border-radius: 999px;
  border: 1px dashed var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

/* ---------- Featured tool ---------- */

.featured-tool {
  display: grid;
  gap: var(--space-7);
  align-items: center;
}

@media (min-width: 1024px) {
  .featured-tool { grid-template-columns: 1fr 1fr; }
}

.featured-tool__demo {
  padding: var(--space-5);
}

.featured-tool__demo img {
  width: 100%;
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}

.featured-tool__palette {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-2);
  margin-bottom: var(--space-3);
}

.featured-tool__palette .swatch {
  min-height: 56px;
}

.featured-tool__note {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0;
}

/* ---------- Why grid ---------- */

.why-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
}

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

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

.why-card {
  padding: var(--space-5);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.why-card__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--tool-accent, var(--gradient-brand));
  margin-bottom: var(--space-4);
}

.why-card__icon svg { width: 20px; height: 20px; color: #fff; }

/* ---------- Color inspiration ---------- */

.inspiration-tabs {
  display: flex;
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.chip {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  border-radius: 999px;
  padding: var(--space-2) var(--space-4);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.chip[aria-pressed="true"] {
  background: var(--color-text);
  color: var(--color-background);
  border-color: var(--color-text);
}

.inspiration-grid {
  display: grid;
  gap: var(--space-5);
  grid-template-columns: 1fr;
}

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

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

.palette-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.palette-card__swatches {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
}

.palette-card__swatches .swatch {
  border-radius: 0;
  border: none;
  min-height: 88px;
}

.palette-card__name {
  padding: var(--space-4);
  font-weight: 600;
  font-size: 0.9rem;
}

/* ---------- Honest stats band ---------- */

.stats-band {
  padding-block: var(--space-6);
  background: var(--color-text);
  color: var(--color-background);
}

.stats-band__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
  text-align: center;
}

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

.stat__value {
  display: block;
  font-size: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem);
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat__label {
  display: block;
  font-size: 0.85rem;
  opacity: 0.75;
  margin-top: var(--space-1);
}

/* ---------- Blog teaser (honest — no fabricated posts) ---------- */

.blog-teaser {
  padding: var(--space-6);
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
}

.blog-teaser h3 { margin-bottom: var(--space-3); }
.blog-teaser p { margin-bottom: 0; color: var(--color-text-muted); }

/* ---------- Newsletter ---------- */

.newsletter-card {
  padding: var(--space-7) var(--space-6);
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
}

.newsletter-card h2 { margin-bottom: var(--space-3); }
.newsletter-card > p { color: var(--color-text-muted); margin-bottom: var(--space-5); }

.newsletter-form {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  margin-bottom: var(--space-4);
}

.newsletter-form input[type="email"] {
  flex: 1;
  min-width: 220px;
  min-height: 48px;
  font-size: 16px;
  padding: 0 var(--space-4);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-text);
}

.newsletter-note {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin: 0;
}
