/* ====================================
   hgmai.cn — 胡公满·AI共生服务
   全局样式表
   Design: 羊皮纸暖金 · 楷体 · 磨砂玻璃
   ==================================== */

/* --- CSS Variables --- */
:root {
  --bg-page: #e1d5c0;
  --gold: #bc9a6c;
  --gold-dark: #a17d52;
  --gold-light: #d4b88a;
  --ink: #4f2f1c;
  --ink-light: #6b4c34;
  --white-soft: rgba(255,255,255,0.60);
  --white-soft-hover: rgba(255,255,255,0.78);
  --glass-bg: rgba(225,213,192,0.72);
  --glass-border: rgba(188,154,108,0.30);
  --card-bg: rgba(255,255,255,0.50);
  --card-shadow: rgba(79,47,28,0.08);
  --radius-tl: 48px;
  --radius-tr: 16px;
  --radius-br: 48px;
  --radius-bl: 16px;
  --nav-height: 86px;
  --gold-stripe: #bc9a6c;
  --gold-line-w: 80px;
  --gold-line-h: 3px;
  --page-pad: 12px;
  --max-w: 1200px;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'STKaiti', 'KaiTi', '楷体', 'Noto Serif SC', serif;
  background-color: var(--bg-page);
  color: var(--ink);
  line-height: 1.7;
  font-size: 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --- Left & Right Gold Borders --- */
body::before,
body::after {
  content: '';
  position: fixed;
  top: 0;
  bottom: 0;
  width: 12px;
  background: var(--gold);
  z-index: 9999;
  pointer-events: none;
}
body::before { left: 0; }
body::after  { right: 0; }

/* --- Container --- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  flex: 1;
}

/* --- Frosted Glass Navbar --- */
.pagenav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40px;
}

.pagenav .nav-inner {
  max-width: var(--max-w);
  width: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pagenav .nav-logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 2px;
  white-space: nowrap;
}

.pagenav .nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pagenav .nav-links a {
  display: block;
  padding: 8px 14px;
  font-size: 15px;
  color: var(--ink-light);
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.pagenav .nav-links a:hover {
  background: var(--white-soft-hover);
  color: var(--ink);
}

.pagenav .nav-links a.active {
  background: var(--gold);
  color: #fff;
}

/* --- Footer --- */
.page-footer {
  margin-top: auto;
  background: var(--gold);
  padding: 32px 24px;
  text-align: center;
}

.page-footer p {
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  letter-spacing: 1px;
}

.page-footer a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
}

.page-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

/* --- Golden Decorative Line --- */
.gold-line {
  display: block;
  width: var(--gold-line-w);
  height: var(--gold-line-h);
  background: var(--gold);
  margin: 16px auto;
  border: none;
}

/* --- Asymmetric Card --- */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-tl) var(--radius-tr) var(--radius-br) var(--radius-bl);
  padding: 28px 24px;
  box-shadow: 0 2px 12px var(--card-shadow);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(188,154,108,0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 24px rgba(79,47,28,0.12);
}

/* --- Page Title / Section --- */
.page-title {
  text-align: center;
  margin-bottom: 40px;
}

.page-title h1 {
  font-size: 36px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 4px;
}

.page-title p {
  font-size: 16px;
  color: var(--ink-light);
  margin-top: 8px;
}

/* --- Hero Section --- */
.hero {
  text-align: center;
  padding: 80px 0 40px;
}

.hero h1 {
  font-size: 44px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 6px;
  margin-bottom: 8px;
}

.hero .subtitle {
  font-size: 18px;
  color: var(--ink-light);
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.hero .desc {
  font-size: 15px;
  color: var(--ink-light);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.8;
}

/* --- Card Grid (6或4等) --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin: 20px 0;
}

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

/* --- Nav Card (首页6大入口) --- */
.nav-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--card-bg);
  border-radius: var(--radius-tl) var(--radius-tr) var(--radius-br) var(--radius-bl);
  padding: 32px 20px;
  text-align: center;
  border: 1px solid rgba(188,154,108,0.15);
  box-shadow: 0 2px 12px var(--card-shadow);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.nav-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 28px rgba(79,47,28,0.15);
}

.nav-card .icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.nav-card h3 {
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 6px;
}

.nav-card p {
  font-size: 14px;
  color: var(--ink-light);
}

/* --- Content Section --- */
.section {
  margin: 40px 0;
}

.section h2 {
  font-size: 26px;
  color: var(--ink);
  text-align: center;
  margin-bottom: 8px;
  letter-spacing: 3px;
}

.section p {
  font-size: 15px;
  color: var(--ink-light);
  text-align: center;
  max-width: 700px;
  margin: 0 auto 24px;
  line-height: 1.8;
}

/* --- Intro Content (文字介绍) --- */
.intro-content {
  max-width: 800px;
  margin: 0 auto 40px;
  text-align: center;
}

.intro-content h2 {
  font-size: 28px;
  margin-bottom: 12px;
  letter-spacing: 3px;
}

.intro-content p {
  font-size: 16px;
  color: var(--ink-light);
  line-height: 2;
  margin-bottom: 12px;
}

/* --- Iframe Fullscreen --- */
.iframe-wrapper {
  width: 100%;
  height: calc(100vh - var(--nav-height) - 80px);
  border: none;
  border-radius: 16px;
  overflow: hidden;
}

.iframe-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* --- Form --- */
.form-card {
  max-width: 520px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 6px;
}

.form-group label .required {
  color: #b33;
  margin-left: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  font-family: inherit;
  font-size: 15px;
  background: rgba(255,255,255,0.50);
  border: 1px solid var(--gold-light);
  border-radius: 12px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.25s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(188,154,108,0.20);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.btn {
  display: inline-block;
  padding: 12px 32px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--gold);
  border: none;
  border-radius: 24px;
  cursor: pointer;
  transition: background 0.25s ease;
  letter-spacing: 2px;
}

.btn:hover {
  background: var(--gold-dark);
}

.btn-block {
  display: block;
  width: 100%;
}

/* --- Contact Info --- */
.contact-list {
  max-width: 480px;
  margin: 0 auto;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(188,154,108,0.20);
}

.contact-item:last-child {
  border-bottom: none;
}

.contact-item .label {
  font-size: 15px;
  color: var(--ink);
  min-width: 70px;
  font-weight: 600;
}

.contact-item .value {
  font-size: 15px;
  color: var(--ink-light);
  word-break: break-all;
}

.contact-item a {
  color: var(--gold-dark);
  text-decoration: none;
}

.contact-item a:hover {
  text-decoration: underline;
}

/* --- Hero Glow --- */
.hero-glow {
  background: radial-gradient(ellipse at 50% 0%, rgba(188,154,108,0.15) 0%, transparent 60%);
  padding-top: 1px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .pagenav .nav-links a {
    padding: 6px 10px;
    font-size: 13px;
  }

  .pagenav .nav-logo {
    font-size: 18px;
  }

  .hero h1 {
    font-size: 30px;
  }

  .page-title h1 {
    font-size: 28px;
  }

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

  .card-grid-3 {
    grid-template-columns: 1fr;
  }

  .pagenav .nav-inner {
    flex-wrap: wrap;
    gap: 6px;
  }

  .pagenav {
    height: auto;
    padding: 10px 0;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 24px;
    letter-spacing: 3px;
  }

  .pagenav .nav-links {
    gap: 4px;
  }

  .pagenav .nav-links a {
    padding: 4px 8px;
    font-size: 12px;
  }

  .container {
    padding: 0 16px;
  }
}
