/* 年作 nianz · 少儿美学官网 */
:root {
  --ink: #1c1a17;
  --ink-soft: #4a453e;
  --muted: #7a7368;
  --paper: #f7f4ef;
  --paper-deep: #ebe4d8;
  --sage: #8a9a86;
  --sage-deep: #5f7260;
  --champagne: #c4b498;
  --champagne-soft: #ddd2bc;
  --white: #fffcf8;
  --shadow: 0 18px 50px rgba(40, 36, 28, 0.12);
  --font-display: "Cormorant Garamond", "Songti SC", "Noto Serif SC", serif;
  --font-body: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(138, 154, 134, 0.18), transparent 60%),
    radial-gradient(900px 500px at 100% 20%, rgba(196, 180, 152, 0.2), transparent 55%),
    linear-gradient(180deg, var(--paper) 0%, var(--white) 40%, var(--paper-deep) 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* ── Nav ── */
.site-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  backdrop-filter: blur(14px);
  background: rgba(247, 244, 239, 0.72);
  border-bottom: 1px solid rgba(196, 180, 152, 0.35);
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--sage-deep);
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--ink-soft);
}

.nav-links a {
  position: relative;
  transition: color 0.25s var(--ease);
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.25rem;
  height: 1px;
  background: var(--champagne);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-links a:hover::after {
  transform: scaleX(1);
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 6.5rem 1.5rem 3.5rem;
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% center;
  transform: scale(1.04);
  animation: heroDrift 18s var(--ease) infinite alternate;
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(28, 26, 23, 0.72) 0%, rgba(28, 26, 23, 0.35) 42%, rgba(28, 26, 23, 0.12) 70%, transparent 100%),
    linear-gradient(0deg, rgba(28, 26, 23, 0.55) 0%, transparent 45%);
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 34rem;
  color: var(--white);
}

.hero-eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--champagne-soft);
  font-weight: 400;
}

.hero-brand {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 10vw, 5.6rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.02em;
}

.hero-brand span {
  font-style: italic;
  font-weight: 500;
  color: var(--champagne-soft);
}

.hero-lead {
  margin: 1.25rem 0 0;
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  font-weight: 300;
  line-height: 1.75;
  color: rgba(255, 252, 248, 0.9);
  max-width: 22em;
}

@keyframes heroDrift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(-1.5%, 1%, 0); }
}

/* ── Sections ── */
.section {
  padding: 5rem 1.5rem;
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section-head {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--champagne-soft);
}

.section-index {
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
  color: var(--champagne);
  font-weight: 500;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 500;
  letter-spacing: 0.06em;
}

.section-en {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-style: italic;
  color: var(--muted);
  font-size: 1rem;
}

.section-lead {
  margin: -1rem 0 2rem;
  color: var(--ink-soft);
  max-width: 36em;
  font-weight: 300;
}

/* ── Teacher ── */
.teacher {
  background: rgba(255, 252, 248, 0.65);
}

.teacher-grid {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: 2.5rem 3rem;
  align-items: start;
}

.teacher-photo {
  margin: 0;
  border-radius: 2px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--paper-deep);
  aspect-ratio: 1;
}

.teacher-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.teacher-body h3 {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.teacher-body h3 .en {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--sage-deep);
  font-weight: 500;
  margin-left: 0.35rem;
}

.teacher-titles {
  margin: 0.5rem 0 1.5rem;
  color: var(--sage-deep);
  font-size: 0.98rem;
  letter-spacing: 0.04em;
}

.teacher-bio,
.teacher-highlights ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.teacher-bio li,
.teacher-highlights li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.55rem;
  color: var(--ink-soft);
  font-weight: 300;
}

.teacher-bio li::before,
.teacher-highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 5px;
  height: 1px;
  background: var(--champagne);
}

.teacher-highlights {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(196, 180, 152, 0.45);
}

.teacher-highlights h4 {
  margin: 0 0 0.85rem;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--ink);
}

/* ── Works ── */
.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.work-item {
  position: relative;
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 2px;
  background: var(--paper-deep);
  aspect-ratio: 4 / 5;
  text-align: left;
  box-shadow: 0 8px 24px rgba(40, 36, 28, 0.06);
  transition: transform 0.45s var(--ease), box-shadow 0.45s var(--ease);
}

.work-item.wide {
  grid-column: span 2;
  aspect-ratio: 16 / 10;
}

.work-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.work-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2.2rem 1rem 0.85rem;
  background: linear-gradient(transparent, rgba(28, 26, 23, 0.72));
  color: var(--white);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.work-item:hover,
.work-item:focus-visible {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  outline: none;
}

.work-item:hover img,
.work-item:focus-visible img {
  transform: scale(1.04);
}

.work-item:hover .work-cap,
.work-item:focus-visible .work-cap {
  opacity: 1;
  transform: translateY(0);
}

/* ── Entity / compliance ── */
.entity {
  background:
    linear-gradient(180deg, transparent, rgba(138, 154, 134, 0.08)),
    rgba(255, 252, 248, 0.8);
}

.entity-card {
  display: grid;
  gap: 2rem;
  padding: 1.75rem;
  border: 1px solid rgba(196, 180, 152, 0.55);
  background: var(--white);
  box-shadow: var(--shadow);
}

.entity-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem 1.5rem;
  margin: 0;
}

.entity-meta .entity-scope {
  grid-column: 1 / -1;
}

.entity-meta dt {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.entity-meta dd {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
}

.entity-meta .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  word-break: break-all;
}

.entity-scope dd {
  font-weight: 300;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.75;
}

.gsxt-figure {
  margin: 0;
}

.gsxt-figure figcaption {
  margin-bottom: 0.85rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.gsxt-btn {
  display: block;
  width: 100%;
  overflow: auto;
  border: 1px solid rgba(196, 180, 152, 0.45);
  background: #f0eee8;
  max-height: min(70vh, 720px);
}

.gsxt-btn img {
  width: 100%;
  height: auto;
}

.gsxt-hint {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── Partners ── */
.partners {
  padding-bottom: 4rem;
  background: rgba(255, 252, 248, 0.9);
}

.partners-figure {
  margin: 0;
  padding: 1.5rem 1.25rem;
  background: var(--white);
  border: 1px solid rgba(196, 180, 152, 0.45);
  box-shadow: var(--shadow);
}

.partners-figure img {
  width: 100%;
  height: auto;
  margin: 0 auto;
}

@media (max-width: 720px) {
  .partners-figure {
    padding: 0.85rem 0.65rem;
  }
}

/* ── Footer ── */
.site-footer {
  padding: 2.5rem 1.5rem 3rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  border-top: 1px solid rgba(196, 180, 152, 0.4);
  background: rgba(247, 244, 239, 0.85);
}

.site-footer p {
  margin: 0;
}

.footer-sub {
  margin-top: 0.35rem !important;
  font-family: var(--font-display);
  font-style: italic;
  letter-spacing: 0.08em;
}

.beian-link {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

/* ── Reveal motion ── */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

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

.works-grid .reveal:nth-child(2) { transition-delay: 0.06s; }
.works-grid .reveal:nth-child(3) { transition-delay: 0.12s; }
.works-grid .reveal:nth-child(4) { transition-delay: 0.18s; }
.works-grid .reveal:nth-child(5) { transition-delay: 0.08s; }
.works-grid .reveal:nth-child(6) { transition-delay: 0.14s; }

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: rgba(20, 18, 15, 0.88);
  backdrop-filter: blur(6px);
}

.lightbox[hidden] {
  display: none;
}

.lightbox img {
  max-width: min(96vw, 1200px);
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  background: #111;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: rgba(255, 252, 248, 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
}

.lightbox-close:hover {
  background: rgba(255, 252, 248, 0.22);
}

body.lightbox-open {
  overflow: hidden;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .work-item.wide {
    grid-column: span 2;
  }

  .entity-meta {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .site-nav {
    padding: 0.85rem 1rem;
  }

  .nav-links {
    gap: 0.85rem;
    font-size: 0.82rem;
  }

  .hero {
    padding: 5.5rem 1.15rem 2.75rem;
    align-items: end;
  }

  .hero-veil {
    background:
      linear-gradient(180deg, rgba(28, 26, 23, 0.25) 0%, rgba(28, 26, 23, 0.55) 55%, rgba(28, 26, 23, 0.78) 100%);
  }

  .hero-img {
    object-position: 70% center;
  }

  .section {
    padding: 3.5rem 1.15rem;
  }

  .teacher-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .teacher-photo {
    max-width: 220px;
  }

  .works-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  .work-item,
  .work-item.wide {
    grid-column: span 1;
    aspect-ratio: 3 / 4;
  }

  .work-item.wide {
    grid-column: span 2;
    aspect-ratio: 16 / 11;
  }

  .work-cap {
    opacity: 1;
    transform: none;
    font-size: 0.75rem;
    padding: 1.6rem 0.65rem 0.55rem;
  }

  .entity-meta {
    grid-template-columns: 1fr;
  }

  .entity-card {
    padding: 1.15rem;
  }

  .gsxt-btn {
    max-height: 55vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-img { animation: none; }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
