/* 南京智慧无垠教育科技有限公司 — company site.
   Formal, light, restrained: ivory paper, ink type, one gold accent (the horizon sun of the mark). */

@font-face {
  font-family: "ZB Serif";
  src: url("fonts/serif-600.woff2") format("woff2");
  font-weight: 500 800;
  font-display: swap;
}

@font-face {
  font-family: "ZB Serif";
  src: url("fonts/serif-400.woff2") format("woff2");
  font-weight: 100 499;
  font-display: swap;
}

:root {
  --bg: #F7F5F0;
  --tint: #EFECE5;
  --surface: #FFFFFF;
  --ink: #121418;
  --ink-2: #3A3F46;
  --muted: #6E737A;
  --line: #E0DCD2;
  --accent: #8A6420;
  --sun: #C8963F;
  --night: #121418;
  --serif: "ZB Serif", "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif CJK SC", "Noto Serif SC", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Segoe UI", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 1180px;
  --gutter: max(20px, min(5vw, 40px));
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Latin fonts first in English, so quotes and dashes don't come from a CJK font. */
html[data-lang="en"] body { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p, h1, h2, h3, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }

/* Language: markup defaults to zh-Hans, site.js switches before first paint. */
html[data-lang="zh-Hans"] [data-lang]:not([data-lang="zh-Hans"]),
html[data-lang="en"] [data-lang]:not([data-lang="en"]) { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 14px; border-radius: 8px;
  background: var(--ink); color: var(--bg); text-decoration: none; font-size: 14px;
}
.skip:focus { top: 12px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.serif { font-family: var(--serif); font-weight: 600; letter-spacing: 0.02em; }
html[data-lang="en"] .serif { letter-spacing: -0.01em; }

/* Header */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  border-bottom: 1px solid transparent;
  transition: background-color .35s ease, border-color .35s ease;
}
.top.is-scrolled {
  background: rgba(247, 245, 240, 0.86);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  backdrop-filter: saturate(150%) blur(14px);
}
.top__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 68px; }
.mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.mark__glyph { width: 30px; height: 30px; color: var(--sun); }
.mark__name { font-size: 19px; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav__link {
  position: relative; padding: 8px 14px;
  font-size: 15px; color: var(--ink-2); text-decoration: none;
}
.nav__link::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 1px;
  background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s ease;
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after { transform: scaleX(1); }
.lang {
  margin-left: 10px; padding: 6px 14px;
  border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink);
  font: 600 13px/1.2 var(--sans); letter-spacing: 0.04em; cursor: pointer;
  transition: border-color .2s ease;
}
.lang:hover { border-color: var(--ink-2); }

/* Hero */
.hero {
  position: relative;
  min-height: 88vh;
  min-height: 88svh;
  display: flex; align-items: center;
  padding: 140px 0 160px;
  overflow: hidden;
  background:
    radial-gradient(70% 55% at 50% 100%, rgba(200, 150, 63, 0.16), rgba(247, 245, 240, 0) 70%),
    var(--bg);
}
.hero__eyebrow {
  font-size: 13px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent);
}
.hero__title {
  margin-top: 26px;
  font-size: clamp(42px, 6.6vw, 96px);
  line-height: 1.14;
}
html[data-lang="en"] .hero__title { font-size: clamp(56px, 10vw, 148px); line-height: 0.98; }
.hero__motto {
  margin-top: 30px;
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 400;
  color: var(--ink-2);
}
.hero__eyebrow, .hero__title, .hero__motto { animation: fade-up 1.2s cubic-bezier(.2, .7, .1, 1) both; }
.hero__title { animation-delay: .12s; }
.hero__motto { animation-delay: .3s; }

.hero__horizon {
  position: absolute; left: 0; right: 0; bottom: 72px; height: 48px;
  overflow: hidden;
}
.hero__horizon::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: linear-gradient(90deg, rgba(18, 20, 24, 0) 0%, rgba(18, 20, 24, 0.28) 20%, rgba(138, 100, 32, 0.6) 50%, rgba(18, 20, 24, 0.28) 80%, rgba(18, 20, 24, 0) 100%);
  animation: line-in 1.6s ease .2s both;
}
.hero__sun {
  position: absolute; left: 50%; bottom: 0; width: 88px; height: 44px;
  color: var(--sun);
  transform: translateX(-50%);
  filter: drop-shadow(0 0 22px rgba(200, 150, 63, 0.45));
  animation: sunrise 2.2s cubic-bezier(.2, .7, .1, 1) .4s both;
}

@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes line-in { from { opacity: 0; transform: scaleX(.2); } to { opacity: 1; transform: scaleX(1); } }
@keyframes sunrise { from { transform: translate(-50%, 100%); } to { transform: translate(-50%, 0); } }

/* Sections */
.section { padding: clamp(88px, 11vw, 140px) 0; border-top: 1px solid var(--line); }
.section--tint { background: var(--tint); }
.section__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.section__no {
  font-family: var(--serif); font-size: 15px; font-weight: 600;
  letter-spacing: 0.12em; color: var(--accent);
}
.section__title { margin-top: 10px; font-size: clamp(32px, 3.6vw, 44px); line-height: 1.2; }
.section__en {
  margin-top: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--muted);
}

/* Company profile */
.profile { border-top: 1px solid var(--ink); }
.profile__row {
  display: grid; grid-template-columns: minmax(0, 10em) minmax(0, 1fr); gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}
.profile dt { color: var(--muted); font-size: 15px; }
.profile dd { font-size: 17px; overflow-wrap: anywhere; }
.profile a, .contact__mail { text-decoration: none; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 100% 1px no-repeat; transition: color .2s ease; }
.profile a:hover { color: var(--accent); }

/* Products */
.products { display: grid; gap: 16px; }
.product {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 22px;
  padding: 24px 26px;
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--surface);
  text-decoration: none;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.product:hover { border-color: rgba(138, 100, 32, 0.55); box-shadow: 0 18px 40px -24px rgba(18, 20, 24, 0.3); }
.product__icon { width: 56px; height: 56px; border-radius: 13px; }
.product__body { display: grid; gap: 2px; }
.product__name { font-size: 19px; font-weight: 600; }
.product__desc { font-size: 15px; color: var(--muted); }
.product__go { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.product__go svg { width: 15px; height: 15px; transition: transform .25s ease; }
.product:hover .product__go svg { transform: translate(2px, -2px); }

/* Contact */
.contact { border-top: 1px solid var(--ink); padding-top: 28px; }
.contact__lead { color: var(--ink-2); }
.contact__mail {
  display: inline-block; margin-top: 18px;
  font-size: clamp(26px, 3.4vw, 40px); line-height: 1.3; font-weight: 600;
  background-size: 100% 1px; padding-bottom: 4px;
}
.contact__mail:hover { color: var(--accent); }
.contact__note { margin-top: 18px; font-size: 15px; color: var(--muted); }

/* Footer */
.foot { background: var(--night); color: #A3A8AF; }
.foot__inner {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px;
  padding-top: 40px; padding-bottom: max(40px, env(safe-area-inset-bottom, 0px));
  font-size: 13px;
}
.mark--foot { color: #ECEAE5; }
.mark--foot .mark__name { font-size: 17px; }

/* Scroll reveal (only when JS runs) */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 1s cubic-bezier(.2, .7, .1, 1), transform 1s cubic-bezier(.2, .7, .1, 1); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .section__grid > .reveal + .reveal { transition-delay: .1s; }

/* 404 */
.lost { min-height: 100vh; min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 96px 0; }
.lost .hero__eyebrow { letter-spacing: 0.3em; }
.lost .section__title { margin-top: 14px; }
.lost__text { margin-top: 14px; color: var(--muted); }
.btn {
  display: inline-flex; margin-top: 32px; padding: 12px 22px; border-radius: 999px;
  background: var(--ink); color: var(--bg); font-size: 15px; font-weight: 600; text-decoration: none;
}

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

@media (max-width: 600px) {
  body { font-size: 16px; }
  .nav__link { display: none; }
  .mark__name { font-size: 17px; }
  .hero { padding: 120px 0 140px; }
  .profile__row { grid-template-columns: 1fr; gap: 2px; padding: 18px 0; }
  .product { grid-template-columns: auto minmax(0, 1fr); padding: 20px; gap: 16px; }
  .product__go { grid-column: 2; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
