/* ============================================================
   婕依教育科技 — Heritage Precision
   Hand-written tokens + layout + animations. No external assets.
   ============================================================ */

:root {
  /* Interactive / CTA — primary blue */
  --color-cta:        #1A6E8A;
  --color-cta-hover:  #155F78;
  --color-link:       #1A6E8A;
  /* Brand accent — copper */
  --color-copper:       #8A5A3A;
  --color-copper-light: #A67A5B;
  /* Neutrals */
  --color-text:      #31373D;
  --color-text-2:    #6B7280;
  --color-muted:     #9CA3AF;
  /* Surfaces */
  --bg:        #FFFFFF;
  --bg-subtle: #F7F7F5;
  --bg-dark:   #1C1F24;
  --border:    #E5E7EB;

  --font-serif: "Songti SC", "STSong", "Noto Serif SC", Georgia, serif;
  --font-sans:  "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;

  --section-y: 96px;
  --container: 1280px;
  --gutter: 24px;
  --radius: 3px;

  --shadow-card:  0 1px 4px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
  --shadow-hover: 0 6px 18px rgba(26,110,138,.12), 0 12px 36px rgba(0,0,0,.08);

  --ease: cubic-bezier(.4,0,.2,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html.smooth { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  color: var(--color-text);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

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

/* ---------- Shared type ---------- */
.h2 {
  font-family: var(--font-serif);
  font-weight: 300;
  font-size: clamp(26px, 3.4vw, 38px);
  line-height: 1.25;
  letter-spacing: -.01em;
  color: var(--color-text);
}
.eyebrow {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--color-copper);
  margin-bottom: 16px;
}
.lead { font-size: 18px; line-height: 1.8; color: var(--color-text-2); }
.muted { color: var(--color-text-2); }
.accent { color: var(--color-copper); font-weight: 400; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 12px 28px;
  border: 1px solid transparent;
  transition: background .25s var(--ease), transform .25s var(--ease), box-shadow .25s var(--ease);
}
.btn--cta { background: var(--color-cta); color: #fff; }
.btn--cta:hover {
  background: var(--color-cta-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(26,110,138,.28);
}
.btn--lg { padding: 16px 36px; font-size: 15px; }

/* link with sliding arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-link);
  font-size: 14px;
  font-weight: 600;
}
.link-arrow .arrow { transition: transform .25s var(--ease); }
.link-arrow:hover .arrow { transform: translateX(5px); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: 64px;
  z-index: 100;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.nav__logo {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: 20px;
  color: var(--color-copper);
  letter-spacing: .02em;
}
.nav__links { display: flex; gap: 36px; margin-left: auto; margin-right: 8px; }
.nav__links a {
  position: relative;
  font-size: 14px;
  color: #fff;
  padding: 6px 0;
  transition: color .25s var(--ease);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s var(--ease);
}
.nav__links a:hover { color: var(--color-copper-light); }
.nav__links a:hover::after { transform: scaleX(1); }
.nav__cta { flex: none; }

/* scrolled state -> frosted white */
.nav.scrolled {
  background: rgba(255,255,255,.85);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
}
.nav.scrolled .nav__links a { color: var(--color-text); }
.nav.scrolled .nav__links a:hover { color: var(--color-copper); }
.nav.scrolled .nav__logo { color: var(--color-copper); }

.nav__toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; padding: 6px; }
.nav__toggle span { width: 24px; height: 2px; background: #fff; transition: background .3s var(--ease); }
.nav.scrolled .nav__toggle span { background: var(--color-text); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 580px;
  overflow: hidden;
  background: var(--bg-dark);
}
.hero__track { position: absolute; inset: 0; }
.hero__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  pointer-events: none;
}
.hero__slide.is-active { opacity: 1; pointer-events: auto; }
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.001);
}
/* Ken Burns only while active */
.hero__slide.is-active .hero__img { animation: kenburns 7s ease-out forwards; }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.09); } }
.hero__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.45); }
.hero__content { position: relative; max-width: 900px; text-align: left; }
.hero__title {
  font-family: var(--font-serif);
  font-weight: 300;
  color: #fff;
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.15;
  margin-bottom: 24px;
}
.hero__title .accent { color: var(--color-copper-light); }
.hero__sub {
  color: rgba(255,255,255,.85);
  font-size: clamp(16px, 2vw, 19px);
  max-width: 640px;
  margin-bottom: 32px;
}
.hero__dots {
  position: absolute;
  bottom: 40px; left: 50%;
  transform: translateX(-50%);
  display: flex; gap: 14px;
  z-index: 5;
}
.hero__dots button {
  width: 44px; height: 3px;
  border: 0;
  background: rgba(255,255,255,.35);
  transition: background .25s var(--ease);
}
.hero__dots button.is-active { background: #fff; }

/* ============================================================
   SECTION shells
   ============================================================ */
.section { padding: var(--section-y) 0; }
.section--subtle { background: var(--bg-subtle); }

/* ---------- Mission ---------- */
.mission__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 80px;
  align-items: center;
}
.mission__quote {
  border-left: 3px solid var(--color-cta);
  padding: 6px 0 6px 16px;
  margin: 28px 0 0;
  font-style: italic;
  color: var(--color-text);
}
/* Media column: fixed aspect ratio + dark gradient fallback so the
   layout never collapses, even if the image fails to load. */
.mission__media {
  position: relative;
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(135deg, #1a2230 0%, #0b0f16 100%);
}
.mission__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform .6s ease;
}
.mission__media:hover .mission__img {
  transform: scale(1.02);
}
/* 触屏设备禁用 hover，避免点击残留态 */
@media (hover: none) {
  .mission__media:hover .mission__img {
    transform: scale(1);
  }
}
.mission .lead { margin-top: 24px; }

/* marquee */
.marquee {
  margin-top: 40px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  gap: 48px;
  padding: 14px 24px;
  animation: marquee 30s linear infinite;
}
.marquee__track span {
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--color-copper);
  text-transform: uppercase;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Solutions ---------- */
.solutions__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 48px;
}
.solutions__head .muted { margin-top: 8px; }
.solutions__nav { display: flex; gap: 12px; flex: none; }
.iconbtn {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  font-size: 18px;
  color: var(--color-text);
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.iconbtn:hover { background: var(--color-cta); color: #fff; border-color: var(--color-cta); }

.solutions__row {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  padding: 12px 4px 28px;
  scroll-snap-type: x mandatory;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.solutions__row::-webkit-scrollbar { display: none; }

.card {
  flex: 0 0 340px;
  scroll-snap-align: start;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover {
  transform: scale(1.04);
  border-color: var(--color-cta);
  box-shadow: var(--shadow-hover);
}
.card__icon { width: 48px; height: 48px; margin-bottom: 28px; color: var(--color-text-2); transition: color .25s var(--ease); }
.card__icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.card:hover .card__icon { color: var(--color-cta); }
.card__title { font-family: var(--font-serif); font-weight: 600; font-size: 20px; margin-bottom: 14px; }
.card__desc { color: var(--color-text-2); font-size: 15px; margin-bottom: 28px; }

/* ---------- Featured ---------- */
.featured__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.featured__img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; border-radius: var(--radius); background: var(--bg-subtle); }
.featured .lead { margin-top: 24px; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 32px 0; max-width: 360px; }
.stat { border-top: 1px solid var(--border); padding-top: 10px; }
.stat__num { display: block; font-family: var(--font-serif); font-weight: 600; font-size: 26px; color: var(--color-cta); font-variant-numeric: tabular-nums; }
.stat__label { font-size: 13px; color: var(--color-text-2); }

/* ---------- Insights ---------- */
.insights__head { text-align: center; margin-bottom: 56px; }
.insights__head .muted { margin-top: 8px; }
.insights__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.icard {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .3s var(--ease), transform .3s var(--ease);
}
.icard:hover { box-shadow: var(--shadow-hover); transform: translateY(-3px); }
.icard__media { overflow: hidden; }
.icard__img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; background: var(--bg-subtle); transition: transform .5s var(--ease); }
.icard:hover .icard__img { transform: scale(1.07); }
.icard__body { padding: 28px 28px 32px; }
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--color-copper);
  background: rgba(138,90,58,.08);
  padding: 4px 10px;
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.icard__title { font-family: var(--font-serif); font-weight: 600; font-size: 19px; line-height: 1.4; margin-bottom: 12px; }
.icard__desc { color: var(--color-text-2); font-size: 15px; margin-bottom: 22px; }

/* ---------- Dark quote ---------- */
.quote {
  position: relative;
  background: var(--bg-dark);
  color: #fff;
  padding: 120px 0;
  overflow: hidden;
}
.quote__dots {
  position: absolute;
  inset: 0;
  opacity: .12;
  background-image: radial-gradient(circle at 2px 2px, #fff 1px, transparent 0);
  background-size: 40px 40px;
}
.quote__inner { position: relative; text-align: center; max-width: 860px; }
.quote__mark {
  font-family: var(--font-serif);
  font-size: 110px;
  line-height: .6;
  color: var(--color-copper-light);
  display: block;
  margin-bottom: 24px;
}
.quote__text {
  font-family: var(--font-serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(24px, 3.6vw, 38px);
  line-height: 1.5;
  color: rgba(255,255,255,.96);
}
.quote__rule { width: 48px; height: 1px; background: rgba(255,255,255,.25); margin: 40px auto 20px; }
.quote__by { font-size: 13px; letter-spacing: .2em; color: rgba(255,255,255,.6); }
.quote__by span { margin: 0 8px; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-subtle); border-top: 1px solid var(--border); padding: var(--section-y) 0 40px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.4fr; gap: 32px; }
.footer__logo { font-family: var(--font-serif); font-weight: 600; font-size: 20px; color: var(--color-copper); display: block; margin-bottom: 16px; }
.footer__addr { color: var(--color-text-2); font-size: 15px; }
.footer__col h4 { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 18px; }
.footer__col ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.footer__col a { color: var(--color-text-2); font-size: 14px; transition: color .25s var(--ease); }
.footer__col a:hover { color: var(--color-cta); }
.footer__subscribe p { color: var(--color-text-2); font-size: 14px; margin-bottom: 16px; }

.subscribe { display: flex; gap: 0; }
.subscribe__field {
  position: relative;
  flex: 1;
}
.subscribe input {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  padding: 11px 14px;
  font: inherit;
  font-size: 14px;
  outline: none;
  border-radius: var(--radius) 0 0 var(--radius);
  transition: border-color .25s var(--ease);
}
/* animated underline border on focus */
.subscribe__field::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  height: 2px; width: 100%;
  background: var(--color-cta);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.subscribe input:focus { border-color: var(--color-cta); }
.subscribe__field:focus-within::after { transform: scaleX(1); }
.subscribe .btn { border-radius: 0 var(--radius) var(--radius) 0; }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.footer__bottom p { font-size: 13px; color: var(--color-text-2); }
.footer__legal { display: flex; gap: 28px; }
.footer__legal a { font-size: 13px; color: var(--color-text-2); transition: color .25s var(--ease); }
.footer__legal a:hover { color: var(--color-cta); }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal--left  { transform: translateX(-44px); }
.reveal--right { transform: translateX(44px); }
.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html.smooth { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__slide.is-active .hero__img { animation: none; }
  .marquee__track { animation: none; }
}

/* ============================================================
   PLACEHOLDER IMAGERY (local gradients, no external assets)
   ============================================================ */
.ph { width: 100%; height: 100%; background-size: cover; background-position: center; }
.ph--city {
  background:
    linear-gradient(180deg, rgba(20,40,60,.2), rgba(10,20,35,.85)),
    radial-gradient(120% 90% at 70% 20%, #2a5a78 0%, #173247 45%, #0c1826 100%);
}
.ph--network {
  background:
    radial-gradient(60% 60% at 30% 40%, rgba(70,160,200,.4), transparent 60%),
    radial-gradient(40% 40% at 75% 70%, rgba(120,210,240,.3), transparent 60%),
    linear-gradient(135deg, #0a1f33, #0f3350 60%, #08182a);
}
.ph--interior {
  background:
    linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.55)),
    linear-gradient(120deg, #c9cdd4 0%, #9aa3ad 40%, #6f7882 100%);
}
.ph--circuit {
  background:
    repeating-linear-gradient(0deg, rgba(166,122,91,.18) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(90deg, rgba(166,122,91,.18) 0 1px, transparent 1px 22px),
    linear-gradient(135deg, #16314a, #0d2236 70%, #081726);
}
.ph--business {
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.18)),
    linear-gradient(115deg, #e7e3dc 0%, #cfc8bd 45%, #b6b0a4 100%);
}
.ph--chart {
  background:
    linear-gradient(0deg, rgba(26,110,138,.35), transparent 60%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 1px, transparent 1px 30px),
    linear-gradient(135deg, #103048, #1a4e6b 70%, #0c2030);
}
.ph--desk {
  background:
    radial-gradient(80% 80% at 30% 20%, rgba(255,255,255,.25), transparent 60%),
    linear-gradient(120deg, #d8d2c6, #b8a98f 60%, #8a7a60);
}
.ph--archive {
  background:
    linear-gradient(180deg, rgba(0,0,0,.1), rgba(0,0,0,.4)),
    repeating-linear-gradient(90deg, #5a4632 0 14px, #6b5640 14px 28px),
    linear-gradient(#3b2e20, #241a10);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  :root { --section-y: 72px; }
  .mission__grid, .featured__grid { gap: 56px; }
}

@media (max-width: 768px) {
  :root { --section-y: 56px; }

  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: flex; }
  .nav.nav--open { background: rgba(255,255,255,.96); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
  .nav.nav--open .nav__links {
    display: flex;
    position: absolute;
    top: 64px; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
    margin: 0;
  }
  .nav.nav--open .nav__links a { color: var(--color-text); padding: 14px 24px; }
  .nav.nav--open .nav__links a::after { display: none; }

  .hero { text-align: center; }
  .hero__content { text-align: center; margin: 0 auto; }
  .hero__sub { margin-left: auto; margin-right: auto; }

  .mission__grid, .featured__grid { grid-template-columns: 1fr; }
  .featured__media { order: 2; }
  .insights__grid { grid-template-columns: 1fr; }

  .solutions__head { flex-direction: column; align-items: flex-start; }
  .card { flex-basis: 82%; }

  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand, .footer__subscribe { grid-column: 1 / -1; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .footer__grid { grid-template-columns: 1fr; }
}
