/* ============================================================
   RawBeauty — landing page
   ============================================================ */

:root {
  --red: #ff4f9a;
  --red-deep: #d93c82;
  --coral: #ff72b2;
  --rose: #ffd9ea;
  --lilac: #d0beff;
  --lilac-soft: #eee8ff;
  --blush: #fff5fa;
  --ink: #1f1f24;
  --ink-soft: #707078;
  --paper: #ffffff;
  --paper-warm: #fff7fb;
  --line: #e9e6ee;
  --radius-lg: 32px;
  --radius-md: 22px;
  --shadow-soft: 0 28px 70px -32px rgba(95, 69, 130, 0.35);
  --shadow-card: 0 26px 70px -36px rgba(31, 31, 36, 0.32);
  --font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: #fdfcfe;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  width: min(1200px, calc(100% - 56px));
  margin-inline: auto;
}

/* ============ App Store button ============ */

.btn-appstore {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--ink);
  color: #fff;
  border-radius: 999px;
  padding: 11px 24px;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  box-shadow: 0 10px 26px -12px rgba(29, 29, 31, 0.55);
  white-space: nowrap;
}

.btn-appstore:hover {
  transform: translateY(-2px);
  background: #34343a;
  box-shadow: 0 16px 32px -12px rgba(29, 29, 31, 0.6);
}

.btn-appstore__apple {
  width: 26px;
  height: 26px;
  fill: currentColor;
  flex-shrink: 0;
}

.btn-appstore__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  font-size: 17px;
  font-weight: 600;
  text-align: left;
}

.btn-appstore__text small {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.04em;
  opacity: 0.85;
}

.btn-appstore--lg { padding: 13px 30px; border-radius: 999px; }

.btn-appstore--nav {
  padding: 9px 19px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: none;
}
.btn-appstore--nav .btn-appstore__apple { width: 18px; height: 18px; }

/* ============ Nav ============ */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 13px 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(31, 31, 36, 0.06);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: background 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

.nav.is-scrolled {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 12px 36px -24px rgba(31, 31, 36, 0.45);
  padding: 11px 0;
}

.nav__inner {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 20px;
}

.nav__logo {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  box-shadow: 0 4px 14px -6px rgba(29, 29, 31, 0.35);
  background: #fff;
}

.nav__name { letter-spacing: -0.01em; }

.nav__links {
  display: flex;
  gap: 28px;
  margin-left: auto;
  font-size: 15px;
  font-weight: 500;
}

.nav__links a { position: relative; padding: 4px 0; opacity: 0.85; transition: opacity 0.2s; }
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--lilac), var(--coral));
  transition: right 0.25s ease;
}
.nav__links a:hover { opacity: 1; }
.nav__links a:hover::after { right: 0; }

.nav:not(.is-scrolled) .btn-appstore--nav { background: var(--ink); color: #fff; }
.nav:not(.is-scrolled) .btn-appstore--nav:hover { background: #34343a; }

/* ============ Hero ============ */

.hero {
  position: relative;
  overflow: hidden;
  color: var(--ink);
  background: linear-gradient(121deg, #d0beff 0%, #f1d8f6 40%, #ffd9ea 68%, #ff72b2 100%);
  padding: 152px 0 108px;
  border-radius: 0 0 46px 46px;
}

.hero__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.48;
  pointer-events: none;
}
.hero__glow--1 { width: 560px; height: 560px; background: #ffffff; top: -220px; left: -100px; }
.hero__glow--2 { width: 500px; height: 500px; background: #ff8fc0; bottom: -210px; right: 4%; }

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  align-items: center;
  gap: 48px;
}

.hero__title {
  max-width: 650px;
  font-size: clamp(48px, 6.4vw, 76px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero__subtitle {
  margin-top: 18px;
  color: rgba(31, 31, 36, 0.75);
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 500;
}

.hero__cta { margin-top: 36px; }

/* Phone mockup */

.hero__visual {
  position: relative;
  justify-self: center;
}

.phone {
  position: relative;
  width: min(310px, 68vw);
  aspect-ratio: 9 / 19;
  border-radius: 48px;
  padding: 7px;
  background: #1f1f24;
  box-shadow: 0 44px 90px -34px rgba(61, 37, 76, 0.58);
  transform: rotate(2.5deg);
}

.phone img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 41px;
}

.phone__notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 38%;
  height: 24px;
  border-radius: 14px;
  background: rgba(20, 20, 22, 0.92);
  z-index: 2;
}

.phone--back {
  position: absolute;
  top: 42px;
  left: 64px;
  transform: rotate(-5deg) scale(0.96);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.68), rgba(208, 190, 255, 0.5));
  box-shadow: 0 30px 70px -32px rgba(63, 39, 78, 0.34);
}

.hero__wave {
  display: none;
}

/* ============ Sections ============ */

.section-title {
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.035em;
  text-align: center;
}

.section-subtitle {
  margin: 16px auto 0;
  max-width: 640px;
  text-align: center;
  color: #7a7c81;
  font-size: 17px;
}

/* ============ Features ============ */

.features { padding: 108px 0 32px; background: #fdfcfe; }

.feature {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  align-items: center;
  gap: clamp(40px, 6vw, 88px);
  margin: 52px 0;
  padding: clamp(42px, 5vw, 70px);
  border: 1px solid rgba(31, 31, 36, 0.05);
  border-radius: 42px;
  overflow: hidden;
  box-shadow: 0 30px 80px -58px rgba(31, 31, 36, 0.42);
}

.features .feature:nth-of-type(1) { background: linear-gradient(145deg, #f2edff, #fcfaff); }
.features .feature:nth-of-type(2) { background: linear-gradient(145deg, #fff3f8, #ffe7f2); }
.features .feature:nth-of-type(3) { background: linear-gradient(145deg, #f2f9ff, #ece7ff); }
.features .feature:nth-of-type(4) { background: linear-gradient(145deg, #fff9fc, #f5efff); }
.features .feature:nth-of-type(5) { background: linear-gradient(121deg, #d0beff, #f5dcf6 55%, #ffd4e7); }

.feature--flip .feature__media { order: 2; }
.feature--flip .feature__body { order: 1; }

.feature__title {
  margin-top: 0;
  font-size: clamp(30px, 3.2vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.feature__desc {
  margin-top: 18px;
  color: #6f7077;
  font-size: 17px;
  max-width: 440px;
}

.feature__body .btn-appstore { margin-top: 28px; }

/* reveal on scroll */
.feature { opacity: 0; transform: translateY(36px); transition: opacity 0.7s ease, transform 0.7s ease; }
.feature.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .feature { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============ Compare slider ============ */

.compare { width: 100%; }

.compare__frame {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 6px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-card);
  background: #f3f0ef;
  touch-action: pan-y;
  cursor: ew-resize;
  user-select: none;
  -webkit-user-select: none;
}

.compare__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.compare__clip {
  position: absolute;
  inset: 0;
  overflow: hidden;
  /* width is driven by JS via --pos */
  clip-path: inset(0 calc(100% - var(--pos, 50%)) 0 0);
}

.compare__divider {
  position: absolute;
  top: 0; bottom: 0;
  left: var(--pos, 50%);
  width: 3px;
  margin-left: -1.5px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.35);
}

.compare__handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  border: 4px solid #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.4);
}

.compare__handle svg { width: 24px; height: 24px; }

.compare__tag {
  position: absolute;
  top: 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(31, 31, 36, 0.68);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 5px 14px;
  pointer-events: none;
}

.compare__tag--before { left: 18px; }
.compare__tag--after { right: 18px; }

/* dots (example switcher) */

.compare__dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.compare__dots:empty { display: none; }

.compare__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(31, 31, 36, 0.16);
  cursor: pointer;
  padding: 0;
  transition: transform 0.2s ease, background 0.2s ease;
}

.compare__dot:hover { transform: scale(1.25); }
.compare__dot.is-active { background: var(--coral); transform: scale(1.25); }

/* filter chips */

.compare__chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}

.compare__chip {
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 500;
  color: #65656c;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(31, 31, 36, 0.1);
  border-radius: 999px;
  padding: 7px 16px;
  cursor: pointer;
  transition: all 0.22s ease;
}

.compare__chip:hover { border-color: var(--coral); color: var(--red-deep); }

.compare__chip.is-active {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
  box-shadow: 0 10px 24px -12px rgba(31, 31, 36, 0.65);
}

/* image crossfade when switching examples */
.compare__img { transition: opacity 0.28s ease; }
.compare.is-switching .compare__img { opacity: 0; }

/* ============ Bottom CTA ============ */

.cta {
  width: min(1200px, calc(100% - 56px));
  margin: 92px auto 0;
  background: linear-gradient(121deg, #d0beff 0%, #ffd9ea 66%, #ff72b2 100%);
  color: var(--ink);
  padding: 90px 0;
  border-radius: 44px;
  overflow: hidden;
}

.cta__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 26px;
}

.cta__logo {
  width: 84px;
  height: 84px;
  border-radius: 22px;
  box-shadow: 0 22px 54px -24px rgba(57, 35, 70, 0.55);
}

.cta__title {
  font-size: clamp(28px, 3.6vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  max-width: 640px;
}

/* ============ Footer ============ */

.footer { margin-top: 80px; color: #fff; background: var(--ink); border-top: 0; }

.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding: 64px 0 40px;
}

.footer__tagline { margin-top: 14px; color: var(--ink-soft); font-size: 14.5px; }

.footer__col h4 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 16px;
}

.footer__col a {
  display: block;
  color: #c7c7cd;
  font-size: 14.5px;
  padding: 5px 0;
  transition: color 0.2s;
}

.footer__col a:hover { color: #ff9bc7; }

.footer__col .nav__brand { display: inline-flex; color: #fff; }
.footer .nav__name { color: #fff; }
.footer__tagline { color: #a9a9b2; }

.legal a { color: var(--red-deep); font-weight: 600; }

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 22px 0 26px;
  color: #9b9ba5;
  font-size: 13px;
}

/* ============ Responsive ============ */

@media (max-width: 900px) {
  .hero { padding: 132px 0 88px; border-radius: 0 0 34px 34px; }
  .hero__inner { grid-template-columns: 1fr; text-align: center; }
  .hero__cta { display: flex; justify-content: center; }
  .hero__visual { margin-top: 26px; }
  .phone--back { display: none; }

  .feature,
  .feature--flip { grid-template-columns: 1fr; padding: 44px; margin: 34px 0; }
  .feature--flip .feature__media { order: 0; }
  .feature--flip .feature__body { order: 0; }
  .feature__body { text-align: center; }
  .feature__desc { margin-inline: auto; }

  .footer__inner { grid-template-columns: 1fr; gap: 30px; text-align: center; padding: 48px 0 30px; }
  .footer__col--brand .nav__brand { justify-content: center; }
  .footer__bottom { text-align: center; }
}

@media (max-width: 620px) {
  .container { width: min(1200px, calc(100% - 32px)); }
  .nav__links { display: none; }
  .nav__inner { justify-content: space-between; gap: 12px; }
  .hero { padding: 118px 0 76px; }
  .hero__title { font-size: clamp(42px, 13vw, 56px); }
  .hero__cta { margin-top: 30px; }
  .features { padding-top: 82px; }
  .feature,
  .feature--flip { padding: 24px; border-radius: 30px; }
  .cta { width: calc(100% - 32px); padding: 68px 20px; border-radius: 32px; }
  .footer { margin-top: 56px; }
  .compare__handle { width: 44px; height: 44px; }
  .compare__tag { top: 12px; font-size: 10.5px; }
  .compare__tag--before { left: 12px; }
  .compare__tag--after { right: 12px; }
}

@media (max-width: 380px) {
  .nav__logo { width: 34px; height: 34px; }
  .nav__brand { gap: 7px; font-size: 17px; }
  .btn-appstore--nav { gap: 7px; padding: 8px 13px; font-size: 13px; }
  .btn-appstore--nav .btn-appstore__apple { width: 16px; height: 16px; }
}
