/* =============================================================
   北邮社杯 · 赞助企业问卷页
   与主页同一设计体系：深藏青 Hero + 浅色内容区 + 竞赛红点缀
   兼容 sponsor.js 的全部 class 钩子：
   company-item / primary / company-logo / logo-fallback / company-name
   / badge-primary / question / question-title / option / other-input
   / char-counter(.over) / form-* / btn-primary / field-error
   ============================================================= */

:root {
  --navy-900: #081A33;
  --navy-800: #0B2547;
  --navy-700: #10315C;
  --blue-500: #2E7CF6;
  --red-500: #C8102E;
  --gold-400: #F2C14E;
  --ink: #1C2B3A;
  --muted: #5F7186;
  --line: #E3EAF2;
  --bg: #F5F8FC;
  --white: #FFFFFF;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(11, 37, 71, .08);
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", "Noto Sans SC", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* ============ 导航 ============ */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(8, 26, 51, .82);
  backdrop-filter: blur(14px);
  padding: 9px 0;
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(135deg, var(--red-500), #F0523C);
  color: #fff; font-weight: 800; font-size: 17px;
  display: flex; align-items: center; justify-content: center;
}
.logo-text { color: #fff; font-size: 17px; font-weight: 700; letter-spacing: .08em; }
.logo-text em { font-style: normal; font-size: 11px; color: var(--gold-400); margin-left: 8px; letter-spacing: .2em; }

/* ============ 按钮 ============ */
.btn-primary {
  display: block; width: 100%;
  background: linear-gradient(120deg, var(--red-500), #E4402F);
  color: #fff; border: none; border-radius: 999px;
  padding: 15px; font-size: 17px; font-weight: 600; letter-spacing: .12em;
  cursor: pointer; transition: transform .25s, box-shadow .25s, background .25s;
  box-shadow: 0 8px 22px rgba(200, 16, 46, .32);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(200, 16, 46, .42); }
.btn-primary:disabled { background: var(--muted); box-shadow: none; cursor: not-allowed; }
.btn-ghost {
  color: #fff; border: 1.5px solid rgba(255, 255, 255, .5);
  background: rgba(255, 255, 255, .06);
  border-radius: 999px; text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 8px 20px; transition: background .2s, border-color .2s;
}
.btn-ghost:hover { background: rgba(255, 255, 255, .16); border-color: #fff; }

/* ============ Hero ============ */
.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 130px 24px 90px;
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(46, 124, 246, .32), transparent 60%),
    radial-gradient(700px 360px at 10% 115%, rgba(200, 16, 46, .2), transparent 60%),
    linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 55%, var(--navy-700) 100%);
  color: #fff;
}
.hero-glow {
  position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%);
  width: 620px; height: 620px; border-radius: 50%;
  background: radial-gradient(circle, rgba(46, 124, 246, .16), transparent 65%);
  pointer-events: none;
  animation: breathe 6s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: .9; }
  50% { transform: translate(-50%, -50%) scale(1.12); opacity: .6; }
}
.hero-inner { position: relative; z-index: 2; max-width: 780px; margin: 0 auto; }
.hero-badge {
  display: inline-block; padding: 7px 20px; border-radius: 999px;
  border: 1px solid rgba(242, 193, 78, .55); color: var(--gold-400);
  font-size: 13px; letter-spacing: .22em;
  background: rgba(242, 193, 78, .08); margin-bottom: 24px;
}
.hero-title { font-size: clamp(32px, 5vw, 48px); font-weight: 800; letter-spacing: .06em; }
.hero-sub { margin-top: 16px; font-size: 15.5px; color: rgba(255, 255, 255, .82); }

/* 进度指示 */
.progress {
  margin: 40px auto 0; display: flex; align-items: center; justify-content: center;
  gap: 14px; font-size: 13.5px; color: rgba(255, 255, 255, .55);
}
.progress-step { display: flex; align-items: center; gap: 8px; }
.progress-step .dot {
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .4);
}
.progress-step.active { color: #fff; font-weight: 600; }
.progress-step.active .dot { background: var(--gold-400); border-color: var(--gold-400); box-shadow: 0 0 10px rgba(242, 193, 78, .7); }
.progress-line { width: 56px; height: 1.5px; background: rgba(255, 255, 255, .25); }

/* ============ 内容区 ============ */
.page { max-width: 920px; margin: 0 auto; padding: 0 20px 40px; }
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 38px 36px;
  margin-top: -40px;               /* 卡片压 Hero 底边 */
  position: relative; z-index: 3;
}
.page .card + .card { margin-top: 28px; }

.sec-head { text-align: center; margin-bottom: 30px; }
.sec-tag { display: inline-block; font-size: 12px; letter-spacing: .3em; color: var(--blue-500); font-weight: 700; margin-bottom: 10px; }
.sec-head h2 { font-size: clamp(22px, 3vw, 28px); color: var(--navy-800); letter-spacing: .04em; }
.sec-head h2::after {
  content: ""; display: block; width: 40px; height: 4px; border-radius: 2px;
  background: linear-gradient(90deg, var(--red-500), var(--gold-400));
  margin: 12px auto 0;
}
.sec-head p { color: var(--muted); margin-top: 12px; font-size: 14px; }

/* ============ 企业墙 ============ */
.company-wall {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}
.company-item {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 16px 20px;
  text-align: center;
  background: #FAFBFD;
  transition: transform .3s, box-shadow .3s, border-color .3s;
}
.company-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.company-item.primary {
  border-color: rgba(200, 16, 46, .4);
  background: linear-gradient(180deg, #FFF9F9, #fff);
  box-shadow: 0 12px 28px rgba(200, 16, 46, .1);
}
.badge-primary {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(120deg, var(--red-500), #E4402F);
  color: #fff; font-size: 12px; font-weight: 600;
  padding: 3px 14px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 5px 12px rgba(200, 16, 46, .35);
}
.company-logo {
  height: 64px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.company-logo img { max-height: 64px; max-width: 100%; object-fit: contain; }
.logo-fallback {
  width: 64px; height: 64px; border-radius: 14px;
  background: linear-gradient(135deg, var(--navy-700), var(--blue-500));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 24px; font-weight: 800;
  box-shadow: 0 8px 18px rgba(11, 37, 71, .22);
}
.company-item.primary .logo-fallback {
  background: linear-gradient(135deg, var(--red-500), #F0523C);
}
.company-name { font-size: 14px; color: var(--ink); font-weight: 600; line-height: 1.5; }

/* ============ 表单 ============ */
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px;
}
.form-row { margin-bottom: 20px; }
.form-label { display: block; font-weight: 600; margin-bottom: 7px; font-size: 15px; }
.form-label em { color: var(--red-500); font-style: normal; margin-left: 2px; }
.form-input {
  width: 100%; padding: 11px 14px;
  border: 1.5px solid var(--line); border-radius: 10px;
  font-size: 15px; background: #fff; color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.form-input:focus {
  outline: none; border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(46, 124, 246, .12);
}
textarea.form-input { resize: vertical; min-height: 96px; }

/* ============ 题目（sponsor.js 动态生成） ============ */
.question {
  background: #FAFBFD;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 16px;
  transition: border-color .25s, box-shadow .25s;
}
.question:focus-within { border-color: rgba(46, 124, 246, .5); box-shadow: 0 0 0 4px rgba(46, 124, 246, .07); }
.question-title { font-weight: 600; margin-bottom: 10px; font-size: 15px; }
.option {
  display: block; padding: 7px 10px; margin: 0 -10px;
  font-size: 14.5px; cursor: pointer; border-radius: 8px;
  transition: background .15s;
}
.option:hover { background: rgba(46, 124, 246, .06); }
.option input { margin-right: 9px; transform: scale(1.15); accent-color: var(--blue-500); }
.other-input { margin: 6px 0 2px 30px; max-width: 340px; }
.char-counter { text-align: right; font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.char-counter.over { color: var(--red-500); font-weight: 600; }

/* 提交区 */
.submit-row { margin-top: 28px; margin-bottom: 0; }
.form-tip { text-align: center; color: var(--muted); font-size: 13px; margin-top: 12px; }
.field-error { color: var(--red-500); font-size: 13px; margin-top: 5px; }

/* ============ 页脚 ============ */
.footer { text-align: center; color: var(--muted); font-size: 12px; margin: 36px 0 8px; }

/* ============ 入场动画 ============ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-glow { animation: none; }
}

/* ============ 响应式 ============ */
@media (max-width: 680px) {
  .card { padding: 28px 20px; }
  .form-grid { grid-template-columns: 1fr; }
  .hero { padding: 110px 18px 76px; }
  .progress-line { width: 34px; }
  .other-input { margin-left: 0; max-width: 100%; }
}

/* 企业官网链接提示 */
.company-link { font-size: 12px; color: var(--blue-500); margin-top: 6px; }
a.company-item { text-decoration: none; }

/* ============ 顶栏展示图 & 新页头 ============ */
.top-banner { line-height: 0; }
.top-banner img {
  display: block; width: 100%; height: auto;
}
.page-head {
  background: linear-gradient(160deg, var(--navy-900) 0%, var(--navy-800) 60%, var(--navy-700) 100%);
  color: #fff; text-align: center; padding: 56px 24px 48px;
}
.page-head .page-title { font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: .06em; margin-top: 18px; }
.page-head .page-sub { max-width: 680px; margin: 14px auto 0; color: rgba(255,255,255,.82); font-size: 15px; }
.page-head .progress { margin-top: 34px; }
