/* ========================================
   Dandy Kids — Shared Stylesheet
   ======================================== */

/* --- CSS Variables --- */
:root {
  --primary: #6C63FF;
  --primary-light: #8B7DFF;
  --primary-dark: #5A52D5;
  --secondary: #FF8C42;
  --secondary-light: #FFA366;
  --accent: #4CAF93;
  --bg: #F8F7FF;
  --bg-white: #FFFFFF;
  --text-primary: #2D2B3D;
  --text-secondary: #6E6B7B;
  --star-gold: #FFD700;
  --border: #E8E6F0;
  --shadow: 0 4px 20px rgba(108, 99, 255, 0.08);
  --shadow-lg: 0 8px 40px rgba(108, 99, 255, 0.12);
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-full: 999px;
  --transition: 0.3s ease;
}

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Nunito', sans-serif;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

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

ul { list-style: none; }

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

.container-sm {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}

.navbar.scrolled {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

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

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.4rem;
  color: var(--text-primary);
}

.nav-logo img {
  height: 42px;
  width: auto;
  border-radius: 10px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: rgba(108, 99, 255, 0.08);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  font-size: 1.5rem;
  color: var(--text-primary);
}

/* Mobile Nav */
@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: white;
    flex-direction: column;
    padding: 16px 24px;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-120%);
    opacity: 0;
    transition: all 0.35s ease;
    pointer-events: none;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .nav-links a {
    width: 100%;
    padding: 12px 16px;
    font-size: 1rem;
  }
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 16px rgba(108, 99, 255, 0.3);
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(108, 99, 255, 0.4);
}

.btn-secondary {
  background: var(--secondary);
  color: white;
  box-shadow: 0 4px 16px rgba(255, 140, 66, 0.3);
}
.btn-secondary:hover {
  background: #E87A30;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(255, 140, 66, 0.4);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}

.btn-dark {
  background: var(--text-primary);
  color: white;
}
.btn-dark:hover {
  background: #1a1828;
  color: white;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.9rem;
}

/* --- Section Styles --- */
.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}

.section-header h2 {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}

.section-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.section-alt {
  background: white;
}

/* --- Hero Section --- */
.hero {
  padding: 140px 0 80px;
  background: linear-gradient(160deg, #F8F7FF 0%, #EDE9FF 50%, #F0EDFF 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(108, 99, 255, 0.06) 0%, transparent 70%);
  top: -100px;
  right: -100px;
}

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

.hero-content h1 {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.hero-content h1 span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-phones {
  display: flex;
  justify-content: center;
  gap: 20px;
  position: relative;
}

/* --- Phone Mockup --- */
.phone-mockup {
  width: 220px;
  background: #1a1a2e;
  border-radius: 32px;
  padding: 12px;
  box-shadow: var(--shadow-lg), 0 20px 60px rgba(0, 0, 0, 0.15);
  position: relative;
  transition: transform 0.4s ease;
}

.phone-mockup:hover {
  transform: translateY(-8px);
}

.phone-mockup::before {
  content: '';
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 20px;
  background: #1a1a2e;
  border-radius: 0 0 16px 16px;
  z-index: 2;
}

.phone-mockup img {
  width: 100%;
  border-radius: 22px;
  display: block;
}

.phone-mockup-sm {
  width: 180px;
}

.phone-tilt-left {
  transform: rotate(-5deg) translateY(20px);
}
.phone-tilt-left:hover {
  transform: rotate(-5deg) translateY(12px);
}

.phone-tilt-right {
  transform: rotate(5deg) translateY(20px);
}
.phone-tilt-right:hover {
  transform: rotate(5deg) translateY(12px);
}

/* --- Feature Cards --- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  background: white;
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
  border: 1px solid transparent;
}

.feature-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(108, 99, 255, 0.15);
}

.feature-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin: 0 auto 20px;
}

.feature-icon-purple { background: rgba(108, 99, 255, 0.1); color: var(--primary); }
.feature-icon-orange { background: rgba(255, 140, 66, 0.1); color: var(--secondary); }
.feature-icon-teal   { background: rgba(76, 175, 147, 0.1); color: var(--accent); }
.feature-icon-gold   { background: rgba(255, 215, 0, 0.1); color: #D4A800; }

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

@media (max-width: 992px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
  .features-grid { grid-template-columns: 1fr; }
}

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

.steps-grid::before {
  content: '';
  position: absolute;
  top: 44px;
  left: 20%;
  right: 20%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  border-radius: 2px;
  z-index: 0;
}

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

.step-number {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  margin: 0 auto 20px;
  background: white;
  box-shadow: var(--shadow);
  border: 3px solid var(--primary);
  color: var(--primary);
}

.step-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .steps-grid { grid-template-columns: 1fr; gap: 32px; }
  .steps-grid::before { display: none; }
}

/* --- Screenshot Gallery --- */
.gallery-scroll {
  display: flex;
  gap: 28px;
  overflow-x: auto;
  padding: 20px 0 32px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.gallery-scroll::-webkit-scrollbar { display: none; }

.gallery-item {
  flex: 0 0 auto;
  scroll-snap-align: center;
  text-align: center;
}

.gallery-item .phone-mockup {
  width: 200px;
}

/* Mockup images — already have device frames from AppMockupGenerator */
.mockup-img {
  width: 260px;
  position: relative;
  transition: transform 0.4s ease;
}

.mockup-img:hover {
  transform: translateY(-8px);
}

.mockup-img img {
  width: 100%;
  display: block;
  border-radius: 8px;
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.15));
}

.gallery-item .mockup-img {
  width: 240px;
}

.gallery-item p {
  margin-top: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* --- Stats Section --- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-item h3 {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
}

.stat-item p {
  font-size: 1rem;
  color: var(--text-secondary);
  font-weight: 600;
}

@media (max-width: 576px) {
  .stats-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* --- CTA Section --- */
.cta-section {
  padding: 80px 0;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  text-align: center;
  color: white;
}

.cta-section h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 32px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Page Header (for inner pages) --- */
.page-header {
  padding: 120px 0 50px;
  background: linear-gradient(160deg, #F8F7FF 0%, #EDE9FF 100%);
  text-align: center;
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.page-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* --- Cards (content cards for inner pages) --- */
.content-card {
  background: white;
  border-radius: var(--radius);
  padding: 36px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}

.content-card h2 {
  color: var(--primary);
  font-size: 1.35rem;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(108, 99, 255, 0.1);
}

.content-card h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  margin: 20px 0 8px;
}

.content-card p,
.content-card li {
  margin-bottom: 12px;
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.content-card ul {
  padding-left: 24px;
  list-style: disc;
}

.content-card .highlight {
  background: rgba(108, 99, 255, 0.06);
  border-left: 4px solid var(--primary);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 16px 0;
}

.content-card .highlight strong {
  color: var(--primary);
}

/* --- Contact Form --- */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  color: var(--text-primary);
  background: var(--bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.1);
  background: white;
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-message {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  margin-top: 16px;
  font-weight: 600;
  display: none;
}

.form-message.success {
  display: block;
  background: rgba(76, 175, 147, 0.1);
  color: var(--accent);
  border: 1px solid rgba(76, 175, 147, 0.3);
}

.form-message.error {
  display: block;
  background: rgba(255, 82, 82, 0.1);
  color: #D32F2F;
  border: 1px solid rgba(255, 82, 82, 0.3);
}

/* --- FAQ Accordion --- */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  background: white;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 20px 24px;
  background: none;
  border: none;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: color var(--transition);
}

.faq-question:hover {
  color: var(--primary);
}

.faq-question i {
  font-size: 0.8rem;
  transition: transform var(--transition);
  color: var(--primary);
}

.faq-item.open .faq-question i {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-answer-inner {
  padding: 0 24px 20px;
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

.faq-item.open .faq-answer {
  max-height: 300px;
}

/* --- Footer --- */
.footer {
  background: var(--text-primary);
  color: rgba(255, 255, 255, 0.75);
  padding: 64px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand .nav-logo {
  color: white;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  transition: all var(--transition);
}

.footer-social a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.footer h4 {
  color: white;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer ul li {
  margin-bottom: 10px;
}

.footer ul a {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.95rem;
  transition: color var(--transition);
}

.footer ul a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px 0;
  text-align: center;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

@media (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
}

/* --- About Page --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.about-card {
  background: white;
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition);
}

.about-card:hover {
  transform: translateY(-4px);
}

.about-card .feature-icon {
  margin: 0 0 16px;
}

.about-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.about-card p {
  color: var(--text-secondary);
  line-height: 1.7;
}

@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; }
}

/* --- Contact Info Cards --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.contact-info-card {
  background: white;
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-card);
}

@media (max-width: 768px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }
.fade-in-delay-4 { transition-delay: 0.4s; }

/* --- Responsive Hero --- */
@media (max-width: 992px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .hero-content h1 { font-size: 2.4rem; }
  .hero-buttons { justify-content: center; }
  .hero-phones { justify-content: center; }
  .phone-mockup { width: 180px; }
  .phone-mockup-sm { width: 150px; }
  .mockup-img { width: 200px; }
  .mockup-img.phone-mockup-sm { width: 170px; }
  .gallery-item .mockup-img { width: 200px; }
}

@media (max-width: 576px) {
  .hero { padding: 120px 0 60px; }
  .hero-content h1 { font-size: 1.9rem; }
  .hero-content p { font-size: 1rem; }
  .hero-buttons { flex-direction: column; align-items: center; }
  .hero-phones { gap: 12px; }
  .phone-mockup { width: 140px; border-radius: 24px; padding: 8px; }
  .phone-mockup::before { width: 60px; height: 16px; top: 8px; }
  .phone-mockup img { border-radius: 17px; }
  .phone-mockup-sm { width: 120px; }
  .mockup-img { width: 160px; }
  .mockup-img.phone-mockup-sm { width: 130px; }
  .gallery-item .mockup-img { width: 180px; }

  .section { padding: 56px 0; }
  .section-header h2 { font-size: 1.7rem; }
  .page-header h1 { font-size: 1.8rem; }
  .cta-section h2 { font-size: 1.7rem; }

  .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .stat-item h3 { font-size: 1.8rem; }
}

/* --- Utility --- */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
