/* Yunfan Zhiyuan Corporate Website - Global Style */
:root {
  --bg: #07090d;
  --bg-soft: #111824;
  --surface: #131d2c;
  --surface-2: #1a2638;
  --text: #e9edf4;
  --text-muted: #b9c3d3;
  --brand: #d71920;
  --brand-alt: #ff5f2e;
  --line: #2b3b54;
  --ok: #34d399;
  --warning: #f59e0b;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
  --max: 1220px;
  --radius: 18px;
  --radius-sm: 10px;
  --font-title: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Source Sans 3", Tahoma, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: radial-gradient(circle at 20% 0%, #1b2740 0%, var(--bg) 45%), var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

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

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

.container {
  width: min(var(--max), 92%);
  margin: 0 auto;
}

.grid {
  display: grid;
  gap: 1.25rem;
}

.section {
  padding: 5rem 0;
  position: relative;
}

.section-title {
  font-family: var(--font-title);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: clamp(2rem, 4vw, 3.8rem);
  margin: 0 0 0.8rem;
  line-height: 1.05;
}

.section-lead {
  color: var(--text-muted);
  max-width: 72ch;
  font-size: 1.1rem;
}

.kicker {
  display: inline-block;
  color: #ffb4a8;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 9, 13, 0.75);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-wrap {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand img {
  width: 42px;
  height: 42px;
}

.brand span {
  font-family: var(--font-title);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 1.15rem;
  font-weight: 700;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-weight: 600;
}

.nav-links a {
  position: relative;
  padding: 0.15rem 0;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--brand), var(--brand-alt));
  transition: width 0.26s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.mobile-toggle {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  width: 40px;
  height: 40px;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hero {
  padding: 5rem 0 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(0.5px);
  z-index: 0;
}

.hero::before {
  width: 380px;
  height: 380px;
  top: -80px;
  right: -120px;
  background: radial-gradient(circle, rgba(215, 25, 32, 0.4), transparent 68%);
}

.hero::after {
  width: 440px;
  height: 440px;
  left: -120px;
  bottom: -180px;
  background: radial-gradient(circle, rgba(255, 95, 46, 0.25), transparent 65%);
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 1.4rem;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-family: var(--font-title);
  font-size: clamp(2.5rem, 5vw, 5.2rem);
  letter-spacing: 0.04em;
  line-height: 0.95;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 64ch;
}

.hero-actions {
  margin-top: 1.4rem;
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.68rem 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition: transform 0.2s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.btn-primary {
  background: linear-gradient(90deg, var(--brand), var(--brand-alt));
  color: #fff;
  box-shadow: 0 10px 26px rgba(215, 25, 32, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
}

.hero-media {
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}

.hero-media img {
  width: 100%;
  min-height: 360px;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.9s ease;
}

.hero-media:hover img {
  transform: scale(1.08);
}

.meta-strip {
  margin-top: 1.4rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.meta-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(19, 29, 44, 0.85);
  padding: 0.9rem;
  min-width: 0;
}

.meta-item .label {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #9cb0ce;
}

.meta-item .value {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.cards {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(27, 39, 64, 0.55), rgba(19, 29, 44, 0.85));
  padding: 1.25rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.25);
}

.card h3 {
  margin: 0.7rem 0;
  font-family: var(--font-title);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 1.5rem;
}

.card p {
  margin: 0;
  color: var(--text-muted);
}

.icon-box {
  width: 52px;
  height: 52px;
}

.icon-box img {
  width: 100%;
  height: 100%;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.3rem;
  align-items: stretch;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(19, 29, 44, 0.76);
  padding: 1.3rem;
}

.panel ul {
  margin: 0;
  padding-left: 1rem;
}

.panel li {
  margin-bottom: 0.5rem;
}

.image-panel {
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.12);
  min-height: 360px;
  position: relative;
}

.image-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-panel img[data-parallax] {
  top: -48px;
  bottom: auto;
  height: calc(100% + 96px);
}

.timeline {
  border-left: 3px solid #324a6a;
  padding-left: 1rem;
  margin-top: 1rem;
}

.timeline-item {
  margin-bottom: 1.2rem;
  position: relative;
}

.timeline-item::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: linear-gradient(90deg, var(--brand), var(--brand-alt));
  position: absolute;
  left: -1.42rem;
  top: 0.35rem;
}

.news-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.news-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: rgba(19, 29, 44, 0.85);
  transition: transform 0.2s ease;
}

.news-card:hover {
  transform: translateY(-5px);
}

.news-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.news-body {
  padding: 1rem;
}

.badge {
  display: inline-block;
  background: rgba(215, 25, 32, 0.15);
  color: #ffb7aa;
  border: 1px solid rgba(215, 25, 32, 0.4);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stat {
  text-align: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem;
  background: rgba(26, 38, 56, 0.65);
}

.stat strong {
  display: block;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-family: var(--font-title);
}

.stat span {
  color: var(--text-muted);
}

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

.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem;
  background: rgba(19, 29, 44, 0.82);
}

.contact-card h3 {
  margin-top: 0;
  font-family: var(--font-title);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.contact-item {
  margin: 0.55rem 0;
}

.map-box {
  min-height: 240px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.map-box iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.legal-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1rem;
}

.legal-nav {
  position: sticky;
  top: 96px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem;
  align-self: start;
  background: rgba(19, 29, 44, 0.8);
}

.legal-nav a {
  display: block;
  font-size: 0.93rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.legal-nav a:hover {
  color: var(--text);
}

.legal-content {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  background: rgba(19, 29, 44, 0.8);
}

.legal-content h2,
.legal-content h3 {
  font-family: var(--font-title);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.legal-content p,
.legal-content li {
  color: var(--text-muted);
}

.legal-content ul {
  padding-left: 1rem;
}

footer {
  margin-top: 2.2rem;
  padding: 2rem 0 2.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(7, 9, 13, 0.8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 0.6rem;
}

.footer-brand img {
  width: 38px;
  height: 38px;
}

.footer-links a {
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.35rem;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-bottom {
  margin-top: 1rem;
  color: #9cb0ce;
  font-size: 0.9rem;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

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

[data-parallax] {
  transition: transform 0.2s ease-out;
}

@media (max-width: 1024px) {
  .hero-layout,
  .split,
  .contact-grid,
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .cards,
  .news-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .legal-nav {
    position: static;
  }

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

@media (max-width: 760px) {
  .nav-links {
    position: absolute;
    top: 78px;
    left: 4%;
    right: 4%;
    background: rgba(11, 15, 23, 0.98);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 0.7rem;
    flex-direction: column;
    align-items: flex-start;
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .mobile-toggle {
    display: inline-flex;
  }

  .cards,
  .news-grid,
  .stats,
  .meta-strip,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 4rem;
  }

  .hero h1 {
    font-size: clamp(2.2rem, 11vw, 3.2rem);
  }

  .section {
    padding: 3.8rem 0;
  }
}
