/* ============================================================
   site-chrome.css
   Shared header / footer "chrome" styles for offramp.xyz.
   Extracted from website-deploy/creators/index.html.
   Link this file from every page that uses the shared
   _partials/header.html and _partials/footer.html.
   ============================================================ */

/* ---------------------------------------------------------- */
/* tokens                                                      */
/* ---------------------------------------------------------- */
:root {
  --ink: #000000;
  --ink-soft: #6B6F85;
  --paper: #FAFAFC;
  --surface: #FFFFFF;
  --surface-alt: #F4F1FB;
  --accent: #4F46E5;
  --accent-soft: rgba(79,70,229,0.10);
  --accent-mid: rgba(79,70,229,0.20);
  --accent-glow: rgba(79,70,229,0.55);
  --c-green: #30D158;
  --c-purple: #7A5AF8;
  --ink-muted: rgba(17,17,17,0.45);
  --ink-subtle: rgba(17,17,17,0.65);
  --rule: rgba(30,35,64,0.1);
  --rule-mid: rgba(30,35,64,0.18);
  --rule-soft: rgba(30,35,64,0.08);
  --g-velocity: linear-gradient(90deg, #4F46E5 0%, #8B7FE8 55%, #B8A8F0 100%);
  --g-nebula:
    radial-gradient(ellipse at 20% 20%, #B8A8F0 0%, transparent 55%),
    radial-gradient(ellipse at 75% 60%, #8B7FE8 0%, transparent 55%),
    radial-gradient(ellipse at 50% 100%, #4F46E5 0%, transparent 60%);
  --c-orange: #FF8A3D;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------------------------------------------------------- */
/* base / reset                                               */
/* ---------------------------------------------------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------- */
/* header                                                     */
/* ---------------------------------------------------------- */
@keyframes headerSlideDown {
  from { opacity: 0; transform: translateY(-100%); }
  to   { opacity: 1; transform: translateY(0); }
}

.skip-link {
  position: absolute;
  top: 0;
  left: 12px;
  padding: 10px 16px;
  background: var(--ink);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  border-radius: 0 0 10px 10px;
  z-index: 100;
  transform: translateY(-110%);
  transition: transform .2s var(--ease);
  text-decoration: none;
}
.skip-link:focus-visible {
  transform: translateY(0);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px max(48px, calc((100vw - 1160px) / 2));
  gap: 32px;
  background: transparent;
  transition: background 0.4s, box-shadow 0.4s;
  animation: headerSlideDown 0.6s var(--ease) 0.2s both;
}

.brand-group { display: flex; align-items: center; gap: 12px; }

.brand { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; }
.brand:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.brand img {
  display: block;
  height: 26px;
  width: auto;
  filter: brightness(0);
}

/* ---------------------------------------------------------- */
/* lang switcher                                              */
/* ---------------------------------------------------------- */
.lang-switcher { position: relative; }
.lang-switcher summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 8px;
  border: none;
  background: transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
  user-select: none;
  transition: opacity .2s var(--ease);
}
.lang-switcher summary::-webkit-details-marker { display: none; }
.lang-switcher summary::marker { content: ""; }
.lang-switcher summary:hover { opacity: 0.7; }
.lang-switcher summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lang-switcher[open] summary { color: var(--accent); }
.lang-chevron { transition: transform .2s var(--ease); }
.lang-switcher[open] .lang-chevron { transform: rotate(180deg); }
.lang-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  list-style: none;
  margin: 0;
  padding: 6px;
  min-width: 168px;
  background: #fff;
  border: 1px solid rgba(30,35,64,0.1);
  border-radius: 12px;
  box-shadow: 0 12px 32px -8px rgba(17,17,17,0.18), 0 2px 6px rgba(30,35,64,0.06);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: langMenuIn .15s var(--ease);
}
@keyframes langMenuIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.lang-menu a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 12px;
  text-decoration: none;
  color: var(--ink-subtle);
  border-radius: 8px;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.lang-menu a:hover { background: rgba(30,35,64,0.04); color: var(--ink); }
.lang-menu a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.lang-menu .lang-code {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  opacity: 0.55;
  width: 22px;
  text-transform: uppercase;
}
.lang-menu .lang-name { font-size: 13px; font-weight: 500; }

@media (max-width: 640px) {
  .lang-switcher summary { font-size: 13px; padding: 6px 10px; text-transform: lowercase; letter-spacing: 0.02em; }
  .lang-menu { min-width: 140px; }
}

/* ---------------------------------------------------------- */
/* nav + actions + buttons                                    */
/* ---------------------------------------------------------- */
.nav {
  display: flex;
  gap: 32px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  opacity: 0.85;
  transition: opacity 0.15s;
}
.nav a:hover { opacity: 1; }
.nav a:focus-visible { outline-offset: 4px; border-radius: 6px; }

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-ghost, .btn-primary {
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 14px 28px;
  border-radius: 999px;
  transition: transform .2s var(--ease), box-shadow .3s var(--ease), border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.btn-ghost {
  color: var(--ink);
  background: transparent;
  border: 1px solid rgba(30,35,64,0.2);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-primary {
  background: #633DDB;
  color: #fff;
  box-shadow: 0 10px 30px -8px rgba(99,61,219,0.45), 0 2px 6px var(--rule-soft);
}
.btn-primary:hover {
  transform: translateY(-2px);
  background: #7451E3;
  box-shadow: 0 18px 40px -8px rgba(99,61,219,0.55), 0 2px 6px var(--rule);
}
.btn-primary:focus-visible, .btn-ghost:focus-visible {
  outline-offset: 3px;
  box-shadow: 0 0 0 3px var(--accent-mid);
}
.btn-primary:active, .btn-ghost:active {
  transform: translateY(0) scale(0.98);
  transition-duration: 80ms;
}

/* ---------------------------------------------------------- */
/* mobile menu                                               */
/* ---------------------------------------------------------- */
.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  margin-left: 4px;
  background: transparent;
  border: 0;
  cursor: pointer;
  position: relative;
  z-index: 12;
}
.burger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform .25s var(--ease), opacity .2s ease;
  transform-origin: center;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 11;
  background: var(--paper);
  padding: 88px 24px 32px;
  display: flex;
  flex-direction: column;
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform .35s var(--ease), opacity .25s ease, visibility 0s linear .35s;
}
.mobile-menu[data-open="true"] {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  transition: transform .35s var(--ease), opacity .25s ease, visibility 0s;
}
.mobile-menu-close {
  position: absolute;
  top: 18px;
  right: 16px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  border-radius: 999px;
}
.mobile-menu-close:active { background: var(--ink-faint); }
.mobile-menu-nav { display: flex; flex-direction: column; }
.mobile-menu-nav a {
  display: block;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule);
}
.mobile-menu-nav a:active { opacity: 0.6; }
body.menu-open { overflow: hidden; }

/* ---------------------------------------------------------- */
/* footer                                                     */
/* ---------------------------------------------------------- */
.footer-wrap {
  background: transparent;
  position: relative;
  z-index: 3;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.footer-wrap.in-view {
  opacity: 1;
  transform: translateY(0);
}
.site-footer {
  background: #0B0B0C;
  color: rgba(255,255,255,0.7);
  padding: 0 48px;
  position: relative;
  max-width: none;
}
.footer-grid {
  max-width: 1160px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  align-items: start;
  padding: 48px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-col h4 {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.65);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 20px;
}
.footer-col ul {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.footer-col a {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.15s ease, transform 0.2s ease;
  display: inline-block;
}
.footer-col a:hover {
  color: #fff;
  transform: translateX(3px);
}
.footer-bottom {
  max-width: 1160px;
  margin: 0 auto;
  padding: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-logo {
  display: block;
  height: 24px;
  width: auto;
  filter: brightness(0) invert(1);
}
.footer-legal {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
}
.footer-badges {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  letter-spacing: 0.02em;
}
.footer-badges span {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
}

/* ---------------------------------------------------------- */
/* responsive                                                 */
/* ---------------------------------------------------------- */
@media (max-width: 900px) {
  a, button, summary { min-height: 44px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .site-footer { padding: 48px 24px 0; }
}
@media (max-width: 820px) {
  .site-header { padding: 18px 20px; }
  .nav { display: none; }
  .burger { display: inline-flex; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .site-header { padding: 12px 16px; gap: 10px; align-items: center; }
  .brand-group { gap: 2px; }
  .site-header .brand img { height: 24px; }
  .actions { gap: 8px; align-items: center; }
  .actions .btn-ghost { display: none; }
  .btn-primary, .btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    font-size: 14px;
    line-height: 1;
    min-height: 44px;
  }

  .site-footer { padding: 48px 24px calc(28px + env(safe-area-inset-bottom)); }
  .footer-grid { padding: 8px 0 32px; gap: 36px; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .footer-col h4 { margin: 0 0 14px; font-size: 11px; }
  .footer-col ul { gap: 4px; }
  .footer-col a { font-size: 15px; line-height: 1.45; min-height: 0; }
  .footer-bottom { padding: 24px 0 0; gap: 20px; flex-direction: column; align-items: flex-start; }
  .footer-logo { height: 22px; }
  .footer-legal { font-size: 12px; line-height: 1.5; }
  .footer-badges { flex-wrap: wrap; gap: 8px; }
  .footer-badges span { font-size: 11px; padding: 5px 10px; }
}

/* ----------------------------------------------------------
   Figma mobile-header overrides (id="figma-mobile-header")
   These MUST come last to win source-order specificity.
   ---------------------------------------------------------- */
/* brand-wordmark / brand-mark swap */
.site-header .brand .brand-mark { display: none; }
@media (max-width: 640px) {
  .site-header .brand .brand-wordmark { display: none !important; }
  .site-header .brand .brand-mark { display: block !important; height: 28px; width: auto; }
  .site-header .brand-group { display: contents; }
  .site-header .brand { margin-right: auto; }
  .site-header { padding-left: 12px; padding-right: 12px; }
  .site-header .lang-switcher summary {
    display: inline-flex; align-items: center; gap: 4px;
    background: #f5f0ef; padding: 6px 12px; border-radius: 999px;
    font-size: 12px; font-weight: 500; letter-spacing: 0;
    text-transform: none; min-height: 0; color: #000;
  }
  .site-header .lang-menu { left: auto; right: 0; }
  .site-header .actions .btn-ghost { display: none; }
  .site-header .btn-primary {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 6px 12px; font-size: 12px; font-weight: 500;
    line-height: 1.32; min-height: 0; border-radius: 999px;
  }
}
