/* FaceFat AI — facefatai.com */

:root {
  --bg: #f6f5f1;
  --bg-white: #ffffff;
  --text: #111111;
  --text-muted: #5c5c5c;
  --text-soft: #86868b;
  --border: #e5e5e5;
  --primary: #7c3aed;
  --primary-dark: #6d28d9;
  --dark: #0a0a0a;
  --dark-card: #1a1a1c;
  --max: 1120px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.site-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(246, 245, 241, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.site-nav__bar {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: 0 auto;
}

.site-nav__inner {
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 16px 24px;
}

.site-nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
  min-width: 0;
}

.site-nav__brand-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-nav__brand img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  flex-shrink: 0;
}

.site-nav__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin: 0 0 0 auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-white);
  color: var(--text);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s;
}

.site-nav__toggle:hover {
  border-color: #ccc;
}

.site-nav__toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.site-nav__toggle-icon,
.site-nav__toggle-icon::before,
.site-nav__toggle-icon::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 1px;
  background: currentColor;
  transition: transform 0.2s, opacity 0.2s;
}

.site-nav__toggle-icon {
  position: relative;
}

.site-nav__toggle-icon::before,
.site-nav__toggle-icon::after {
  content: '';
  position: absolute;
  left: 0;
}

.site-nav__toggle-icon::before {
  top: -6px;
}

.site-nav__toggle-icon::after {
  top: 6px;
}

.site-nav.is-open .site-nav__toggle-icon {
  background: transparent;
}

.site-nav.is-open .site-nav__toggle-icon::before {
  top: 0;
  transform: rotate(45deg);
}

.site-nav.is-open .site-nav__toggle-icon::after {
  top: 0;
  transform: rotate(-45deg);
}

.site-nav__dropdown {
  display: none;
}

.site-nav__backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background: rgba(0, 0, 0, 0.35);
  cursor: pointer;
  border: 0;
  padding: 0;
  pointer-events: none;
}

.site-nav.is-open .site-nav__backdrop {
  pointer-events: auto;
}

.site-nav.is-open .site-nav__backdrop {
  display: block;
}

.site-nav__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 22px;
  flex: 1;
  min-width: 0;
}

.site-nav__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

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

.site-nav__stores {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}


.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  background: #000;
  color: #fff;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  border: 1px solid #000;
  transition: transform 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.store-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.store-btn--lg {
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 13px;
}

.store-btn__small {
  display: block;
  font-size: 9px;
  font-weight: 500;
  opacity: 0.85;
}

.store-btn__big {
  display: block;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section {
  padding: 80px 24px;
}

.container {
  max-width: var(--max);
  margin: 0 auto;
}

/* —— Hero —— */
.hero {
  padding: 48px 24px 72px;
  background: linear-gradient(180deg, #faf9f6 0%, var(--bg) 100%);
  overflow-x: clip;
}

.hero__grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 40px 48px;
  align-items: center;
}

.hero__copy {
  position: relative;
  z-index: 2;
  min-width: 0;
}

.hero__visual {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
  container-type: inline-size;
  container-name: hero-visual;
}

.hero__progress-scaler {
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  /* Room for rotated side phones — keeps full image visible */
  padding: 36px 52px 0;
  box-sizing: border-box;
  overflow: visible;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 8px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 24px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.hero__avatars {
  display: flex;
}

.hero__avatars span {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-left: -8px;
}

.hero__avatars span:first-child {
  margin-left: 0;
  background: linear-gradient(135deg, #93c5fd, #2563eb);
}

.hero__avatars span:nth-child(2) {
  background: linear-gradient(135deg, #fcd34d, #f59e0b);
}

.hero__avatars span:nth-child(3) {
  background: linear-gradient(135deg, #86efac, #22c55e);
}

.hero__title {
  margin: 0 0 8px;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hero__subtitle {
  margin: 0 0 20px;
  font-size: clamp(1.75rem, 3.5vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero__desc {
  margin: 0 0 28px;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 28em;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* —— Hero: 3-photo progress —— */
.hero__progress {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 0;
  box-sizing: border-box;
  overflow: visible;
}

.progress-photo {
  flex: 1 1 0;
  min-width: 0;
  max-width: 33.333%;
  margin: 0;
  padding: 0 4px;
  text-align: center;
  box-sizing: border-box;
  overflow: visible;
}

.progress-photo--start {
  z-index: 1;
}

.progress-photo--start .progress-photo__tilt {
  transform: rotate(-11deg);
  transform-origin: 50% 72%;
}

.progress-photo--mid {
  z-index: 3;
  flex: 1.08 1 0;
  max-width: 36%;
}

.progress-photo--mid .progress-photo__tilt {
  transform: translateY(-8px);
  transform-origin: 50% 72%;
}

.progress-photo--end {
  z-index: 1;
}

.progress-photo--end .progress-photo__tilt {
  transform: rotate(11deg);
  transform-origin: 50% 72%;
}

.progress-photo__tilt {
  width: 100%;
  overflow: visible;
}

.progress-photo__frame {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  aspect-ratio: 9 / 19.2;
  max-height: min(46vh, 420px);
  padding: clamp(6px, 1.2cqi, 11px);
  border-radius: clamp(24px, 5cqi, 44px);
  overflow: hidden;
  background: linear-gradient(160deg, #3a3a3c 0%, #111113 55%, #000 100%);
  box-shadow:
    0 32px 64px rgba(15, 23, 42, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.06) inset;
}

.progress-photo--mid .progress-photo__frame {
  box-shadow:
    0 40px 80px rgba(15, 23, 42, 0.26),
    0 16px 40px rgba(124, 58, 237, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

.progress-photo__frame img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  border-radius: clamp(18px, 4cqi, 34px);
  object-fit: cover;
  object-position: center top;
}

.progress-photo__meta {
  margin-top: 12px;
  padding: 0 2px;
}

.progress-photo--start .progress-photo__meta,
.progress-photo--end .progress-photo__meta {
  margin-top: 14px;
}

@container hero-visual (max-width: 420px) {
  .hero__progress-scaler {
    padding: 28px 28px 0;
  }

  .progress-photo--start .progress-photo__tilt {
    transform: rotate(-9deg);
  }

  .progress-photo--end .progress-photo__tilt {
    transform: rotate(9deg);
  }

  .progress-photo--mid .progress-photo__tilt {
    transform: translateY(-6px);
  }

  .progress-photo__frame {
    max-height: min(40vh, 340px);
  }
}

.progress-photo__week {
  display: block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-soft);
}

.progress-photo__score {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.progress-photo__score em {
  font-style: normal;
  color: var(--primary);
  font-size: 22px;
}

.hero__progress-caption {
  margin: 20px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* —— Banner —— */
.banner {
  background: linear-gradient(135deg, #ede9fe 0%, #e0e7ff 50%, #fae8ff 100%);
  padding: 64px 24px;
  text-align: center;
}

.banner__tag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #dc2626;
  margin-bottom: 12px;
}

.banner__title {
  margin: 0;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.banner__sub {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 17px;
}

/* —— Features —— */
.features__head {
  text-align: center;
  margin-bottom: 56px;
}

.features__head h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.features__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.features__phone-wrap {
  display: flex;
  justify-content: center;
  position: sticky;
  top: 100px;
}

.phone {
  width: 280px;
  padding: 10px;
  background: #1a1a1a;
  border-radius: 40px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.18);
}

.phone__screen {
  border-radius: 32px;
  overflow: hidden;
  background: #000;
  aspect-ratio: 9 / 19.5;
}

.phone__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.features__list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-card {
  padding: 22px 24px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.feature-card.is-active {
  border-color: var(--primary);
  box-shadow: 0 8px 32px rgba(124, 58, 237, 0.12);
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
}

.feature-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text-muted);
}

.how {
  background: var(--bg-white);
}

.how__grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}

.how__visual {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.1);
}

.how__steps {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}

.how__steps li {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.how__step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.how__steps strong {
  display: block;
  font-size: 16px;
  margin-bottom: 4px;
}

.how__steps span {
  font-size: 14px;
  color: var(--text-muted);
}

.testimonials-dark {
  background: var(--dark);
  color: #f5f5f7;
}

.testimonials-dark h2 {
  text-align: center;
  margin: 0 0 48px;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 800;
}

.testimonials-dark__grid {
  column-count: 3;
  column-gap: 16px;
}

.tweet-card {
  break-inside: avoid;
  margin-bottom: 16px;
  padding: 18px 20px;
  background: var(--dark-card);
  border: 1px solid #2a2a2e;
  border-radius: 16px;
}

.tweet-card__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.tweet-card__avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.tweet-card__name {
  font-size: 14px;
  font-weight: 700;
}

.tweet-card__body {
  margin: 0;
  font-size: 15px;
  line-height: 1.45;
  color: #d1d1d6;
}

.stories h2 {
  text-align: center;
  margin: 0 0 48px;
  font-size: clamp(1.75rem, 3.5vw, 2.25rem);
  font-weight: 800;
}

.masonry {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px 22px;
  max-width: 860px;
  margin: 0 auto;
  padding: 18px 10px 28px;
  overflow: visible;
}

.stories .container {
  overflow: visible;
}

.story-card {
  margin: 0;
  border-radius: 16px;
  overflow: hidden;
  transform: rotate(var(--story-tilt, 0deg));
  transform-origin: center center;
  box-shadow:
    0 4px 6px rgba(15, 23, 42, 0.06),
    0 16px 40px rgba(15, 23, 42, 0.12);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  will-change: transform;
}

.story-card:nth-child(1) {
  --story-tilt: -8deg;
}

.story-card:nth-child(2) {
  --story-tilt: 7deg;
}

.story-card:nth-child(3) {
  --story-tilt: -6deg;
}

.story-card:nth-child(4) {
  grid-column: 2;
  --story-tilt: 5deg;
}

.story-card:hover {
  transform: rotate(var(--story-tilt, 0deg)) scale(1.02);
  box-shadow:
    0 8px 12px rgba(15, 23, 42, 0.08),
    0 24px 48px rgba(15, 23, 42, 0.16);
  z-index: 1;
}

.story-card img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.cta {
  text-align: center;
  background: var(--bg-white);
  border-top: 1px solid var(--border);
}

.cta h2 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
}

.cta p {
  margin: 0 0 28px;
  color: var(--text-muted);
}

.cta__stores {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.site-footer {
  padding: 40px 24px;
  border-top: 1px solid var(--border);
}

.site-footer__inner {
  max-width: var(--max);
  margin: 0 auto;
}

.site-footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.site-footer__brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 16px;
}

.site-footer__links a {
  font-size: 14px;
  color: var(--text-muted);
}

.site-footer__copy {
  margin: 16px 0 0;
  font-size: 13px;
  color: var(--text-soft);
}

@media (max-width: 1024px) {
  .testimonials-dark__grid {
    column-count: 2;
  }
}

@media (min-width: 1101px) {
  .site-nav__bar {
    display: flex;
    align-items: center;
    gap: 16px 24px;
    padding: 14px 24px;
  }

  .site-nav__inner {
    padding: 0;
    flex-shrink: 0;
  }

  .site-nav__dropdown {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 16px 24px;
    min-width: 0;
  }
}

@media (max-width: 1100px) {
  .site-nav__inner {
    flex-wrap: nowrap;
    gap: 12px;
  }

  .site-nav__toggle {
    display: inline-flex;
  }

  .site-nav.is-open .site-nav__dropdown {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    flex-direction: column;
    align-items: stretch;
    gap: 20px;
    padding: 8px 24px 24px;
    background: rgba(246, 245, 241, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
  }

  .site-nav__links {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 4px;
  }

  .site-nav__links a {
    padding: 12px 14px;
    font-size: 16px;
    border-radius: 10px;
  }

  .site-nav__links a:hover {
    background: rgba(0, 0, 0, 0.04);
  }

  .site-nav__stores {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .site-nav__stores .store-btn {
    justify-content: center;
    width: 100%;
  }
}

@media (max-width: 900px) {
  .hero__grid,
  .features__grid,
  .how__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .hero__copy {
    order: 1;
  }
  .hero__visual {
    order: 2;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
  }
  .hero__progress-scaler {
    padding: 28px 32px 0;
  }
  .progress-photo__frame {
    max-height: min(48vh, 400px);
  }
  .features__phone-wrap {
    position: static;
    order: -1;
  }
}

@media (max-width: 560px) {
  .site-nav__inner {
    padding: 12px 16px;
  }

  .site-nav__brand {
    font-size: 16px;
    gap: 8px;
  }

  .site-nav__brand img {
    width: 28px;
    height: 28px;
  }

  .hero {
    padding: 32px 16px 56px;
  }
  .hero__visual {
    max-width: 100%;
  }
  .hero__progress-scaler {
    padding: 24px 20px 0;
  }
  .progress-photo {
    padding: 0 2px;
  }
  .progress-photo__frame {
    max-height: min(42vh, 320px);
    padding: 6px;
  }
  .progress-photo__week {
    font-size: 10px;
  }
  .progress-photo__score {
    font-size: 13px;
  }
  .progress-photo__score em {
    font-size: 16px;
  }
  .hero__progress-caption {
    font-size: 12px;
    padding: 0 8px;
  }
  .masonry {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: min(100%, 400px);
    gap: 16px 12px;
    padding: 12px 6px 20px;
  }

  .story-card:nth-child(4) {
    grid-column: 2;
  }

  .story-card:nth-child(1) {
    --story-tilt: -6deg;
  }

  .story-card:nth-child(2) {
    --story-tilt: 5deg;
  }

  .story-card:nth-child(3) {
    --story-tilt: -5deg;
  }

  .story-card:nth-child(4) {
    --story-tilt: 4deg;
  }
  .testimonials-dark__grid {
    column-count: 1;
  }
}
