/* ==========================================================================
   奥弗留学 — Design tokens
   Concept: 护照与签证页 —— 纸张、细线、印章。
   金色（logo 标准色）= 品牌与数字；印章红 = 印章与操作；其余保持安静。
   ========================================================================== */

:root {
  --ink: #1a1815;          /* 偏暖的近黑，和 logo 深棕协调 */
  --ink-soft: #3a3936;
  --paper: #f6f4ef;
  --paper-alt: #efebe1;
  --paper-deep: #e7e2d4;
  --gray: #716d65;
  --line: #d8d2c2;
  --stamp: #9a3324;
  --stamp-dark: #762417;
  --stamp-soft: rgba(154, 51, 36, 0.08);
  --stamp-light: #d98b78;   /* 深色背景上用的印章红，保证可读 */
  --gold: #897a2b;          /* logo 标准色 C50 M50 Y100 */
  --gold-deep: #3c3019;     /* logo 标准色 C65 M70 Y100 K50 */
  --gold-foil: #c9b46e;     /* 深色背景上的烫金 */

  /* 标题：拉丁字母/数字用 Fraunces，中文用本地子集思源宋体（与 logo 字标呼应） */
  --font-display: "Fraunces", "Aofu Serif SC", "Songti SC", "STSong", serif;
  --font-body: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-sub: "Fraunces", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: "IBM Plex Mono", "Noto Sans Mono", monospace;

  --container: 1180px;
  --radius: 2px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.22;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
/* 小标题用无衬线中文，层级更清楚，也不用加载更多字体 */
h3, h4 { font-family: var(--font-sub); letter-spacing: 0; }

p { margin: 0 0 1em; color: var(--ink-soft); text-wrap: pretty; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stamp);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--stamp);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 244, 239, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: 0;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.logo .mark { color: inherit; }
.logo .sub {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--gold);
  letter-spacing: 0.14em;
  margin-left: 10px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 40px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  font-size: 14px;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color 0.2s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--stamp);
  transition: right 0.25s var(--ease);
}
.nav-links a:hover::after,
.nav-links a.active::after { right: 0; }
.nav-links a.active { color: var(--stamp); }

.nav-cta {
  display: flex;
  align-items: center;
  gap: 24px;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.menu-toggle span {
  width: 22px; height: 1px;
  background: var(--ink);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  padding: 13px 26px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.25s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--stamp);
  border-color: var(--stamp);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--stamp);
  color: var(--stamp);
}
.btn-stamp {
  border: 1px solid var(--stamp);
  color: var(--stamp);
  background: var(--stamp-soft);
}
.btn-stamp:hover {
  background: var(--stamp);
  color: var(--paper);
}

/* ---------- Stamp signature element ---------- */
.stamp {
  --size: 132px;
  width: var(--size);
  height: var(--size);
  border-radius: 50%;
  border: 1.5px dashed var(--stamp);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--stamp);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  transform: rotate(-9deg);
  position: relative;
  flex-shrink: 0;
  transition: transform 0.4s var(--ease);
}
.stamp::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid var(--stamp);
  border-radius: 50%;
  opacity: 0.5;
}
.stamp:hover { transform: rotate(-3deg) scale(1.04); }
.stamp .stamp-line1, .stamp .stamp-line2 { white-space: nowrap; }
.stamp .stamp-line1 { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.stamp .stamp-line2 { opacity: 0.8; }

/* ---------- Hero ---------- */
.hero {
  padding: 72px 0 80px;
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 64px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(36px, 5vw, 58px);
  max-width: 16ch;
}
.hero .lede {
  font-size: 17px;
  max-width: 34em;
  color: var(--ink-soft);
  margin-bottom: 30px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
}

/* MRZ-style decorative strip, nods to passport machine-readable zone */
.mrz {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--gray);
  opacity: 0.55;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin-top: 28px;
}

/* ---------- Stat row ---------- */
.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats .container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 26px 28px;
  border-left: 1px solid var(--line);
}
.stat:first-child { border-left: none; }
.stat .num {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1.1;
  color: var(--gold);
}
.stat .label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray);
  letter-spacing: 0.04em;
  margin-top: 6px;
}

/* ---------- Sections ---------- */
section.block { padding: 80px 0; }
section.block.alt { background: var(--paper-alt); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 44px;
}
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); max-width: 14ch; }
.section-head .note { max-width: 26em; font-size: 15px; margin-bottom: 0.4em; }

/* ---------- Process steps ---------- */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.process-step {
  background: var(--paper);
  padding: 30px 28px;
  position: relative;
}
.process-step .step-no {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--stamp);
  letter-spacing: 0.08em;
  margin-bottom: 16px;
  display: block;
}
.process-step h3 { font-size: 18px; margin-bottom: 8px; }
.process-step p { font-size: 14px; margin-bottom: 0; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.card {
  border: 1px solid var(--line);
  padding: 30px 28px;
  background: var(--paper);
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.card:hover { border-color: var(--stamp); transform: translateY(-3px); }
.card h3 { font-size: 20px; margin-bottom: 12px; }
.card p { font-size: 14.5px; }
.card-icon {
  width: 40px; height: 40px;
  border: 1px solid var(--stamp);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--stamp);
  font-family: var(--font-mono);
  font-size: 13px;
  margin-bottom: 24px;
}
.card-list {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  font-size: 14px;
  color: var(--ink-soft);
}
.card-list li {
  padding: 9px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.card-list li::before {
  content: "·";
  color: var(--stamp);
  margin-right: 8px;
}

/* ---------- Case cards ---------- */
.case-card {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 30px;
  position: relative;
}
.case-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 20px;
}
.case-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gray);
  letter-spacing: 0.06em;
}
.case-offer {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--stamp);
  border: 1px solid var(--stamp);
  padding: 4px 10px;
  border-radius: 999px;
  transform: rotate(-4deg);
  white-space: nowrap;
}
.case-card h3 { font-size: 19px; }
.case-meta {
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--gray);
  margin-bottom: 14px;
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--ink);
  color: var(--paper);
  padding: 68px 0;
  text-align: center;
}
.cta-banner h2 {
  color: var(--paper);
  font-size: clamp(26px, 3.6vw, 38px);
  margin-bottom: 20px;
}
.cta-banner p { color: #c9c6bd; margin: 0 auto 30px; max-width: 34em; }
.cta-banner .btn-primary { background: var(--stamp); border-color: var(--stamp); color: var(--paper); }
.cta-banner .btn-primary:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.cta-banner .btn-ghost { color: var(--paper); border-color: #5b594f; }
.cta-banner .btn-ghost:hover { border-color: var(--paper); color: var(--paper); }
.cta-banner .actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--gray);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 10px; font-size: 14px; }
.footer-grid a:hover { color: var(--stamp); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray);
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Reveal-on-scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Page header (inner pages) ---------- */
.page-header {
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--line);
}
.page-header h1 { font-size: clamp(32px, 4.2vw, 46px); max-width: 18ch; }
.page-header .lede { font-size: 16px; max-width: 36em; margin-bottom: 0; }

/* ---------- About page specifics ---------- */
.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li {
  display: flex;
  gap: 16px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
}
.contact-list li:last-child { border-bottom: 1px solid var(--line); }
.contact-list .k {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray);
  width: 90px;
  flex-shrink: 0;
  letter-spacing: 0.04em;
}
.contact-list .v { font-size: 15px; }
.contact-list .v a { display: inline-block; padding: 8px 0; margin: -8px 0; }
.contact-list .v a:hover { color: var(--stamp); }

.placeholder-note {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--gray);
  background: var(--paper-alt);
  border: 1px dashed var(--line);
  padding: 10px 14px;
  margin-top: 6px;
}

form.inquiry {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
form.inquiry label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray);
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 8px;
}
form.inquiry input,
form.inquiry select,
form.inquiry textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--ink);
  border-radius: var(--radius);
}
form.inquiry input:focus,
form.inquiry select:focus,
form.inquiry textarea:focus {
  outline: none;
  border-color: var(--stamp);
}
form.inquiry textarea { resize: vertical; min-height: 110px; }
form.inquiry .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
form.inquiry .form-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
form.inquiry .form-consent { font-size: 12px; color: var(--gray); margin: 0; flex: 1 1 200px; }
form.inquiry .form-status { margin: 0; font-size: 14px; min-height: 0; }
form.inquiry .form-status:empty { display: none; }
form.inquiry .form-status.ok { color: #2f6b3a; background: rgba(47, 107, 58, 0.08); border-left: 3px solid #2f6b3a; padding: 10px 14px; }
form.inquiry .form-status.err { color: var(--stamp); background: var(--stamp-soft); border-left: 3px solid var(--stamp); padding: 10px 14px; }
form.inquiry .field-error input, form.inquiry .field-error textarea { border-color: var(--stamp); }
form.inquiry { position: relative; }

/* ---------- Focus visibility ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--stamp);
  outline-offset: 2px;
}

/* ---------- Responsive ---------- */
/* 网格子项默认 min-width:auto 会被不换行的内容（如 .mrz）撑宽，导致手机端文字被截断 */
.hero-grid > *, .split > *, .contact-grid > *, .footer-grid > * { min-width: 0; }
.contact-list .v, .footer-grid li { min-width: 0; overflow-wrap: anywhere; }

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-aside { align-items: flex-start; }
  .stats .container { grid-template-columns: repeat(2, 1fr); }
  /* 2×2 排列：去掉第三格多出的竖线，补上两行之间的横线 */
  .stat:nth-child(odd) { border-left: none; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .process { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .split, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 720px) {
  .container { padding: 0 20px; }

  /* 导航 */
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .menu-toggle {
    display: flex;
    width: 44px; height: 44px;
    align-items: center; justify-content: center;
    margin-right: -10px;
  }
  .menu-toggle span { transition: transform 0.25s var(--ease), opacity 0.2s; }
  .site-header.open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .site-header.open .menu-toggle span:nth-child(2) { opacity: 0; }
  .site-header.open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .nav-cta { gap: 0; }
  .site-header.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 24px rgba(22, 22, 26, 0.08);
    padding: 12px 20px 20px;
    gap: 4px;
  }
  .site-header.open .nav-links a { display: inline-block; padding: 10px 0; font-size: 15px; }

  /* 区块间距 */
  .hero { padding: 56px 0 64px; }
  .hero .lede { font-size: 16px; }
  section.block { padding: 64px 0; }
  .page-header { padding: 44px 0 40px; }
  .cta-banner { padding: 60px 0; }
  .section-head { flex-direction: column; align-items: flex-start; gap: 16px; margin-bottom: 36px; }

  .stats .container { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 24px 18px; }
  .stat .num { font-size: 30px; }
  .process { grid-template-columns: 1fr; }
  .process-step { padding: 28px 22px; }
  .card-grid { grid-template-columns: 1fr; }
  .card { padding: 28px 22px; }

  /* 页脚：品牌和联系方式各占一整行，导航与服务方向并排 */
  .site-footer { padding: 48px 0 28px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 20px; margin-bottom: 36px; }
  .footer-grid > div:first-child, .footer-grid > div:last-child { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
  .footer-grid li { margin-bottom: 4px; }
  .footer-grid li a { display: inline-block; padding: 5px 0; }

  /* 联系表单：字号 ≥16px，避免 iPhone 聚焦时自动放大页面 */
  form.inquiry input, form.inquiry select, form.inquiry textarea { font-size: 16px; }
  .contact-list li { gap: 12px; }
  .contact-list .k { width: 52px; }
}
