/* Hairly — scroll-cinematic landing styles
   Brand palette from lib/core/theme/app_colors.dart */

:root {
  color-scheme: dark;
  --canvas: #000000;
  --surface-card: #1a1a1a;
  --surface-muted: #2c2c2e;
  --accent: #7c5cff;
  --accent-fg: #ffffff;
  --bg-top: #0e0e14;
  --bg-bottom: #09090f;
  --good: #58ba42;
  --bad: #ec615a;
  --nav-inactive: #8e8e93;
  --text: #f5f5f7;
  --text-muted: #a3a3ad;
  --text-faint: #6f6f78;
  --line: rgba(255, 255, 255, 0.08);
  --grad: linear-gradient(135deg, #7c5cff 0%, #c65cff 55%, #e14cd6 100%);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--canvas);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- shared scene shell ---------- */

.scene {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 96px 24px;
  overflow: hidden;
}

.scene-inner {
  position: relative;
  z-index: 2;
  width: min(1120px, 100%);
  margin: 0 auto;
}

.noise-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------- HERO (scene 1) ---------- */

.hero {
  min-height: 100svh;
  padding-top: 0;
  background: radial-gradient(120% 90% at 50% -10%, #14101f 0%, var(--bg-top) 45%, var(--bg-bottom) 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-image {
  position: absolute;
  inset: -6%;
  width: 112%;
  height: 112%;
  object-fit: cover;
  opacity: 0.5;
  filter: saturate(1.1);
  will-change: transform;
}

.hero-bg-fade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(9, 9, 15, 0.35) 0%, rgba(9, 9, 15, 0.55) 55%, var(--bg-bottom) 100%),
    radial-gradient(60% 45% at 50% 30%, rgba(124, 92, 255, 0.28) 0%, transparent 70%);
}

.particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(198, 92, 255, 0.9) 0%, rgba(124, 92, 255, 0) 70%);
  opacity: 0.55;
  will-change: transform;
  animation: drift linear infinite;
}

@keyframes drift {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(12px, -22px, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

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

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  background: linear-gradient(180deg, rgba(9, 9, 15, 0.75), rgba(9, 9, 15, 0));
  backdrop-filter: blur(6px);
  transition: background 0.2s ease;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.nav-brand img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.nav-cta {
  font-size: 13px;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  text-decoration: none;
  white-space: nowrap;
}

.hero-content {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding-top: 64px;
}

@media (max-width: 880px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: var(--grad);
  margin-bottom: 22px;
}

h1.headline {
  margin: 0 0 20px;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.04;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 30%, #d9ccff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-promise {
  margin: 0 0 34px;
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 46ch;
}

@media (max-width: 880px) {
  .hero-promise {
    margin-inline: auto;
  }
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

@media (max-width: 880px) {
  .cta-row {
    justify-content: center;
  }
}

.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 14px;
  background: #fff;
  color: #000;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 30px rgba(124, 92, 255, 0.25);
}

.appstore-badge:hover {
  transform: translateY(-2px);
}

.appstore-badge svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.badge-text small {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  color: #55555a;
}

.free-note {
  font-size: 13px;
  color: var(--text-faint);
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.scroll-cue .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  animation: bob 1.8s ease-in-out infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(0); opacity: 0.4; }
  50% { transform: translateY(10px); opacity: 1; }
}

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

/* ---------- device mockup (CSS-drawn, reused across scenes) ---------- */

.device {
  position: relative;
  width: min(300px, 78vw);
  aspect-ratio: 300 / 610;
  margin: 0 auto;
  border-radius: 46px;
  padding: 12px;
  background: linear-gradient(165deg, #2b2b30, #101012 60%);
  box-shadow:
    0 40px 90px -20px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset,
    0 0 60px rgba(124, 92, 255, 0.18);
  will-change: transform;
}

.device-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 34px;
  overflow: hidden;
  background: linear-gradient(180deg, #121218, #050506 80%);
  display: flex;
  flex-direction: column;
}

.device-notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 84px;
  height: 22px;
  border-radius: 14px;
  background: #050506;
  z-index: 5;
}

.device-statusbar {
  display: flex;
  justify-content: space-between;
  padding: 14px 20px 0;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
}

.device-body {
  flex: 1;
  padding: 34px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.device-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  padding: 0 4px;
}

.device-sub {
  font-size: 10.5px;
  color: var(--text-faint);
  padding: 0 4px;
  margin-top: -8px;
}

/* before/after preview card */
.ba-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--surface-card);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.ba-half {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 14px;
}

.ba-half.before {
  clip-path: inset(0 50% 0 0);
  background: linear-gradient(160deg, #262629, #0f0f11 70%);
}

.ba-half.after {
  clip-path: inset(0 0 0 50%);
  background: linear-gradient(160deg, #4a2f8f, #7c5cff 55%, #e14cd6 130%);
}

.ba-silhouette {
  width: 58%;
  aspect-ratio: 1 / 1.35;
  border-radius: 46% 46% 42% 42% / 52% 52% 40% 40%;
  background: rgba(255, 255, 255, 0.12);
}

.ba-half.after .ba-silhouette {
  background: rgba(255, 255, 255, 0.22);
}

.ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.ba-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.ba-label {
  position: absolute;
  bottom: 10px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(0, 0, 0, 0.35);
  padding: 3px 8px;
  border-radius: 999px;
}

.ba-label.left {
  left: 10px;
}

.ba-label.right {
  right: 10px;
}

/* style chip row */
.chip-row {
  display: flex;
  gap: 8px;
  overflow: hidden;
  padding: 0 4px;
}

.chip {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  background: var(--surface-muted);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.05);
  white-space: nowrap;
}

.chip.active {
  background: var(--grad);
  color: #fff;
}

/* grid of look thumbnails */
.look-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  padding: 0 4px;
}

.look-thumb {
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  background: linear-gradient(150deg, var(--surface-card), var(--surface-muted));
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.look-thumb::after {
  content: "";
  position: absolute;
  inset: 30% 22% 12%;
  border-radius: 50% 50% 40% 40% / 60% 60% 30% 30%;
  background: var(--tint, rgba(124, 92, 255, 0.5));
}

.look-thumb.t1 { --tint: rgba(124, 92, 255, 0.55); }
.look-thumb.t2 { --tint: rgba(198, 92, 255, 0.55); }
.look-thumb.t3 { --tint: rgba(225, 76, 214, 0.5); }
.look-thumb.t4 { --tint: rgba(200, 170, 90, 0.55); }
.look-thumb.t5 { --tint: rgba(120, 120, 130, 0.55); }
.look-thumb.t6 { --tint: rgba(90, 160, 255, 0.5); }

/* custom prompt field */
.prompt-field {
  border-radius: 16px;
  background: var(--surface-card);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 12px 14px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.5;
}

.prompt-field .cursor {
  display: inline-block;
  width: 2px;
  height: 12px;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: middle;
  animation: blink 1.1s step-end infinite;
}

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

@keyframes blink {
  50% { opacity: 0; }
}

.device-cta {
  margin-top: auto;
  border-radius: 14px;
  padding: 13px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  background: var(--grad);
}

.device-home {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.35);
}

/* ---------- feature scenes 2-4 ---------- */

.feature-scene {
  background: var(--canvas);
}

.feature-scene .scene-inner {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: 64px;
  align-items: center;
}

.feature-scene.reverse .scene-inner {
  grid-template-columns: 0.85fr 1fr;
}

.feature-scene.reverse .device-col {
  order: -1;
}

@media (max-width: 900px) {
  .feature-scene .scene-inner,
  .feature-scene.reverse .scene-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .feature-scene.reverse .device-col {
    order: 0;
  }
}

.scene-atmosphere {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0.28;
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.scene-atmosphere-fade {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(180deg, var(--canvas) 0%, rgba(0, 0, 0, 0.55) 30%, var(--canvas) 100%);
}

.kicker {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

h2.feature-title {
  margin: 0 0 20px;
  font-size: clamp(30px, 4.4vw, 46px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}

.feature-copy {
  margin: 0 0 26px;
  font-size: 16.5px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 48ch;
}

@media (max-width: 900px) {
  .feature-copy {
    margin-inline: auto;
  }
}

.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (max-width: 900px) {
  .feature-list {
    align-items: center;
  }
}

.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  color: var(--text-muted);
}

.feature-list .tick {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(124, 92, 255, 0.16);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  margin-top: 1px;
}

/* ---------- scroll reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal.reveal-in {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }

.device-reveal {
  opacity: 0;
  transform: translateY(48px) rotate(-4deg);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.device-reveal.reveal-in {
  opacity: 1;
  transform: translateY(0) rotate(0deg);
}

.feature-scene.reverse .device-reveal {
  transform: translateY(48px) rotate(4deg);
}

.feature-scene.reverse .device-reveal.reveal-in {
  transform: translateY(0) rotate(0deg);
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .device-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .hero-bg-image {
    transform: none !important;
  }
}

/* ---------- scene 5: proof + faq + cta ---------- */

.proof-scene {
  background: radial-gradient(90% 60% at 50% 0%, #14101f 0%, var(--bg-top) 45%, var(--bg-bottom) 100%);
  padding-bottom: 64px;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 0 0 72px;
}

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

.proof-card {
  border-radius: 20px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line);
}

.proof-card .proof-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  font-size: 18px;
}

.proof-card h3 {
  margin: 0 0 8px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text);
}

.proof-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-muted);
}

.section-heading {
  text-align: center;
  margin: 0 0 40px;
}

.section-heading h2 {
  margin: 0 0 10px;
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-heading p {
  margin: 0 auto;
  max-width: 50ch;
  color: var(--text-muted);
  font-size: 15px;
}

.faq {
  max-width: 760px;
  margin: 0 auto 72px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary .plus {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.faq-item[open] summary .plus {
  transform: rotate(45deg);
  color: #fff;
  background: var(--accent);
}

.faq-item p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}

.final-cta {
  text-align: center;
}

.final-cta h2 {
  margin: 0 0 14px;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.final-cta p {
  margin: 0 auto 30px;
  max-width: 46ch;
  color: var(--text-muted);
  font-size: 16px;
}

.final-cta .cta-row {
  justify-content: center;
}

/* ---------- footer ---------- */

.site-footer {
  padding: 40px 24px 56px;
  border-top: 1px solid var(--line);
  background: var(--bg-bottom);
}

.footer-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 14px;
}

.footer-brand img {
  width: 22px;
  height: 22px;
  border-radius: 6px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-links a {
  text-decoration: none;
  color: var(--text-muted);
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.footer-links a:hover {
  color: var(--text);
  border-color: var(--accent);
}

.footer-copy {
  width: 100%;
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-faint);
  text-align: center;
}

.footer-more-apps {
  width: 100%;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 16px;
  font-size: 11px;
  color: var(--text-faint);
}

.footer-more-apps span.label {
  color: var(--text-faint);
  opacity: 0.8;
}

.footer-more-apps a {
  color: var(--text-faint);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.footer-more-apps a:hover {
  color: var(--text-muted);
  border-color: var(--accent);
}
