:root {
  --ink: #0b1f2a;
  --ink-soft: #243b48;
  --paper: #f3f8f9;
  --accent: #0d8a7b;
  --accent-deep: #06665c;
  --line: rgba(11, 31, 42, 0.12);
  --hero-ink: #f4fbfa;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: "Sora", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}
html[dir="rtl"] body { direction: rtl; }
.shell { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; }

/* —— header —— */
.bar {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 6vw; flex-wrap: wrap;
  background: #eef5f6;
}
.bar.on-hero {
  position: absolute; top: 0; left: 0; right: 0;
  background: transparent;
}
.bar.on-hero .brand { color: #fff; }
.bar.on-hero .brand span { color: #9fe8dc; }
.bar.on-hero .nav a { color: rgba(255,255,255,0.88); }
.bar.on-hero .nav a:hover { color: #fff; border-color: rgba(255,255,255,0.5); }
.bar.on-hero .lang-wrap { color: rgba(255,255,255,0.85); }
.bar.on-hero .lang-select {
  background-color: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.28);
  color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23ffffff' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
}
.bar.on-hero .lang-select option { color: var(--ink); }

.brand {
  font-weight: 700; font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  letter-spacing: -0.03em; color: var(--ink); text-decoration: none;
}
.brand span { color: var(--accent-deep); }
.nav { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.nav a {
  color: var(--ink-soft); text-decoration: none; font-size: 0.92rem;
  border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--accent-deep); border-color: var(--accent); }
.lang-wrap { display: flex; align-items: center; gap: 8px; font-size: 0.82rem; color: var(--ink-soft); }
.lang-select {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.72) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%230b1f2a' d='M1 1l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 10px center;
  padding: 8px 32px 8px 12px; border-radius: 10px; font: inherit; color: var(--ink); cursor: pointer;
}

/* —— full-bleed hero —— */
.hero-bleed {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-content: end;
  padding: 18vh 6vw 10vh;
  color: var(--hero-ink);
  overflow: hidden;
}
.hero-bleed .hero-media {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 28, 34, 0.35) 0%, rgba(6, 28, 34, 0.55) 42%, rgba(6, 40, 42, 0.88) 100%),
    url("/assets/img/hero-teams-web.jpg") center/cover no-repeat;
  transform: scale(1.04);
  animation: heroKen 14s ease-in-out infinite alternate;
}
@keyframes heroKen {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.1) translate3d(-1.5%, -1%, 0); }
}
.hero-bleed .hero-copy {
  position: relative; z-index: 2;
  max-width: 640px;
  display: grid; gap: 18px;
  animation: rise 0.85s ease both;
}
.hero-bleed h1 {
  font-family: "Source Serif 4", Georgia, serif; font-weight: 700;
  font-size: clamp(2.3rem, 5.8vw, 3.9rem); line-height: 1.06;
  letter-spacing: -0.03em; max-width: 13ch;
  text-shadow: 0 10px 40px rgba(0,0,0,0.35);
}
.hero-bleed p.sub {
  font-size: clamp(1rem, 2vw, 1.2rem); line-height: 1.55;
  color: rgba(244, 251, 250, 0.88); max-width: 40ch;
}
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; }
.cta {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px; border-radius: 12px;
  background: linear-gradient(180deg, #119987, var(--accent-deep));
  color: #fff; text-decoration: none; font-weight: 700; font-size: 1.02rem;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 18px 36px rgba(0,0,0,0.34); }
.cta-hint { font-size: 0.88rem; color: rgba(244, 251, 250, 0.75); }

/* —— 4 grid —— */
.quad {
  padding: 8vh 6vw 4vh;
  max-width: 1120px;
  margin: 0 auto;
}
.quad > h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  margin-bottom: 8px;
}
.quad > .lead {
  color: var(--ink-soft); margin-bottom: 28px; max-width: 48ch; line-height: 1.5;
}
.quad-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.quad-grid a {
  position: relative;
  display: block;
  min-height: 240px;
  overflow: hidden;
  text-decoration: none;
  color: #fff;
  isolation: isolate;
}
.quad-grid a img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.55s ease;
}
.quad-grid a::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8, 30, 36, 0.08) 20%, rgba(6, 32, 36, 0.82) 100%);
  z-index: 1;
}
.quad-grid a:hover img { transform: scale(1.08); }
.quad-grid .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 2; padding: 22px 20px;
  display: grid; gap: 6px;
}
.quad-grid h3 {
  font-size: 1.12rem; font-weight: 700; letter-spacing: -0.02em;
}
.quad-grid p {
  font-size: 0.9rem; line-height: 1.4; color: rgba(255,255,255,0.84);
  max-width: 36ch;
}

/* legacy / inner pages */
.hero {
  display: grid; align-content: center; gap: 22px;
  padding: 10vh 6vw 6vh; max-width: 920px; position: relative;
}
.hero h1 {
  font-family: "Source Serif 4", Georgia, serif; font-weight: 700;
  font-size: clamp(2.1rem, 5.2vw, 3.6rem); line-height: 1.08;
  letter-spacing: -0.03em; max-width: 14ch;
}
.hero p.sub {
  font-size: clamp(1rem, 2vw, 1.2rem); line-height: 1.55;
  color: var(--ink-soft); max-width: 46ch;
}
.points {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px; max-width: 920px; padding: 0 6vw 6vh;
}
.points article { padding-top: 14px; border-top: 1px solid var(--line); }
.points h2 { font-size: 1rem; margin-bottom: 6px; }
.points p { font-size: 0.92rem; line-height: 1.45; color: var(--ink-soft); }
.guides { padding: 0 6vw 10vh; max-width: 920px; }
.guides > h2 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 8px;
}
.guides > .lead { color: var(--ink-soft); margin-bottom: 22px; max-width: 50ch; line-height: 1.5; }
.guide-list { display: grid; gap: 0; }
.guide-list a {
  display: block; padding: 18px 0; text-decoration: none; color: inherit;
  border-top: 1px solid var(--line);
}
.guide-list a:last-child { border-bottom: 1px solid var(--line); }
.guide-list h3 { font-size: 1.05rem; margin-bottom: 6px; color: var(--ink); }
.guide-list p { font-size: 0.92rem; color: var(--ink-soft); line-height: 1.45; }
.guide-list a:hover h3 { color: var(--accent-deep); }
footer {
  padding: 20px 6vw 28px; font-size: 0.8rem; color: rgba(11, 31, 42, 0.62);
  border-top: 1px solid var(--line); background: #eef5f6;
}
.article-wrap { padding: 12vh 6vw 10vh; max-width: 720px; }
.article-wrap .crumb { font-size: 0.88rem; color: var(--ink-soft); margin-bottom: 18px; }
.article-wrap .crumb a { color: var(--accent-deep); text-decoration: none; }
.article-wrap h1 {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin-bottom: 16px;
}
.article-wrap .meta { font-size: 0.86rem; color: var(--ink-soft); margin-bottom: 28px; }
.article-body { font-size: 1.02rem; line-height: 1.7; color: var(--ink); }
.article-body h2 { font-size: 1.2rem; margin: 28px 0 10px; }
.article-body p { margin-bottom: 14px; color: var(--ink-soft); }
.article-body ol, .article-body ul { margin: 0 0 16px 1.2em; color: var(--ink-soft); }
.article-body li { margin-bottom: 8px; }
.article-body [data-body] { display: none; }
html[lang="zh"] .article-body [data-body="zh"] { display: block; }
html:not([lang="zh"]) .article-body [data-body="en"] { display: block; }
.article-cta { margin-top: 32px; }
.article-cta .cta-hint { color: var(--ink-soft); }

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 820px) {
  .points { grid-template-columns: 1fr; }
  .hero h1, .hero-bleed h1 { max-width: none; }
  .quad-grid { grid-template-columns: 1fr; }
  .quad-grid a { min-height: 220px; }
  .hero-bleed { min-height: 92vh; align-content: end; padding-top: 22vh; }
}
