/*
Theme Name: Djinny
Theme URI: https://djinny.vn
Author: Djinny Team
Author URI: https://djinny.vn
Description: Modern landing page for Djinny — Vietnam's on-demand home services app.
Version: 1.0.8
Requires at least: 5.8
Tested up to: 6.5
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: djinny
Tags: full-width-template, custom-colors, responsive-layout, one-column
*/

/* ============================================================
   VARIABLES & RESET
   ============================================================ */
:root {
  --primary:       #1E40AF;
  --primary-light: #3B82F6;
  --accent:        #F59E0B;
  --dark:          #1E3A8A;
  --bg:            #F8FAFC;
  --white:         #ffffff;
  --text:          #1F2937;
  --text-muted:    #6B7280;
  --border:        #E5E7EB;
  --radius:        14px;
  --shadow-sm:     0 2px 8px rgba(0,0,0,.06);
  --shadow-md:     0 4px 24px rgba(30,64,175,.10);
  --shadow-lg:     0 12px 40px rgba(30,64,175,.16);
  --transition:    .2s ease;
}

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

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

body {
  font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

/* ============================================================
   LANGUAGE SWITCHING
   ============================================================ */
html.lang-en .vi-text { display: none !important; }
html.lang-vi .en-text { display: none !important; }

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 200;
  background: rgba(30, 64, 175, .92);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -.02em;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

/* Language toggle */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0;
}
.lang-sep {
  color: rgba(255,255,255,.25);
  font-size: 12px;
  padding: 0 3px;
  user-select: none;
}
.lang-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,.5);
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: .08em;
  cursor: pointer;
  padding: 5px 9px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
  line-height: 1;
}
.lang-btn:hover  { color: white; background: rgba(255,255,255,.1); }
.lang-btn.active { color: white; background: rgba(255,255,255,.16); }

.nav-cta {
  background: white;
  color: var(--primary);
  padding: 8px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}
.nav-cta:hover { background: var(--accent); color: white; }

/* ============================================================
   STORE BUTTONS  (shared across sections)
   ============================================================ */
.btn-store {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #000;
  color: white;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18);
  min-width: 162px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  cursor: pointer;
}
.btn-store:hover {
  background: #1a1a1a;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(0,0,0,.35);
}
.btn-store svg { flex-shrink: 0; }
.btn-store-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.btn-store-sublabel {
  font-size: 10px;
  line-height: 1;
  opacity: .72;
  margin-bottom: 3px;
}
.btn-store-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.01em;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  background: linear-gradient(140deg, #1E40AF 0%, #3B82F6 100%);
  display: flex;
  align-items: center;
  padding: 104px 32px 80px;
  position: relative;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.hero::before {
  width: 800px; height: 800px;
  top: -30%; right: -15%;
  background: radial-gradient(circle, rgba(255,255,255,.07) 0%, transparent 65%);
}
.hero::after {
  width: 400px; height: 400px;
  bottom: -20%; left: -10%;
  background: radial-gradient(circle, rgba(245,158,11,.12) 0%, transparent 65%);
}

.hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content { color: white; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.92);
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(36px, 5.5vw, 60px);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -.03em;
  margin-bottom: 14px;
}

.hero-tagline {
  font-size: clamp(16px, 2vw, 20px);
  color: rgba(255,255,255,.72);
  margin-bottom: 44px;
  font-weight: 400;
}

.cta-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Phone mockup */
.hero-phone {
  display: flex;
  justify-content: center;
  align-items: center;
}

.phone-mockup {
  width: 260px;
  height: 520px;
  background: rgba(255,255,255,.1);
  border: 2px solid rgba(255,255,255,.22);
  border-radius: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: rgba(255,255,255,.55);
  font-size: 13px;
  font-weight: 500;
  position: relative;
  box-shadow:
    0 40px 90px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.18);
}
.phone-mockup::before {
  content: '';
  width: 72px; height: 5px;
  background: rgba(255,255,255,.28);
  border-radius: 3px;
  position: absolute;
  top: 18px;
}
.phone-screen-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: .5;
}
.phone-screen-placeholder svg { opacity: .7; }

/* ============================================================
   SECTION BASE
   ============================================================ */
.section {
  padding: 96px 32px;
}

.section-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  letter-spacing: -.025em;
  margin-bottom: 14px;
}

.section-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  margin-bottom: 64px;
  max-width: 500px;
  line-height: 1.65;
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-section { background: var(--bg); }

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

.steps-connector {
  position: absolute;
  top: 52px;
  left: calc(16.67% + 20px);
  right: calc(16.67% + 20px);
  height: 2px;
  background: linear-gradient(90deg, var(--primary-light) 0%, var(--accent) 100%);
  opacity: .25;
  pointer-events: none;
}

.step-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 40px 28px 32px;
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}
.step-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.step-number {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 28px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px var(--bg);
}

.step-icon-wrap {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--primary);
  transition: background var(--transition);
}
.step-card:hover .step-icon-wrap {
  background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
}

.service-icon-wrap,
.step-icon-wrap {
  color: var(--primary);
}

.step-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
}

.step-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ============================================================
   SERVICES
   ============================================================ */
.services-section { background: var(--white); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.service-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 32px 22px 28px;
  text-align: center;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-light);
}

.service-icon-wrap {
  width: 68px; height: 68px;
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  transition: background var(--transition);
}
.service-card:hover .service-icon-wrap {
  background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
}

.service-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0;
}

/* ============================================================
   DOWNLOAD CTA
   ============================================================ */
.cta-section {
  background: var(--dark);
  padding: 100px 32px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 50% 120%, rgba(59,130,246,.3) 0%, transparent 70%);
  pointer-events: none;
}

.cta-inner {
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.cta-section h2 {
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 800;
  color: white;
  line-height: 1.15;
  letter-spacing: -.03em;
  margin-bottom: 12px;
}
.cta-section h2 em {
  font-style: normal;
  color: var(--accent);
}

.cta-subtitle {
  font-size: 17px;
  color: rgba(255,255,255,.62);
  margin-bottom: 40px;
  line-height: 1.6;
}

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

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #0F172A;
  padding: 48px 32px;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: white;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -.01em;
}

.footer-links {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
  justify-content: center;
}
.footer-links a {
  color: rgba(255,255,255,.5);
  font-size: 14px;
  transition: color var(--transition);
}
.footer-links a:hover { color: white; }

.footer-divider {
  width: 40px;
  height: 1px;
  background: rgba(255,255,255,.1);
}

.footer-copy {
  font-size: 13px;
  color: rgba(255,255,255,.3);
}

/* ============================================================
   LEGAL PAGES  (privacy / terms)
   ============================================================ */
.page-hero {
  background: linear-gradient(140deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 120px 32px 64px;
  color: white;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.15;
}
.page-hero p {
  font-size: 16px;
  margin-top: 12px;
  opacity: .72;
}

.page-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 72px 32px 100px;
}

.page-content h2 {
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  margin: 44px 0 12px;
  letter-spacing: -.01em;
}
.page-content h2:first-child { margin-top: 0; }

.page-content p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.page-content ul {
  padding-left: 22px;
  list-style: disc;
  margin-bottom: 16px;
}
.page-content li {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 8px;
}

.page-content strong { color: var(--text); }

.last-updated {
  display: inline-block;
  background: #EFF6FF;
  color: var(--primary);
  border: 1px solid #BFDBFE;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 40px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr 340px;
    gap: 48px;
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media (max-width: 800px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 52px;
  }
  .hero .cta-buttons { justify-content: center; }
  .hero-badge { justify-content: center; }
  .hero-phone { order: -1; }
  .phone-mockup { width: 200px; height: 400px; }

  .steps-grid {
    grid-template-columns: 1fr;
    gap: 44px;
    max-width: 420px;
    margin: 0 auto;
  }
  .steps-connector { display: none; }

  .section { padding: 72px 20px; }
  .hero    { padding: 100px 20px 72px; }
  .cta-section { padding: 72px 20px; }
  .section-title { font-weight: 700; }
}

@media (max-width: 560px) {
  .services-grid     { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .service-card      { padding: 20px 12px 18px; }
  .service-icon-wrap { width: 52px; height: 52px; border-radius: 14px; margin-bottom: 14px; }
  .nav-inner         { padding: 0 20px; }
  .nav-cta           { display: none; }
  .nav-right         { gap: 8px; }
  .footer-links      { gap: 16px; flex-direction: column; }
  /* Tighter section spacing */
  .section           { padding: 56px 18px; }
  .cta-section       { padding: 56px 18px; }
  .section-subtitle  { margin-bottom: 40px; font-size: 15px; }
  /* Buttons: centered column, less padding, larger icons */
  .cta-buttons, .cta-buttons-row {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .btn-store {
    width: auto;
    min-width: 0;
    flex: none;
    padding: 12px 10px;
  }
  .btn-store svg       { width: 28px; height: 28px; }
  .btn-store-name      { font-size: 15px; }
  .btn-store-sublabel  { font-size: 10px; }
}
