/* ========================================
   CloudDream - Airbnb Style Homepage
   Warm, human-centric, rounded, trustworthy
   ======================================== */

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

:root {
  --color-bg: #F9F6F1;
  --color-bg-alt: #F1EDE6;
  --color-surface: #FFFFFF;
  --color-primary: #E05C4F;
  --color-primary-hover: #C94E42;
  --color-primary-light: #FFF0EE;
  --color-secondary: #2D8F77;
  --color-secondary-light: #E8F5F0;
  --color-text: #2C2C2C;
  --color-text-secondary: #717171;
  --color-text-muted: #A0A0A0;
  --color-border: #E5E0D8;
  --color-border-light: #F0EBE4;
  --color-accent-warm: #C4956A;
  --color-accent-warm-light: #F5EDE4;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.1), 0 4px 8px rgba(0,0,0,0.04);
  --shadow-card: 0 2px 8px rgba(0,0,0,0.06);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --max-width: 1200px;
  --header-height: 72px;
  --transition: 0.2s ease;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* --- Container --- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all var(--transition);
  white-space: nowrap;
  text-align: center;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  padding: 12px 24px;
  font-size: 15px;
}

.btn-primary:hover {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  padding: 12px 24px;
  font-size: 15px;
  border: 1.5px solid var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-text);
  background: var(--color-surface);
}

.btn-white {
  background: #fff;
  color: var(--color-primary);
  padding: 14px 32px;
  font-size: 16px;
}

.btn-white:hover {
  background: var(--color-primary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-outline-white {
  background: transparent;
  color: #fff;
  padding: 14px 32px;
  font-size: 16px;
  border: 1.5px solid rgba(255,255,255,0.6);
}

.btn-outline-white:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
}

.btn-sm {
  padding: 8px 18px;
  font-size: 14px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 16px;
}

/* --- Section Common --- */
.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 56px;
}

.section-tag {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-light);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

.section-desc {
  font-size: 17px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

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

.header.scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 32px;
}

.logo-img {
  height: 36px;
  width: auto;
}

.nav {
  flex: 1;
}

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

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text-secondary);
  border-radius: var(--radius-full);
  transition: all var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-text);
  background: var(--color-bg-alt);
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-btn {
  position: relative;
}

.nav-dropdown-btn::after {
  content: '';
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 6px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform var(--transition);
}

.nav-dropdown-btn[aria-expanded="true"]::after {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 180px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
}

.nav-dropdown-btn[aria-expanded="true"] + .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-link {
  display: block;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--color-text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.dropdown-link:hover {
  background: var(--color-bg-alt);
  color: var(--color-text);
}

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

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.mobile-toggle-bar {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
  padding-top: calc(var(--header-height) + 48px);
  padding-bottom: 80px;
  background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-bg-alt) 100%);
}

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

.hero-title {
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--color-text);
}

.hero-subtitle {
  font-size: 18px;
  line-height: 1.7;
  color: var(--color-text-secondary);
  margin-bottom: 36px;
  max-width: 520px;
}

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

.hero-visual {
  position: relative;
}

.hero-image-wrapper {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--color-surface);
}

.hero-image {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* ========================================
   Stats Bar
   ======================================== */
.stats-bar {
  padding: 48px 0;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border-light);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-item {
  padding: 24px 16px;
}

.stat-number {
  display: block;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1.1;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.stat-label {
  display: block;
  font-size: 14px;
  color: var(--color-text-secondary);
  font-weight: 500;
}

/* ========================================
   About Section
   ======================================== */
.about {
  padding: 96px 0;
  background: var(--color-surface);
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.about-card {
  padding: 32px 24px;
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: all var(--transition);
}

.about-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.about-card-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

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

.about-card-text {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.6;
}

.about-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ========================================
   Why Choose Section
   ======================================== */
.why-choose {
  padding: 96px 0;
  background: var(--color-bg);
}

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

.feature-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-card--full {
  grid-column: 1 / -1;
}

.feature-card--full .feature-image {
  order: -1;
}

.feature-image {
  position: relative;
  min-height: 240px;
}

.feature-image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-content {
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.feature-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--color-text);
  line-height: 1.3;
}

.feature-text {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ========================================
   Standardized Section
   ======================================== */
.standardized {
  padding: 96px 0;
  background: var(--color-surface);
}

.standard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.standard-card {
  padding: 40px 32px;
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  position: relative;
  transition: all var(--transition);
}

.standard-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.standard-number {
  font-size: 48px;
  font-weight: 800;
  color: var(--color-primary);
  opacity: 0.15;
  line-height: 1;
  margin-bottom: 16px;
}

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

.standard-text {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ========================================
   Trust Section
   ======================================== */
.trust {
  padding: 96px 0;
  background: var(--color-bg-alt);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.trust-card {
  display: flex;
  gap: 28px;
  padding: 36px;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: all var(--transition);
}

.trust-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.trust-logo {
  flex-shrink: 0;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-bg);
  border-radius: var(--radius-md);
  padding: 16px;
}

.trust-logo-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

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

.trust-text {
  font-size: 15px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* ========================================
   Team Section
   ======================================== */
.team {
  padding: 96px 0;
  background: var(--color-surface);
}

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

.team-card {
  text-align: center;
  padding: 28px 16px;
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.team-card:hover {
  background: var(--color-bg);
}

.team-avatar {
  width: 100px;
  height: 100px;
  margin: 0 auto 16px;
  border-radius: var(--radius-full);
  overflow: hidden;
  background: var(--color-bg-alt);
  box-shadow: var(--shadow-sm);
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-name {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--color-text);
}

.team-role {
  font-size: 14px;
  color: var(--color-text-secondary);
}

/* ========================================
   CTA Section
   ======================================== */
.cta {
  padding: 96px 0;
  background: linear-gradient(135deg, var(--color-primary) 0%, #C44D40 100%);
}

.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
}

.cta-content {
  flex: 1;
}

.cta-title {
  font-size: clamp(26px, 3.5vw, 36px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
  line-height: 1.25;
}

.cta-text {
  font-size: 17px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 32px;
  line-height: 1.6;
}

.cta-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.cta-qr {
  text-align: center;
  flex-shrink: 0;
}

.cta-qr-img {
  width: 140px;
  height: 140px;
  border-radius: var(--radius-md);
  background: #fff;
  padding: 8px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-lg);
}

.cta-qr-text {
  font-size: 14px;
  color: rgba(255,255,255,0.8);
}

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

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

.footer-logo {
  height: 32px;
  margin-bottom: 16px;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer-brand-text {
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
}

.footer-brand-desc {
  font-size: 14px;
  line-height: 1.6;
  max-width: 280px;
}

.footer-nav-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-nav-list a {
  font-size: 14px;
  color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}

.footer-nav-list a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-copyright,
.footer-icp {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}

/* ========================================
   Mobile Responsive
   ======================================== */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-visual {
    order: -1;
  }

  .about-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature-card {
    grid-template-columns: 1fr;
  }

  .feature-image {
    min-height: 200px;
  }

  .team-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }

  .container {
    padding: 0 20px;
  }

  /* Mobile Nav */
  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-surface);
    padding: 24px 20px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
  }

  .nav.open {
    transform: translateX(0);
  }

  .nav-list {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .nav-link {
    padding: 14px 16px;
    font-size: 16px;
    border-radius: var(--radius-md);
  }

  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    padding: 0 0 0 16px;
    display: none;
  }

  .nav-dropdown-btn[aria-expanded="true"] + .dropdown-menu {
    display: block;
  }

  .header-actions {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }

  /* Stats */
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .stat-number {
    font-size: 28px;
  }

  .stat-label {
    font-size: 13px;
  }

  /* Hero */
  .hero {
    padding-top: calc(var(--header-height) + 32px);
    padding-bottom: 56px;
  }

  .hero-title {
    font-size: 28px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-actions {
    flex-direction: column;
  }

  .hero-actions .btn {
    width: 100%;
  }

  /* Sections */
  .about,
  .why-choose,
  .standardized,
  .trust,
  .team,
  .cta {
    padding: 64px 0;
  }

  .section-header {
    margin-bottom: 40px;
  }

  .section-title {
    font-size: 26px;
  }

  .section-desc {
    font-size: 15px;
  }

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

  .about-card {
    padding: 24px 20px;
  }

  .about-actions {
    flex-direction: column;
  }

  .about-actions .btn {
    width: 100%;
  }

  /* Features */
  .feature-content {
    padding: 24px 20px;
  }

  .feature-title {
    font-size: 18px;
  }

  /* Standard */
  .standard-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .standard-card {
    padding: 28px 24px;
  }

  /* Trust */
  .trust-grid {
    grid-template-columns: 1fr;
  }

  .trust-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 24px;
  }

  .trust-logo {
    width: 80px;
    height: 80px;
  }

  /* Team */
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .team-avatar {
    width: 80px;
    height: 80px;
  }

  /* CTA */
  .cta-inner {
    flex-direction: column;
    text-align: center;
  }

  .cta-actions {
    justify-content: center;
  }

  .cta-actions .btn {
    width: 100%;
  }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 24px;
  }

  .section-title {
    font-size: 22px;
  }

  .team-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cta-qr-img {
    width: 120px;
    height: 120px;
  }
}

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

.animate-on-scroll {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
