/* ============================================================
   shared.css — common tokens & components for all Instatok pages
   ============================================================ */

/* ========== TOKENS ========== */
:root {
  --bg: #0a0908;
  --bg-2: #141110;
  --bg-3: #1d1917;
  --bg-card: #1a1614;
  --ink: #f7f3ea;
  --ink-soft: #e0d9cc;
  --ink-dim: #8a8278;
  --ink-faint: #56514a;
  --accent: #ff6b3a;
  --accent-hot: #ff4500;
  --accent-soft: rgba(255, 107, 58, 0.12);
  --accent-line: rgba(255, 107, 58, 0.35);
  --green: #4ade80;
  --warm: #f5c17a;
  --line: rgba(255, 243, 234, 0.08);
  --line-strong: rgba(255, 243, 234, 0.15);
  --line-bright: rgba(255, 243, 234, 0.3);
  --radius: 16px;
  --radius-sm: 10px;
}

/* ========== RESET ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', system-ui, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1200px circle at 15% 0%, rgba(245, 193, 122, 0.04), transparent 55%),
    radial-gradient(900px circle at 85% 30%, rgba(255, 243, 234, 0.02), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

/* grain */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

::selection { background: var(--accent); color: #0a0908; }

/* z-index layer above grain */
main, nav, footer, .page-container { position: relative; z-index: 2; }

/* generic max-width wrapper */
.container { max-width: 1240px; margin: 0 auto; padding: 0 28px; position: relative; z-index: 2; }

/* ========== NAV ========== */
nav {
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--line);
  z-index: 100;
}
.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.035em;
  color: var(--ink);
  text-decoration: none;
}
.logo-mark {
  width: 28px;
  height: 28px;
  position: relative;
  display: grid;
  place-items: center;
}
.logo-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  background: conic-gradient(from 180deg at 50% 50%, var(--accent), var(--warm), var(--accent));
  animation: spin 8s linear infinite;
}
.logo-mark::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 7px;
  background: var(--bg);
}
.logo-mark svg { position: relative; z-index: 1; width: 14px; height: 14px; }
@keyframes spin { to { transform: rotate(360deg); } }

.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-cta {
  background: var(--accent);
  color: #0a0908 !important;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}
.nav-cta:hover { background: var(--accent-hot); transform: translateY(-1px); }

/* ========== FOOTER ========== */
footer {
  padding: 40px 0;
  background: var(--bg);
  border-top: 1px solid var(--line);
  color: var(--ink-dim);
  font-size: 13px;
}
.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
footer a {
  color: var(--ink-soft);
  text-decoration: none;
  margin-left: 22px;
  transition: color 0.2s;
}
footer a:first-of-type { margin-left: 0; }
footer a:hover { color: var(--accent); }

/* ========== RESPONSIVE ========== */
@media (max-width: 720px) {
  .nav-links a:not(.nav-cta) { display: none; }
}
