/* ============================================================
   SHARED STYLES · Accrove
   Variables, reset, nav, buttons, footer, mobile nav
   ============================================================ */

/* --- Design Tokens --- */
:root {
  --bg: #FFFFFF;
  --bg-muted: #F4F4F0;
  --ink: #0B132B;
  --ink-soft: #1A1F36;
  --ink-italic: #2D3350;
  --muted: #64748B;
  --muted-strong: #334155;
  --muted-foreground: #6B7280;
  --border: #E5E7EB;
  --border-strong: #D1D5DB;
  --cyan: #00CFFF;
}

/* --- Global Reset --- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; border: none; background: none; cursor: pointer; color: inherit; }

/* --- Nav (Desktop) --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 0 8px;
  padding-top: env(safe-area-inset-top);
}
.nav__container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px auto 0;
  max-width: 1152px;
  padding: 0 48px;
  height: 72px;
  background-color: rgba(255, 255, 255, 0);
  border: 1px solid rgba(11, 19, 43, 0);
  border-radius: 0px;
  box-shadow: 0 10px 36px -18px rgba(11, 19, 43, 0);
  backdrop-filter: blur(0) saturate(100%);
  -webkit-backdrop-filter: blur(0) saturate(100%);
  transition:
    max-width               700ms cubic-bezier(0.65, 0, 0.35, 1),
    padding                 700ms cubic-bezier(0.65, 0, 0.35, 1),
    height                  700ms cubic-bezier(0.65, 0, 0.35, 1),
    background-color        700ms cubic-bezier(0.65, 0, 0.35, 1),
    border-color            700ms cubic-bezier(0.65, 0, 0.35, 1),
    border-radius           700ms cubic-bezier(0.65, 0, 0.35, 1),
    box-shadow              700ms cubic-bezier(0.65, 0, 0.35, 1),
    backdrop-filter         700ms cubic-bezier(0.65, 0, 0.35, 1),
    -webkit-backdrop-filter 700ms cubic-bezier(0.65, 0, 0.35, 1);
}
.nav.scrolled .nav__container {
  max-width: 896px;
  padding: 0 20px;
  height: 56px;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(11, 19, 43, 0.08);
  border-radius: 16px;
  box-shadow: 0 10px 36px -18px rgba(11, 19, 43, 0.12);
}
.wordmark {
  font-size: 16px;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  line-height: 1;
  text-decoration: none;
}
.wordmark__svg {
  height: 1em;
  width: auto;
  display: block;
  color: inherit;
}
.wordmark__dash {
  display: inline-block;
  width: 0.21em;
  height: 1.5em;
  border-radius: 0.105em;
  background: var(--cyan);
  animation: blink 1.06s linear infinite;
}
@keyframes blink {
  0%, 49.99% { opacity: 1; }
  50%, 100% { opacity: 0; }
}
.nav__links {
  position: absolute;
  inset: 0;
  margin: auto;
  width: fit-content;
  height: fit-content;
  display: flex;
  gap: 32px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted-foreground);
  list-style: none;
  padding: 0;
}
.nav__links a { transition: color 160ms; }
.nav__links a:hover { color: var(--ink); }
.nav__links a.active { color: var(--ink); }
.nav__right { display: flex; align-items: center; gap: 10px; }

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  border-radius: 6px;
  transition: all 200ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.btn--sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn--outline { color: var(--ink); border: 1px solid var(--border-strong); background: rgba(255,255,255,0.5); }
.btn--outline:hover { background: var(--bg-muted); }
.btn--primary { background: var(--ink); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,0.1) inset, 0 8px 20px -8px rgba(11,19,43,0.24); }
.btn--primary:hover { background: #1A2447; transform: translateY(-1px); }

/* --- Footer --- */
.footer {
  position: relative;
  background: #0B132B;
  color: rgba(255, 255, 255, 0.74);
  padding: 80px 24px 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
@media (min-width: 768px) {
  .footer { padding: 100px 32px 56px; }
}
.footer__inner { max-width: 1180px; margin: 0 auto; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: 48px;
  margin-bottom: 56px;
}
.footer__brand { display: flex; flex-direction: column; gap: 18px; }
.footer__wordmark { font-size: 20px; color: #FFFFFF; }
.footer__social { display: flex; gap: 10px; }
.footer__bottom-left { display: flex; gap: 16px 20px; flex-wrap: wrap; align-items: center; }
.footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.68);
  transition: all 180ms;
}
.footer__social a:hover {
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.04);
}
.footer__social svg { display: block; }
.footer__tagline {
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.55);
  max-width: 280px;
  margin: 0;
}
.footer__col-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 18px;
}
.footer__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer__list a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.72);
  transition: color 160ms;
}
.footer__list a:hover { color: #FFFFFF; }
.footer__locale {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}
.footer__locale button {
  color: rgba(255, 255, 255, 0.45);
  padding: 4px 6px;
  border-radius: 4px;
  font-family: inherit;
  font-size: inherit;
  transition: color 160ms;
}
.footer__locale button:hover { color: rgba(255, 255, 255, 0.85); }
.footer__locale button.active { color: #FFFFFF; }
.footer__locale-sep { color: rgba(255, 255, 255, 0.22); }
.footer__bottom {
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.45);
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.02em;
}
@media (max-width: 900px) {
  .footer { padding: 72px 20px 40px; }
  .footer__grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px 32px;
    margin-bottom: 40px;
  }
  .footer__brand { grid-column: 1 / -1; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* --- Mobile Nav --- */
.nav__burger {
  display: none;
  position: relative;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  border-radius: 8px;
  z-index: 51;
}
.nav__burger:hover { background: rgba(11, 19, 43, 0.05); }
.nav__burger span {
  position: absolute;
  display: block;
  width: 22px;
  height: 1.8px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 400ms cubic-bezier(0.65, 0, 0.35, 1), opacity 200ms ease;
}
.nav__burger span:nth-child(1) { transform: translateY(-6px); }
.nav__burger span:nth-child(3) { transform: translateY(6px); }
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg); }

.nav-panel {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms cubic-bezier(0.65, 0, 0.35, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 96px 32px 56px;
}
.nav-panel[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}
.nav-panel__inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 360px;
  text-align: center;
}
.nav-panel__links {
  list-style: none;
  padding: 0;
  margin: 0 0 44px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.nav-panel__links li {
  transform: translateY(18px);
  opacity: 0;
  transition: transform 500ms cubic-bezier(0.65, 0, 0.35, 1), opacity 500ms ease;
}
.nav-panel[aria-hidden="false"] .nav-panel__links li {
  transform: translateY(0);
  opacity: 1;
}
.nav-panel__links li:nth-child(1) { transition-delay: 80ms; }
.nav-panel__links li:nth-child(2) { transition-delay: 130ms; }
.nav-panel__links li:nth-child(3) { transition-delay: 180ms; }
.nav-panel__links li:nth-child(4) { transition-delay: 230ms; }
.nav-panel__links a {
  font-family: 'Satoshi', sans-serif;
  font-weight: 500;
  font-size: 30px;
  letter-spacing: -0.024em;
  line-height: 1.1;
  color: var(--ink);
  padding: 6px 0;
  display: inline-block;
  text-decoration: none;
}
.nav-panel__links a:hover { color: var(--muted-strong); }
.nav-panel__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  background: var(--ink);
  color: #FFFFFF !important;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  border-radius: 12px;
  margin-bottom: 32px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.1) inset, 0 8px 20px -8px rgba(11,19,43,0.24);
  transform: translateY(18px);
  opacity: 0;
  transition: transform 500ms cubic-bezier(0.65, 0, 0.35, 1), opacity 500ms ease, background 200ms ease;
  transition-delay: 300ms;
  text-decoration: none;
}
.nav-panel[aria-hidden="false"] .nav-panel__cta {
  transform: translateY(0);
  opacity: 1;
}
.nav-panel__cta:hover { background: #1A2447; }
.nav-panel__legal {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  margin: 0;
  letter-spacing: 0.04em;
  opacity: 0;
  transition: opacity 400ms ease;
  transition-delay: 400ms;
}
.nav-panel[aria-hidden="false"] .nav-panel__legal { opacity: 1; }
.nav-panel__legal a {
  color: var(--muted-strong);
  border-bottom: 1px solid transparent;
  transition: border-color 160ms, color 160ms;
  padding: 4px;
}
.nav-panel__legal a:hover { color: var(--ink); border-bottom-color: var(--cyan); }

body.nav-panel-open { overflow: hidden; }

/* --- Responsive: Nav Mobile --- */
@media (max-width: 820px) {
  .nav__container { padding: 0 20px; }
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__right { display: none; }
}

/* --- Accessibility --- */
@media (prefers-reduced-motion: reduce) {
  .nav__container { transition: none !important; }
  .wordmark__dash { animation: none !important; }
  .nav-panel,
  .nav-panel__links li,
  .nav-panel__cta,
  .nav-panel__legal,
  .nav__burger span { transition: none !important; }
}
