/* =========================================================
   PR&R LIGHT THEME - shared design system
   Technical, hairline-bordered, left-aligned. Boxes and
   containers built from thin gray lines. Inspired by Linear /
   Vercel / Stripe Press grid systems.
   ========================================================= */

:root {
  /* Surfaces */
  --bg:            #ffffff;
  --surface-1:     #fafbfc;   /* whisper container fill */
  --surface-2:     #f4f6f8;   /* slightly heavier panel */
  --surface-3:     #eef1f4;   /* sub-panel */

  /* Hairline borders - the structural language */
  --line:          #e4e7eb;   /* primary hairline */
  --line-soft:     #eef0f3;   /* subtler - interior dividers */
  --line-strong:   #d4d8de;   /* hover / focus */
  --line-grid:     #f1f3f6;   /* extremely subtle, for grid backgrounds */

  /* Aliases (backwards-compat with prior tokens) */
  --border:        #e4e7eb;
  --border-soft:   #eef0f3;
  --border-strong: #d4d8de;
  --border-hover:  #d4d8de;

  /* Ink */
  --ink-1:         #0a0a0c;
  --ink-2:         #1f2937;
  --ink-3:         #475569;
  --ink-4:         #64748b;
  --ink-5:         #94a3b8;

  /* Brand blue - used throughout */
  --blue:          #2563eb;
  --blue-600:      #2563eb;
  --blue-500:      #3b82f6;
  --blue-700:      #1d4ed8;
  --blue-soft:     #eff6ff;
  --blue-soft-2:   #dbeafe;

  /* Status */
  --success:       #16a34a;
  --warn:          #ca8a04;

  /* Typography */
  --font-sans:     'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono:     'JetBrains Mono', ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Radii - minimal, technical */
  --r-xs: 2px;
  --r-sm: 3px;
  --r-md: 4px;
  --r-lg: 6px;
  --r-xl: 8px;
  --r-2xl: 8px;     /* alias - keep large containers tight */
  --r-pill: 999px;  /* still used by a couple of legacy spots */

  /* Shadows - almost none. Borders carry the load. */
  --shadow-xs: 0 1px 0 rgba(15, 23, 42, 0.02);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 6px 16px -8px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 40px -16px rgba(15, 23, 42, 0.14);
  --shadow-blue: 0 6px 18px -8px rgba(37, 99, 235, 0.30);

  /* Layout */
  --maxw:        1240px;
  --maxw-narrow:  920px;
  --maxw-wide:   1360px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }
html, body {
  background: var(--bg);
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
}

/* Faint dot-grid background - sets the texture of the page */
body {
  background-image: radial-gradient(circle, rgba(15, 23, 42, 0.06) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: 0 0;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

::selection { background: var(--blue-soft-2); color: var(--ink-1); }

::-webkit-scrollbar          { width: 10px; height: 10px; }
::-webkit-scrollbar-track    { background: var(--bg); }
::-webkit-scrollbar-thumb    { background: var(--line-strong); border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--ink-5); }

/* ====================================================
   CONTAINERS - hairline-defined boxes
   ==================================================== */
.container        { max-width: var(--maxw);        margin: 0 auto; padding: 0 32px; }
.container-wide   { max-width: var(--maxw-wide);   margin: 0 auto; padding: 0 32px; }
.container-narrow { max-width: var(--maxw-narrow); margin: 0 auto; padding: 0 32px; }

/* Frame - primary hairline-bordered surface */
.frame {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.frame.flush     { border-radius: 0; }
.frame.tinted    { background: var(--surface-1); }

/* Specimen - labeled bordered container with header strip */
.specimen { border: 1px solid var(--line); background: #fff; border-radius: var(--r-md); }
.specimen-head {
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-1);
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-4);
}
.specimen-body { padding: 28px 28px; }

/* Eyebrow - labels not pills */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}
.eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  background: var(--blue);
}

/* Tag-style label (rectangle, hairline, mono) */
.label-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: #fff;
  border: 1px solid var(--line);
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  border-radius: var(--r-xs);
}
.label-tag.blue {
  border-color: rgba(37, 99, 235, 0.28);
  background: var(--blue-soft);
  color: var(--blue);
}
.label-tag .dot { width: 6px; height: 6px; background: currentColor; }

/* Headings */
h1, h2, h3, h4 {
  color: var(--ink-1);
  font-weight: 600;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

/* ====================================================
   NAV - flat bar, rectangular, hairline-divided
   ==================================================== */
nav.site-nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--maxw-wide);
  margin: 0 auto;
  padding: 14px 32px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.nav-mark { display: flex; align-items: center; justify-self: start; }
.nav-mark a { display: flex; align-items: center; }
.nav-logo { height: 36px; width: auto; display: block; }

/* Centered primary links - thin dividers between items */
.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  justify-self: center;
}
.nav-links > li { display: flex; align-items: center; }
.nav-links > li + li::before {
  content: "";
  display: block;
  width: 1px;
  height: 14px;
  background: var(--line-strong);
  margin: 0 6px;
  flex-shrink: 0;
}
.nav-links a {
  display: inline-block;
  padding: 8px 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-3);
  border-radius: var(--r-xs);
  transition: color .18s var(--ease), background .18s var(--ease);
  white-space: nowrap;
}
.nav-links a:hover { color: var(--ink-1); background: var(--surface-2); }
.nav-links a.active { color: var(--ink-1); background: var(--surface-2); }

/* Right zone - Contact link sits next to the Discord CTA */
.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  justify-self: end;
}
.nav-contact {
  display: inline-block;
  padding: 8px 4px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-3);
  white-space: nowrap;
  transition: color .18s var(--ease);
}
.nav-contact:hover { color: var(--ink-1); }
.nav-contact.active { color: var(--ink-1); }

.discord-cta {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  background: var(--blue);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.005em;
  border-radius: var(--r-sm);
  border: 1px solid var(--blue);
  box-shadow: var(--shadow-blue);
  transition: transform .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
  position: relative;
  overflow: hidden;
}
.discord-cta:hover {
  background: var(--blue-700);
  border-color: var(--blue-700);
  transform: translateY(-1px);
}
.discord-cta::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.20), transparent);
  transform: translateX(-100%);
  animation: shimmer 3.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}
.discord-cta svg { width: 16px; height: 16px; }

.nav-burger {
  display: none;
  background: transparent; border: 0; cursor: pointer; padding: 0;
  width: 40px; height: 40px;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-burger span {
  display: block; width: 22px; height: 1.5px; background: var(--ink-1);
  transition: transform .3s var(--ease), opacity .2s ease;
  transform-origin: center;
}
.nav-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(255,255,255,0.98);
  backdrop-filter: blur(14px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 32px; padding: 24px;
  opacity: 0; pointer-events: none;
  transform: translateY(-12px);
  transition: opacity .28s ease, transform .32s var(--ease);
}
.mobile-menu.open { opacity: 1; pointer-events: all; transform: translateY(0); }
.mobile-menu-links { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.mobile-menu-links a {
  font-size: 28px; font-weight: 600;
  color: var(--ink-1); letter-spacing: -0.02em;
}
.mobile-menu-links a:hover { color: var(--blue); }

/* ====================================================
   BUTTONS - rectangular, low radius
   ==================================================== */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 20px;
  background: var(--blue);
  color: #fff;
  font-size: 14px; font-weight: 600;
  border-radius: var(--r-sm);
  border: 1px solid var(--blue);
  cursor: pointer;
  transition: transform .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
  box-shadow: var(--shadow-blue);
}
.btn:hover { background: var(--blue-700); border-color: var(--blue-700); transform: translateY(-1px); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn-ghost {
  background: #fff;
  color: var(--ink-1);
  border: 1px solid var(--line);
  box-shadow: none;
}
.btn-ghost:hover {
  background: var(--surface-1);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.btn-lg { padding: 15px 28px; font-size: 15px; }

/* ====================================================
   SECTIONS - generous vertical rhythm
   ==================================================== */
section {
  padding: 120px 0;
  position: relative;
}
section.tight { padding: 80px 0; }

/* Bordered section - shows the structural hairline */
section.bordered { border-top: 1px solid var(--line); }

/* Section header - left-aligned by default */
.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 56px;
  max-width: 760px;
  text-align: left;
}
.section-head h2 {
  font-size: clamp(34px, 4.6vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.section-head p {
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink-3);
  max-width: 620px;
}

/* Spec rule - labeled hairline divider */
.spec-rule {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-5);
}
.spec-rule .id { color: var(--blue); }

/* ====================================================
   FOOTER
   ==================================================== */
footer.site-footer {
  padding: 72px 0 40px;
  border-top: 1px solid var(--line);
  background: var(--surface-1);
  margin-top: 80px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 56px;
  margin-bottom: 48px;
}
.footer-brand img { height: 38px; width: auto; margin-bottom: 18px; }
.footer-brand p { font-size: 13.5px; color: var(--ink-3); max-width: 320px; line-height: 1.6; }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-5);
  font-weight: 500;
  margin-bottom: 16px;
}
.footer-col ul li { margin-bottom: 8px; }
.footer-col a {
  font-size: 13.5px; color: var(--ink-3);
  transition: color .15s ease;
}
.footer-col a:hover { color: var(--ink-1); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-5);
}

/* ====================================================
   REVEAL ANIMATIONS - fade in from blurred state
   ==================================================== */
.reveal {
  opacity: 0;
  filter: blur(12px);
  transform: translateY(20px);
  transition:
    opacity 1s var(--ease),
    filter  1.05s var(--ease),
    transform 1s var(--ease);
  will-change: opacity, filter, transform;
}
.reveal.in {
  opacity: 1;
  filter: blur(0);
  transform: none;
}

.reveal-soft {
  opacity: 0;
  filter: blur(8px);
  transition: opacity .9s var(--ease), filter .95s var(--ease);
}
.reveal-soft.in { opacity: 1; filter: blur(0); }

.reveal[style*="--i"] { transition-delay: calc(var(--i) * 80ms); }

.hero-enter > * {
  opacity: 0;
  filter: blur(12px);
  transform: translateY(16px);
  animation: heroIn 1s var(--ease) forwards;
}
.hero-enter > *:nth-child(1) { animation-delay: .05s; }
.hero-enter > *:nth-child(2) { animation-delay: .16s; }
.hero-enter > *:nth-child(3) { animation-delay: .28s; }
.hero-enter > *:nth-child(4) { animation-delay: .40s; }
.hero-enter > *:nth-child(5) { animation-delay: .52s; }
.hero-enter > *:nth-child(6) { animation-delay: .64s; }
@keyframes heroIn {
  to { opacity: 1; filter: blur(0); transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-soft, .hero-enter > * {
    opacity: 1 !important; filter: none !important; transform: none !important; animation: none !important;
  }
  .discord-cta::after { display: none; animation: none; }
}

/* ====================================================
   RESPONSIVE
   ==================================================== */
@media (max-width: 900px) {
  section { padding: 72px 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .nav-links, .nav-contact { display: none; }
  .nav-burger { display: flex; }
  .nav-inner {
    padding: 12px 20px;
    grid-template-columns: 1fr auto;
  }
  .nav-mark { justify-self: start; }
  .nav-right { gap: 10px; }
  .container, .container-wide, .container-narrow { padding: 0 20px; }
  .section-head h2 { font-size: clamp(26px, 7vw, 36px); }
  .section-head p { font-size: 15.5px; }
  .footer-bottom { flex-direction: column; gap: 10px; align-items: flex-start; }
  .specimen-body { padding: 22px; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}
