/* ==========================================================
   OpeNext Foundation — styles
   Logo blues stay as the brand anchor; violet / pink / peach
   bring warmth and a younger, friendlier feel.
   ========================================================== */
:root {
  --navy: #1a2f6d;        /* logo dark blue — used for text */
  --blue: #3d62ac;        /* logo mid blue */
  --violet: #7b5cff;
  --violet-deep: #5a3fd6;
  --pink: #ff6fae;
  --peach: #ffae85;
  --sun: #ffd36e;
  --mint: #5fd4b8;

  --lilac: #f3eeff;
  --blush: #fff0f6;
  --cream: #fffaf4;
  --ink: #1b1f3b;
  --text: #3b3f5c;
  --muted: #6c7090;
  --line: #ebe6f7;
  --white: #ffffff;

  --grad: linear-gradient(110deg, var(--violet) 0%, var(--pink) 55%, var(--peach) 100%);

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", "Noto Sans SC", system-ui, sans-serif;
  --font-zh: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-zh-serif: "Noto Serif SC", "Songti SC", "SimSun", serif;

  --wrap: 1200px;
  --radius: 28px;
}

/* ---------- Language switching ---------- */
html[data-lang="zh"] body [lang="en"],
html[data-lang="en"] body [lang="zh"] { display: none !important; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
html[data-lang="zh"] body { font-family: var(--font-zh); line-height: 1.9; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); margin: 0; letter-spacing: -0.01em; }
html[data-lang="zh"] h1, html[data-lang="zh"] h2, html[data-lang="zh"] h3 { font-family: var(--font-zh-serif); letter-spacing: 0.02em; }
p { margin: 0 0 1.1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 32px; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 28px; border-radius: 999px;
  font: 700 15px/1 var(--font-body); text-decoration: none;
  border: 2px solid transparent; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
html[data-lang="zh"] .btn { font-family: var(--font-zh); }
.btn:hover { transform: translateY(-3px) rotate(-1deg); }
.btn svg { width: 18px; height: 18px; }
.btn-light, .btn-primary { background: var(--grad); color: var(--white); box-shadow: 0 14px 30px -12px rgba(123,92,255,.6); }
.btn-light:hover, .btn-primary:hover { box-shadow: 0 18px 36px -12px rgba(255,111,174,.7); }
.btn-ghost { color: var(--ink); border-color: var(--ink); background: var(--white); }

/* ---------- Header ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; color: var(--navy); transition: background .3s ease, box-shadow .3s ease; }
.site-header.scrolled {
  background: rgba(255,250,244,.85);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner { display: flex; align-items: center; gap: 32px; height: 78px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.brand-mark { width: 38px; height: auto; }
.brand-word {
  display: block; width: 118px; height: 33px; background: var(--navy);
  -webkit-mask: url(assets/logo-wordmark.png) left center / contain no-repeat;
          mask: url(assets/logo-wordmark.png) left center / contain no-repeat;
}
.nav { display: flex; align-items: center; gap: 26px; }
.nav a { text-decoration: none; font-size: 15px; font-weight: 600; color: var(--ink); position: relative; }
.nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; border-radius: 3px;
  background: var(--grad); transform: scaleX(0); transform-origin: left; transition: transform .25s ease;
}
.nav a:not(.nav-cta):hover::after { transform: scaleX(1); }
.nav-cta { padding: 9px 20px; border-radius: 999px; background: var(--ink); color: var(--white) !important; }
.nav-cta:hover { background: var(--violet); }
.lang-toggle {
  background: var(--white); border: 1.5px solid var(--line); border-radius: 999px; color: var(--ink); cursor: pointer;
  font: 600 13px var(--font-body); padding: 7px 12px;
}
.lang-toggle span { opacity: .45; }
.lang-toggle .sep { margin: 0 3px; }
html[data-lang="zh"] .lang-toggle [data-l="zh"],
html[data-lang="en"] .lang-toggle [data-l="en"] { opacity: 1; color: var(--violet); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--ink);
  background:
    radial-gradient(40% 50% at 85% 20%, rgba(255,111,174,.20), transparent 70%),
    radial-gradient(45% 55% at 10% 90%, rgba(123,92,255,.18), transparent 70%),
    radial-gradient(30% 40% at 55% 0%, rgba(255,211,110,.25), transparent 70%),
    var(--cream);
  padding: 150px 0 60px;
}
.hero-glow { display: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 48px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 13px/1 var(--font-body); letter-spacing: .04em;
  color: var(--violet-deep); background: var(--white); padding: 10px 16px; border-radius: 999px;
  box-shadow: 0 6px 20px -10px rgba(123,92,255,.5); margin-bottom: 28px;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pink); }
html[data-lang="zh"] .eyebrow { font-family: var(--font-zh); letter-spacing: .06em; }
.hero h1 { font-size: clamp(46px, 6.6vw, 88px); line-height: 1.04; font-weight: 600; }
html[data-lang="zh"] .hero h1 { line-height: 1.18; font-weight: 900; letter-spacing: .03em; }
.hero h1 .hl { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: clamp(18px, 2vw, 22px); color: var(--muted); margin: 26px 0 38px; max-width: 30em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-visual { display: grid; place-items: center; }
.orb { position: relative; width: min(440px, 80vw); aspect-ratio: 1; display: grid; place-items: center; }
.blob { position: absolute; border-radius: 50%; filter: blur(2px); }
.b1 { inset: 8%; background: linear-gradient(140deg, #d9ccff, #ffd1e6); border-radius: 46% 54% 58% 42% / 48% 42% 58% 52%; animation: morph 12s ease-in-out infinite; }
.b2 { width: 34%; aspect-ratio: 1; right: 2%; top: 6%; background: radial-gradient(circle at 35% 35%, #ffe7a8, var(--peach)); animation: float 7s ease-in-out infinite; }
.b3 { width: 20%; aspect-ratio: 1; left: 4%; bottom: 10%; background: radial-gradient(circle at 35% 35%, #c9b8ff, var(--violet)); animation: float 9s ease-in-out infinite reverse; }
.ring { position: absolute; inset: 0; border-radius: 50%; border: 2px dashed rgba(123,92,255,.25); animation: spin 50s linear infinite; }
.orb-mark { position: relative; width: 44%; filter: drop-shadow(0 18px 30px rgba(26,47,109,.25)); }
.chip {
  position: absolute; white-space: nowrap;
  background: var(--white); color: var(--ink); font-size: 14px; font-weight: 700;
  padding: 9px 15px; border-radius: 999px; box-shadow: 0 10px 28px -12px rgba(27,31,59,.35);
  animation: float 6s ease-in-out infinite;
}
.c1 { left: -4%; top: 18%; transform: rotate(-6deg); }
.c2 { right: -6%; bottom: 22%; transform: rotate(5deg); animation-delay: -2s; }
.c3 { left: 18%; bottom: -2%; transform: rotate(-3deg); animation-delay: -4s; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 50% { translate: 0 -10px; } }
@keyframes morph {
  50% { border-radius: 58% 42% 44% 56% / 42% 58% 42% 58%; transform: rotate(8deg) scale(1.03); }
}

.hubs {
  position: relative; list-style: none; margin: 80px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
}
.hubs li {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: rgba(255,255,255,.75); border: 1.5px solid var(--line); border-radius: 18px; padding: 14px 18px;
}
.hub-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--violet); }
.hubs li:nth-child(2) .hub-dot { background: var(--pink); }
.hubs li:nth-child(3) .hub-dot { background: var(--peach); }
.hubs li:nth-child(4) .hub-dot { background: var(--mint); }
.hub-name { font-weight: 700; font-size: 16px; color: var(--ink); }
.hub-time { margin-left: auto; font: 500 14px var(--font-body); color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Sections ---------- */
.section { padding: 120px 0; }
.section-head { display: flex; gap: 22px; align-items: flex-start; margin-bottom: 56px; }
.section-no {
  flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px;
  font: 600 24px/1 var(--font-display); color: var(--white); background: var(--grad);
  transform: rotate(-6deg); box-shadow: 0 12px 26px -12px rgba(255,111,174,.8);
}
.kicker {
  font: 700 13px/1 var(--font-body); letter-spacing: .14em; text-transform: uppercase;
  color: var(--pink); margin: 6px 0 12px;
}
html[data-lang="zh"] .kicker { font-family: var(--font-zh); letter-spacing: .18em; }
.section h2 { font-size: clamp(30px, 3.8vw, 50px); line-height: 1.15; font-weight: 600; max-width: 22em; }
html[data-lang="zh"] .section h2 { font-weight: 700; line-height: 1.3; }

/* Origin */
.origin { background: var(--white); border-radius: 48px 48px 0 0; position: relative; }
.origin-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: 72px; align-items: start; }
.prose .lead { font-size: 22px; line-height: 1.65; color: var(--ink); font-weight: 600; }
.quote-card {
  position: sticky; top: 110px; margin: 0; overflow: hidden;
  background: var(--grad); color: var(--white); border-radius: var(--radius); padding: 56px 44px 44px;
  transform: rotate(1.5deg); box-shadow: 0 30px 60px -30px rgba(123,92,255,.7);
}
.quote-light {
  position: absolute; width: 260px; height: 260px; top: -90px; right: -80px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,240,190,.85), transparent 65%);
}
.quote-card::after { content: "“"; position: absolute; right: 26px; bottom: -60px; font: 800 240px/1 var(--font-display); color: rgba(255,255,255,.18); }
.quote-card blockquote { position: relative; margin: 0 0 28px; }
.quote-zh { font: 900 clamp(38px, 4.2vw, 56px)/1.3 var(--font-zh-serif); letter-spacing: .06em; margin: 0; }
.quote-en { font: italic 400 clamp(26px, 2.6vw, 34px)/1.3 "Fraunces", Georgia, serif; margin: 0; }
.quote-card figcaption { position: relative; color: rgba(255,255,255,.85); font-size: 15px; font-weight: 600; }

/* Belief */
.belief { background: var(--lilac); }
.belief-intro { max-width: 860px; margin-bottom: 56px; }
.belief-statement { font-size: clamp(20px, 2.3vw, 28px); line-height: 1.55; color: var(--ink); font-weight: 700; margin: 32px 0; }
.belief-statement mark {
  background: linear-gradient(transparent 58%, rgba(255,111,174,.35) 58%);
  color: inherit; padding: 0 2px;
}
.pillars { display: grid; grid-template-columns: 1fr 1.35fr 1fr; gap: 20px; align-items: stretch; }
.pillar {
  background: var(--white); border-radius: var(--radius); padding: 36px 32px;
  border: 2px solid transparent; transition: transform .25s ease, border-color .25s ease;
}
.pillar:hover { transform: translateY(-6px) rotate(-.6deg); border-color: var(--violet); }
.pillar-icon {
  width: 56px; height: 56px; padding: 12px; border-radius: 18px; margin-bottom: 22px;
  color: var(--violet-deep); background: var(--lilac);
}
.pillars .pillar:nth-child(3) .pillar-icon { color: #d6407f; background: var(--blush); }
.pillar h3 { font-size: 23px; margin-bottom: 12px; }
.pillar p { font-size: 16px; color: var(--muted); }
.pillar-wide { background: var(--ink); }
.pillar-wide:hover { border-color: var(--pink); }
.pillar-wide h3 { color: var(--white); }
.pillar-wide p { color: rgba(255,255,255,.72); }
.pillar-wide .pillar-icon { color: var(--ink); background: var(--sun); }
.lifecycle { list-style: none; padding: 20px 0 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; position: relative; }
.lifecycle::before { content: ""; position: absolute; top: 26px; left: 6px; right: 6px; height: 3px; border-radius: 3px; background: var(--grad); }
.lifecycle li { position: relative; padding-top: 24px; font-size: 14px; color: rgba(255,255,255,.7); line-height: 1.5; }
.lifecycle li::before { content: ""; position: absolute; top: 0; left: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--white); border: 3px solid var(--pink); }
.lifecycle li:first-child::before { border-color: var(--violet); }
.lifecycle li:last-child::before { border-color: var(--peach); }
.lifecycle b { display: block; color: var(--white); font-size: 15px; margin-bottom: 2px; }

/* Impact */
.impact { background: var(--white); position: relative; }
.impact-intro { max-width: 820px; font-size: 19px; color: var(--text); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 48px 0 64px; }
.stats > div { border-radius: var(--radius); padding: 30px 26px; }
.stats > div:nth-child(1) { background: var(--lilac); }
.stats > div:nth-child(2) { background: var(--blush); }
.stats > div:nth-child(3) { background: #fff3e8; }
.stats > div:nth-child(4) { background: #e9faf5; }
.stats dt { font: 600 clamp(42px, 4.6vw, 64px)/1 var(--font-display); margin-bottom: 12px; }
.stats > div:nth-child(1) dt { color: var(--violet-deep); }
.stats > div:nth-child(2) dt { color: #e04d8d; }
.stats > div:nth-child(3) dt { color: #e7743f; }
.stats > div:nth-child(4) dt { color: #1f9e80; }
.stats dd { margin: 0; font-size: 15px; color: var(--text); font-weight: 600; line-height: 1.5; }
.programs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.program {
  position: relative; overflow: hidden;
  background: var(--cream); border: 2px solid var(--line); border-radius: var(--radius); padding: 40px 36px;
  transition: transform .25s ease, border-color .25s ease;
}
.program::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: var(--c, var(--violet)); }
.program:nth-child(1) { --c: var(--violet); }
.program:nth-child(2) { --c: var(--pink); }
.program:nth-child(3) { --c: var(--peach); }
.program:nth-child(4) { --c: var(--mint); }
.program:hover { transform: translateY(-4px); border-color: var(--c); }
.program-no {
  display: inline-grid; place-items: center; min-width: 44px; height: 32px; padding: 0 10px; border-radius: 999px;
  font: 700 14px var(--font-display); color: var(--ink); background: var(--c);
}
.program h3 { font-size: 25px; margin: 18px 0 6px; }
.program-sub { color: var(--violet-deep); font-weight: 700; font-size: 15px; margin-bottom: 16px; }
.program p:last-child { font-size: 16px; color: var(--text); margin: 0; }

/* Contact */
.contact {
  position: relative; overflow: hidden;
  background:
    radial-gradient(45% 60% at 0% 0%, rgba(255,211,110,.35), transparent 70%),
    radial-gradient(50% 60% at 100% 100%, rgba(255,111,174,.35), transparent 70%),
    linear-gradient(135deg, #efe8ff, #ffe8f2);
}
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; }
.contact h2 { margin-bottom: 24px; }
.contact-copy > p { color: var(--text); max-width: 30em; }
.contact-form {
  background: var(--white); border-radius: var(--radius); padding: 40px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  box-shadow: 0 30px 60px -30px rgba(123,92,255,.45);
}
.field { display: grid; gap: 8px; }
.field-full { grid-column: 1 / -1; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.field label { font-size: 14px; font-weight: 700; color: var(--ink); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--cream); border: 2px solid var(--line); border-radius: 16px;
  padding: 12px 14px; width: 100%;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--violet); background: var(--white); box-shadow: 0 0 0 5px rgba(123,92,255,.14);
}
.contact-form .btn { grid-column: 1 / -1; justify-self: start; }
.contact-form .btn[disabled] { opacity: .6; cursor: wait; transform: none; }
.form-status {
  grid-column: 1 / -1; margin: 0; padding: 14px 18px; border-radius: 16px;
  font-size: 15px; font-weight: 600;
}
.form-status.ok { background: #e9faf5; color: #17785f; }
.form-status.err { background: var(--blush); color: #b8326c; }

/* Footer */
.site-footer { background: var(--ink); color: rgba(255,255,255,.62); padding: 56px 0 40px; font-size: 14px; line-height: 1.7; }
.footer-inner { display: grid; grid-template-columns: auto 1fr; gap: 24px 64px; align-items: start; }
.footer-brand { display: flex; gap: 14px; align-items: center; }
.footer-mark { width: 42px; background: var(--white); border-radius: 12px; padding: 6px; }
.footer-brand strong { color: var(--white); font: 700 16px var(--font-body); }
.footer-hubs { margin: 2px 0 0; font-size: 13px; }
.footer-legal { margin: 0; max-width: 640px; }
.footer-copy { grid-column: 1 / -1; margin: 16px 0 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero-grid, .origin-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .orb { width: min(300px, 70vw); }
  .quote-card { position: relative; top: 0; transform: none; }
  .pillars { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .hubs { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { gap: 48px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .nav a:not(.nav-cta) { display: none; }
  .header-inner { gap: 12px; height: 66px; }
  .brand-word { width: 96px; }
  .hero { padding: 100px 0 44px; }
  .hubs { margin-top: 48px; gap: 10px; }
  .hubs li { padding: 12px 14px; }
  .chip { font-size: 12px; padding: 7px 12px; }
  .c1 { left: -2%; } .c2 { right: -2%; }
  .section { padding: 80px 0; }
  .origin { border-radius: 32px 32px 0 0; }
  .section-head { gap: 16px; margin-bottom: 36px; }
  .section-no { width: 52px; height: 52px; font-size: 20px; border-radius: 16px; }
  .stats { gap: 10px; }
  .stats > div { padding: 22px 18px; }
  .programs { grid-template-columns: 1fr; }
  .program, .pillar { padding: 30px 24px; }
  .quote-card { padding: 44px 28px 32px; }
  .contact-form { grid-template-columns: 1fr; padding: 26px 20px; }
  .lifecycle { grid-template-columns: 1fr; gap: 14px; }
  .lifecycle::before { top: 6px; bottom: 6px; left: 6px; right: auto; width: 3px; height: auto; background: linear-gradient(var(--violet), var(--pink), var(--peach)); }
  .lifecycle li { padding: 0 0 0 28px; }
  .footer-inner { grid-template-columns: 1fr; }
}
@media (max-width: 340px) {
  .nav-cta { display: none; }
}
