/* ============================================
   Beautify Me – Marketing site
   Premium dark theme, beauty-app aesthetic
   ============================================ */

:root {
  --bg-deep: #0d0610;
  --bg-card: rgba(26, 10, 15, 0.85);
  --bg-elevated: #1a0f14;
  --accent: #e8a598;
  --accent-soft: rgba(232, 165, 152, 0.25);
  --accent-glow: rgba(232, 165, 152, 0.4);
  --text: #f5eae8;
  --text-muted: #a89a97;
  --border: rgba(232, 165, 152, 0.15);
  --font-sans: 'Outfit', system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --radius: 16px;
  --radius-lg: 24px;
  --space: 1.25rem;
  --container: min(1120px, 92vw);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-deep);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space);
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: var(--bg-deep);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  z-index: 100;
  transition: top 0.2s;
}
.skip-link:focus { top: var(--space); }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ---- Header ---- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(13, 6, 16, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-text {
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  color: var(--text);
}
.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
}
.nav a:hover { color: var(--text); text-decoration: none; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s;
}
.btn-cta {
  background: var(--text);
  color: var(--bg-deep);
}
.btn-cta:hover {
  text-decoration: none;
  background: var(--text-muted);
  color: var(--bg-deep);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text);
}
.menu-toggle span {
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 1px;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  contain: layout;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr;
  align-content: center;
  padding: calc(var(--header-h) + 2rem) clamp(2rem, 6vw, 4rem) 4rem;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-soft), transparent 50%),
    radial-gradient(ellipse 60% 40% at 90% 60%, rgba(180, 100, 120, 0.15), transparent 45%),
    radial-gradient(ellipse 50% 30% at 10% 80%, rgba(200, 120, 140, 0.1), transparent 40%);
}
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}
.hero-glow-1 {
  width: 400px;
  height: 400px;
  background: var(--accent-glow);
  top: -100px;
  right: -100px;
  animation: float 12s ease-in-out infinite;
}
.hero-glow-2 {
  width: 300px;
  height: 300px;
  background: rgba(180, 100, 120, 0.3);
  bottom: 10%;
  left: -80px;
  animation: float 10s ease-in-out infinite reverse;
}
@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(20px, -20px); }
}
.hero-mesh {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, black, transparent 70%);
}

.hero,
.hero * {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif !important;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 560px;
}
.hero-label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}
.hero-title {
  font-family: system-ui, -apple-system, sans-serif;
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.15;
  margin: 0 0 1.25rem;
  letter-spacing: -0.02em;
}
.hero-title-line { display: block; }
.hero-title-accent {
  color: var(--accent);
  font-style: italic;
}
.hero-desc {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin: 0 0 2rem;
  max-width: 480px;
}
.hero-cta { margin-bottom: 2rem; }
.hero-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0.75rem 0 0;
}

.btn-apple {
  background: var(--text);
  color: var(--bg-deep);
  padding: 0.85rem 1.5rem;
  font-weight: 600;
}
.btn-apple:hover {
  text-decoration: none;
  background: var(--text-muted);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.3);
}
.apple-icon { width: 22px; height: 22px; }

/* ---- Hero: 3 screenshots with liquid glass ---- */
.hero-visual {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 2.5rem;
  padding: 1rem 0;
  contain: layout;
}
.hero-screenshots {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 0;
  min-height: 340px;
  contain: layout;
}
.glass-screenshot {
  position: relative;
  flex-shrink: 0;
}
.glass-frame {
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.18);
  --glass-shine: rgba(255, 255, 255, 0.08);
  position: relative;
  width: min(160px, 28vw);
  aspect-ratio: 1 / 2;
  border-radius: 28px;
  padding: 10px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 0 0 1px var(--glass-shine) inset,
    0 24px 48px rgba(0, 0, 0, 0.35),
    0 8px 24px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}
.glass-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(145deg, rgba(255,255,255,0.28) 0%, transparent 45%, rgba(255,255,255,0.06) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.glass-screenshot:hover .glass-frame {
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow:
    0 0 0 1px var(--glass-shine) inset,
    0 28px 56px rgba(0, 0, 0, 0.4),
    0 12px 28px rgba(0, 0, 0, 0.25);
}
.glass-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 2;
  object-fit: cover;
  display: block;
  vertical-align: middle;
  border-radius: 20px;
  background: var(--bg-elevated);
}
.glass-screenshot-1 { transform: rotate(-4deg); }
.glass-screenshot-2 { transform: translateY(-8px); z-index: 2; }
.glass-screenshot-3 { transform: rotate(4deg); }
.hero-screenshots .glass-screenshot-1 { margin-right: -24px; }
.hero-screenshots .glass-screenshot-3 { margin-left: -24px; }

/* ---- Container & Sections ---- */
.container {
  width: var(--container);
  margin: 0 auto;
  padding: 0 var(--space);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  text-align: center;
  margin: 0 0 0.75rem;
  color: var(--text);
}
.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 3rem;
}

/* ---- Features ---- */
.features {
  padding: 5rem 0;
}
.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: border-color 0.2s, transform 0.2s;
}
.feature-card:hover {
  border-color: var(--accent-soft);
  transform: translateY(-2px);
}
.feature-icon {
  display: block;
  color: var(--accent);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}
.feature-card h3 {
  font-family: var(--font-sans);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: var(--text);
}
.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---- How it works / Stats ---- */
.how-it-works {
  padding: 4rem 0;
  background: linear-gradient(180deg, transparent, var(--bg-elevated) 20%, var(--bg-elevated) 80%, transparent);
}
.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  margin-top: 2rem;
}
.stat {
  text-align: center;
}
.stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ---- Blog preview (homepage) ---- */
.blog-preview {
  padding: 4rem 0;
  background: linear-gradient(180deg, transparent, var(--bg-elevated) 15%, var(--bg-elevated) 85%, transparent);
}
.blog-preview-list {
  list-style: none;
  margin: 0 auto 1.5rem;
  padding: 0;
  max-width: 640px;
}
.blog-preview-list li {
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}
.blog-preview-list li:first-child { padding-top: 0; }
.blog-preview-list a {
  font-weight: 500;
  color: var(--text);
  display: block;
  margin-bottom: 0.25rem;
}
.blog-preview-list a:hover { color: var(--accent); text-decoration: none; }
.blog-preview-list time {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.blog-preview-more {
  text-align: center;
  margin: 0;
}
.blog-preview-more a { font-weight: 600; }

/* ---- Download ---- */
.download {
  padding: 5rem 0;
  text-align: center;
}
.btn-large {
  padding: 1rem 2rem;
  font-size: 1.05rem;
  margin-top: 0.5rem;
}
.download-legal {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 1.5rem 0 0;
}

/* ---- Footer ---- */
.site-footer {
  padding: 2.5rem var(--space);
  border-top: 1px solid var(--border);
  text-align: center;
}
.footer-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  margin: 0 0 0.5rem;
}
.footer-credit, .footer-links {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.25rem 0;
}
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--accent); }
.footer-links a + a::before { content: " · "; color: var(--text-muted); }

/* ---- Responsive ---- */
@media (min-width: 640px) {
  .glass-frame {
    width: min(200px, 22vw);
  }
  .hero-screenshots .glass-screenshot-1 { margin-right: -32px; }
  .hero-screenshots .glass-screenshot-3 { margin-left: -32px; }
}
@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
  }
  .hero-content { margin: 0; }
  .hero-visual { margin-top: 0; justify-content: flex-end; }
  .glass-frame {
    width: min(220px, 18vw);
  }
  .glass-screenshot-1 { transform: rotate(-5deg); }
  .glass-screenshot-2 { transform: translateY(-12px); }
  .glass-screenshot-3 { transform: rotate(5deg); }
  .hero-screenshots .glass-screenshot-1 { margin-right: -40px; }
  .hero-screenshots .glass-screenshot-3 { margin-left: -40px; }
}
@media (max-width: 480px) {
  .glass-frame { width: min(140px, 30vw); }
  .glass-screenshot-1 { transform: rotate(-3deg); }
  .glass-screenshot-3 { transform: rotate(3deg); }
  .hero-screenshots .glass-screenshot-1 { margin-right: -16px; }
  .hero-screenshots .glass-screenshot-3 { margin-left: -16px; }
}

@media (max-width: 700px) {
  .nav { display: none; }
  .nav.is-open {
    display: flex;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
    background: var(--bg-deep);
    padding: 2rem;
  }
  .menu-toggle { display: flex; }
  .menu-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
  .menu-toggle span { transition: transform 0.2s, opacity 0.2s; }
}
