/* ============================================================
   Perpetual Group — 恒久集团
   Ink navy · porcelain · vermilion seal · muted gold
   ============================================================ */

:root {
  --ink: #14263c;
  --ink-2: #1d3a5f;
  --ink-3: #0d1a2b;
  --porcelain: #f4f5f2;
  --paper: #ffffff;
  --vermilion: #c3272b;
  --vermilion-dark: #9e1f23;
  --gold: #a8842c;
  --gold-soft: #c9ab63;
  --text: #24303e;
  --muted: #5a6878;
  --line: #dcdfd9;
  --line-dark: rgba(255, 255, 255, 0.14);

  --serif: "Noto Serif", "Noto Serif SC", "Songti SC", serif;
  --sans: "Noto Sans", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;

  --max: 1140px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--text);
  background: var(--porcelain);
  -webkit-font-smoothing: antialiased;
}

/* ---- Language switching ------------------------------------ */
html[data-lang="en"] .zh { display: none !important; }
html[data-lang="zh"] .en { display: none !important; }
html[data-lang="zh"] body { font-size: 16px; letter-spacing: 0.01em; }

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

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

/* ---- Type -------------------------------------------------- */
h1, h2, h3 { font-family: var(--serif); color: var(--ink); font-weight: 600; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--vermilion);
  margin-bottom: 18px;
}
.eyebrow::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--vermilion);
  flex: none;
}
.on-dark .eyebrow { color: var(--gold-soft); }
.on-dark .eyebrow::before { background: var(--gold-soft); }

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.2;
  max-width: 22em;
}
.section-lede {
  margin-top: 16px;
  max-width: 44em;
  color: var(--muted);
  font-size: 17.5px;
}
.on-dark .section-title { color: #fff; }
.on-dark .section-lede { color: rgba(255, 255, 255, 0.72); }

section { padding: 96px 0; }

/* ---- Seal mark --------------------------------------------- */
.seal {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--vermilion);
  color: #fff;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 24px;
  line-height: 1;
  border-radius: 7px;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.28), inset 0 0 0 5px var(--vermilion);
  transform: rotate(-3deg);
  user-select: none;
}

/* ---- Header ------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 38, 60, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-dark);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  margin-right: auto;
}
.brand-name {
  font-family: var(--serif);
  color: #fff;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.15;
}
.brand-name small {
  display: block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.34em;
  color: var(--gold-soft);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  flex-wrap: wrap;
}
.site-nav a {
  color: rgba(255, 255, 255, 0.82);
  text-decoration: none;
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: #fff; }
.site-nav a.active { color: #fff; border-bottom-color: var(--vermilion); }

.lang-toggle {
  display: flex;
  border: 1px solid var(--line-dark);
  border-radius: 4px;
  overflow: hidden;
}
.lang-toggle button {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.65);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 13px;
  cursor: pointer;
}
.lang-toggle button.active {
  background: var(--vermilion);
  color: #fff;
}

/* ---- Hero -------------------------------------------------- */
.hero {
  position: relative;
  background: linear-gradient(168deg, var(--ink) 0%, var(--ink-2) 62%, var(--ink-3) 100%);
  color: #fff;
  padding: 120px 0 0;
  overflow: hidden;
}
.hero .wrap { position: relative; z-index: 2; }
.stars {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.55;
  pointer-events: none;
}
.hero-motto {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 30px;
}
.hero-motto .seal { width: 52px; height: 52px; font-size: 28px; }
.hero h1 {
  color: #fff;
  font-size: clamp(36px, 5.6vw, 62px);
  line-height: 1.14;
  max-width: 16.5em;
  font-weight: 600;
}
.hero h1 em {
  font-style: normal;
  color: var(--gold-soft);
}
.hero-sub {
  margin-top: 26px;
  font-size: clamp(17px, 2vw, 20px);
  color: rgba(255, 255, 255, 0.78);
  max-width: 38em;
}
.hero-actions {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  font-size: 15.5px;
  letter-spacing: 0.03em;
  padding: 14px 30px;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: var(--vermilion); color: #fff; }
.btn-primary:hover { background: var(--vermilion-dark); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.4); color: #fff; }
.btn-ghost:hover { border-color: #fff; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-2); }

/* Stats band inside hero */
.stat-band {
  margin-top: 84px;
  border-top: 1px solid var(--line-dark);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 32px 28px 40px 0;
  border-right: 1px solid var(--line-dark);
}
.stat:last-child { border-right: 0; }
.stat b {
  display: block;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 600;
  color: #fff;
  line-height: 1.1;
}
.stat span {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.62);
}

/* ---- Why Bulgaria ------------------------------------------ */
.fact-grid {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}
.fact {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  padding: 34px 34px 38px;
}
.fact .figure {
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
}
.fact h3 { margin-top: 14px; font-size: 19px; }
.fact p { margin-top: 10px; color: var(--muted); font-size: 15.5px; }

/* ---- Process (numbered path) ------------------------------- */
.process { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.steps {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border-left: 1px solid var(--line);
}
.step {
  border-right: 1px solid var(--line);
  padding: 6px 24px 10px;
  position: relative;
}
.step .num {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--vermilion);
  letter-spacing: 0.08em;
}
.step .num::after {
  content: "";
  display: block;
  width: 22px;
  height: 1px;
  background: var(--vermilion);
  margin-top: 10px;
}
.step h3 { font-size: 17.5px; margin-top: 16px; line-height: 1.35; }
.step p { margin-top: 10px; font-size: 14.5px; color: var(--muted); }

/* ---- Industries cards -------------------------------------- */
.industry-grid {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.industry-card {
  background: var(--ink);
  color: #fff;
  padding: 38px 32px 34px;
  display: flex;
  flex-direction: column;
  min-height: 320px;
  text-decoration: none;
  transition: background 0.2s ease;
}
.industry-card:hover { background: var(--ink-2); }
.industry-card .zh-mark {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--gold-soft);
  letter-spacing: 0.3em;
}
.industry-card h3 { color: #fff; font-size: 22px; margin-top: 14px; }
.industry-card p {
  margin-top: 12px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.72);
  flex: 1;
}
.industry-card .more {
  margin-top: 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--gold-soft);
  letter-spacing: 0.06em;
}

/* ---- Partners ---------------------------------------------- */
.partners { background: var(--paper); border-top: 1px solid var(--line); }
.partner-strip {
  margin-top: 46px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.partner-strip li {
  list-style: none;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 14px 24px;
  background: var(--porcelain);
}
.partner-note { margin-top: 26px; font-size: 14px; color: var(--muted); }

/* ---- Leadership -------------------------------------------- */
.team-grid {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.person {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 34px 30px;
}
.person .initials {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--gold-soft);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 600;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}
.person h3 { font-size: 20px; }
.person .role {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--vermilion);
  margin-top: 6px;
}
.person p { margin-top: 12px; font-size: 15px; color: var(--muted); }
.person a { color: var(--ink-2); font-weight: 500; text-decoration: none; font-size: 15px; }
.person a:hover { text-decoration: underline; }

/* ---- Generic dark section ----------------------------------- */
.on-dark { background: var(--ink); color: rgba(255, 255, 255, 0.82); }

/* ---- Sector pages (industries.html) ------------------------- */
.page-hero {
  background: linear-gradient(168deg, var(--ink) 0%, var(--ink-2) 100%);
  color: #fff;
  padding: 88px 0;
  position: relative;
  overflow: hidden;
}
.page-hero h1 {
  color: #fff;
  font-size: clamp(32px, 4.6vw, 50px);
  line-height: 1.16;
  max-width: 18em;
}
.page-hero .hero-sub { margin-top: 20px; }

.sector { border-bottom: 1px solid var(--line); }
.sector:last-of-type { border-bottom: 0; }
.sector-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: start;
}
.sector h2 { font-size: clamp(26px, 3.4vw, 34px); }
.sector .body p { margin-top: 18px; color: var(--text); }
.sector .body p.dim { color: var(--muted); font-size: 15.5px; }
.roster {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--vermilion);
  padding: 30px 30px 34px;
}
.roster h4 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.roster ul { list-style: none; }
.roster li {
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
}
.roster li:last-child { border-bottom: 0; }
.roster li b { font-weight: 600; color: var(--ink); }
.roster li span { color: var(--muted); font-size: 14px; display: block; }

/* ---- Projects page ------------------------------------------ */
.ptag {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 3px;
  margin-bottom: 16px;
}
.ptag--op { background: #e6eee1; color: #3d6b34; }
.ptag--dev { background: #f3ead4; color: #8a6416; }
.ptag--done { background: #e4e9f0; color: #33517a; }
.ptag--rd { background: #f0e4e4; color: #9e1f23; }

.flagship { border-bottom: 1px solid var(--line); }
.flagship .roster { border-top-color: var(--gold); }
.spec-note {
  margin-top: 18px;
  padding: 14px 18px;
  background: var(--porcelain);
  border-left: 3px solid var(--gold);
  font-size: 14px;
  color: var(--muted);
}
.miles { list-style: none; margin-top: 22px; }
.miles li {
  position: relative;
  padding: 7px 0 7px 26px;
  font-size: 15px;
  color: var(--text);
}
.miles li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: var(--paper);
}
.miles li.done::before { background: var(--gold); }

.proj-grid {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.proj {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 32px 30px 34px;
  display: flex;
  flex-direction: column;
}
.proj-media {
  margin: -32px -30px 24px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.proj-media img {
  width: 100%;
  height: 170px;
  object-fit: cover;
  display: block;
}
.roster figure {
  margin: -30px -30px 24px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.roster figure img {
  width: 100%;
  height: 230px;
  object-fit: cover;
  display: block;
}
.proj .meta {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.proj h3 { font-size: 20px; line-height: 1.3; }
.proj p { margin-top: 12px; font-size: 15px; color: var(--muted); flex: 1; }
.proj .proj-link {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--vermilion);
  text-decoration: none;
}
.proj .proj-link:hover { text-decoration: underline; }

.spv-note {
  margin-top: 44px;
  font-size: 13.5px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 18px;
  max-width: 52em;
}

@media (max-width: 980px) {
  .proj-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .proj-grid { grid-template-columns: 1fr; }
}

/* ---- Values (about) ----------------------------------------- */
.value-grid {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.value {
  border-left: 3px solid var(--gold);
  padding: 6px 0 6px 26px;
}
.value h3 { font-size: 19px; }
.value p { margin-top: 10px; font-size: 15px; color: var(--muted); }

/* ---- Contact / CTA ------------------------------------------ */
.contact { background: var(--ink); color: rgba(255, 255, 255, 0.8); }
.contact-grid {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 44px;
}
.contact-block h3 {
  color: #fff;
  font-size: 15px;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.contact-block p { font-size: 15.5px; }
.contact-block a { color: var(--gold-soft); text-decoration: none; }
.contact-block a:hover { text-decoration: underline; }
.wechat-tag {
  display: inline-block;
  margin-top: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.35);
  padding: 8px 14px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

/* ---- Footer -------------------------------------------------- */
.site-footer {
  background: var(--ink-3);
  color: rgba(255, 255, 255, 0.5);
  padding: 30px 0;
  font-size: 13.5px;
}
.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}
.site-footer .motto { letter-spacing: 0.2em; text-transform: uppercase; font-size: 12px; }

/* ---- Reveal animation ---------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---- Focus -------------------------------------------------- */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* ---- Responsive --------------------------------------------- */
@media (max-width: 980px) {
  .site-header .wrap { flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; row-gap: 4px; }
  .brand { order: 1; }
  .lang-toggle { order: 2; margin-left: auto; }
  .site-nav { order: 3; flex-basis: 100%; gap: 22px; }
  .steps { grid-template-columns: 1fr; border-left: 0; }
  .step { border-right: 0; border-left: 1px solid var(--line); margin-bottom: 8px; }
  .industry-grid, .team-grid, .value-grid, .contact-grid { grid-template-columns: 1fr 1fr; }
  .sector-inner { grid-template-columns: 1fr; gap: 36px; }
  .stat-band { grid-template-columns: 1fr 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--line-dark); }
}
@media (max-width: 640px) {
  section { padding: 68px 0; }
  .hero { padding-top: 80px; }
  .fact-grid, .industry-grid, .team-grid, .value-grid, .contact-grid { grid-template-columns: 1fr; }
  .stat-band { grid-template-columns: 1fr; }
  .site-nav { gap: 16px; }
}
