/* =========================================================
   ROR Studios — Design System v4 (Elite Edition)
   Obsidian & Cyber Cyan — Deep, Rich, Human-Crafted
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;0,14..32,800;0,14..32,900;1,14..32,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* --------------------------------------------------
   Tokens
-------------------------------------------------- */
:root {
  /* Colors - Deep Obsidian & cool-toned darks */
  --bg-0: #030305;
  --bg-1: #07070a;
  --bg-2: #0c0d12;
  --bg-3: #11131a;
  --bg-4: #171a24;

  /* Borders - Fine-line architectural */
  --border-subtle: rgba(255, 255, 255, 0.04);
  --border:        rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-glow:   rgba(0, 240, 255, 0.18);

  /* Typography */
  --txt-primary:   #f0f2f5;
  --txt-secondary: #9ca3af;
  --txt-tertiary:  #4b5563;
  --txt-inverse:   #030305;

  /* Accent — Cyber Cyan */
  --accent:        #00f0ff;
  --accent-dim:    rgba(0, 240, 255, 0.07);
  --accent-glow:   rgba(0, 240, 255, 0.18);
  --accent-dark:   #007f8a;

  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Fluid Type Scale */
  --t-10:  clamp(0.625rem,  0.58rem  + 0.22vw, 0.6875rem);
  --t-11:  clamp(0.6875rem, 0.65rem  + 0.18vw, 0.75rem);
  --t-12:  clamp(0.75rem,   0.72rem  + 0.15vw, 0.8125rem);
  --t-14:  clamp(0.8125rem, 0.77rem  + 0.22vw, 0.875rem);
  --t-16:  clamp(0.9rem,    0.86rem  + 0.2vw,  1rem);
  --t-18:  clamp(1rem,      0.93rem  + 0.35vw, 1.125rem);
  --t-20:  clamp(1.1rem,    1rem     + 0.5vw,  1.25rem);
  --t-24:  clamp(1.35rem,   1.2rem   + 0.75vw, 1.5rem);
  --t-28:  clamp(1.5rem,    1.3rem   + 1vw,    1.75rem);
  --t-36:  clamp(2rem,      1.65rem  + 1.75vw, 2.25rem);
  --t-48:  clamp(2.5rem,    2rem     + 2.5vw,  3.25rem);
  --t-64:  clamp(3rem,      2.4rem   + 3vw,    4.25rem);
  --t-80:  clamp(3.5rem,    2.8rem   + 3.5vw,  5.5rem);
  --t-96:  clamp(4rem,      3.2rem   + 4vw,    6.5rem);

  /* Spacing */
  --s1:  0.25rem; --s2: 0.5rem;  --s3: 0.75rem;
  --s4:  1rem;    --s5: 1.25rem; --s6: 1.5rem;
  --s8:  2rem;    --s10: 2.5rem; --s12: 3rem;
  --s16: 4rem;    --s20: 5rem;   --s24: 6rem;
  --s32: 8rem;

  /* Layout */
  --max-w:      1240px;
  --max-w-wide: 1440px;
  --gutter:     clamp(1.5rem, 6vw, 3rem);

  /* Border Radii */
  --r-xs: 2px; --r-sm: 4px; --r: 6px; --r-md: 8px; --r-lg: 12px; --r-xl: 20px;

  /* Easing */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Timings */
  --dur-fast:  150ms;
  --dur-base:  300ms;
  --dur-slow:  600ms;
  --dur-hero: 1000ms;

  /* Z-index */
  --z-nav:   100;
  --z-modal: 200;
}

/* --------------------------------------------------
   Noise Texture Filter (SVG-based grain)
-------------------------------------------------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}

/* --------------------------------------------------
   Custom Scrollbar
-------------------------------------------------- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 100px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  background-color: var(--bg-0);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--t-16);
  line-height: 1.6;
  color: var(--txt-primary);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 4px;
  border-radius: 2px;
}

::selection {
  background: rgba(0, 240, 255, 0.18);
  color: var(--txt-primary);
}

/* --------------------------------------------------
   Typography
-------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--txt-primary);
}

p {
  color: var(--txt-secondary);
  line-height: 1.7;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: var(--t-11);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--txt-tertiary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mono-label::before {
  content: '//';
  color: var(--accent);
}

.overline {
  font-family: var(--font-sans);
  font-size: var(--t-11);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--txt-tertiary);
}

.overline--accent { color: var(--accent); }

/* Accent highlight span */
.text-accent { color: var(--accent); }

/* --------------------------------------------------
   Layout
-------------------------------------------------- */
.wrap {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.wrap--wide   { max-width: var(--max-w-wide); }
.wrap--narrow { max-width: 760px; }

.section    { padding-block: clamp(6rem, 14vw, 10rem); }
.section--sm{ padding-block: clamp(3.5rem, 8vw, 6rem); }

.rule {
  border: none;
  border-top: 1px solid var(--border-subtle);
}

/* Glowing divider rule */
.glow-rule {
  border: none;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    var(--border) 20%,
    rgba(0, 240, 255, 0.22) 50%,
    var(--border) 80%,
    transparent 100%
  );
  margin-block: 0;
}

/* Gradient text headline */
.gradient-text {
  background: linear-gradient(135deg, var(--txt-primary) 20%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Shimmer animation for gradient text */
.shimmer-text {
  background: linear-gradient(
    100deg,
    var(--txt-primary) 0%,
    var(--accent) 38%,
    #e0fffe 52%,
    var(--accent) 66%,
    var(--txt-primary) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmerMove 5s linear infinite;
}

@keyframes shimmerMove {
  from { background-position: 0% center; }
  to   { background-position: 200% center; }
}

/* Glow border overlay on hover */
.glow-border {
  position: relative;
}
.glow-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(0,240,255,0.28), transparent 50%, rgba(0,240,255,0.08));
  z-index: -1;
  opacity: 0;
  transition: opacity var(--dur-base) var(--ease-out);
  pointer-events: none;
}
.glow-border:hover::before { opacity: 1; }

/* Pill / badge */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: var(--t-10);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  background: var(--bg-1);
  color: var(--txt-secondary);
  white-space: nowrap;
}

.pill--accent {
  border-color: rgba(0, 240, 255, 0.28);
  background: rgba(0, 240, 255, 0.05);
  color: var(--accent);
}

.pill--accent::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: nvPulse 2s ease-in-out infinite;
}

/* Icon wrapper box */
.icon-box {
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  background: var(--bg-2);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}

.icon-box svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border-width: 0;
}

/* --------------------------------------------------
   Responsive Helpers
-------------------------------------------------- */
@media (max-width: 640px) {
  :root { --gutter: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body::before { display: none; }
}
