/* ============================================
   Piqqo Website - Styles
   Colors from app theme: colors.ts
   ============================================ */

/* --- CSS Custom Properties (Design Tokens) --- */
:root {
  /* Primary Palette */
  --color-primary: #2d3436; /* Charcoal */
  --color-accent: #e07a5f; /* Terracotta */
  --color-secondary: #81b29a; /* Sage */

  /* Backgrounds */
  --color-bg: #faf8f6; /* Warm White */
  --color-surface: #ffffff; /* Cards, modals */

  /* Dark section (deep charcoal) — derived from primary, not a new brand color */
  --color-ink: #212527; /* Deeper charcoal for dark bands */
  --color-on-dark: #faf8f6; /* Text on dark */
  --color-on-dark-muted: rgba(250, 248, 246, 0.66); /* Secondary text on dark */

  /* Texture — subtle warm gradients layered over base bg */
  --gradient-warm:
    radial-gradient(
      120% 90% at 100% 0%,
      rgba(224, 122, 95, 0.08) 0%,
      transparent 55%
    ),
    radial-gradient(
      90% 80% at 0% 100%,
      rgba(129, 178, 154, 0.08) 0%,
      transparent 55%
    );

  /* Text */
  --color-text: #2d3436; /* Primary text */
  --color-text-secondary: #6b7280; /* Secondary text */
  --color-muted: #b8b5b0; /* Placeholders */

  /* Semantic */
  --color-success: #81b29a;
  --color-error: #e07a5f;
  --color-warning: #f2cc8f;
  --color-info: #6c8ebf;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  /* Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);

  /* Typography */
  --font-family:
    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* Editorial serif display for headlines (body/UI stays Inter) */
  --font-display:
    "Fraunces", Georgia, "Times New Roman", "Times", serif;
  --font-size-caption: 12px;
  --font-size-body-sm: 14px;
  --font-size-body: 16px;
  --font-size-h3: 18px;
  --font-size-h2: 22px;
  --font-size-h1: 28px;
  --font-size-hero: 48px;
  /* Oversized editorial display scale (fluid) */
  --font-size-display: clamp(2.75rem, 6vw + 1rem, 5.25rem);
  --font-size-display-sm: clamp(2rem, 3.5vw + 1rem, 3rem);

  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  /* Layout */
  --max-width: 1100px;
  --max-width-narrow: 800px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-body);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #c4654b;
}

img {
  max-width: 100%;
  height: auto;
}

/* --- Typography --- */
h1,
h2,
h3,
h4 {
  line-height: var(--line-height-tight);
  color: var(--color-primary);
}

/* Big editorial headlines wear the serif display face; UI headings stay Inter */
h1,
h2 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
}

/* Utility: opt any element into the display face */
.font-display {
  font-family: var(--font-display);
  font-optical-sizing: auto;
}

/* Oversized editorial display type */
.display {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: var(--font-size-display);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--font-size-h1);
  font-weight: 700;
}

h2 {
  font-size: var(--font-size-h2);
  font-weight: 600;
  margin-bottom: var(--space-md);
}

h3 {
  font-size: var(--font-size-h3);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

p {
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
}

/* --- Layout --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

/* --- Navigation --- */
.nav {
  position: sticky;
  top: 0;
  background-color: var(--color-surface);
  border-bottom: 1px solid rgba(45, 52, 54, 0.08);
  z-index: 100;
  backdrop-filter: blur(12px);
  background-color: rgba(255, 255, 255, 0.92);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

.nav__logo {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: 26px;
  font-weight: 600;
  color: var(--color-primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav__logo:hover {
  color: var(--color-primary);
}

.nav__logo span {
  color: var(--color-accent);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  list-style: none;
}

.nav__links a {
  font-size: var(--font-size-body-sm);
  color: var(--color-text-secondary);
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav__links a:hover {
  color: var(--color-primary);
}

.nav__lang {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 6px 12px;
  font-size: var(--font-size-caption);
  font-weight: 600;
  color: var(--color-text-secondary);
  background: var(--color-bg);
  border: 1px solid rgba(45, 52, 54, 0.1);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all 0.2s ease;
}

.nav__lang:hover {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background: var(--color-surface);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  padding: var(--space-4xl) 0 var(--space-3xl);
  overflow: hidden;
}

/* Soft warm glow behind the phone */
.hero::before {
  content: "";
  position: absolute;
  top: -10%;
  right: -5%;
  width: 55%;
  height: 120%;
  background: radial-gradient(
    circle at 60% 40%,
    rgba(224, 122, 95, 0.16) 0%,
    rgba(129, 178, 154, 0.1) 40%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: var(--space-4xl);
}

.hero__copy {
  max-width: 32ch;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 6px 16px;
  font-size: var(--font-size-caption);
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(224, 122, 95, 0.1);
  border-radius: var(--radius-full);
  margin-bottom: var(--space-lg);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero__title {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-size: var(--font-size-display);
  font-weight: 600;
  line-height: 1.02;
  margin-bottom: var(--space-lg);
  letter-spacing: -0.02em;
  color: var(--color-primary);
}

/* Fraunces ships true italics — the accent word gets a real italic cut */
.hero__title em {
  font-style: italic;
  color: var(--color-accent);
}

.hero__subtitle {
  font-size: var(--font-size-h3);
  color: var(--color-text-secondary);
  max-width: 46ch;
  margin: 0 0 var(--space-xl);
  line-height: var(--line-height-relaxed);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
}

.hero__note {
  margin-top: var(--space-md);
  margin-bottom: 0;
  font-size: var(--font-size-caption);
  color: var(--color-muted);
}

.hero__visual {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  font-size: var(--font-size-body);
  font-weight: 600;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn--primary {
  background-color: var(--color-accent);
  color: white;
}

.btn--primary:hover {
  background-color: #c4654b;
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid rgba(45, 52, 54, 0.15);
}

.btn--outline:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
  transform: translateY(-1px);
}

/* --- Features Section --- */
.features {
  padding: var(--space-4xl) 0;
  background-color: var(--color-surface);
}

.features__header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.features__header h2 {
  font-size: var(--font-size-h1);
  margin-bottom: var(--space-sm);
}

.features__header p {
  font-size: var(--font-size-h3);
  color: var(--color-text-secondary);
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
}

.feature-card {
  padding: var(--space-xl);
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(224, 122, 95, 0.1);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  font-size: 24px;
}

.feature-card__icon--sage {
  background: rgba(129, 178, 154, 0.1);
}

.feature-card__icon--info {
  background: rgba(108, 142, 191, 0.1);
}

.feature-card h3 {
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.feature-card p {
  font-size: var(--font-size-body-sm);
  color: var(--color-text-secondary);
  margin-bottom: 0;
}

/* --- How It Works --- */
.how-it-works {
  padding: var(--space-4xl) 0;
}

.how-it-works__header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.how-it-works__header h2 {
  font-size: var(--font-size-h1);
  margin-bottom: var(--space-sm);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  counter-reset: step;
}

.step {
  text-align: center;
  counter-increment: step;
  position: relative;
}

.step__number {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: white;
  font-size: var(--font-size-h2);
  font-weight: 700;
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-md);
}

.step h3 {
  margin-bottom: var(--space-sm);
}

.step p {
  font-size: var(--font-size-body-sm);
  margin-bottom: 0;
}

/* --- Privacy Band ---
   Deep-charcoal band: the ink background, terracotta glow, and on-dark text
   come from the shared `.section--dark` treatment (applied in the markup).
   Only band-specific layout lives here. */
.privacy-band {
  padding: var(--space-4xl) 0;
}

.privacy-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
}

.privacy-band h2 {
  margin-bottom: var(--space-sm);
}

.privacy-band p {
  margin-bottom: 0;
  max-width: 500px;
}

.privacy-band .btn--outline {
  color: var(--color-on-dark);
  border-color: rgba(250, 248, 246, 0.3);
  white-space: nowrap;
}

.privacy-band .btn--outline:hover {
  border-color: var(--color-on-dark);
  color: var(--color-on-dark);
}

/* --- Footer ---
   Deep-charcoal footer that flows out of the privacy band; a hairline
   divider marks the seam between the two dark regions. Links lift to
   terracotta on hover for a brand accent. */
.footer {
  padding: var(--space-xl) 0;
  background-color: var(--color-ink);
  color: var(--color-on-dark-muted);
  border-top: 1px solid rgba(250, 248, 246, 0.1);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-md);
}

.footer__copy {
  font-size: var(--font-size-body-sm);
  color: var(--color-on-dark-muted);
}

.footer__links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
}

.footer__links a {
  font-size: var(--font-size-body-sm);
  color: var(--color-on-dark-muted);
  transition: color 0.2s ease;
}

.footer__links a:hover {
  color: var(--color-accent);
}

/* --- Legal Pages --- */
.legal {
  padding: var(--space-3xl) 0 var(--space-4xl);
}

.legal__header {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(45, 52, 54, 0.08);
}

.legal__header h1 {
  font-size: 36px;
  margin-bottom: var(--space-sm);
}

.legal__date {
  font-size: var(--font-size-body-sm);
  color: var(--color-muted);
}

.legal__content h2 {
  font-size: var(--font-size-h2);
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
  padding-top: var(--space-lg);
  border-top: 1px solid rgba(45, 52, 54, 0.05);
}

.legal__content h2:first-child {
  border-top: none;
  padding-top: 0;
  margin-top: 0;
}

.legal__content h3 {
  font-size: var(--font-size-h3);
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.legal__content p {
  margin-bottom: var(--space-md);
  line-height: var(--line-height-relaxed);
}

.legal__content ul {
  margin-bottom: var(--space-md);
  padding-left: var(--space-lg);
}

.legal__content li {
  margin-bottom: var(--space-sm);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

.legal__content strong {
  color: var(--color-primary);
}

.legal__content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-lg);
  font-size: var(--font-size-body-sm);
}

.legal__content th {
  text-align: left;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-primary);
  color: white;
  font-weight: 600;
  font-size: var(--font-size-caption);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.legal__content th:first-child {
  border-radius: var(--radius-md) 0 0 0;
}

.legal__content th:last-child {
  border-radius: 0 var(--radius-md) 0 0;
}

.legal__content td {
  padding: var(--space-sm) var(--space-md);
  border-bottom: 1px solid rgba(45, 52, 54, 0.06);
  color: var(--color-text-secondary);
}

.legal__content tr:hover td {
  background: rgba(45, 52, 54, 0.02);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  :root {
    --font-size-hero: 32px;
    --font-size-h1: 24px;
    --font-size-h2: 20px;
  }

  .hero {
    padding: var(--space-3xl) 0;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: var(--space-3xl);
    text-align: center;
  }

  .hero__copy {
    max-width: none;
  }

  .hero__badge,
  .hero__cta,
  .store-badges {
    justify-content: center;
  }

  .hero__subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .features__grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .steps {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }

  .privacy-band__inner {
    flex-direction: column;
    text-align: center;
  }

  .privacy-band p {
    max-width: none;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .nav__links {
    gap: var(--space-md);
  }

  .legal__content table {
    display: block;
    overflow-x: auto;
  }
}

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

  .hero__cta {
    flex-direction: column;
    width: 100%;
  }

  .hero__cta .btn {
    width: 100%;
    justify-content: center;
  }

  .nav__links {
    gap: var(--space-sm);
  }

  .nav__links a {
    font-size: var(--font-size-caption);
  }
}

/* ============================================
   Foundation utilities (redesign)
   ============================================ */

/* Warm textured page surface — layered radial gradients over the base bg */
.bg-texture {
  background-image: var(--gradient-warm);
  background-attachment: fixed;
}

/* Deep-charcoal section for high-contrast bands */
.section--dark {
  background-color: var(--color-ink);
  color: var(--color-on-dark);
  background-image:
    radial-gradient(
      100% 100% at 50% 0%,
      rgba(224, 122, 95, 0.14) 0%,
      transparent 60%
    );
}

.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--color-on-dark);
}

.section--dark p {
  color: var(--color-on-dark-muted);
}

/* --- Scroll reveal harness ---
   Elements marked [data-reveal] start hidden and animate in when the
   IntersectionObserver in main.js adds .is-visible. The `js` class (set by
   main.js on <html>) gates the hidden state so content stays visible if JS
   never runs. */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--reveal-delay, 0s);
  will-change: opacity, transform;
}

.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

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

  .js [data-reveal],
  .js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ============================================
   Store badges (placeholder — swap href for real store URLs at launch)
   ============================================ */
.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  background-color: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-md);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.store-badge:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.store-badge svg {
  flex-shrink: 0;
  fill: #fff;
}

.store-badge__label {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  text-align: left;
}

.store-badge__small {
  font-size: 9px;
  letter-spacing: 0.4px;
  opacity: 0.85;
}

.store-badge__big {
  font-size: 15px;
  font-weight: 600;
}

/* ============================================
   Phone mockup primitive (reused by hero, features, how-it-works)
   Garment tiles are placeholder slots: set --tile to a real screenshot url
   (background-image) to raise fidelity per slot.
   ============================================ */
.mockup {
  --mock-w: 300px;
  position: relative;
  width: var(--mock-w);
  aspect-ratio: 300 / 620;
  background: #111314;
  border-radius: 44px;
  padding: 11px;
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.18),
    0 30px 60px rgba(45, 52, 54, 0.24);
}

.mockup__notch {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 40%;
  height: 20px;
  background: #111314;
  border-radius: 0 0 14px 14px;
  z-index: 5;
}

.mockup__screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--color-bg);
  border-radius: 34px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* --- Suggestions screen content --- */
.mock-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 30px 14px 14px;
  gap: 10px;
}

.mock-app__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mock-app__title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
}

.mock-app__occasion {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 600;
  color: var(--color-accent);
  background: rgba(224, 122, 95, 0.12);
  border-radius: var(--radius-full);
}

.mock-card {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 12px;
  box-shadow: var(--shadow-md);
}

.mock-card__badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-full);
}

.mock-card__heart {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.mock-card__heart svg {
  width: 14px;
  height: 14px;
  fill: var(--color-accent);
}

.mock-collage {
  flex: 1;
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: 1fr;
  gap: 8px;
}

.mock-garment {
  position: relative;
  border-radius: var(--radius-md);
  background-color: var(--color-muted);
  background-image: var(--tile, none);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

/* Placeholder tints so tiles read as distinct garments before real photos */
.mock-garment--1 {
  background-image: linear-gradient(145deg, #b9a58f, #8f7d68);
}
.mock-garment--2 {
  background-image: linear-gradient(145deg, #cdd7d1, #a7b8ae);
}
.mock-garment--3 {
  background-image: linear-gradient(145deg, #9fb0c4, #7889a0);
}
.mock-garment--4 {
  background-image: linear-gradient(145deg, #e0b3a4, #c98d78);
}

.mock-garment__badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  padding: 2px 7px;
  font-size: 8px;
  font-weight: 600;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--radius-full);
}

.mock-card__reason {
  margin: 10px 0 0;
  font-size: 10px;
  line-height: 1.4;
  color: var(--color-text-secondary);
}

.mock-dots {
  display: flex;
  gap: 5px;
  justify-content: center;
  padding-top: 2px;
}

.mock-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-muted);
}

.mock-dot--active {
  width: 16px;
  background: var(--color-accent);
}

/* ============================================
   Hero / mockup animation
   ============================================ */
@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes tile-in {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero__visual {
  animation: floaty 6s ease-in-out infinite;
}

.hero .mock-garment {
  opacity: 0;
  animation: tile-in 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.hero .mock-garment--1 {
  animation-delay: 0.2s;
}
.hero .mock-garment--2 {
  animation-delay: 0.32s;
}
.hero .mock-garment--3 {
  animation-delay: 0.44s;
}
.hero .mock-garment--4 {
  animation-delay: 0.56s;
}

@media (prefers-reduced-motion: reduce) {
  .hero__visual {
    animation: none;
  }
  .hero .mock-garment {
    opacity: 1;
    animation: none;
  }
}

/* ============================================
   Bento feature area (issue 03)
   Asymmetric feature grid over the three core features. The Scan cell reuses
   the phone mockup primitive (device frame); the Suggestions cell shows a
   flat Wardrobe grid screen; the Swipe cell is a wide dark banner.
   ============================================ */
.bento {
  padding: var(--space-4xl) 0;
  background-color: var(--color-surface);
}

.bento__header {
  max-width: 44ch;
  margin-bottom: var(--space-3xl);
}

.bento__header h2 {
  font-size: var(--font-size-display-sm);
  line-height: 1.05;
  margin-bottom: var(--space-md);
}

.bento__header p {
  font-size: var(--font-size-h3);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
  margin-bottom: 0;
}

/* Editorial eyebrow — small uppercase kicker above headings */
.eyebrow {
  display: inline-block;
  margin-bottom: var(--space-sm);
  font-size: var(--font-size-caption);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}
.eyebrow--accent {
  color: var(--color-accent);
}
.eyebrow--sage {
  color: var(--color-secondary);
}
.eyebrow--info {
  color: var(--color-info);
}

.bento__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-lg);
}

.bento__cell {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--space-xl);
  background: var(--color-bg);
  border: 1px solid rgba(45, 52, 54, 0.06);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.bento__cell:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Scan — tall showcase, holds the Scan/Camera phone mockup */
.bento__cell--scan {
  grid-column: span 7;
  justify-content: space-between;
  gap: var(--space-xl);
  /* Let the phone mockup's soft drop shadow breathe past the rounded corner
     (the gradient background still clips to border-radius). */
  overflow: visible;
  background: linear-gradient(
    165deg,
    rgba(224, 122, 95, 0.09) 0%,
    var(--color-bg) 55%
  );
}

/* Suggestions — holds the Wardrobe grid screen */
.bento__cell--sugg {
  grid-column: span 5;
  gap: var(--space-lg);
}

/* Swipe — wide banner: copy left, swipe cards right */
.bento__cell--swipe {
  grid-column: span 12;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xxl);
  background: var(--color-ink);
  border-color: transparent;
}

.bento__copy h3 {
  font-size: var(--font-size-h2);
  color: var(--color-primary);
  margin-bottom: var(--space-sm);
}

.bento__copy p {
  font-size: var(--font-size-body-sm);
  color: var(--color-text-secondary);
  max-width: 44ch;
  margin-bottom: 0;
}

.bento__cell--swipe .bento__copy h3 {
  color: var(--color-on-dark);
}
.bento__cell--swipe .bento__copy p {
  color: var(--color-on-dark-muted);
}

.bento__visual {
  display: flex;
  justify-content: center;
}

.mockup--sm {
  --mock-w: 210px;
}

/* --- Scan / Camera screen (inside the mockup primitive) --- */
.mock-scan {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 26px 12px 14px;
  gap: 10px;
}

.mock-scan__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mock-scan__bar span:first-child {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
}

.mock-scan__live {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(224, 122, 95, 0.2);
}

.mock-scan__view {
  position: relative;
  flex: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(150deg, #2a2f33, #14171a);
}

.mock-scan__garment {
  position: absolute;
  inset: 16% 24%;
  border-radius: 12px;
  background: linear-gradient(150deg, #3d4a5c, #26303d);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.mock-scan__corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.85);
}
.mock-scan__corner--tl {
  top: 12px;
  left: 12px;
  border-right: 0;
  border-bottom: 0;
  border-radius: 6px 0 0 0;
}
.mock-scan__corner--tr {
  top: 12px;
  right: 12px;
  border-left: 0;
  border-bottom: 0;
  border-radius: 0 6px 0 0;
}
.mock-scan__corner--bl {
  bottom: 12px;
  left: 12px;
  border-right: 0;
  border-top: 0;
  border-radius: 0 0 0 6px;
}
.mock-scan__corner--br {
  bottom: 12px;
  right: 12px;
  border-left: 0;
  border-top: 0;
  border-radius: 0 0 6px 0;
}

.mock-scan__scanline {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 16%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-accent),
    transparent
  );
  box-shadow: 0 0 8px var(--color-accent);
  animation: scanline 2.4s ease-in-out infinite;
}

@keyframes scanline {
  0%,
  100% {
    top: 16%;
  }
  50% {
    top: 80%;
  }
}

.mock-scan__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mock-tag {
  padding: 4px 9px;
  font-size: 10px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-surface);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-sm);
}

.mock-scan__shutter {
  width: 40px;
  height: 40px;
  margin: 2px auto 0;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 3px solid var(--color-accent);
  box-shadow: inset 0 0 0 2px var(--color-surface);
}

/* --- Wardrobe grid screen (inside the Suggestions cell) --- */
.mock-wardrobe {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
  padding: 14px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.mock-wardrobe__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mock-wardrobe__title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
}

.mock-wardrobe__count {
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  color: var(--color-secondary);
  background: rgba(129, 178, 154, 0.14);
  border-radius: var(--radius-full);
}

.mock-wardrobe__grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 1fr;
  gap: 8px;
}

.mock-tile {
  border-radius: var(--radius-md);
  background-size: cover;
  background-position: center;
}
.mock-tile--1 {
  background-image: linear-gradient(145deg, #b9a58f, #8f7d68);
}
.mock-tile--2 {
  background-image: linear-gradient(145deg, #cdd7d1, #a7b8ae);
}
.mock-tile--3 {
  background-image: linear-gradient(145deg, #9fb0c4, #7889a0);
}
.mock-tile--4 {
  background-image: linear-gradient(145deg, #e0b3a4, #c98d78);
}
.mock-tile--5 {
  background-image: linear-gradient(145deg, #d8c7a8, #b8a17e);
}
.mock-tile--6 {
  background-image: linear-gradient(145deg, #a9b8b0, #869a8f);
}

/* --- Swipe cards visual (Swipe & favoris cell) --- */
.mock-swipe {
  position: relative;
  flex-shrink: 0;
  width: 200px;
  height: 150px;
}

.mock-swipe__card {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
}

.mock-swipe__card--back {
  transform: rotate(-7deg) scale(0.93);
  opacity: 0.55;
}

.mock-swipe__card--front {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 12px;
  transform: rotate(3deg);
  background: linear-gradient(160deg, #cdd7d1, #a7b8ae);
}

.mock-swipe__pass,
.mock-swipe__like {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
}

.mock-swipe__pass {
  color: var(--color-text-secondary);
}

.mock-swipe__like svg {
  width: 17px;
  height: 17px;
  fill: var(--color-accent);
}

/* --- Bento responsive --- */
@media (max-width: 768px) {
  .bento__grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .bento__cell--scan,
  .bento__cell--sugg,
  .bento__cell--swipe {
    grid-column: 1 / -1;
  }

  .bento__cell--swipe {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-xl);
  }

  .mock-swipe {
    align-self: center;
  }
}

@media (max-width: 480px) {
  .bento__cell {
    padding: var(--space-lg);
  }

  .mockup--sm {
    --mock-w: 190px;
  }
}

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

  .bento__cell,
  .bento__cell:hover {
    transform: none;
    transition: box-shadow 0.25s ease;
  }
}

/* ============================================
   How It Works — animated four-step flow (issue 04)
   Each step reuses the phone-mockup primitive to show a real app screen.
   Steps stagger in on scroll via the reveal harness. The final step
   carries a looping swipe-gesture micro-animation. Two new in-frame
   screens live here: .mock-occasion (Decrivez) and .mock-refine (Affinez).
   ============================================ */
.how-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  align-items: start;
}

.how-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Smaller device frame tuned for a 4-up row */
.mockup--how {
  --mock-w: 210px;
}

.how-step__stage {
  display: flex;
  justify-content: center;
  width: 100%;
}

.how-step__copy {
  margin-top: var(--space-lg);
  max-width: 26ch;
}

.how-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-bottom: var(--space-sm);
  font-family: var(--font-display);
  font-size: var(--font-size-body-sm);
  font-weight: 700;
  color: var(--color-accent);
  background: rgba(224, 122, 95, 0.12);
  border-radius: var(--radius-full);
}

.how-step__copy h3 {
  margin-bottom: var(--space-xs);
}

.how-step__copy p {
  font-size: var(--font-size-body-sm);
  color: var(--color-text-secondary);
  margin-bottom: 0;
}

/* --- Decrivez : occasion picker screen --- */
.mock-occasion {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 30px 14px 16px;
  gap: 10px;
}

.mock-occasion__title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
}

.mock-occasion__field {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 11px;
  font-size: 11px;
  color: var(--color-text-secondary);
  background: var(--color-surface);
  border: 1px solid var(--color-muted);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.mock-occasion__typed {
  color: var(--color-primary);
}

.mock-occasion__caret {
  width: 1.5px;
  height: 12px;
  margin-left: -3px;
  background: var(--color-accent);
  animation: caret-blink 1.1s step-end infinite;
}

@keyframes caret-blink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

.mock-occasion__label {
  margin-top: 2px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text-secondary);
}

.mock-occasion__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mock-chip {
  padding: 5px 10px;
  font-size: 10px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-surface);
  border: 1px solid var(--color-muted);
  border-radius: var(--radius-full);
}

.mock-chip--on {
  color: #fff;
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.mock-occasion__cta {
  margin-top: auto;
  padding: 10px;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: var(--color-primary);
  border-radius: var(--radius-md);
}

/* --- Affinez : swipe-gesture micro-animation screen --- */
.mock-refine {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 30px 14px 16px;
  gap: 10px;
}

.mock-refine__bar span {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
}

.mock-refine__deck {
  position: relative;
  flex: 1;
}

.mock-refine__card {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.mock-refine__card--back {
  transform: rotate(-5deg) scale(0.94);
  opacity: 0.5;
}

.mock-refine__card--front {
  transform-origin: bottom center;
  animation: refine-swipe 4s ease-in-out infinite;
}

/* Outfit collage filling the swipe card */
.mock-collage--refine {
  height: 100%;
  margin-top: 0;
  padding: 8px;
  gap: 6px;
}

.mock-refine__stamp {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 3;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--color-secondary);
  background: rgba(255, 255, 255, 0.92);
  border: 2px solid var(--color-secondary);
  border-radius: var(--radius-md);
  transform: rotate(-12deg);
  opacity: 0;
  animation: refine-stamp 4s ease-in-out infinite;
}

/* Pointer that drags the card, echoing the swipe */
.mock-refine__hand {
  position: absolute;
  bottom: 26%;
  left: 46%;
  z-index: 4;
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  background: rgba(45, 52, 54, 0.28);
  box-shadow: 0 0 0 6px rgba(45, 52, 54, 0.1);
  animation: refine-hand 4s ease-in-out infinite;
}

.mock-refine__actions {
  display: flex;
  justify-content: center;
  gap: 22px;
}

.mock-refine__btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.mock-refine__btn--pass {
  color: var(--color-text-secondary);
}

.mock-refine__btn--like svg {
  width: 16px;
  height: 16px;
  fill: var(--color-accent);
}

@keyframes refine-swipe {
  0%,
  14% {
    transform: translateX(0) rotate(0);
    opacity: 1;
  }
  38% {
    transform: translateX(60px) rotate(9deg);
    opacity: 1;
  }
  52% {
    transform: translateX(230px) rotate(15deg);
    opacity: 0;
  }
  53% {
    transform: translateX(0) rotate(0);
    opacity: 0;
  }
  70%,
  100% {
    transform: translateX(0) rotate(0);
    opacity: 1;
  }
}

@keyframes refine-stamp {
  0%,
  18% {
    opacity: 0;
  }
  34%,
  50% {
    opacity: 1;
  }
  53%,
  100% {
    opacity: 0;
  }
}

@keyframes refine-hand {
  0%,
  14% {
    transform: translate(0, 0);
    opacity: 0.9;
  }
  38% {
    transform: translate(56px, -6px);
    opacity: 0.9;
  }
  52% {
    transform: translate(150px, -12px);
    opacity: 0;
  }
  53%,
  100% {
    opacity: 0;
  }
}

/* --- How It Works responsive ---
   Four 210px frames + gaps need ~984px of viewport before they overflow the
   container, so the row collapses to 2-up well above the 768px tablet mark. */
@media (max-width: 992px) {
  .how-steps {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xxl) var(--space-lg);
  }
}

@media (max-width: 480px) {
  .how-steps {
    grid-template-columns: 1fr;
    gap: var(--space-xxl);
  }

  .mockup--how {
    --mock-w: 230px;
  }
}

/* Static, legible fallback: no swipe/caret motion, "liked" state shown */
@media (prefers-reduced-motion: reduce) {
  .mock-occasion__caret {
    animation: none;
  }

  .mock-refine__card--front {
    transform: rotate(4deg);
    animation: none;
  }

  .mock-refine__stamp {
    opacity: 1;
    animation: none;
  }

  .mock-refine__hand {
    display: none;
  }
}
