/* TestOffical — community hub landing. Light by default, dark on request. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #eef1f5;
  --bg-soft: #e5e9ef;
  --surface: rgba(255, 255, 255, .88);
  --surface-solid: #ffffff;
  --surface-2: #f5f7fa;
  --line: rgba(23, 34, 51, .13);
  --line-strong: rgba(23, 34, 51, .24);
  --text: #1b2735;
  --text-soft: #26384d;
  --muted: #5f6c7c;
  --dim: #6f7c8d;
  --primary: #2f7fbe;
  --primary-2: #4b93ca;
  --primary-hover: #1e5f97;
  --primary-rgb: 47, 127, 190;
  --primary-soft: rgba(47, 127, 190, .10);
  --violet: #7d6fb0;
  --green: #2f9168;
  --amber: #a66b16;
  --shadow: 0 22px 70px rgba(35, 51, 72, .10);
  --shadow-soft: 0 10px 34px rgba(35, 51, 72, .07);
  --grad: linear-gradient(112deg, #1e5f97 0%, #2f7fbe 42%, #4b93ca 100%);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --display: "Manrope", "Inter", "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", Consolas, monospace;
  --radius: 24px;
  --radius-sm: 14px;
  --container: 1180px;
  --ease: cubic-bezier(.22, .8, .22, 1);
}

html[data-theme="dark"] {
  --bg: #13171e;
  --bg-soft: #0f1218;
  --surface: rgba(27, 32, 41, .84);
  --surface-solid: #1b2029;
  --surface-2: #222831;
  --line: rgba(230, 236, 244, .12);
  --line-strong: rgba(230, 236, 244, .22);
  --text: #e9edf3;
  --text-soft: #d7dee8;
  --muted: #a2adbb;
  --dim: #7d8897;
  --primary: #6f9fca;
  --primary-2: #8bb6db;
  --primary-hover: #8bb6db;
  --primary-rgb: 111, 159, 202;
  --primary-soft: rgba(111, 159, 202, .14);
  --violet: #a99bd0;
  --green: #7cc3a5;
  --amber: #d3b071;
  --shadow: 0 24px 80px rgba(0, 0, 0, .38);
  --shadow-soft: 0 12px 38px rgba(0, 0, 0, .24);
  --grad: linear-gradient(112deg, #4f7fa9 0%, #6f9fca 46%, #9cc0df 100%);
}

html { scroll-behavior: smooth; }

body.landing-page {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .35s var(--ease), color .35s var(--ease);
}

body.landing-page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(820px 520px at 8% -8%, rgba(47, 127, 190, .10), transparent 68%),
    radial-gradient(720px 520px at 96% 5%, rgba(75, 147, 202, .05), transparent 70%),
    radial-gradient(700px 520px at 70% 100%, rgba(47, 127, 190, .04), transparent 70%);
}

html[data-theme="dark"] body.landing-page::before {
  background:
    radial-gradient(820px 520px at 8% -8%, rgba(111, 159, 202, .15), transparent 68%),
    radial-gradient(720px 520px at 96% 5%, rgba(111, 159, 202, .06), transparent 70%),
    radial-gradient(700px 520px at 70% 100%, rgba(111, 159, 202, .04), transparent 70%);
}

::selection { background: rgba(47, 127, 190, .18); color: var(--text); }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 700; line-height: 1.06; letter-spacing: -.03em; color: var(--text); }
p { color: var(--muted); }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: fixed; left: 20px; top: -80px; z-index: 200;
  padding: 10px 16px; border-radius: 10px;
  background: var(--primary); color: #fff; font-weight: 600;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 20px; }

.landing-container { width: min(var(--container), calc(100% - 48px)); margin-inline: auto; position: relative; z-index: 2; }

.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* header */
.landing-header {
  position: sticky; top: 0; z-index: 50;
  border-bottom: 1px solid transparent;
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  transition: background .3s var(--ease), border-color .3s var(--ease);
}
.landing-header.is-scrolled { border-bottom-color: var(--line); background: color-mix(in srgb, var(--bg) 88%, transparent); }
.header-row { height: 78px; display: flex; align-items: center; gap: 26px; }
.landing-brand { display: inline-flex; align-items: center; gap: 11px; min-width: max-content; }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 12px; color: #fff; font-family: var(--display); font-weight: 800; font-size: 19px;
  background: var(--grad); box-shadow: 0 8px 24px rgba(var(--primary-rgb), .26);
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-copy strong { font-family: var(--display); font-size: 16px; letter-spacing: -.02em; }
.brand-copy small { color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; margin-top: 3px; }
.landing-nav { display: flex; align-items: center; gap: 22px; margin-left: 22px; }
.landing-nav a { color: var(--muted); font-size: 14px; font-weight: 550; transition: color .2s; }
.landing-nav a:hover, .landing-nav a.is-active { color: var(--text); }
.landing-nav a.is-active { position: relative; }
.landing-nav a.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -23px; height: 2px; border-radius: 2px; background: var(--grad); }
.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.header-link { color: var(--muted); font-size: 13px; font-weight: 550; padding: 8px 4px; }
.header-link:hover { color: var(--text); }

.theme-toggle {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 11px;
  border: 1px solid var(--line); border-radius: 10px; color: var(--muted);
  background: var(--surface); transition: color .2s, border-color .2s, background .2s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--line-strong); }
.theme-icon { width: 16px; height: 16px; }
.theme-icon-moon { display: none; }
html[data-theme="dark"] .theme-icon-sun { display: none; }
html[data-theme="dark"] .theme-icon-moon { display: block; }
.theme-label { font-size: 12px; font-weight: 600; }

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 42px; padding: 10px 18px; border-radius: 11px;
  font-size: 14px; font-weight: 650; letter-spacing: -.01em; white-space: nowrap;
  border: 1px solid transparent; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, border-color .2s;
}
.button svg { width: 17px; height: 17px; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--primary); box-shadow: 0 10px 24px rgba(var(--primary-rgb), .22); }
.button-primary:hover { background: var(--primary-hover); box-shadow: 0 14px 30px rgba(var(--primary-rgb), .3); }
html[data-theme="dark"] .button-primary { color: #0f1720; background: var(--primary); }
html[data-theme="dark"] .button-primary:hover { background: var(--primary-2); }
.button-ghost { color: var(--text); border-color: var(--line-strong); background: var(--surface); }
.button-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.button-quiet { color: var(--muted); padding-inline: 8px; }
.button-quiet:hover { color: var(--text); }
.button-small { min-height: 36px; padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.button-large { min-height: 50px; padding: 13px 22px; font-size: 15px; border-radius: 13px; }

/* mobile nav */
.menu-toggle { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 10px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; }
.menu-toggle span { width: 17px; height: 1.6px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.menu-toggle.is-open span:first-child { transform: translateY(3.3px) rotate(45deg); }
.menu-toggle.is-open span:last-child { transform: translateY(-3.3px) rotate(-45deg); }
.mobile-nav { display: none; }

/* hero */
.hero { padding: 82px 0 64px; position: relative; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(420px, .97fr); align-items: center; gap: 64px; }
.eyebrow, .section-kicker { display: inline-flex; align-items: center; gap: 9px; color: var(--primary); font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(5, 150, 105, .1); }
.hero h1 { margin-top: 22px; font-size: clamp(42px, 5.1vw, 70px); line-height: 1.02; letter-spacing: -.045em; }
.hero-lead { margin-top: 24px; max-width: 570px; font-size: 17px; line-height: 1.65; color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.customization-note {
  display: flex; align-items: flex-start; gap: 12px; margin-top: 28px; padding: 14px 16px;
  max-width: 530px; border: 1px solid var(--line); border-radius: 14px;
  background: color-mix(in srgb, var(--surface-solid) 66%, transparent);
}
.note-icon { flex: 0 0 auto; width: 31px; height: 31px; display: grid; place-items: center; border-radius: 9px; color: var(--primary); background: var(--primary-soft); }
.note-icon svg { width: 16px; height: 16px; }
.customization-note p { font-size: 13px; line-height: 1.55; color: var(--muted); }
.customization-note strong { color: var(--text-soft); font-weight: 650; }
.hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; color: var(--dim); font-family: var(--mono); font-size: 10px; letter-spacing: .09em; text-transform: uppercase; }
.hero-meta i { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }

.hero-visual { position: relative; padding: 30px 16px 30px 12px; }
.hub-glow { position: absolute; inset: 12% 8%; border-radius: 50%; background: radial-gradient(circle, rgba(var(--primary-rgb), .18), transparent 67%); filter: blur(26px); }
.hub-card {
  position: relative; z-index: 2; padding: 22px; border: 1px solid var(--line-strong);
  border-radius: 22px; background: var(--surface); box-shadow: var(--shadow);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  transform: rotate(-1.2deg);
}
.hub-top { display: flex; justify-content: space-between; align-items: center; padding-bottom: 17px; border-bottom: 1px solid var(--line); color: var(--dim); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.hub-online { display: inline-flex; align-items: center; gap: 6px; color: var(--green); }
.hub-online i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }
.hub-profile { display: flex; align-items: center; gap: 12px; padding: 18px 0 17px; }
.hub-avatar { width: 45px; height: 45px; display: grid; place-items: center; border-radius: 13px; background: var(--grad); color: #fff; font-family: var(--display); font-weight: 800; font-size: 21px; }
.hub-person { display: flex; flex-direction: column; line-height: 1.25; }
.hub-person strong { font-size: 15px; letter-spacing: -.01em; }
.hub-person span { color: var(--muted); font-family: var(--mono); font-size: 11px; margin-top: 3px; }
.hub-role { margin-left: auto; padding: 5px 8px; border-radius: 7px; background: var(--primary-soft); color: var(--primary); font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.hub-links { display: flex; flex-direction: column; gap: 4px; }
.hub-links a { display: flex; align-items: center; gap: 11px; padding: 10px 10px; border-radius: 11px; transition: background .2s, transform .2s; }
.hub-links a:hover { background: var(--primary-soft); transform: translateX(2px); }
.hub-link-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 8px; color: var(--primary); background: var(--surface-2); font-size: 14px; }
.hub-links a > span:nth-child(2) { display: flex; flex-direction: column; line-height: 1.25; }
.hub-links b { font-size: 12px; font-weight: 650; }
.hub-links small { color: var(--muted); font-size: 10px; margin-top: 2px; }
.hub-links em { margin-left: auto; color: var(--dim); font-style: normal; font-size: 13px; }
.hub-foot { display: flex; align-items: center; gap: 9px; padding-top: 17px; margin-top: 12px; border-top: 1px solid var(--line); color: var(--dim); font-family: var(--mono); font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
.hub-foot-line { height: 1px; flex: 1; background: var(--line); }

.float-card { position: absolute; z-index: 3; display: flex; align-items: center; gap: 7px; padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 11px; background: var(--surface-solid); box-shadow: var(--shadow-soft); font-size: 10px; }
.float-card b { font-family: var(--mono); font-weight: 500; letter-spacing: .03em; }
.float-card small { color: var(--muted); font-size: 9px; }
.float-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.float-dot-blue { background: var(--primary-2); }
.float-dot-violet { background: var(--violet); }
.float-forum { top: 12px; right: -8px; animation: float 6s ease-in-out infinite; }
.float-mail { bottom: 58px; right: -18px; animation: float 6.5s ease-in-out .8s infinite; }
.float-matrix { bottom: 16px; left: -14px; animation: float 7s ease-in-out .4s infinite; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* sections */
.services { padding: 52px 0 80px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 44px; margin-bottom: 32px; }
.section-head h2 { margin-top: 14px; font-size: clamp(32px, 3.8vw, 48px); line-height: 1.04; }
.section-head > p { max-width: 380px; font-size: 14px; line-height: 1.65; padding-bottom: 6px; }
.service-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.service-card {
  position: relative; display: flex; flex-direction: column; min-height: 275px; padding: 22px;
  border: 1px solid var(--line); border-radius: 18px; background: var(--surface);
  box-shadow: var(--shadow-soft); overflow: hidden;
  transition: transform .25s var(--ease), border-color .25s, box-shadow .25s;
}
.service-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--grad); opacity: .7; }
.service-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--primary) 36%, var(--line)); box-shadow: var(--shadow); }
.service-number { font-family: var(--mono); font-size: 10px; color: var(--dim); letter-spacing: .08em; }
.service-icon { width: 42px; height: 42px; display: grid; place-items: center; margin-top: 22px; border-radius: 12px; color: var(--primary); background: var(--primary-soft); font-size: 20px; }
.service-card h3 { margin-top: 17px; font-size: 20px; }
.service-card p { margin-top: 9px; font-size: 12px; line-height: 1.6; }
.service-link { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 20px; color: var(--primary); font-size: 12px; font-weight: 650; }
.service-link b { font-size: 15px; font-weight: 500; }
.service-card-mail .service-icon { color: var(--violet); background: color-mix(in srgb, var(--violet) 12%, transparent); }

.matrix-strip {
  display: flex; align-items: center; justify-content: space-between; gap: 40px;
  margin-top: 16px; padding: 26px 28px; border: 1px solid var(--line); border-radius: 18px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--primary) 8%, var(--surface-solid)), color-mix(in srgb, var(--violet) 7%, var(--surface-solid)));
}
.matrix-strip h3 { margin-top: 10px; font-size: 23px; }
.matrix-strip p { max-width: 620px; margin-top: 8px; font-size: 12px; line-height: 1.6; }
.matrix-strip-actions { display: flex; flex-wrap: wrap; gap: 9px; flex: 0 0 auto; }

/* account */
.account-section { padding: 22px 0 96px; }
.account-grid { display: grid; grid-template-columns: 1fr .9fr; gap: 64px; align-items: center; }
.account-copy h2 { margin-top: 14px; font-size: clamp(32px, 3.8vw, 48px); line-height: 1.04; }
.account-copy > p { max-width: 500px; margin-top: 20px; font-size: 14px; line-height: 1.7; }
.account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 25px; }
.account-panel { padding: 8px 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow-soft); }
.account-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.account-row span { color: var(--muted); }
.account-row b { color: var(--text-soft); font-weight: 600; text-align: right; }
.account-foot { display: flex; align-items: center; gap: 8px; padding: 16px 0; color: var(--dim); font-size: 10px; }
.account-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--green); }

/* footer */
.landing-footer { position: relative; z-index: 2; padding: 44px 0 24px; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--surface-solid) 45%, transparent); }
.footer-grid { display: flex; justify-content: space-between; gap: 60px; }
.footer-brand { max-width: 310px; }
.footer-brand p { margin-top: 15px; font-size: 12px; line-height: 1.6; }
.footer-links { display: grid; grid-template-columns: repeat(3, minmax(110px, 1fr)); gap: 48px; }
.footer-links h4 { margin-bottom: 12px; color: var(--text-soft); font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }
.footer-links a { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 38px; padding-top: 17px; border-top: 1px solid var(--line); color: var(--dim); font-family: var(--mono); font-size: 9px; letter-spacing: .04em; }

[data-reveal] { animation: reveal .65s var(--ease) both; animation-delay: var(--d, 0ms); }
@keyframes reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 980px) {
  .landing-nav, .header-link { display: none; }
  .menu-toggle { display: inline-flex; }
  .header-actions { margin-left: auto; }
  .mobile-nav { display: none; padding: 8px 24px 18px; border-top: 1px solid var(--line); background: var(--bg); }
  .mobile-nav.is-open { display: grid; gap: 2px; }
  .mobile-nav a { padding: 10px 0; color: var(--muted); font-size: 14px; border-bottom: 1px solid var(--line); }
  .mobile-nav a:hover { color: var(--text); }
  .mobile-nav .mobile-login { margin-top: 8px; padding: 11px 14px; border: 0; border-radius: 9px; background: var(--primary); color: #fff; text-align: center; font-weight: 650; }
  .hero { padding-top: 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-visual { max-width: 540px; margin-inline: auto; width: 100%; }
  .service-grid { grid-template-columns: repeat(2, 1fr); }
  .account-grid { grid-template-columns: 1fr; gap: 34px; }
  .footer-grid { flex-direction: column; gap: 32px; }
}

@media (max-width: 640px) {
  .landing-container { width: min(var(--container), calc(100% - 32px)); }
  .header-row { height: 68px; gap: 12px; }
  .brand-copy small { display: none; }
  .theme-label { display: none; }
  .theme-toggle { padding: 0 9px; }
  .hero { padding: 42px 0 44px; }
  .hero h1 { font-size: clamp(38px, 11.5vw, 54px); }
  .hero-lead { font-size: 15px; }
  .hero-actions .button { flex: 1 1 auto; }
  .hero-visual { padding: 16px 4px 34px; }
  .hub-card { padding: 17px; transform: none; }
  .float-forum { top: -9px; right: -2px; }
  .float-mail { bottom: 33px; right: -3px; }
  .float-matrix { bottom: -6px; left: -2px; }
  .float-card small { display: none; }
  .section-head { display: block; }
  .section-head > p { margin-top: 14px; }
  .service-grid { grid-template-columns: 1fr; }
  .service-card { min-height: 230px; }
  .matrix-strip { display: block; padding: 22px; }
  .matrix-strip-actions { margin-top: 18px; }
  .services { padding-bottom: 58px; }
  .account-section { padding-bottom: 64px; }
  .footer-links { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .footer-bottom { display: block; line-height: 2; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

html[data-theme="dark"] .brand-mark, html[data-theme="dark"] .hub-avatar, html[data-theme="dark"] .mobile-nav .mobile-login, html[data-theme="dark"] .skip-link { color: #0f1720; }
