/* 阿童船长（深圳）控股集团有限公司 — 首页样式 */
:root {
  --color-primary: #1a5f4a;
  --color-primary-dark: #0f3d30;
  --color-accent: #c9a227;
  --color-text: #2c2c2c;
  --color-text-muted: #666;
  --color-bg: #f7f7f5;
  --color-white: #fff;
  --header-h: 80px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
  --font-sans: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --layout-max: 1500px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul {
  list-style: none;
}

/* 版心约 1500px 居中（导航/正文），大屏不铺满全屏 — 对齐 huimeigroup 导航视觉 */
.container {
  position: relative;
  margin: 0 auto;
  padding: 0 15px;
  width: 100%;
  max-width: var(--layout-max);
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-h);
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
}

.site-header.is-scrolled .nav-link {
  color: var(--color-text);
}

.site-header:not(.is-scrolled) .nav-link {
  color: var(--color-white);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

/* 彩色 LOGO 在透明顶栏上保持原色，滚动后白底同样适用 */

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}

.logo img {
  width: 180px;
  max-width: 100%;
  height: auto;
  transition: filter 0.35s var(--ease);
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: block;
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: color 0.25s, opacity 0.25s;
}

.nav-link:hover {
  opacity: 0.85;
}

.nav-item.has-sub > .nav-link::after {
  content: "";
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 6px;
  vertical-align: middle;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
}

.sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--color-white);
  box-shadow: var(--shadow);
  border-radius: 8px;
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
}

.nav-item.has-sub:hover .sub-menu,
.nav-item.has-sub.is-open .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sub-menu a {
  display: block;
  padding: 0.55rem 1.25rem;
  font-size: 0.9rem;
  color: var(--color-text);
  transition: background 0.2s, color 0.2s;
}

.sub-menu a:hover {
  background: var(--color-bg);
  color: var(--color-primary);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-search {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 8px;
  opacity: 0.9;
}

.site-header:not(.is-scrolled) .btn-search img {
  filter: brightness(0) invert(1);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  height: 2px;
  width: 24px;
  background: currentColor;
  transition: transform 0.3s var(--ease);
}

.site-header:not(.is-scrolled) .menu-toggle {
  color: var(--color-white);
}

.site-header.is-scrolled .menu-toggle {
  color: var(--color-text);
}

/* Search overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(15, 30, 25, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
}

.search-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.search-form {
  display: flex;
  width: min(560px, 90vw);
  gap: 0.5rem;
}

.search-form input {
  flex: 1;
  padding: 1rem 1.25rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
}

.search-form button {
  padding: 0 1.5rem;
  border: none;
  border-radius: 8px;
  background: var(--color-accent);
  color: var(--color-white);
  font-weight: 600;
  cursor: pointer;
}

.search-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border: none;
  background: transparent;
  color: var(--color-white);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

/* Mobile drawer */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 1050;
  pointer-events: none;
}

.mobile-drawer.is-open {
  pointer-events: auto;
}

.mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.35s;
}

.mobile-drawer.is-open .mobile-drawer-backdrop {
  opacity: 1;
}

.mobile-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(320px, 88vw);
  height: 100%;
  background: var(--color-white);
  transform: translateX(100%);
  transition: transform 0.35s var(--ease);
  overflow-y: auto;
  padding: 1.5rem;
}

.mobile-drawer.is-open .mobile-drawer-panel {
  transform: translateX(0);
}

.mobile-nav a {
  display: block;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
  font-size: 1rem;
}

.mobile-sub {
  padding-left: 1rem;
  display: none;
}

.mobile-sub.is-expanded {
  display: block;
}

.mobile-nav .toggle-sub {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
}

/* Hero */
.hero {
  position: relative;
  height: 100vh;
  min-height: 520px;
  max-height: 900px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1s var(--ease);
  pointer-events: none;
}

.hero-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(15, 45, 35, 0.75) 0%, rgba(0, 0, 0, 0.35) 100%);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
}

.hero-text {
  max-width: 640px;
  color: var(--color-white);
}

.hero-text h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 1rem;
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.8s var(--ease) 0.2s, opacity 0.8s 0.2s;
}

.hero-slide.is-active .hero-text h1 {
  transform: translateY(0);
  opacity: 1;
}

.hero-text p {
  font-size: 1.05rem;
  opacity: 0.92;
  margin-bottom: 2rem;
  transform: translateY(24px);
  opacity: 0;
  transition: transform 0.8s var(--ease) 0.35s, opacity 0.8s 0.35s;
}

.hero-slide.is-active .hero-text p {
  transform: translateY(0);
  opacity: 0.92;
}

.btn-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 2rem;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  color: var(--color-white);
  font-size: 0.95rem;
  transition: background 0.3s, border-color 0.3s;
}

.btn-more:hover {
  background: var(--color-white);
  color: var(--color-primary-dark);
  border-color: var(--color-white);
}

.hero-dots {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 2;
}

.hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--color-white);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: background 0.3s;
}

.hero-dots button.is-active {
  background: var(--color-white);
}

.hero-arrows button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
  color: var(--color-white);
  font-size: 1.25rem;
  cursor: pointer;
  transition: background 0.3s;
}

.hero-arrows button:hover {
  background: rgba(0, 0, 0, 0.45);
}

.hero-prev {
  left: 1.5rem;
}

.hero-next {
  right: 1.5rem;
}

/* Sections */
.section {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.section-title {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 2.5rem;
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* About */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.about-media {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--color-bg);
}

.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-media::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  pointer-events: none;
}

.about-copy h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 700;
  margin-bottom: 1.25rem;
  line-height: 1.45;
  color: var(--color-primary-dark);
}

.about-copy .lead {
  color: var(--color-text-muted);
  font-size: 0.98rem;
  margin-bottom: 1.5rem;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 2rem;
}

.link-arrow::after {
  content: "→";
  transition: transform 0.25s;
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(8.5rem, 1fr));
  gap: 1rem;
}

.stat-item {
  text-align: center;
  padding: 1rem 0.5rem;
  background: var(--color-bg);
  border-radius: 12px;
}

.stat-item em {
  display: block;
  font-style: normal;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--color-primary);
}

.stat-item span {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Products */
.products-wrap {
  position: relative;
  background: var(--color-primary-dark);
  padding: clamp(3rem, 6vw, 5rem) 0 0;
  overflow: hidden;
}

.products-intro {
  position: relative;
  z-index: 1;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.products-bg {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  opacity: 0.15;
  pointer-events: none;
}

.products-bg span {
  background-size: cover;
  background-position: center;
}

.product-grid {
  position: relative;
  z-index: 1;
  display: grid;
  /* 产品品类：一排 3 个，6 项为 2 行 */
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  width: 100%;
  max-width: var(--layout-max);
  margin: 0 auto;
  padding: 0 15px  clamp(3rem, 6vw, 5rem);
  background: rgba(255, 255, 255, 0.1);
}

.product-card {
  position: relative;
  min-height: 320px;
  overflow: hidden;
}

.product-card .bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s var(--ease);
}

.product-card:hover .bg {
  transform: scale(1.08);
}

.product-card .label {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  color: var(--color-white);
  font-size: 1.35rem;
  font-weight: 600;
  z-index: 2;
}

.product-card .panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
  background: rgba(26, 95, 74, 0.88);
  color: var(--color-white);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
  z-index: 3;
}

.product-card:hover .panel {
  opacity: 1;
}

.product-card .num {
  font-size: 4rem;
  font-weight: 700;
  opacity: 0.35;
  line-height: 1;
}

.product-card h3 {
  font-size: 1.5rem;
  margin: 0.5rem 0;
}

.product-card .desc {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 1rem;
}

/* Business */
.business-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.business-card {
  display: block;
  padding: 2rem 1.5rem;
  border-radius: 12px;
  background: var(--color-bg);
  border: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

a.business-card {
  text-decoration: none;
  color: inherit;
}

.business-card:hover {
  border-color: rgba(26, 95, 74, 0.2);
  box-shadow: var(--shadow);
  transform: translateY(-4px);
}

.business-card .idx {
  font-size: 0.85rem;
  color: var(--color-accent);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.business-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: var(--color-primary-dark);
}

.business-card p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* News — 集团动态 */
.news-section {
  padding-top: clamp(4rem, 6.5vw, 5.5rem);
  padding-bottom: clamp(4.5rem, 7vw, 6.25rem);
  background: var(--color-white);
}

.news-section-title {
  text-align: center;
  font-size: clamp(1.75rem, 3.2vw, 2.25rem);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 3.125rem;
  letter-spacing: 0.02em;
}

.news-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.25rem;
  align-items: start;
}

.news-item {
  min-width: 0;
}

.news-img {
  display: block;
  overflow: hidden;
  line-height: 0;
}

.news-img img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  transition: transform 0.55s var(--ease);
}

.news-item:hover .news-img img {
  transform: scale(1.03);
}

.news-item time {
  display: block;
  margin-top: 1.25rem;
  margin-bottom: 0.625rem;
  font-size: 0.875rem;
  color: #999;
  line-height: 1.4;
}

.news-headline {
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--color-text);
}

.news-headline a {
  transition: color 0.25s;
}

.news-headline a:hover {
  color: var(--color-primary);
}

.news-more {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.25s, opacity 0.25s;
}

.news-more:hover {
  color: var(--color-primary);
  opacity: 0.9;
}

.site-footer {
  background: #1a1a1a;
  color: rgba(255, 255, 255, 0.85);
}

.footer-top {
  padding: 4rem 0 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.footer-grid h4 {
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
  color: var(--color-white);
}

.footer-grid ul li {
  margin-bottom: 0.5rem;
}

.footer-grid a {
  font-size: 0.9rem;
  opacity: 0.8;
  transition: opacity 0.2s, color 0.2s;
}

.footer-grid a:hover {
  opacity: 1;
  color: var(--color-accent);
}

.footer-contact li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.footer-contact img {
  width: 20px;
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.7;
}

.footer-form input {
  width: 100%;
  padding: 0.65rem 0.75rem;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-white);
  font-size: 0.85rem;
}

.footer-form button {
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: 6px;
  background: var(--color-primary);
  color: var(--color-white);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s;
}

.footer-form button:hover {
  background: var(--color-accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem 0 2rem;
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.75;
}

.footer-logo {
  text-align: center;
}

.footer-logo img {
  width: 180px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

/* WAP bottom bar */
.wap-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999;
  background: var(--color-white);
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
  padding: 0.5rem;
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}

.wap-bar-inner {
  display: flex;
  justify-content: space-around;
  font-size: 0.75rem;
  text-align: center;
}

.wap-bar a {
  padding: 0.35rem;
  color: var(--color-text-muted);
}

.wap-bar a.is-primary {
  color: var(--color-primary);
  font-weight: 600;
}

/* Responsive */
@media (max-width: 1024px) {
  .nav-main {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .business-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 64px;
  }

  .hero-arrows {
    display: none;
  }

  .stats {
    grid-template-columns: 1fr 1fr;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }

  .product-card {
    min-height: 260px;
  }

  .business-grid,
  .news-list {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .wap-bar {
    display: block;
  }

  body {
    padding-bottom: 56px;
  }
}
