/* ==========================================================================
   YAGGIX BRAND & GLOBAL VARIABLES
   Palette + type system referenced from the Yaggix brand identity:
   navy #0F172A · teal #14B8A6 · purple #7C3AED · orange #F97316
   pink #EC4899 · sky #0EA5E9 · amber #FBBF24
   ========================================================================== */
:root {
  /* Brand palette */
  --navy: #0F172A;
  --navy-70: rgba(15, 23, 42, .72);
  --navy-55: rgba(15, 23, 42, .55);
  --navy-35: rgba(15, 23, 42, .35);
  --teal: #14B8A6;
  --purple: #7C3AED;
  --orange: #F97316;
  --pink: #EC4899;
  --sky: #0EA5E9;
  --amber: #FBBF24;
  --gradient-brand: linear-gradient(102deg, var(--purple) 0%, var(--pink) 52%, var(--orange) 100%);
  --gradient-brand-soft: linear-gradient(102deg, rgba(124,58,237,.12) 0%, rgba(236,72,153,.12) 52%, rgba(249,115,22,.12) 100%);

  /* Semantic aliases (kept so existing inline var() references stay correct) */
  --primary: var(--purple);
  --primary-hover: #6D28D9;
  --bg-color: #FDFBF7;
  --bg-alt: #F7F4EC;
  --text-main: var(--navy);
  --text-muted: var(--navy-55);
  --border-color: rgba(15, 23, 42, .12);
  --border-color-strong: rgba(15, 23, 42, .18);
  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow-md: 0 8px 24px -8px rgba(15, 23, 42, .16);
  --shadow-lg: 0 24px 60px -16px rgba(15, 23, 42, .22);

  /* Fluid Typography */
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Fredoka', 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.85rem + 0.125vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1.05rem + 0.375vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.35rem + 0.75vw, 2rem);
  --text-3xl: clamp(1.875rem, 1.6rem + 1.375vw, 2.5rem);
  --text-4xl: clamp(2.25rem, 1.8rem + 2.25vw, 3.5rem);

  /* Layout */
  --max-width: 1200px;
  --section-py: clamp(3rem, 5vw, 6rem);
  --ease: cubic-bezier(.16, .8, .3, 1);
  --transition: .3s var(--ease);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--text-main);
  background-color: var(--bg-color);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body.menu-open {
  overflow: hidden;
}

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

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

:focus-visible {
  outline: 2.5px solid var(--purple);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ==========================================================================
   LAYOUT & CONTAINERS
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: var(--section-py) 0;
}

.bg-alt {
  background-color: var(--bg-alt);
}

.text-center { text-align: center; }
.text-lg { font-size: var(--text-lg); }
.w-100 { width: 100%; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-6 { margin-bottom: 3rem; }
.mt-2 { margin-top: 1rem; }
.mt-4 { margin-top: 2rem; }

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5 {
  line-height: 1.15;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: -.01em;
  margin-bottom: 1rem;
  color: var(--navy);
}
h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
p { font-size: var(--text-base); color: var(--text-muted); margin-bottom: 1rem; }

.grad-text {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0.85rem 1.6rem;
  font-weight: 600;
  border-radius: 999px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition), filter var(--transition);
  cursor: pointer;
  border: 1.5px solid transparent;
  font-size: var(--text-sm);
  text-align: center;
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient-brand);
  color: var(--white);
  box-shadow: var(--shadow-md);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  filter: saturate(1.08);
}
.btn-primary:active { transform: translateY(0); }
.btn-outline {
  border-color: var(--border-color-strong);
  color: var(--navy);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--purple);
  color: var(--purple);
  background: rgba(124, 58, 237, .06);
  transform: translateY(-2px);
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(253, 251, 247, .82);
  backdrop-filter: blur(14px) saturate(1.4);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  z-index: 1000;
  border-bottom: 1px solid transparent;
  box-shadow: none;
  transition: box-shadow .3s var(--ease), border-color .3s var(--ease), background .3s var(--ease);
}

header.scrolled {
  border-bottom-color: var(--border-color);
  box-shadow: var(--shadow-sm);
  background: rgba(253, 251, 247, .94);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  transition: transform .25s var(--ease);
}
.logo:hover { transform: translateY(-1px); }

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

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
  list-style: none;
}

.nav-links a {
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--navy-70);
  transition: color var(--transition);
  position: relative;
  padding: 4px 0;
}

.nav-links a:not(.btn)::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 100%;
  height: 2px;
  border-radius: 2px;
  background: var(--gradient-brand);
  transition: right .25s var(--ease);
}

.nav-links a:not(.btn):hover {
  color: var(--navy);
}
.nav-links a:not(.btn):hover::after { right: 0; }

.nav-links a.active {
  color: var(--navy);
  font-weight: 600;
}

.nav-links a.active::after {
  right: 0;
}

.nav-links a.btn.active {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}
.hamburger span {
  display: block;
  width: 25px;
  height: 3px;
  border-radius: 2px;
  background-color: var(--navy);
  margin: 5px 0;
  transition: 0.3s var(--ease);
}

/* ==========================================================================
   HERO & "YOUR BUSINESS" ANIMATION
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-bg-effect {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 100vw;
  background: radial-gradient(circle, rgba(124, 58, 237, .07) 0%, rgba(255, 255, 255, 0) 70%);
  z-index: 0;
  pointer-events: none;
}

/* decorative floating blobs, purely CSS, sit behind hero content */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .28;
  pointer-events: none;
  z-index: 0;
  animation: floatBlob 12s var(--ease) infinite;
}
.hero::before {
  width: 320px; height: 320px;
  background: var(--teal);
  top: 8%; left: -6%;
}
.hero::after {
  width: 360px; height: 360px;
  background: var(--orange);
  bottom: 2%; right: -8%;
  animation-delay: -6s;
}
@keyframes floatBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(24px, -18px) scale(1.06); }
}

/* Preserved Your Business Animation, restyled with the brand gradient */
.your-business-wrapper {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  height: var(--text-4xl);
  margin-left: 0.5rem;
  position: relative;
  width: max-content;
}

.your-business-anim {
  display: inline-block;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: slideUpFade 3s infinite;
  font-weight: 700;
  font-family: var(--font-display);
}

@keyframes slideUpFade {
  0%, 10% { transform: translateY(100%); opacity: 0; }
  20%, 80% { transform: translateY(0); opacity: 1; }
  90%, 100% { transform: translateY(-100%); opacity: 0; }
}

/* ==========================================================================
   CARDS & GRIDS
   ========================================================================== */
.grid {
  display: grid;
  gap: 2rem;
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.card {
  background: var(--white);
  border-radius: 1.1rem;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  line-height: 1;
}

/* Portfolio Cards */
.portfolio-card {
  padding: 0;
  overflow: hidden;
}
.portfolio-img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
  background: var(--bg-alt);
}
.portfolio-card:hover .portfolio-img {
  transform: scale(1.05);
}
.portfolio-content {
  padding: 1.5rem;
}

/* Pricing Cards */
.pricing-card {
  position: relative;
}
.pricing-card.recommended {
  border: 2px solid var(--purple);
  transform: scale(1.05);
}
.pricing-card.recommended:hover {
  transform: scale(1.05) translateY(-6px);
}
.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-brand);
  color: white;
  padding: 0.3rem 1.1rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: .02em;
  box-shadow: var(--shadow-sm);
}
.price {
  font-size: var(--text-4xl);
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text-main);
  margin: 1rem 0;
}
.pricing-features {
  list-style: none;
  margin: 1.5rem 0;
  flex-grow: 1;
}
.pricing-features li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-muted);
}
.pricing-features li:last-child {
  border-bottom: none;
}

/* Team Cards */
.team-card {
  text-align: center;
}
.team-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 1.5rem auto;
  background: var(--gradient-brand);
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: #fff;
  box-shadow: var(--shadow-sm);
}

/* ==========================================================================
   REGISTRATION UI (Matches Firebase Architecture)
   ========================================================================== */
.register-container {
  max-width: 600px;
  margin: 0 auto;
}
.step-indicator {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  position: relative;
}
.step-indicator::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--border-color);
  z-index: 1;
}
.step {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--border-color-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  z-index: 2;
  color: var(--text-muted);
  transition: var(--transition);
}
.step.active {
  border-color: transparent;
  background: var(--gradient-brand);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.form-step {
  display: none;
  animation: fadeIn 0.5s var(--ease);
}
.form-step.active {
  display: block;
}

.form-group {
  margin-bottom: 1.5rem;
}
.form-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1.5px solid var(--border-color-strong);
  border-radius: 0.7rem;
  font-family: inherit;
  font-size: var(--text-base);
  background: var(--bg-color);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--purple);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, .12);
}
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.checkbox-label {
  display: flex;
  align-items: center;
  padding: 1rem;
  border: 1.5px solid var(--border-color-strong);
  border-radius: 0.7rem;
  cursor: pointer;
  transition: var(--transition);
}
.checkbox-label:hover {
  border-color: var(--purple);
  background: rgba(124, 58, 237, .05);
}
.checkbox-label input {
  margin-right: 1rem;
  width: 20px;
  height: 20px;
  accent-color: var(--purple);
}

/* ==========================================================================
   ANIMATIONS & REVEALS
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .your-business-anim { animation: none; transform: none; opacity: 1; }
  .hero::before, .hero::after { animation: none; }
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  background-color: var(--navy);
  color: rgba(255, 255, 255, .72);
  padding: 4rem 0 2rem 0;
}
.footer-logo-chip {
  display: inline-flex;
  align-items: center;
  background: var(--bg-color);
  padding: 10px 16px;
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  margin-bottom: 1rem;
}
.footer-logo-chip img {
  height: 26px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.footer-grid h4 { color: #fff; font-size: var(--text-sm); letter-spacing: .04em; text-transform: uppercase; }
.footer-links {
  list-style: none;
}
.footer-links li { margin-bottom: 0.75rem; }
.footer-links a { color: #9ca3af; transition: var(--transition); }
.footer-links a:hover { color: white; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-top: 2rem;
  text-align: center;
  color: #9ca3af;
  font-size: var(--text-sm);
}

/* ==========================================================================
   MOBILE RESPONSIVENESS (Critical)
   ========================================================================== */
@media (max-width: 1024px) {
  .pricing-card.recommended { transform: scale(1); }
  .pricing-card.recommended:hover { transform: translateY(-6px); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .hamburger { display: block; }
  .nav-links {
    position: fixed;
    top: 80px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 80px);
    background: var(--bg-color);
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 2rem;
    transition: 0.35s var(--ease);
    overflow-y: auto;
  }
  .nav-links.active { left: 0; }
  .nav-links a:not(.btn) { font-size: 1.15rem; padding: 12px 0; }
  .nav-links a:not(.btn)::after { display: none; }

  .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

  .your-business-wrapper { display: block; margin: 0 auto; text-align: center; height: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero::before, .hero::after { opacity: .16; }
}

@media (max-width: 414px) {
  .btn { width: 100%; }
  .hero-content h1 { font-size: 2rem; }
  .card { padding: 1.5rem; }
}
