/* LEXERY site — page styles */

/* ─── Layout primitives ───────────────────────────────────── */
:root { --nav-scrollbar-compensation: 0px; }

body {
  padding-top: 61px;
}

.container { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 720px) { .container { padding: 0 20px; } }

.section { position: relative; padding: 120px 0; }
.section--tight { padding: 80px 0; }
@media (max-width: 720px) {
  .section { padding: 56px 0; }
  .section--tight { padding: 44px 0; }
}
@media (max-width: 480px) {
  .section { padding: 44px 0; }
  .section--tight { padding: 36px 0; }
}

/* hairline grid background — Linear-style */
.gridlines {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(30,60,100,0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30,60,100,0.055) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 30%, transparent 80%);
}

/* ─── Top nav ─────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  background: rgba(255,255,255,0.82);
  border-bottom: 1px solid var(--line);
}
.nav.is-menu-open {
  background: rgba(255,255,255,0.94);
}
body.nav-menu-lock {
  overflow: hidden;
  padding-right: var(--nav-scrollbar-compensation);
}
.nav .container {
  max-width: none;
  padding: 0 32px;
  padding-right: calc(32px + var(--nav-scrollbar-compensation));
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 60px;
  gap: 24px;
}
.nav-left, .nav-right { display: flex; align-items: center; gap: 32px; }
.nav-left, .nav-right { flex-shrink: 0; }
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 600; letter-spacing: 0.02em; font-size: 14px;
  flex-shrink: 0;
}
.brand-mark { width: 22px; height: 22px; color: var(--fg); }
.brand-mark svg, .brand-mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.brand-name { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.14em; }
.nav .brand { font-size: 16px; }
.nav .brand-mark { width: 26px; height: 30px; }
.nav .brand-name { line-height: 19px; letter-spacing: 1.96px; }
.nav-links { display: flex; gap: 28px; font-size: 13.5px; color: var(--fg-2); }
.nav-links { flex-shrink: 0; }
.nav .nav-links { line-height: 16px; }
.nav-links a { transition: color 160ms; }
.nav-links a:hover { color: var(--fg); }

.nav-mobile-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: auto;
  flex-shrink: 0;
  place-items: center;
  border-radius: 12px;
  color: var(--fg);
  cursor: pointer;
  transition:
    background 180ms var(--ease),
    box-shadow 180ms var(--ease);
}
.nav-mobile-toggle:hover {
  background: transparent;
}
.nav.is-menu-open .nav-mobile-toggle {
  background: transparent;
}
.nav-mobile-toggle:focus-visible {
  outline: none;
}
.nav-menu-icon {
  width: 31px;
  height: 31px;
  display: block;
  position: relative;
}
.nav-menu-line {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  width: 18.08334px;
  height: 2.58333px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: 50% 50%;
  will-change: transform;
}
.nav-menu-line--top {
  transform: translate(-50%, -50%) translateY(-3.875px) rotate(0deg) scaleX(1);
}
.nav-menu-line--bottom {
  transform: translate(-50%, -50%) translateY(3.875px) rotate(0deg) scaleX(1);
}
.nav.is-menu-open .nav-menu-line--top {
  transform: translate(-50%, -50%) translateY(0) rotate(45deg) scaleX(1.21218);
}
.nav.is-menu-open .nav-menu-line--bottom {
  transform: translate(-50%, -50%) translateY(0) rotate(-45deg) scaleX(1.21218);
}

.nav-mobile-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 1px);
  height: calc(100vh - 61px);
  display: none;
  padding: 30px 20px calc(40px + env(safe-area-inset-bottom));
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background:
    linear-gradient(180deg, #FFFFFF 0%, #F8FBFF 46%, #EEF6FF 100%),
    linear-gradient(to right, rgba(30,60,100,0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(30,60,100,0.045) 1px, transparent 1px);
  background-size: auto, 80px 80px, 80px 80px;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  opacity: 1;
  visibility: hidden;
  pointer-events: none;
  clip-path: inset(0 0 100% 0);
  transform: translate3d(0, 0, 0) scaleY(0.985);
  transform-origin: top center;
}
.nav-mobile-list {
  display: flex;
  flex-direction: column;
  gap: 34px;
  width: min(100%, 640px);
  margin: 0 auto;
  opacity: 0;
  transform: translate3d(0, -18px, 0);
}
.nav-mobile-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.nav-mobile-kicker,
.nav-mobile-list a {
  opacity: 0;
  transform: translate3d(0, -16px, 0);
}
.nav-mobile-kicker {
  color: var(--fg-3);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.01em;
}
.nav-mobile-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  color: var(--fg);
  font-family: var(--font-display);
  font-size: clamp(28px, 7.8vw, 44px);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: 0;
  transition: color 180ms var(--ease);
}
.nav-mobile-label {
  min-width: 0;
  overflow-wrap: break-word;
}
.nav-mobile-list a:hover {
  background: transparent;
  color: var(--accent);
}
.nav-mobile-list .btn {
  width: 100%;
  border-color: transparent;
  box-shadow: none;
}
.nav-mobile-list .arr {
  flex-shrink: 0;
  margin-left: auto;
}
.nav-mobile-list .btn--ghost {
  background: transparent;
  color: var(--fg);
}
.nav-mobile-list .btn--primary {
  width: 100%;
  min-height: 0;
  margin-top: 0;
  padding: 0;
  border-radius: 0;
  color: var(--fg);
  background: transparent;
  font-family: var(--font-display);
  font-size: clamp(28px, 7.8vw, 44px);
  font-weight: 600;
  line-height: 1.08;
  box-shadow: none;
}
.nav-mobile-list .btn--primary:hover {
  color: var(--accent);
  background: transparent;
  transform: none;
}
.nav-mobile-list .btn:hover .arr {
  transform: none;
}
.nav.is-mobile .nav-links,
.nav.is-mobile .nav-right {
  display: none;
}
.nav.is-mobile .nav-mobile-toggle {
  display: grid;
}
.nav.is-mobile .nav-mobile-panel {
  display: block;
}
.nav.is-mobile.is-menu-open .nav-mobile-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  clip-path: inset(0 0 0 0);
  transform: translate3d(0, 0, 0) scaleY(1);
}
.nav.is-mobile.is-menu-open .nav-mobile-list {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
.nav.is-mobile.is-menu-open .nav-mobile-kicker,
.nav.is-mobile.is-menu-open .nav-mobile-list a {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}
/* ─── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: var(--r-md);
  font-size: 13px; font-weight: 500; letter-spacing: 0.01em;
  transition: all 180ms var(--ease);
  border: 1px solid transparent; white-space: nowrap;
}
.btn--ghost { color: var(--fg-2); }
.btn--ghost:hover { color: var(--fg); background: rgba(16,24,40,0.055); }
.btn--primary {
  background: var(--fg); color: white; font-weight: 600;
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 8px 20px -14px rgba(16,24,40,0.5);
}
.btn--primary:hover { background: #0B1220; transform: translateY(-1px); }
.btn--accent {
  background: var(--accent); color: white; font-weight: 600;
  box-shadow: 0 0 0 1px rgba(46,140,240,0.22), 0 8px 26px -12px rgba(30,111,199,0.42);
  transition: background 220ms var(--ease), transform 220ms var(--ease), box-shadow 220ms var(--ease);
}
.btn--accent:hover {
  background: var(--accent-bright);
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(46,140,240,0.30), 0 12px 30px -10px rgba(30,111,199,0.52);
}
.btn--accent:active {
  background: #1a6fc7;
  transform: scale(0.975) translateY(1px);
  box-shadow: 0 0 0 1px rgba(46,140,240,0.15), 0 3px 10px -6px rgba(30,111,199,0.25);
  transition-duration: 70ms;
}
.btn--secondary {
  color: var(--fg); background: rgba(16,24,40,0.04);
  border-color: var(--line-2);
}
.btn--secondary:hover { background: rgba(16,24,40,0.075); border-color: var(--line-3); }
.btn--lg { padding: 13px 20px; font-size: 14px; border-radius: var(--r-md); }
.btn .arr { display: inline-block; transition: transform 200ms var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

@media (max-width: 760px) {
  .nav .container {
    padding: 0 20px;
    padding-right: calc(20px + var(--nav-scrollbar-compensation));
  }
}

@media (max-width: 420px) {
  .nav-mobile-panel { padding-left: 20px; padding-right: 20px; }
  .nav-mobile-list { gap: 32px; }
  .nav-mobile-group { gap: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .nav-menu-line,
  .nav-mobile-panel,
  .nav-mobile-list,
  .nav-mobile-toggle,
  .nav-mobile-list a {
    transition: none;
    animation: none;
  }
}

/* ─── Reusable kit ─────────────────────────────────────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(77,161,255,0.08); border: 1px solid rgba(77,161,255,0.20);
  color: var(--accent-bright);
  font-size: 11px; font-weight: 500; letter-spacing: 0.10em; text-transform: uppercase;
}
.eyebrow .pulse {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent-bright);
  box-shadow: 0 0 0 0 rgba(77,161,255,0.6);
  animation: pulse 2s var(--ease) infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(77,161,255,0.6); }
  70% { box-shadow: 0 0 0 8px rgba(77,161,255,0); }
  100% { box-shadow: 0 0 0 0 rgba(77,161,255,0); }
}

.kicker {
  font-size: 11px; color: var(--fg-3); font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.022em;
  font-weight: 600;
  margin: 0;
  color: var(--fg);
}
h1 { font-size: clamp(36px, 6.5vw, 76px); line-height: 1.04; font-weight: 600; letter-spacing: -0.032em; }
h2 { font-size: clamp(26px, 4.4vw, 48px); line-height: 1.1; }
h3 { font-size: clamp(18px, 2.2vw, 24px); line-height: 1.2; font-weight: 500; }
p  { margin: 0; color: var(--fg-2); }
.lead { font-size: 17px; line-height: 1.55; color: var(--fg-2); max-width: 640px; }
@media (max-width: 720px) {
  .lead { font-size: 15.5px; }
}

/* ─── Footer ─────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--line);
  padding: 80px 0 48px; position: relative; overflow: hidden;
}
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr 1fr; gap: 40px;
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .footer-grid > div:first-child { display: none; }
}
.footer h4 {
  font-family: var(--font);
  font-size: 11px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--fg-3); margin-bottom: 18px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer ul a { font-size: 13.5px; color: var(--fg-2); transition: color 160ms; }
.footer ul a:hover { color: var(--fg); }
.footer-bottom {
  margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  color: var(--fg-3); font-size: 12px;
}
.footer-mark {
  font-size: 78px; font-weight: 900; font-family: var(--font-display);
  letter-spacing: -0.04em; color: transparent;
  -webkit-text-stroke: 1px rgba(16,24,40,0.08);
  position: absolute; right: -10px; bottom: -16px;
  pointer-events: none; user-select: none;
  font-size: clamp(80px, 18vw, 240px); line-height: 0.9;
}

@media (max-width: 720px) {
  .footer-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    align-items: start;
  }

  .footer-bottom span {
    min-width: 0;
  }
}

/* ─── Reveal animations ─────────────────────────────────── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal-stagger > * { opacity: 0; transform: translateY(14px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); }
.reveal-stagger.in > * { opacity: 1; transform: none; }
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0ms; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 70ms; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 140ms; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 210ms; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 280ms; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 350ms; }
.reveal-stagger.in > *:nth-child(7) { transition-delay: 420ms; }
.reveal-stagger.in > *:nth-child(8) { transition-delay: 490ms; }
