/* ========================================
   HAPPLE GROUP — Official Website
   Full-Link Cross-Border Logistics
   ======================================== */

/* ===== CSS Variables ===== */
:root {
  --color-navy:        #0a1628;
  --color-navy-light:  #132038;
  --color-navy-lighter:#1a2d4a;
  --color-gold:        #d4a843;
  --color-gold-light:  #e8c56d;
  --color-gold-dark:   #b8922e;
  --color-white:       #ffffff;
  --color-gray-50:     #f8f9fa;
  --color-gray-100:    #f0f2f5;
  --color-gray-200:    #e2e6ea;
  --color-gray-300:    #c8cdd3;
  --color-gray-400:    #9ca3af;
  --color-gray-500:    #6b7280;
  --color-gray-600:    #4b5563;
  --color-gray-700:    #374151;
  --color-gray-800:    #1f2937;
  --color-success:     #10b981;
  --color-error:       #ef4444;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --max-width: 1200px;
  --header-height: 72px;

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.1);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.12);
  --shadow-xl: 0 16px 48px rgba(0,0,0,.16);

  --transition: 0.3s cubic-bezier(.4,0,.2,1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-gray-700);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
}

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

.btn--primary {
  background: var(--color-navy);
  color: var(--color-white);
  padding: 10px 24px;
}
.btn--primary:hover { background: var(--color-navy-lighter); }

.btn--accent {
  background: var(--color-gold);
  color: var(--color-navy);
  padding: 12px 28px;
}
.btn--accent:hover {
  background: var(--color-gold-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--lg {
  padding: 16px 36px;
  font-size: 16px;
  border-radius: var(--radius-md);
}

.btn--full { width: 100%; }

/* ===== Section Headers ===== */
.section__header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 60px;
}

.section__kicker {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-gold);
  margin-bottom: 12px;
}

.section__title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  color: var(--color-navy);
  line-height: 1.2;
  margin-bottom: 16px;
}

.section__desc {
  font-size: 17px;
  color: var(--color-gray-500);
  line-height: 1.7;
}

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

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav__logo {
  display: flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 8px;
  transition: opacity var(--transition);
}
.nav__logo:hover {
  opacity: 0.85;
}
.nav__logo-img {
  height: 44px;
  width: auto;
  display: block;
}

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

.nav__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-gray-600);
  transition: color var(--transition);
}
.nav__link:hover { color: var(--color-gold); }

.nav__cta {
  padding: 8px 20px !important;
  font-size: 13px !important;
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-navy);
  border-radius: 2px;
  transition: all var(--transition);
}

/* Mobile nav toggle active */
.nav__toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav__toggle.active span:nth-child(2) { opacity: 0; }
.nav__toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--color-navy);
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.35;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 80% 60% at 30% 20%, rgba(212, 168, 67, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 70% 80%, rgba(212, 168, 67, 0.05) 0%, transparent 60%),
    linear-gradient(180deg, rgba(10,22,40,0.6) 0%, rgba(10,22,40,0.85) 100%);
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 2;
  padding: 120px 0 80px;
  max-width: 880px;
}
.hero__content .btn--accent {
  position: relative;
  z-index: 2;
}

.hero__kicker {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--color-gold);
  margin-bottom: 20px;
}

.hero__title {
  font-size: clamp(36px, 5.5vw, 56px);
  font-weight: 800;
  color: var(--color-white);
  line-height: 1.15;
  margin-bottom: 24px;
  letter-spacing: -1px;
}
.hero__title span {
  color: var(--color-gold);
}

.hero__subtitle {
  font-size: 17px;
  color: rgba(255,255,255,.65);
  line-height: 1.8;
  max-width: 720px;
  margin-bottom: 40px;
}

.hero__segments {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.hero__segment {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-md);
  padding: 28px 32px;
  transition: all var(--transition);
}
.hero__segment:hover {
  background: rgba(255,255,255,.07);
  border-color: rgba(212, 168, 67, .25);
}

.hero__segment-icon {
  color: var(--color-gold);
  margin-bottom: 14px;
}

.hero__segment h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 8px;
}

.hero__segment p {
  font-size: 14px;
  color: rgba(255,255,255,.55);
  line-height: 1.6;
}

.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.hero__scroll span {
  display: block;
  width: 24px;
  height: 40px;
  border: 2px solid rgba(255,255,255,.25);
  border-radius: 12px;
  position: relative;
}
.hero__scroll span::after {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 8px;
  background: var(--color-gold);
  border-radius: 2px;
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 1; top: 6px; }
  50% { opacity: 0.4; top: 18px; }
}

/* ===== Why Choose Us ===== */
.why-us {
  background: var(--color-white);
}

/* Global Network Map */
.routes__map {
  max-width: 900px;
  margin: 0 auto 48px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.routes__map-img {
  width: 100%;
  height: auto;
  display: block;
}

.routes {
  margin-bottom: 64px;
}

.routes__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-navy);
  text-align: center;
  margin-bottom: 36px;
}

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

.routes__card {
  background: var(--color-gray-50);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: all var(--transition);
}
.routes__card:hover {
  border-color: var(--color-gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.routes__region {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  color: var(--color-gold);
}
.routes__region h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-navy);
}

.routes__card ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.routes__card li {
  font-size: 14px;
  color: var(--color-gray-600);
  line-height: 1.6;
}
.routes__card li strong {
  color: var(--color-navy);
  display: block;
  margin-bottom: 2px;
}

/* Advantages */
.advantages__title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-navy);
  text-align: center;
  margin-bottom: 36px;
}

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

.advantage-card {
  text-align: center;
  padding: 40px 28px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-gray-200);
  transition: all var(--transition);
}
.advantage-card:hover {
  border-color: var(--color-gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.advantage-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: rgba(212, 168, 67, 0.1);
  border-radius: 50%;
  color: var(--color-gold);
  margin-bottom: 20px;
}

.advantage-card h4 {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 10px;
}

.advantage-card p {
  font-size: 15px;
  color: var(--color-gray-500);
  line-height: 1.6;
}

.advantage-card__stat {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-gold);
}

/* ===== Services ===== */
.services {
  background: var(--color-gray-50);
}

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

.service-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-gray-200);
  transition: all var(--transition);
  overflow: hidden;
}
.service-card:hover {
  border-color: var(--color-gold);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.service-card__img {
  width: 100%;
  height: 200px;
  overflow: hidden;
}
.service-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.service-card:hover .service-card__img img {
  transform: scale(1.05);
}

.service-card__body {
  padding: 28px 32px;
}

.service-card h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 12px;
}

.service-card p {
  font-size: 14px;
  color: var(--color-gray-500);
  line-height: 1.7;
}

/* ===== Contact ===== */
.contact {
  background: var(--color-white);
}

.contact__grid {
  max-width: 480px;
  margin: 0 auto;
}

.contact__info {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.contact__info-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--color-gray-50);
  padding: 24px;
  border-radius: var(--radius-md);
  color: var(--color-gold);
}
.contact__info-card a {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-navy);
  transition: color var(--transition);
}
.contact__info-card a:hover { color: var(--color-gold); }

.contact__info-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-gray-400);
  margin-bottom: 2px;
}

.contact__note {
  font-size: 14px;
  color: var(--color-gray-500);
  line-height: 1.7;
}

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

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

.footer__logo {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}
.footer__logo-img {
  height: 40px;
  width: auto;
  border-radius: 4px;
}

.footer__brand p {
  font-size: 14px;
  line-height: 1.7;
  max-width: 320px;
}

.footer__links h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.footer__links a {
  font-size: 14px;
  color: rgba(255,255,255,.55);
  transition: color var(--transition);
}
.footer__links a:hover { color: var(--color-gold); }

.footer__bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,.35);
}

/* ===== Scroll Reveal Animations ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */

/* Tablet */
@media (max-width: 1024px) {
  .routes__grid { grid-template-columns: 1fr; }
  .advantages__grid { grid-template-columns: repeat(2, 1fr); }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

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

  .section { padding: 64px 0; }

  .nav__toggle { display: flex; }

  .nav__menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    padding: 32px 24px;
    gap: 20px;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: all var(--transition);
    box-shadow: 0 4px 16px rgba(0,0,0,.1);
  }
  .nav__menu.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
  .nav__cta { width: 100%; text-align: center; }

  .hero__segments { grid-template-columns: 1fr; }
  .hero__title { font-size: 32px; }

  .advantages__grid { grid-template-columns: 1fr; }
  .services__grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; gap: 32px; }

  .contact__grid { gap: 32px; }
}

/* Small mobile */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .hero__content { padding: 100px 0 60px; }
  .hero__segment { padding: 20px 24px; }
  .routes__card { padding: 24px; }
  .service-card { padding: 0; }
  .service-card__body { padding: 24px 20px; }
  .service-card__img { height: 180px; }
  .routes__map { margin-bottom: 32px; }
}