/* ===== CSS Variables ===== */
:root {
  --color-primary: #1a365d;
  --color-primary-light: #2c5282;
  --color-accent: #c9a227;
  --color-accent-light: #d4b84a;
  --color-bg: #ffffff;
  --color-bg-light: #f7f8fa;
  --color-bg-dark: #0f2440;
  --color-text: #2d3748;
  --color-text-light: #718096;
  --color-text-inverse: #ffffff;
  --color-border: #e2e8f0;

  --font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  --max-width: 1200px;
  --header-height: 72px;
  --section-padding: 100px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 4px 20px rgba(26, 54, 93, 0.08);
  --shadow-lg: 0 8px 40px rgba(26, 54, 93, 0.12);
  --transition: 0.3s ease;
}

/* ===== 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-family);
  font-size: 16px;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

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

ul {
  list-style: none;
}

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

button,
input,
textarea {
  font-family: inherit;
  font-size: inherit;
}

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

.section {
  padding: var(--section-padding) 0;
}

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

.section--dark {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-bg-dark) 100%);
  color: var(--color-text-inverse);
}

.section__header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 60px;
}

.section__tag {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section__tag--light {
  color: var(--color-accent-light);
}

.section__title {
  font-size: 36px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 16px;
  line-height: 1.3;
}

.section__title--light {
  color: var(--color-text-inverse);
}

.section__desc {
  font-size: 17px;
  color: var(--color-text-light);
}

.section__desc--light {
  color: rgba(255, 255, 255, 0.75);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}

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

.btn--primary:hover {
  background: var(--color-accent-light);
  border-color: var(--color-accent-light);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(201, 162, 39, 0.4);
}

.btn--outline {
  background: transparent;
  color: var(--color-text-inverse);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn--outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--color-text-inverse);
}

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

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  transition: background var(--transition), box-shadow var(--transition);
}

.header--scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--color-text-inverse);
  transition: color var(--transition);
}

.header--scrolled .logo {
  color: var(--color-primary);
}

.logo__icon {
  width: 36px;
  height: 36px;
  color: var(--color-accent);
}

.logo__icon svg {
  width: 100%;
  height: 100%;
}

.nav__list {
  display: flex;
  gap: 8px;
}

.nav__link {
  display: block;
  padding: 8px 16px;
  font-size: 15px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  border-radius: var(--radius);
  transition: all var(--transition);
}

.header--scrolled .nav__link {
  color: var(--color-text);
}

.nav__link:hover,
.nav__link.active {
  color: var(--color-accent);
}

.header--scrolled .nav__link:hover,
.header--scrolled .nav__link.active {
  color: var(--color-accent);
  background: rgba(201, 162, 39, 0.08);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text-inverse);
  border-radius: 2px;
  transition: all var(--transition);
}

.header--scrolled .menu-toggle span {
  background: var(--color-primary);
}

.menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

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

.menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

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

.hero__bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(15, 36, 64, 0.88) 0%, rgba(26, 54, 93, 0.82) 50%, rgba(44, 82, 130, 0.78) 100%),
    url("../images/hero-bg.jpg") center / cover no-repeat;
  z-index: -1;
}

.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(201, 162, 39, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 40%);
}

.hero__content {
  padding: calc(var(--header-height) + 40px) 24px 80px;
}

.hero__tag {
  display: inline-block;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--color-accent);
  margin-bottom: 24px;
  padding: 6px 16px;
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: 20px;
}

.hero__title {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.hero__subtitle {
  font-size: clamp(16px, 2.5vw, 20px);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

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

.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
}

.hero__scroll a {
  display: flex;
  color: rgba(255, 255, 255, 0.5);
  transition: color var(--transition);
}

.hero__scroll a:hover {
  color: var(--color-accent);
}

.hero__scroll svg {
  width: 24px;
  height: 24px;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
  40% { transform: translateX(-50%) translateY(-8px); }
  60% { transform: translateX(-50%) translateY(-4px); }
}

/* ===== About ===== */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about__content p {
  margin-bottom: 16px;
  color: var(--color-text-light);
}

.about__stats {
  display: flex;
  gap: 40px;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--color-border);
}

.about__stats li {
  text-align: center;
}

.about__stats strong {
  display: block;
  font-size: 36px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.2;
}

.about__stats span {
  font-size: 14px;
  color: var(--color-text-light);
}

.about__image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about__image img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

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

.service-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  transition: all var(--transition);
}

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

.service-card__icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 54, 93, 0.06);
  border-radius: var(--radius);
  color: var(--color-primary);
  margin-bottom: 20px;
}

.service-card__icon svg {
  width: 32px;
  height: 32px;
}

.service-card__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 12px;
}

.service-card__desc {
  font-size: 15px;
  color: var(--color-text-light);
  line-height: 1.7;
}

/* ===== Advantages ===== */
.advantages__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.advantage-card {
  padding: 32px 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  transition: all var(--transition);
}

.advantage-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(201, 162, 39, 0.3);
}

.advantage-card__number {
  font-size: 40px;
  font-weight: 700;
  color: var(--color-accent);
  opacity: 0.6;
  line-height: 1;
  margin-bottom: 16px;
}

.advantage-card__title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}

.advantage-card__desc {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.7;
}

/* ===== Cases ===== */
.cases__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.case-card {
  background: var(--color-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

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

.case-card__image {
  position: relative;
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: flex-end;
  padding: 16px;
  overflow: hidden;
}

.case-card__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.case-card:hover .case-card__image img {
  transform: scale(1.05);
}

.case-card__image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, transparent 55%);
  z-index: 1;
}

.case-card__type {
  position: relative;
  z-index: 2;
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-inverse);
  background: rgba(0, 0, 0, 0.35);
  padding: 4px 12px;
  border-radius: 20px;
  backdrop-filter: blur(4px);
}

.case-card__body {
  padding: 24px;
}

.case-card__title {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.case-card__desc {
  font-size: 14px;
  color: var(--color-text-light);
  line-height: 1.7;
}

/* ===== Contact ===== */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.contact__item {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}

.contact__item-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(26, 54, 93, 0.06);
  border-radius: var(--radius);
  color: var(--color-primary);
}

.contact__item-icon svg {
  width: 22px;
  height: 22px;
}

.contact__item h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 4px;
}

.contact__item p {
  font-size: 15px;
  color: var(--color-text-light);
}

.contact__form {
  background: var(--color-bg-light);
  border-radius: var(--radius-lg);
  padding: 36px;
  border: 1px solid var(--color-border);
}

.form__group {
  margin-bottom: 20px;
}

.form__group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.form__group input,
.form__group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color var(--transition);
  resize: vertical;
}

.form__group input:focus,
.form__group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.15);
}

.form__group input::placeholder,
.form__group textarea::placeholder {
  color: #a0aec0;
}

/* ===== Footer ===== */
.footer {
  background: var(--color-bg-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 60px 0 0;
}

.footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__brand .logo__text {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-text-inverse);
  display: block;
  margin-bottom: 8px;
}

.footer__brand p {
  font-size: 14px;
}

.footer__links h4,
.footer__contact h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-inverse);
  margin-bottom: 16px;
}

.footer__links ul li {
  margin-bottom: 8px;
}

.footer__links a {
  font-size: 14px;
  transition: color var(--transition);
}

.footer__links a:hover {
  color: var(--color-accent);
}

.footer__contact p {
  font-size: 14px;
  margin-bottom: 6px;
}

.footer__bottom {
  padding: 24px 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
}

.footer__bottom p + p {
  margin-top: 4px;
}

.footer__bottom a {
  color: rgba(255, 255, 255, 0.4);
  transition: color var(--transition);
}

.footer__bottom a:hover {
  color: rgba(255, 255, 255, 0.7);
}

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

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  :root {
    --section-padding: 80px;
  }

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

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

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

  .cases__grid .case-card:last-child {
    grid-column: 1 / -1;
    max-width: 50%;
    margin: 0 auto;
  }

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

  .footer__brand {
    grid-column: 1 / -1;
  }
}

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

  .section__title {
    font-size: 28px;
  }

  .menu-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    padding: 16px 24px;
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
  }

  .nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .nav__list {
    flex-direction: column;
    gap: 4px;
  }

  .nav__link {
    color: var(--color-text);
    padding: 12px 16px;
  }

  .about__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about__stats {
    gap: 24px;
    justify-content: center;
  }

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

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

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

  .cases__grid .case-card:last-child {
    max-width: 100%;
  }

  .contact__grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer__top {
    grid-template-columns: 1fr;
    gap: 32px;
  }

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

  .btn {
    width: 100%;
    max-width: 280px;
  }
}
