/* ================== SHARED ==================
   Loyi shared chrome — imported by landing (styles.css) and blog
   (BaseLayout.astro via <link>). Depends on design-tokens.css.

   If you edit this file, mirror the change in claude-design/ only when
   the rule moved out of / into landing's styles.css. Files sourced from
   this stylesheet are not sync'd to claude-design/.

   Contains: .atmosphere, .grain, main stacking, .nav family, .btn family,
   footer generic + .foot / .foot-meta.
============================================== */

/* Background atmosphere */
.atmosphere {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(1000px 600px at 80% -10%, color-mix(in oklab, var(--accent) 18%, transparent), transparent 60%),
    radial-gradient(800px 500px at -10% 40%, color-mix(in oklab, var(--accent) 8%, transparent), transparent 55%);
}
.atmosphere::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 75%);
}
.grain {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: var(--noise-opacity);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/></svg>");
}
main { position: relative; z-index: 2; }

/* ================== NAV ================== */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
  max-width: 1240px; margin: 0 auto; padding: 0 24px;
}
@media (min-width: 1280px) { .nav-inner { padding: 0 32px; } }

.logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
  letter-spacing: -0.01em;
  color: inherit; text-decoration: none;
}
.logo-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), color-mix(in oklab, var(--accent) 60%, #fff 30%));
  display: grid; place-items: center;
  color: var(--accent-ink); font-weight: 800; font-size: 15px;
  box-shadow: 0 0 0 1px var(--border-2), 0 8px 20px -6px color-mix(in oklab, var(--accent) 40%, transparent);
}
.nav-links { display: none; gap: 28px; font-size: 14px; color: var(--fg-2); }
.nav-links a { color: inherit; text-decoration: none; }
.nav-links a:hover { color: var(--fg); }
@media (min-width: 820px) { .nav-links { display: flex; } }
.nav-cta { display: flex; gap: 8px; align-items: center; }

/* Hamburger toggle — mobile only */
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--bg) 60%, transparent);
  color: var(--fg);
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.nav-toggle:hover { background: color-mix(in oklab, var(--fg) 6%, transparent); border-color: var(--border-2); }
@media (min-width: 820px) { .nav-toggle { display: none; } }

/* Mobile menu drawer */
.mobile-menu {
  position: fixed; inset: 0;
  z-index: 100;
  display: flex; justify-content: flex-end;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu-backdrop {
  position: absolute; inset: 0;
  background: color-mix(in oklab, var(--bg) 70%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: mobileMenuFade .18s ease-out;
}
.mobile-menu-panel {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: 4px;
  width: min(86vw, 320px);
  height: 100%;
  padding: 80px 24px 32px;
  background: var(--bg);
  border-left: 1px solid var(--border);
  box-shadow: -16px 0 40px -12px color-mix(in oklab, #000 20%, transparent);
  animation: mobileMenuSlide .22s cubic-bezier(.2,.8,.2,1);
  overflow-y: auto;
}
.mobile-menu-panel a {
  display: block;
  padding: 14px 12px;
  color: var(--fg);
  text-decoration: none;
  font-size: 17px;
  font-weight: 500;
  border-radius: 10px;
}
.mobile-menu-panel a:hover { background: color-mix(in oklab, var(--fg) 5%, transparent); }
.mobile-menu-panel a.btn { margin-top: 16px; justify-content: center; padding: 14px 16px; font-size: 15px; }
.mobile-menu-close {
  position: absolute; top: 18px; right: 18px;
  width: 40px; height: 40px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg);
  cursor: pointer;
}
.mobile-menu-close:hover { background: color-mix(in oklab, var(--fg) 6%, transparent); }
@keyframes mobileMenuFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mobileMenuSlide { from { transform: translateX(16px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ================== BUTTONS ================== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 10px;
  font-size: 14px; font-weight: 600;
  font-family: var(--font-sans);
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
  border: 1px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  color: inherit; text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { transform: translateY(-1px); }
.btn-ghost { color: var(--fg); border-color: var(--border-2); background: transparent; }
.btn-ghost:hover { background: color-mix(in oklab, var(--fg) 4%, transparent); }
.btn-lg { padding: 14px 22px; font-size: 15px; border-radius: 12px; }

/* ================== FOOTER ================== */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  color: var(--fg-3);
  font-size: 13px;
  position: relative; z-index: 2;
}
.foot {
  display: flex; flex-wrap: wrap; gap: 24px;
  justify-content: space-between; align-items: center;
  max-width: 1240px; margin: 0 auto; padding: 0 24px;
}
@media (min-width: 1280px) { .foot { padding: 0 32px; } }
.foot-meta {
  font-family: var(--font-mono); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
