/* ============================================================
   StudioGrowHub — Global Stylesheet
   ============================================================ */

/* ---------- CSS Variables ---------------------------------- */
:root {
  --primary: #5B73FF;
  --primary-dark: #3D56E8;
  --primary-light: #EEF1FF;
  --warm: #FF7A59;
  --warm-light: #FFF0EC;
  --hop-color: #FF6B6B;
  --hop-light: #FFF1F1;
  --ek-color: #34C4A0;
  --ek-light: #EDFBF7;
  --hh-color: #FF6BA8;
  --hh-light: #FFF0F7;
  --mooni-color: #4F6CF0;
  --mooni-light: #EDF0FF;

  --bg: #FFFFFF;
  --surface: #F7F8FC;
  --surface-2: #EEEEF5;
  --border: #E4E5EF;

  --text-1: #1A1A2E;
  --text-2: #4A4A6A;
  --text-3: #8A8AAA;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-sm: 0 1px 4px rgba(26,26,46,0.06);
  --shadow-md: 0 4px 20px rgba(26,26,46,0.08);
  --shadow-lg: 0 12px 40px rgba(26,26,46,0.12);
  --shadow-xl: 0 24px 64px rgba(26,26,46,0.14);

  --transition: 0.2s ease;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: var(--font);
  color: var(--text-1);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font); }

/* ---------- Typography ------------------------------------- */
h1, h2, h3, h4, h5, h6 { line-height: 1.2; font-weight: 700; }

.display-1 { font-size: clamp(2.4rem, 6vw, 4.5rem); letter-spacing: -0.03em; }
.display-2 { font-size: clamp(1.8rem, 4vw, 3rem);   letter-spacing: -0.02em; }
.headline   { font-size: clamp(1.4rem, 3vw, 2rem);   letter-spacing: -0.015em; }
.subheadline{ font-size: clamp(1rem, 2vw, 1.25rem);  letter-spacing: -0.01em; }
.body-lg    { font-size: 1.125rem; }
.body       { font-size: 1rem; }
.caption    { font-size: 0.875rem; }
.small      { font-size: 0.75rem; }

/* ---------- Layout ---------------------------------------- */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 80px 0; }
.section-sm { padding: 56px 0; }
.section-lg { padding: 120px 0; }

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

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .section-lg { padding: 80px 0; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Header ---------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(228,229,239,0.6);
  transition: var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  color: var(--text-1);
}

.logo-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary) 0%, #9B6BFF 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-icon svg { width: 18px; height: 18px; }

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

.nav a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
  transition: color var(--transition);
}

.nav a:hover, .nav a.active { color: var(--primary); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switcher {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.lang-btn {
  background: none;
  border: none;
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-3);
  transition: var(--transition);
}

.lang-btn.active {
  background: var(--primary);
  color: white;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  color: var(--text-1);
}

.mobile-nav {
  display: none;
  flex-direction: column;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--border);
  gap: 4px;
}

.mobile-nav a {
  padding: 12px 0;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-2);
  border-bottom: 1px solid var(--surface-2);
}

.mobile-nav a:last-child { border-bottom: none; }

@media (max-width: 768px) {
  .nav { display: none; }
  .mobile-menu-btn { display: block; }
  .mobile-nav.open { display: flex; }
}

/* ---------- Buttons ---------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  transition: all var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 16px rgba(91,115,255,0.3);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(91,115,255,0.4);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-1);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-2);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}

.btn-outline:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

.btn-lg { padding: 16px 32px; font-size: 1.05rem; border-radius: 12px; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

.btn-appstore {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  background: var(--text-1);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition);
}

.btn-appstore:hover {
  background: #333355;
  transform: translateY(-1px);
}

.btn-appstore .appstore-icon { width: 20px; height: 20px; }

/* ---------- Hero Section ----------------------------------- */
.hero {
  padding: 96px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse at center, rgba(91,115,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--primary-light);
  border: 1px solid rgba(91,115,255,0.2);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 24px;
}

.hero-title { max-width: 800px; margin: 0 auto 24px; }
.hero-description {
  max-width: 560px;
  margin: 0 auto 40px;
  font-size: 1.125rem;
  color: var(--text-2);
  line-height: 1.7;
}

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

/* ---------- App Cards -------------------------------------- */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  max-width: 800px;
  margin: 0 auto;
}

.app-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

.app-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-icon {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 2rem;
  overflow: hidden;
}

.app-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
}

.app-icon-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -1px;
  color: white;
  flex-shrink: 0;
}

.app-icon-hop { background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%); }
.app-icon-ek  { background: linear-gradient(135deg, #34C4A0 0%, #1BA8A8 100%); }

.app-meta { flex: 1; min-width: 0; }
.app-meta .app-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; }
.app-meta .app-tagline { font-size: 0.85rem; color: var(--text-3); font-weight: 500; }

.app-card .app-description {
  font-size: 0.95rem;
  color: var(--text-2);
  line-height: 1.65;
}

.app-card-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  flex-wrap: wrap;
}

/* ---------- Section Headers -------------------------------- */
.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-label {
  display: inline-block;
  padding: 5px 14px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 16px;
}

.section-title { margin-bottom: 16px; }
.section-subtitle { max-width: 560px; margin: 0 auto; color: var(--text-2); font-size: 1.05rem; }

/* ---------- Feature Cards ---------------------------------- */
.feature-card {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: all 0.25s ease;
}

.feature-card:hover {
  background: var(--bg);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.feature-icon-hop   { background: var(--hop-light); }
.feature-icon-ek    { background: var(--ek-light); }
.feature-icon-hh    { background: var(--hh-light); }
.feature-icon-mooni { background: var(--mooni-light); }
.feature-icon-primary { background: var(--primary-light); }

.feature-title { font-size: 1rem; font-weight: 700; }
.feature-desc  { font-size: 0.9rem; color: var(--text-2); line-height: 1.6; }

/* ---------- App Hero (detail pages) ------------------------ */
.app-hero {
  padding: 80px 0 64px;
  text-align: center;
}

.app-hero-icon {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  margin: 0 auto 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  font-weight: 800;
  color: white;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.app-hero-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-hero-icon-hop { background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%); }
.app-hero-icon-ek  { background: linear-gradient(135deg, #34C4A0 0%, #1BA8A8 100%); }

.app-hero-title { margin-bottom: 16px; }
.app-hero-desc {
  max-width: 560px;
  margin: 0 auto 36px;
  font-size: 1.125rem;
  color: var(--text-2);
  line-height: 1.7;
}

.app-hero-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Screenshots ------------------------------------ */
.screenshots-section { background: var(--surface); }

.screenshots-placeholder {
  background: var(--surface-2);
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 64px 24px;
  text-align: center;
  color: var(--text-3);
}

.screenshots-placeholder svg { margin: 0 auto 16px; opacity: 0.4; }

/* ---------- Privacy / Legal -------------------------------- */
.legal-hero {
  background: var(--surface);
  padding: 64px 0 48px;
  text-align: center;
}

.legal-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 24px;
}

.legal-content h2 {
  font-size: 1.5rem;
  margin: 48px 0 16px;
  color: var(--text-1);
}

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

.legal-content p {
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 16px;
}

.legal-content ul {
  list-style: disc;
  padding-left: 24px;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 16px;
}

.legal-content ul li { margin-bottom: 6px; }

.legal-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.placeholder-text {
  display: inline-block;
  background: #FFF3CD;
  border: 1px dashed #FFC107;
  border-radius: 4px;
  padding: 2px 8px;
  font-family: 'SFMono-Regular', Consolas, monospace;
  font-size: 0.85em;
  color: #856404;
}

.legal-meta {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: var(--text-2);
}

/* ---------- Support Pages ---------------------------------- */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.faq-question {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 10px;
  color: var(--text-1);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-answer {
  color: var(--text-2);
  line-height: 1.7;
  font-size: 0.95rem;
}

.contact-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 40px;
  text-align: center;
}

/* ---------- Privacy / Apps List Pages ---------------------- */
.list-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 24px 28px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all var(--transition);
}

.list-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.list-card-info { flex: 1; }
.list-card-info h3 { font-size: 1.05rem; margin-bottom: 4px; }
.list-card-info p  { font-size: 0.9rem; color: var(--text-3); }

/* ---------- Footer ---------------------------------------- */
.site-footer {
  background: var(--text-1);
  color: rgba(255,255,255,0.7);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 32px;
}

.footer-brand .logo { color: white; margin-bottom: 16px; }
.footer-brand p { font-size: 0.9rem; line-height: 1.7; max-width: 280px; }

.footer-col h4 {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 10px; }

.footer-col a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}

.footer-col a:hover { color: white; }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.85rem;
}

.footer-bottom .footer-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.footer-bottom a {
  color: rgba(255,255,255,0.5);
  transition: color var(--transition);
}

.footer-bottom a:hover { color: rgba(255,255,255,0.9); }

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

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

/* ---------- Tags / Badges ---------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
}

.badge-primary { background: var(--primary-light); color: var(--primary); }
.badge-hop     { background: var(--hop-light); color: var(--hop-color); }
.badge-ek      { background: var(--ek-light); color: var(--ek-color); }
.badge-hh      { background: var(--hh-light); color: var(--hh-color); }
.badge-mooni   { background: var(--mooni-light); color: var(--mooni-color); }
.badge-warm    { background: var(--warm-light); color: var(--warm); }

/* ---------- Divider / Spacer ------------------------------- */
.divider { height: 1px; background: var(--border); margin: 40px 0; }

/* ---------- Info Grid (App detail) ------------------------- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
}

.info-grid-item {
  background: var(--bg);
  padding: 24px;
  text-align: center;
}

.info-grid-item .value { font-size: 1.5rem; font-weight: 800; margin-bottom: 4px; color: var(--primary); }
.info-grid-item .label { font-size: 0.8rem; color: var(--text-3); font-weight: 500; }

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

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.animate-fadeInUp { animation: fadeInUp 0.6s ease both; }
.animate-delay-1  { animation-delay: 0.1s; }
.animate-delay-2  { animation-delay: 0.2s; }
.animate-delay-3  { animation-delay: 0.3s; }

/* ---------- Screenshot Gallery ----------------------------- */
.screenshots-gallery {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 8px 0 24px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

.screenshots-gallery::-webkit-scrollbar { height: 4px; }
.screenshots-gallery::-webkit-scrollbar-track { background: var(--surface-2); border-radius: 2px; }
.screenshots-gallery::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

.screenshot-item {
  flex-shrink: 0;
  scroll-snap-align: start;
}

.screenshot-item img {
  height: 540px;
  width: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  display: block;
}

@media (max-width: 768px) {
  .screenshot-item img { height: 380px; }
}

/* ---------- How It Works ----------------------------------- */
.how-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.how-step {
  text-align: center;
  padding: 32px 20px;
  position: relative;
}

.how-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 48px;
  right: -4px;
  width: 8px;
  height: 2px;
  background: var(--border);
}

.how-number {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--ek-color);
  opacity: 0.25;
  line-height: 1;
  margin-bottom: 20px;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.how-step h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-1);
}

.how-step p {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.65;
}

@media (max-width: 768px) {
  .how-grid { grid-template-columns: repeat(2, 1fr); }
  .how-step:not(:last-child)::after { display: none; }
}

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

/* ---------- Premium Badge ---------------------------------- */
.feature-premium {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: #FFF8E6;
  border: 1px solid #FFCA28;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #916800;
  margin-top: 6px;
  letter-spacing: 0.04em;
}

/* ---------- App Hero Enhancements -------------------------- */
.app-hero-subtitle {
  font-size: 1rem;
  font-weight: 500;
  color: var(--ek-color);
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}

.app-hero-tagline {
  font-size: 1.05rem;
  color: var(--text-2);
  max-width: 500px;
  margin: 0 auto 12px;
  line-height: 1.65;
}

/* ---------- Responsive Utilities -------------------------- */
.hide-mobile  { display: block; }
.show-mobile  { display: none; }

@media (max-width: 768px) {
  .hide-mobile { display: none; }
  .show-mobile { display: block; }
  .text-center-mobile { text-align: center; }
  .hero { padding: 64px 0 56px; }
  .app-hero { padding: 56px 0 48px; }
  .apps-grid { grid-template-columns: 1fr; max-width: 480px; }
}
