/*
Theme Name: 轩堂企业官网
Theme URI: https://jsxuantang.com
Author: Trae Work
Description: 江苏轩堂建筑工程有限公司 WordPress 企业官网主题，支持公司信息展示、业务范围、工程案例与工程影像展示。
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: xuantang-company
*/

@font-face {
  font-family: 'Instrument Sans';
  src: url('./fonts/InstrumentSans-Regular.ttf') format('truetype');
  font-weight: 400;
}
@font-face {
  font-family: 'Instrument Sans';
  src: url('./fonts/InstrumentSans-Bold.ttf') format('truetype');
  font-weight: 700;
}
@font-face {
  font-family: 'National Park';
  src: url('./fonts/NationalPark-Bold.ttf') format('truetype');
  font-weight: 700;
}

:root {
  --bg: #f7f3eb;
  --bg2: #ffffff;
  --ink: #1c2430;
  --muted: #687382;
  --rule: #ded5c8;
  --accent: #8a5a2b;
  --accent2: #17445e;
  --soft: #efe5d5;
  --shadow: rgba(28, 36, 48, 0.12);
  --font: 'Instrument Sans', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  --display: 'National Park', 'Microsoft YaHei', 'PingFang SC', sans-serif;
  --max: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--rule);
  backdrop-filter: blur(16px);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.9rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
}
.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--accent2);
  color: var(--bg2);
  display: grid;
  place-items: center;
  font-weight: 700;
}
.nav-links {
  display: flex;
  gap: 1.2rem;
  font-size: 0.92rem;
  color: var(--muted);
}
.nav-links a:hover { color: var(--accent); }

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 5rem 1.2rem 3.5rem;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(340px, 1.05fr);
  gap: 2rem;
  align-items: center;
}
.eyebrow {
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
}
h1, h2, h3 {
  margin: 0;
  line-height: 1.15;
  font-family: var(--display);
  color: var(--ink);
}
h1 {
  margin-top: 1rem;
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  letter-spacing: -0.05em;
}
.lead {
  margin: 1.4rem 0 0;
  max-width: 650px;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--muted);
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--accent2);
  color: var(--accent2);
  font-weight: 700;
}
.button.primary {
  background: var(--accent2);
  color: var(--bg2);
}
.hero-card {
  position: relative;
  min-height: 560px;
  border-radius: 34px;
  overflow: hidden;
  background: var(--bg2);
  box-shadow: 0 24px 60px var(--shadow);
}
.hero-card img {
  width: 100%;
  height: 100%;
  min-height: 560px;
  object-fit: cover;
}
.hero-badge {
  position: absolute;
  left: 1.2rem;
  right: 1.2rem;
  bottom: 1.2rem;
  padding: 1rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}
.metric strong {
  display: block;
  font-size: clamp(1.25rem, 3vw, 2rem);
  color: var(--accent2);
  line-height: 1.1;
}
.metric span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.82rem;
}

section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 4rem 1.2rem;
}
.section-head {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: end;
  margin-bottom: 2rem;
}
h2 {
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -0.04em;
}
.section-head p {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.card, .about-panel, .project {
  background: var(--bg2);
  border: 1px solid var(--rule);
  box-shadow: 0 14px 34px var(--shadow);
}
.card {
  border-radius: 24px;
  padding: 1.25rem;
}
.card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.65rem;
}
.card p, .about-panel p, .project p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.about-panel {
  border-radius: 28px;
  padding: 1.5rem;
}
.qualification-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.qualification-list li {
  padding: 0.85rem 1rem;
  border-radius: 16px;
  background: var(--soft);
  color: var(--accent2);
  font-weight: 700;
}
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.project {
  overflow: hidden;
  border-radius: 28px;
}
.project img {
  width: 100%;
  height: 245px;
  object-fit: cover;
  background: var(--soft);
}
.project-body { padding: 1.15rem; }
.project h3 {
  font-size: 1.18rem;
  margin-bottom: 0.55rem;
}
.tag {
  display: inline-flex;
  margin-bottom: 0.8rem;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  background: var(--soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
}
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}
.gallery img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  border-radius: 22px;
  border: 1px solid var(--rule);
  background: var(--soft);
}
.contact {
  background: var(--accent2);
  color: var(--bg2);
  border-radius: 34px;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: center;
}
.contact h2, .contact p { color: var(--bg2); }
.contact p {
  margin: 1rem 0 0;
  opacity: 0.82;
}
.contact-box {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 24px;
  padding: 1.2rem;
}
.contact-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
}
.contact-line:last-child { border-bottom: 0; }
.contact-line span:first-child { opacity: 0.72; }
.contact-line span:last-child {
  text-align: right;
  font-weight: 700;
}
.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.2rem 3rem;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (max-width: 920px) {
  .nav-links { display: none; }
  .hero, .section-head, .about-grid, .contact { grid-template-columns: 1fr; }
  .hero-card, .hero-card img { min-height: 420px; }
  .cards, .project-grid, .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .hero { padding-top: 3rem; }
  .hero-badge, .cards, .project-grid, .gallery { grid-template-columns: 1fr; }
  .contact { padding: 1.2rem; }
  .contact-line { display: block; }
  .contact-line span:last-child {
    display: block;
    text-align: left;
    margin-top: 0.2rem;
  }
}
