/* Reusable components: header, navigation, buttons, links, forms, cards, accordion, footer.
   Any future page can use these without changes. */

/* Buttons and links */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 28px; font: 600 15px/1 var(--font); border-radius: var(--r); border: 1.5px solid var(--brand); background: var(--brand); color: #fff; text-decoration: none; cursor: pointer; position: relative; overflow: hidden; isolation: isolate; transition: color var(--t-fast) ease-out, border-color var(--t-fast) ease-out; }
.btn::before { content: ""; position: absolute; inset: 0; background: var(--brand-d); transform: translateY(101%); transition: transform .35s var(--ease); z-index: -1; }
.btn:hover::before { transform: none; }
.btn:hover { border-color: var(--brand-d); }
.btn--ghost { background: transparent; color: var(--brand); }
.btn--ghost::before { background: var(--wash); }
.btn--light { background: #fff; color: var(--brand-d); border-color: #fff; }
.btn--light::before { background: var(--wash); }
.btn--line-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.btn--line-light::before { background: rgba(255,255,255,.12); }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 14px; }
.btns { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.link { color: var(--brand); font-weight: 600; text-decoration: none; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1.5px no-repeat; padding-bottom: 3px; transition: background-size .35s var(--ease); }
.link:hover { background-size: 0 1.5px; background-position: 100% 100%; }
.bg-dark .link { color: var(--brand-l); }
.bg-brand .link { color: #fff; }

/* Plus marker used on interactive rows */
.plus { flex: none; width: 46px; height: 46px; border: 1.5px solid currentColor; border-radius: 50%; position: relative; transition: background-color var(--t-fast), border-color var(--t-fast), transform .35s var(--ease); }
.plus::before, .plus::after { content: ""; position: absolute; left: 50%; top: 50%; background: currentColor; }
.plus::before { width: 16px; height: 1.5px; margin: -.75px 0 0 -8px; }
.plus::after { width: 1.5px; height: 16px; margin: -8px 0 0 -.75px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.94); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid transparent; transition: border-color var(--t) ease, box-shadow var(--t) ease; }
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 36px; height: var(--header); }
.logo { font: 700 27px/1 var(--font); letter-spacing: -.045em; color: var(--ink); text-decoration: none; margin-right: auto; white-space: nowrap; }
.logo i { display: inline-block; width: .23em; height: .23em; background: var(--brand); margin-left: .06em; }
.bg-dark .logo { color: #fff; }
.bg-dark .logo i { background: var(--brand-l); }

.nav { display: flex; gap: 30px; height: 100%; }
.nav-item { position: static; display: flex; }
.nav-item > a, .nav-item > button { display: flex; align-items: center; gap: 6px; height: 100%; font-size: 15px; font-weight: 600; text-decoration: none; color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer; position: relative; }
.nav-item > a::after, .nav-item > button::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; background: var(--brand); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav-item:hover > a::after, .nav-item:hover > button::after, .nav-item:focus-within > a::after, .nav-item:focus-within > button::after, .nav-item > a.is-active::after { transform: scaleX(1); }
.chev { width: 9px; height: 9px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform .25s var(--ease); }
.nav-item:hover .chev, .nav-item:focus-within .chev { transform: rotate(225deg) translate(-2px, -1px); }


.menu-btn { display: none; align-items: center; gap: 10px; background: none; border: 0; font-weight: 600; font-size: 15px; cursor: pointer; padding: 10px 0; color: var(--ink); }
.menu-btn span { width: 22px; height: 12px; position: relative; }
.menu-btn span::before, .menu-btn span::after { content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor; transition: transform .3s var(--ease), top .3s var(--ease); }
.menu-btn span::before { top: 0; }
.menu-btn span::after { top: 10px; }
.menu-btn[aria-expanded="true"] span::before { top: 5px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span::after { top: 5px; transform: rotate(-45deg); }

.mobile-nav { position: fixed; inset: var(--header) 0 0 0; background: #fff; z-index: 49; padding: 24px var(--gutter) 40px; overflow-y: auto; transform: translateY(-12px); opacity: 0; visibility: hidden; transition: opacity .25s ease, transform .3s var(--ease), visibility 0s linear .3s; }
.mobile-nav.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .25s ease, transform .3s var(--ease); }
.mobile-nav a { display: block; font-size: 28px; letter-spacing: -.03em; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.mobile-nav .btn { margin-top: 28px; width: 100%; justify-content: center; font-size: 16px; letter-spacing: 0; color: #fff; border-bottom: 1.5px solid var(--brand); }

@media (max-width: 1080px) {
  .nav, .site-header .btn { display: none; }
  .menu-btn { display: inline-flex; }
}

/* Forms */
.field label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 7px; color: var(--ink); }
.field input, .field select, .field textarea { width: 100%; font: 400 16px var(--font); padding: 14px 15px; border: 1px solid #8A8A8A; border-radius: var(--r); background: #fff; color: var(--ink); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--wash); }
.field textarea { min-height: 120px; resize: vertical; }
.field .hint { font-size: var(--fs-xs); color: var(--muted); margin-top: 6px; }
.field .error { font-size: var(--fs-xs); color: var(--err); margin-top: 6px; display: none; }
.field.has-error input, .field.has-error select { border-color: var(--err); }
.field.has-error .error { display: block; }

/* Tags */
.tag { display: inline-flex; align-items: center; font: 600 13px var(--font); padding: 5px 12px; border-radius: 99px; background: var(--wash); color: var(--brand-d); }
.tag--outline { background: transparent; border: 1px solid currentColor; color: inherit; opacity: .8; }

/* Accordion */
.acc-item { border-bottom: 1px solid var(--line); }
.acc-item:first-child { border-top: 1px solid var(--line); }
.acc-btn { width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 26px 0; background: none; border: 0; text-align: left; cursor: pointer; font-size: 22px; letter-spacing: -.02em; color: var(--ink); line-height: 1.3; }
.acc-btn .plus { width: 38px; height: 38px; color: var(--brand); }
.acc-btn[aria-expanded="true"] .plus { transform: rotate(45deg); background: var(--brand); border-color: var(--brand); color: #fff; }
.acc-btn:hover { color: var(--brand); }
.acc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.acc-panel > div { overflow: hidden; }
.acc-panel p { margin: 0 0 28px; color: var(--text); max-width: 62ch; padding-right: 60px; }
.acc-item.is-open .acc-panel { grid-template-rows: 1fr; }

/* Header turns dark while it sits over a dark section */
.site-header { transition: background-color .35s ease, border-color .35s ease; }
.site-header.is-dark { background: rgba(11,11,16,.94); border-bottom-color: rgba(255,255,255,.08); }
.site-header.is-dark .logo, .site-header.is-dark .nav-item > a, .site-header.is-dark .nav-item > button, .site-header.is-dark .menu-btn { color: #fff; }
.site-header.is-dark .logo i { background: var(--brand-l); }
.site-header.is-dark .btn { box-shadow: 0 10px 24px -10px rgba(91,79,240,.9); }
.logo, .nav-item > a, .nav-item > button, .menu-btn { transition: color .35s ease; }

/* One button shape across the site */
.btn { border-radius: 10px; }

/* Reading progress */
.progress { position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 60; background: linear-gradient(90deg, #5B4FF0, #6FB7FF); transform: scaleX(var(--sp, 0)); transform-origin: left; pointer-events: none; }

/* ---------- Mega menu: floating panel with icon items, featured card and footer strip ---------- */
.mega { position: absolute; left: 0; right: 0; top: 100%; padding-top: 10px; opacity: 0; visibility: hidden; transform: translateY(-6px); pointer-events: none;
  transition: opacity .22s ease, transform .35s var(--ease), visibility 0s linear .35s; }
.nav-item:hover .mega, .nav-item:focus-within .mega { opacity: 1; visibility: visible; transform: none; pointer-events: auto; transition: opacity .22s ease, transform .35s var(--ease); }
.site-header .mega .wrap { display: block; height: auto; }
.mega-panel { display: grid; grid-template-columns: minmax(0, 1fr) 330px; background: #fff; border-radius: 22px; border: 1px solid #E8E8F0; overflow: hidden;
  box-shadow: 0 1px 2px rgba(15,12,60,.06), 0 40px 80px -30px rgba(15,12,60,.45); }
.mega-main { padding: 22px 24px 18px; }
.mega-h { display: flex; justify-content: space-between; align-items: baseline; padding: 0 12px 12px; margin-bottom: 6px; border-bottom: 1px solid #F0F0F5; }
.mega-h b { font-size: 13px; font-weight: 600; color: #7A7A88; }
.mega-h a { font-size: 13.5px; font-weight: 600; color: var(--brand); text-decoration: none; }
.mega-h a:hover { text-decoration: underline; text-underline-offset: 4px; }
.mega-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.mi { display: flex; align-items: flex-start; gap: 14px; padding: 14px 12px; border-radius: 14px; text-decoration: none; color: var(--ink); transition: background-color .2s; }
.mi:hover, .mi:focus-visible { background: #F6F5FF; }
.mi-ic { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 11%, #fff); border: 1px solid color-mix(in srgb, var(--c) 18%, #fff); transition: background-color .25s, color .25s, transform .3s var(--ease); }
.mi-ic svg { width: 21px; height: 21px; }
.mi:hover .mi-ic { background: var(--c); color: #fff; transform: translateY(-1px); }
.mi b { display: block; font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 2px; transition: color .2s; }
.mi:hover b { color: var(--brand); }
.mi small { display: block; font-size: 13.5px; line-height: 1.4; color: #6B6B78; }
.nav-item:hover .mi, .nav-item:focus-within .mi { animation: miIn .45s var(--ease) both; }
.mega-grid .mi:nth-child(3), .mega-grid .mi:nth-child(4) { animation-delay: .04s; }
.mega-grid .mi:nth-child(5), .mega-grid .mi:nth-child(6) { animation-delay: .08s; }
@keyframes miIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.mega-feat { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 26px 26px 24px; color: #fff; text-decoration: none; overflow: hidden; isolation: isolate;
  background: radial-gradient(70% 60% at 100% 0%, rgba(139,133,255,.55), transparent 65%), linear-gradient(160deg, #2A23A8 0%, #17136A 100%); }
.mega-feat::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255,255,255,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px); background-size: 28px 28px; -webkit-mask: linear-gradient(200deg, #000, transparent 70%); mask: linear-gradient(200deg, #000, transparent 70%); }
.mf-tag { align-self: flex-start; font-size: 11.5px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: #7CF0B6; color: #12305A; }
.mf-insight .mf-tag { background: rgba(255,255,255,.16); color: #fff; }
.mega-feat b { font-size: 22px; line-height: 1.2; letter-spacing: -.03em; font-weight: 500; }
.mf-txt { font-size: 14px; line-height: 1.5; color: #CFCDFB; }
.mf-list { display: grid; gap: 7px; margin: 4px 0 6px; }
.mf-list i { font-style: normal; font-size: 13.5px; display: flex; align-items: center; gap: 9px; color: #fff; }
.mf-list i::before { content: ""; width: 16px; height: 16px; border-radius: 50%; flex: none; background: rgba(124,240,182,.2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.2 2.2 4.6-4.8' fill='none' stroke='%237CF0B6' stroke-width='2'/%3E%3C/svg%3E") center / 16px no-repeat; }
.mf-btn { flex: none; height: 42px; white-space: nowrap; margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; padding: 11px 16px; border-radius: 10px; background: #fff; color: var(--brand-d); transition: transform .3s var(--ease), box-shadow .3s; }
.mf-btn::after { content: ""; width: 6px; height: 6px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); }
.mf-btn.mf-ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.mega-feat:hover .mf-btn { transform: translateY(-2px); box-shadow: 0 10px 20px -10px rgba(0,0,0,.5); }
.mf-art { position: relative; height: 96px; margin: -4px 0 6px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); display: grid; grid-template-columns: 1fr 1fr; place-items: center; padding: 8px; }
.mf-art i { font-style: normal; font-size: 10.5px; font-weight: 700; padding: 4px 8px; border-radius: 7px; background: var(--c); color: #fff; }
.mf-art em { position: absolute; left: 50%; top: 50%; width: 26px; height: 26px; margin: -13px 0 0 -13px; border-radius: 8px; background: #fff; box-shadow: 0 0 0 6px rgba(255,255,255,.12); }
.mf-art em::after { content: ""; position: absolute; left: 9px; top: 9px; width: 8px; height: 8px; background: var(--brand); }
.mega-foot { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 14px 36px; background: #F7F7FB; border-top: 1px solid #EFEFF5; font-size: 13.5px; color: #6B6B78; }
.mega-foot a { font-weight: 600; color: var(--brand); text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.mega-foot a::after { content: ""; width: 6px; height: 6px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; transform: rotate(45deg); transition: transform .25s var(--ease); }
.mega-foot a:hover::after { transform: translateX(3px) rotate(45deg); }
@media (max-width: 1240px) { .mega-panel { grid-template-columns: minmax(0, 1fr) 280px; } .mi small { font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .nav-item:hover .mi { animation: none; } }
