/* ============================================
   DIGITALCONSULT.HK - SHARED STYLESHEET
   ============================================ */

:root {
  --dark-navy: #1e293b;
  --dark-navy-lighter: #334155;
  --white: #ffffff;
  --blue-accent: #2563eb;
  --blue-accent-dark: #1d4ed8;
  --light-gray: #f1f5f9;
  --dark-bg: #0f172a;
  --text-dark: #1e293b;
  --text-light: #64748b;
  --border-color: #e2e8f0;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--white);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

a {
  color: var(--blue-accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--blue-accent-dark);
}

/* ============================================
   LAYOUT & SPACING
   ============================================ */

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

.section {
  padding: 6rem 0;
}

.section.light-bg {
  background-color: var(--light-gray);
}

.section.dark-bg {
  background-color: var(--dark-navy);
  color: var(--white);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

header {
  position: sticky;
  top: 0;
  background-color: var(--white);
  border-bottom: 1px solid var(--border-color);
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.logo .logo-dark {
  color: var(--text-dark);
  margin-right: 0.25rem;
}

.logo .logo-blue {
  color: var(--blue-accent);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  color: var(--text-dark);
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--blue-accent);
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 0.5rem;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background-color: var(--text-dark);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* ============================================
   HERO SECTIONS
   ============================================ */

.hero {
  background-color: var(--dark-navy);
  color: var(--white);
  padding: 8rem 2rem;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2.5rem;
  line-height: 1.8;
  color: #cbd5e1;
}

.button-group {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
}

.btn-primary {
  background-color: var(--blue-accent);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--blue-accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

.btn-secondary:hover {
  background-color: var(--white);
  color: var(--dark-navy);
  transform: translateY(-2px);
}

.btn-dark {
  background-color: var(--dark-navy);
  color: var(--white);
}

.btn-dark:hover {
  background-color: var(--dark-navy-lighter);
  transform: translateY(-2px);
}

/* ============================================
   CARDS
   ============================================ */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin: 3rem 0;
}

.card {
  background-color: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 2rem;
  transition: all 0.3s ease;
}

.card:hover {
  border-color: var(--blue-accent);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.15);
  transform: translateY(-4px);
}

.card-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.card h3 {
  color: var(--text-dark);
  margin-bottom: 1rem;
}

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

a.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  cursor: pointer;
}

.light-bg .card {
  background-color: var(--white);
}

/* ============================================
   STATS SECTION
   ============================================ */

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
  text-align: center;
  margin: 3rem 0;
}

.stat-item h3 {
  font-size: 2.5rem;
  color: var(--blue-accent);
  margin-bottom: 0.5rem;
}

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

/* ============================================
   TEXT SECTIONS
   ============================================ */

.text-section {
  max-width: 800px;
  margin: 2rem 0;
}

.text-section p {
  color: var(--text-light);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.dark-bg .text-section p {
  color: #cbd5e1;
}

/* ============================================
   LISTS
   ============================================ */

.feature-list {
  list-style: none;
  margin: 2rem 0;
}

.feature-list li {
  padding: 1rem 0;
  padding-left: 2rem;
  position: relative;
  color: var(--text-light);
  font-size: 1.05rem;
  line-height: 1.8;
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--blue-accent);
  font-weight: bold;
  font-size: 1.25rem;
}

.dark-bg .feature-list li {
  color: #cbd5e1;
}

.numbered-list {
  list-style: none;
  margin: 2rem 0;
}

.numbered-list li {
  padding: 1.5rem 0;
  padding-left: 3rem;
  position: relative;
  color: var(--text-light);
  font-size: 1.05rem;
  line-height: 1.8;
}

.numbered-list li::before {
  content: attr(data-number);
  position: absolute;
  left: 0;
  width: 2rem;
  height: 2rem;
  background-color: var(--blue-accent);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.9rem;
}

.dark-bg .numbered-list li {
  color: #cbd5e1;
}

.dark-bg .numbered-list li::before {
  background-color: var(--blue-accent);
}

/* ============================================
   TWO COLUMN LAYOUT
   ============================================ */

.two-column {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.two-column-content {
  padding: 1rem 0;
}

.two-column-content h3 {
  margin-bottom: 1.5rem;
}

.two-column-content p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

/* ============================================
   CONTACT FORM
   ============================================ */

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--blue-accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.captcha-group {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
}

.captcha-group input {
  width: 100px;
}

.captcha-question {
  font-weight: 600;
  color: var(--text-dark);
}

.error {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.error-message {
  padding: 1rem;
  background-color: #fee2e2;
  color: #991b1b;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.success-message {
  padding: 1rem;
  background-color: #dcfce7;
  color: #166534;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background-color: var(--dark-bg);
  color: var(--white);
  padding: 4rem 2rem 2rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-column h4 {
  margin-bottom: 1.5rem;
  color: var(--white);
}

.footer-column p {
  color: #cbd5e1;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 0.75rem;
}

.footer-column ul li a {
  color: #cbd5e1;
  transition: color 0.3s ease;
}

.footer-column ul li a:hover {
  color: var(--blue-accent);
}

.footer-bottom {
  border-top: 1px solid #1e293b;
  padding-top: 2rem;
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
}

.logo-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.logo-footer .logo-dark {
  color: var(--white);
}

.logo-footer .logo-blue {
  color: var(--blue-accent);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .section {
    padding: 4rem 0;
  }

  .hero {
    padding: 4rem 2rem;
  }

  .header-content {
    padding: 1rem;
  }

  nav ul {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  }

  .mobile-menu ul {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    list-style: none;
  }

  .mobile-menu a {
    color: var(--text-dark);
    font-weight: 500;
    display: block;
  }

  .button-group {
    flex-direction: column;
    align-items: center;
  }

  .button-group .btn {
    width: 100%;
    max-width: 300px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }

  .two-column {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .captcha-group {
    flex-direction: column;
    align-items: stretch;
  }

  .captcha-group input {
    width: 100%;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.35rem;
  }

  .section {
    padding: 3rem 0;
  }

  .hero {
    padding: 3rem 1rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .container {
    padding: 0 1rem;
  }

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

  .stat-item h3 {
    font-size: 2rem;
  }

  nav ul {
    gap: 1rem;
  }
}

/* ============================================
   SCROLL ANIMATIONS
   ============================================ */

.animate-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Stagger delays for cards in a grid */
.cards-grid .animate-up:nth-child(1) { transition-delay: 0s; }
.cards-grid .animate-up:nth-child(2) { transition-delay: 0.1s; }
.cards-grid .animate-up:nth-child(3) { transition-delay: 0.2s; }
.cards-grid .animate-up:nth-child(4) { transition-delay: 0.3s; }
.cards-grid .animate-up:nth-child(5) { transition-delay: 0.4s; }
.cards-grid .animate-up:nth-child(6) { transition-delay: 0.5s; }

/* Stagger for stats */
.stats .animate-up:nth-child(1) { transition-delay: 0s; }
.stats .animate-up:nth-child(2) { transition-delay: 0.12s; }
.stats .animate-up:nth-child(3) { transition-delay: 0.24s; }
.stats .animate-up:nth-child(4) { transition-delay: 0.36s; }

/* Stagger for footer columns */
.footer-content .animate-up:nth-child(1) { transition-delay: 0s; }
.footer-content .animate-up:nth-child(2) { transition-delay: 0.1s; }
.footer-content .animate-up:nth-child(3) { transition-delay: 0.2s; }

/* Hero animates immediately on load */
.hero .hero-content {
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeIn 0.8s ease-out 0.2s forwards;
}

@keyframes heroFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .animate-up {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero .hero-content {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

.slide-in {
  animation: slideInLeft 0.6s ease-out forwards;
}
