/* ============================================
   HairHub - Global Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Anybody:wght@400;500;600;700;800;900&display=swap');

/* --- CSS Variables --- */
:root {
  --orange: #FF6A00;
  --orange-light: #FF8A33;
  --orange-glow: rgba(255, 106, 0, 0.25);
  --orange-subtle: rgba(255, 106, 0, 0.08);
  --bg-primary: #060606;
  --bg-secondary: #0E0E0E;
  --bg-card: #141414;
  --bg-card-hover: #1A1A1A;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 106, 0, 0.3);
  --text-primary: #FFFFFF;
  --text-secondary: #A0A0A0;
  --text-muted: #5A5A5A;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 32px;
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast: 0.2s ease;
  --font-display: 'Anybody', sans-serif;
  --font-body: 'Outfit', sans-serif;
}

/* --- 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-body);
  font-weight: 400;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

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

ul, ol {
  list-style: none;
}

/* --- Utility --- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container--narrow {
  max-width: 820px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --- Background Ambient --- */
.ambient {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ambient__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.4;
}

.ambient__orb--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 106, 0, 0.15) 0%, transparent 70%);
  top: -200px;
  right: -100px;
  animation: float1 20s ease-in-out infinite;
}

.ambient__orb--2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 106, 0, 0.08) 0%, transparent 70%);
  bottom: -150px;
  left: -150px;
  animation: float2 25s ease-in-out infinite;
}

.ambient__orb--3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(255, 140, 50, 0.06) 0%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation: float3 18s ease-in-out infinite;
}

@keyframes float1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-40px, 30px) scale(1.05); }
  66% { transform: translate(20px, -20px) scale(0.95); }
}

@keyframes float2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -40px) scale(1.1); }
}

@keyframes float3 {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.4; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.6; }
}

/* Grain overlay */
.grain {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 128px 128px;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 16px 0;
  transition: background var(--transition), backdrop-filter var(--transition);
}

.nav.scrolled {
  background: rgba(6, 6, 6, 0.85);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1001;
}

.nav__logo img {
  height: 40px;
  width: auto;
}

.nav__logo-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
}

.nav__logo-text span:first-child {
  color: var(--text-primary);
}

.nav__logo-text span:last-child {
  color: var(--orange);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav__link {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  letter-spacing: 0.01em;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--orange);
  transition: width var(--transition);
  border-radius: 1px;
}

.nav__link:hover,
.nav__link.active {
  color: var(--text-primary);
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

/* Mobile menu toggle */
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  z-index: 1001;
  background: none;
  border: none;
  padding: 4px;
}

.nav__toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.nav__toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav__toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav__toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero__content {
  position: relative;
  z-index: 2;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--orange-subtle);
  border: 1px solid rgba(255, 106, 0, 0.15);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--orange-light);
  margin-bottom: 28px;
  animation: fadeInUp 0.8s ease both;
}

.hero__badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--orange);
  border-radius: 50%;
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 5.5vw, 4.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  animation: fadeInUp 0.8s 0.1s ease both;
}

.hero__title span {
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 40px;
  animation: fadeInUp 0.8s 0.2s ease both;
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s 0.3s ease both;
}

.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.btn-store:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--orange-glow);
}

.btn-store svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.btn-store__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
}

.btn-store__label {
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-store__name {
  font-size: 1rem;
  font-weight: 700;
}

/* Hero phone mockup */
.hero__visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeInUp 0.8s 0.4s ease both;
}

.hero__phone-group {
  position: relative;
  width: 100%;
  max-width: 500px;
  display: flex;
  justify-content: center;
}

.phone-mockup {
  position: relative;
  width: 240px;
  border-radius: 36px;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 80px var(--orange-glow);
  transition: var(--transition);
  background: #000;
}

.phone-mockup img {
  width: 100%;
  height: auto;
  display: block;
}

.phone-mockup--back {
  position: absolute;
  width: 200px;
  opacity: 0.6;
  filter: blur(1px);
}

.phone-mockup--left {
  left: -20px;
  top: 40px;
  transform: perspective(800px) rotateY(15deg) scale(0.9);
}

.phone-mockup--right {
  right: -20px;
  top: 40px;
  transform: perspective(800px) rotateY(-15deg) scale(0.9);
}

.phone-mockup--front {
  z-index: 2;
  position: relative;
}

.phone-mockup--front:hover {
  transform: translateY(-8px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 120px var(--orange-glow);
}

/* --- Features Section --- */
.features {
  position: relative;
  z-index: 2;
  padding: 100px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--orange);
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 550px;
  margin: 0 auto;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: var(--orange-subtle);
  border: 1px solid rgba(255, 106, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.feature-card__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.feature-card__text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* --- How It Works --- */
.how-it-works {
  position: relative;
  z-index: 2;
  padding: 100px 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 40px;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange-glow), var(--orange), var(--orange-glow), transparent);
  z-index: 0;
}

.step {
  text-align: center;
  position: relative;
  z-index: 1;
}

.step__number {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--orange);
  box-shadow: 0 0 30px var(--orange-glow);
}

.step__title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.step__text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto;
}

/* --- CTA Section --- */
.cta {
  position: relative;
  z-index: 2;
  padding: 100px 0;
}

.cta__card {
  background: linear-gradient(135deg, rgba(255, 106, 0, 0.12) 0%, rgba(255, 106, 0, 0.03) 100%);
  border: 1px solid rgba(255, 106, 0, 0.2);
  border-radius: var(--radius-xl);
  padding: 80px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta__card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(255, 106, 0, 0.06) 0%, transparent 50%);
  animation: rotate-slow 30s linear infinite;
}

@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.cta__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  letter-spacing: -0.02em;
}

.cta__text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  position: relative;
  z-index: 1;
}

.cta__actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

/* --- Footer --- */
.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border);
  padding: 48px 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer__brand img {
  height: 32px;
  width: auto;
}

.footer__brand-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}

.footer__brand-text span:last-child {
  color: var(--orange);
}

.footer__links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.footer__link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.footer__link:hover {
  color: var(--orange);
}

.footer__copy {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* --- Page Header (for sub-pages) --- */
.page-header {
  position: relative;
  z-index: 2;
  padding: 160px 0 60px;
  text-align: center;
}

.page-header__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.page-header__subtitle {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

/* --- Legal Content (Privacy, Terms) --- */
.legal-content {
  position: relative;
  z-index: 2;
  padding: 0 0 100px;
}

.legal-content h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin: 48px 0 16px;
  letter-spacing: -0.01em;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.75;
  font-size: 0.95rem;
}

.legal-content ul {
  margin-bottom: 16px;
  padding-left: 20px;
}

.legal-content li {
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.65;
  font-size: 0.95rem;
  position: relative;
  padding-left: 16px;
}

.legal-content li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 5px;
  height: 5px;
  background: var(--orange);
  border-radius: 50%;
}

.legal-content a {
  color: var(--orange);
  border-bottom: 1px solid rgba(255, 106, 0, 0.3);
}

.legal-content a:hover {
  color: var(--orange-light);
  border-bottom-color: var(--orange-light);
}

.legal-content strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* --- Contact Page --- */
.contact-section {
  position: relative;
  z-index: 2;
  padding: 0 0 100px;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 60px;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
}

.contact-card__icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--orange-subtle);
  border: 1px solid rgba(255, 106, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
  font-size: 2rem;
}

.contact-card__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.contact-card__text {
  color: var(--text-secondary);
  margin-bottom: 28px;
  line-height: 1.65;
  font-size: 0.95rem;
}

.contact-card__email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  background: linear-gradient(135deg, var(--orange), var(--orange-light));
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: var(--radius-md);
  transition: var(--transition);
  letter-spacing: -0.01em;
}

.contact-card__email:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px var(--orange-glow);
}

.contact-card__email svg {
  width: 20px;
  height: 20px;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 968px) {
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 50px;
    text-align: center;
  }

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

  .hero__actions {
    justify-content: center;
  }

  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps::before {
    display: none;
  }

  .phone-mockup--back {
    display: none;
  }

  .phone-mockup {
    width: 220px;
  }
}

@media (max-width: 768px) {
  .nav__links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(6, 6, 6, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    gap: 32px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }

  .nav__links.open {
    opacity: 1;
    visibility: visible;
  }

  .nav__links .nav__link {
    font-size: 1.4rem;
    font-weight: 600;
  }

  .nav__toggle {
    display: flex;
  }

  .features__grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .cta__card {
    padding: 48px 28px;
  }

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

  .contact-card {
    padding: 40px 24px;
  }
}

@media (max-width: 480px) {
  .hero__actions {
    flex-direction: column;
    align-items: center;
  }

  .btn-store {
    width: 100%;
    max-width: 260px;
    justify-content: center;
  }

  .cta__actions {
    flex-direction: column;
    align-items: center;
  }
}
