/* ============================================
   AppCraft Studios — Main Stylesheet
   ============================================ */

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

:root {
  --purple: #6C63FF;
  --teal:   #3ECFCF;
  --orange: #FF8C42;
  --pink:   #FF6B9D;
  --green:  #38ef7d;
  --blue:   #4A90E2;
  --dark:   #12111A;
  --body:   #3D3B52;
  --light-bg: #f8f9ff;
  --white:  #ffffff;
  --border: #e8e8f0;
  --gradient: linear-gradient(135deg, var(--purple), var(--teal));
  --shadow-sm: 0 2px 12px rgba(108,99,255,0.10);
  --shadow-md: 0 8px 32px rgba(108,99,255,0.15);
  --shadow-lg: 0 20px 60px rgba(108,99,255,0.20);
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

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

.section-pad { padding: 96px 0; }
.bg-light { background: var(--light-bg); }

/* ---- Typography ---- */
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; line-height: 1.15; color: var(--dark); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); font-weight: 700; line-height: 1.2; color: var(--dark); }
h3 { font-size: 1.2rem; font-weight: 600; color: var(--dark); margin-bottom: 8px; }
h4 { font-size: 0.9rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dark); margin-bottom: 16px; }
p  { color: var(--body); line-height: 1.7; }

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

.section-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--purple);
  background: rgba(108,99,255,0.1);
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 14px;
}

.section-header {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 56px;
}
.section-header p { margin-top: 12px; font-size: 1.05rem; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--gradient);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(108,99,255,0.35);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(108,99,255,0.45);
}
.btn-outline {
  background: transparent;
  color: var(--purple);
  border-color: var(--purple);
}
.btn-outline:hover {
  background: var(--purple);
  color: var(--white);
  transform: translateY(-2px);
}
.btn-full { width: 100%; justify-content: center; }

/* ---- Navbar ---- */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 16px 0;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.navbar .logo {
  color: rgba(255,255,255,0.95);
}
.navbar .nav-links a {
  color: rgba(255,255,255,0.88);
}
.navbar .nav-links a:hover {
  color: var(--white);
}
.navbar .hamburger span {
  background: var(--white);
}
.navbar.scrolled {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}
.navbar.scrolled .logo {
  color: var(--dark);
}
.navbar.scrolled .nav-links a {
  color: var(--body);
}
.navbar.scrolled .nav-links a:hover {
  color: var(--purple);
}
.navbar.scrolled .hamburger span {
  background: var(--dark);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--dark);
}
.logo strong { font-weight: 800; }
.logo-icon { width: 36px; height: 36px; flex-shrink: 0; }
.nav-links { display: flex; gap: 36px; }
.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--body);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--purple); }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  background: linear-gradient(135deg, #1a1245 0%, #2d1b69 40%, #0f4a6b 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 80px;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(108,99,255,0.3) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(62,207,207,0.2) 0%, transparent 40%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
  padding: 60px 24px;
}
.hero-text .badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal);
  background: rgba(62,207,207,0.15);
  border: 1px solid rgba(62,207,207,0.3);
  padding: 5px 16px;
  border-radius: 50px;
  margin-bottom: 20px;
}
.hero-text h1 { color: var(--white); margin-bottom: 20px; }
.hero-text p  { color: rgba(255,255,255,0.75); font-size: 1.1rem; margin-bottom: 36px; max-width: 460px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

/* Phone Mockup */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.phone-mockup { position: relative; }
.phone-frame {
  width: 220px;
  height: 440px;
  background: #1a1a2e;
  border-radius: 36px;
  border: 6px solid rgba(255,255,255,0.15);
  overflow: hidden;
  position: relative;
  box-shadow: 0 40px 80px rgba(0,0,0,0.5), inset 0 0 40px rgba(108,99,255,0.1);
}
.phone-screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #1e1b4b, #0f2027);
  display: flex;
  flex-direction: column;
}
.screen-status-bar {
  height: 28px;
  background: rgba(255,255,255,0.05);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.screen-content { flex: 1; padding: 16px; display: flex; align-items: center; justify-content: center; }
.app-icon-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 12px;
}
.app-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  animation: floatIcon 3s ease-in-out infinite;
}
.app-icon.purple  { background: linear-gradient(135deg,#6C63FF,#9B5DE5); animation-delay:0s; }
.app-icon.teal    { background: linear-gradient(135deg,#3ECFCF,#00b4d8); animation-delay:0.3s; }
.app-icon.orange  { background: linear-gradient(135deg,#FF8C42,#FF6B6B); animation-delay:0.6s; }
.app-icon.pink    { background: linear-gradient(135deg,#FF6B9D,#c86dd7); animation-delay:0.9s; }
.app-icon.green   { background: linear-gradient(135deg,#38ef7d,#11998e); animation-delay:1.2s; }
.app-icon.blue    { background: linear-gradient(135deg,#4A90E2,#667eea); animation-delay:1.5s; }
.app-icon.yellow  { background: linear-gradient(135deg,#ffd200,#f7971e); animation-delay:1.8s; }
.app-icon.red     { background: linear-gradient(135deg,#FF6B6B,#ee0979); animation-delay:2.1s; }
.app-icon.indigo  { background: linear-gradient(135deg,#764ba2,#667eea); animation-delay:2.4s; }

@keyframes floatIcon {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-5px); }
}

.phone-glow {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 60px;
  background: var(--purple);
  filter: blur(40px);
  opacity: 0.5;
  border-radius: 50%;
}
.hero-wave {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  line-height: 0;
}
.hero-wave svg { width: 100%; height: 80px; }

/* ---- Stats ---- */
.stats {
  background: var(--light-bg);
  padding: 48px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 32px 16px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.stat-number {
  font-size: 2.4rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-number .plus { font-size: 1.6rem; }
.stat-label { font-size: 0.9rem; font-weight: 500; color: var(--body); }

/* ---- About ---- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.about-visual {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
}
.about-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.about-card:hover { transform: translateX(6px); box-shadow: var(--shadow-md); }
.about-card div strong { display: block; font-weight: 600; color: var(--dark); font-size: 0.95rem; }
.about-card div span  { font-size: 0.85rem; color: var(--body); }
.card-1 { margin-left: 0; }
.card-2 { margin-left: 32px; }
.card-3 { margin-left: 16px; }

.about-text h2 { margin-bottom: 16px; }
.about-text p  { margin-bottom: 16px; font-size: 1rem; }
.about-text .btn { margin-top: 8px; }

/* ---- Services ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--white);
  padding: 36px 28px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.2s, box-shadow 0.2s;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.service-icon svg { width: 24px; height: 24px; }
.service-icon.purple { background: rgba(108,99,255,0.12); color: var(--purple); }
.service-icon.teal   { background: rgba(62,207,207,0.12); color: #2aafaf; }
.service-icon.orange { background: rgba(255,140,66,0.12); color: var(--orange); }
.service-icon.pink   { background: rgba(255,107,157,0.12); color: var(--pink); }
.service-icon.green  { background: rgba(56,239,125,0.12); color: #22b55a; }
.service-icon.blue   { background: rgba(74,144,226,0.12); color: var(--blue); }
.service-card h3 { margin-bottom: 10px; }
.service-card p  { font-size: 0.92rem; }

/* ---- Apps ---- */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.app-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform 0.25s, box-shadow 0.25s;
}
.app-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.app-card-header {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.app-card-icon {
  width: 80px;
  height: 80px;
  background: rgba(255,255,255,0.15);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}
.app-card-icon svg { width: 50px; height: 50px; }
.app-card-body { padding: 24px; }
.app-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.app-category {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--purple);
  background: rgba(108,99,255,0.1);
  padding: 3px 10px;
  border-radius: 50px;
}
.app-rating {
  font-size: 0.88rem;
  font-weight: 700;
  color: #f7971e;
}
.app-card-body h3 { font-size: 1.15rem; margin-bottom: 8px; }
.app-card-body p  { font-size: 0.88rem; margin-bottom: 14px; min-height: 56px; }
.app-downloads {
  font-size: 0.8rem;
  font-weight: 600;
  color: #888;
  margin-bottom: 14px;
}
.play-badge img { height: 44px; width: auto; }

/* ---- Technologies ---- */
.tech-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}
.tech-item {
  padding: 12px 24px;
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--dark);
  transition: all 0.2s ease;
  cursor: default;
}
.tech-item:hover {
  background: var(--gradient);
  border-color: transparent;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.tech-item:hover span { color: var(--white); }

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}
.contact-info h2 { margin-bottom: 16px; }
.contact-info p  { margin-bottom: 32px; font-size: 1.05rem; }
.contact-details { display: flex; flex-direction: column; gap: 18px; }
.contact-details li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--dark);
}
.contact-details li svg { width: 20px; height: 20px; flex-shrink:0; color: var(--purple); }

.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group { display: flex; flex-direction: column; margin-bottom: 20px; }
.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea {
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 0.92rem;
  color: var(--dark);
  background: var(--light-bg);
  transition: border-color 0.2s;
  outline: none;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--purple); background: var(--white); }
.form-notice {
  text-align: center;
  font-size: 0.88rem;
  margin-top: 12px;
  color: #22b55a;
  min-height: 20px;
}

/* ---- Footer ---- */
.footer { background: var(--dark); padding: 64px 0 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand .logo { margin-bottom: 12px; }
.footer-brand .logo span,
.footer-brand .logo strong { color: var(--white); }
.footer-brand p { color: rgba(255,255,255,0.5); font-size: 0.9rem; max-width: 240px; margin-top: 4px; }
.footer-links { display: flex; gap: 64px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 { color: rgba(255,255,255,0.9); margin-bottom: 4px; }
.footer-col a { font-size: 0.9rem; color: rgba(255,255,255,0.5); transition: color 0.2s; }
.footer-col a:hover { color: var(--teal); }
.footer-bottom {
  padding: 20px 0;
  text-align: center;
}
.footer-bottom p { font-size: 0.8rem; color: rgba(255,255,255,0.3); margin-bottom: 4px; }

/* ---- Legal Pages ---- */
.legal-page {
  background: var(--light-bg);
}
.legal-page .navbar {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}
.legal-page .navbar .logo {
  color: var(--dark);
}
.legal-page .navbar .nav-links a {
  color: var(--body);
}
.legal-page .navbar .nav-links a:hover {
  color: var(--purple);
}
.legal-page .navbar .hamburger span {
  background: var(--dark);
}
.legal-main {
  padding-top: 132px;
}
.legal-content {
  max-width: 860px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}
.legal-content h1 {
  margin-bottom: 6px;
}
.legal-updated {
  font-size: 0.9rem;
  color: #6f6d86;
  margin-bottom: 24px;
}
.legal-section {
  margin-bottom: 26px;
}
.legal-section h2 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}
.legal-section p,
.legal-section li {
  font-size: 0.96rem;
}
.legal-section ul {
  list-style: disc;
  padding-left: 20px;
}
.legal-section li + li {
  margin-top: 8px;
}
.legal-content a {
  color: var(--purple);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .hero-inner      { grid-template-columns: 1fr; text-align: center; gap: 48px; }
  .hero-visual     { order: -1; }
  .hero-text p     { margin: 0 auto 36px; }
  .hero-cta        { justify-content: center; }
  .about-grid      { grid-template-columns: 1fr; gap: 48px; }
  .about-visual    { order: 2; }
  .card-2          { margin-left: 0; }
  .card-3          { margin-left: 0; }
  .services-grid   { grid-template-columns: repeat(2,1fr); }
  .apps-grid       { grid-template-columns: repeat(2,1fr); }
  .contact-grid    { grid-template-columns: 1fr; gap: 48px; }
  .stats-grid      { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 768px) {
  .section-pad     { padding: 64px 0; }
  .nav-links {
    display: none;
    position: fixed;
    top: 70px; left: 0; right: 0;
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 16px 0;
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    width: 100%;
    text-align: center;
    padding: 14px;
    font-size: 1rem;
    color: var(--dark);
  }
  .hamburger       { display: flex; }
  .services-grid   { grid-template-columns: 1fr; }
  .apps-grid       { grid-template-columns: 1fr; }
  .form-row        { grid-template-columns: 1fr; }
  .footer-inner    { flex-direction: column; }
  .footer-links    { gap: 32px; }
  .phone-frame     { width: 180px; height: 360px; }
  .hero-inner      { padding: 40px 24px; }
  .legal-main      { padding-top: 112px; }
  .legal-content   { padding: 26px 20px; }
}

@media (max-width: 480px) {
  .stats-grid      { grid-template-columns: repeat(2,1fr); gap: 12px; }
  .stat-number     { font-size: 2rem; }
  .contact-form    { padding: 24px; }
  .footer-links    { flex-direction: column; }
}
