/*
Theme Name:  NR Studio
Theme URI:   https://nrstudio.dev
Author:      NR Studio
Author URI:  https://nrstudio.dev
Description: Premium, bilingual WordPress theme for NR Studio — an elite Digital Agency & Software House. Built with pure PHP and Tailwind CSS. Optimized for 100/100 Core Web Vitals.
Version:     1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
License:     GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nrstudio
Tags:        dark, minimal, tech, bilingual, portfolio, blog, agency
*/

/* ============================================================
   DESIGN TOKENS — "Dark Forge" System
   ============================================================ */
:root {
  /* Colors */
  --color-base:            #0A0A0F;
  --color-surface:         #111118;
  --color-surface-2:       #1A1A24;
  --color-surface-3:       #22222F;
  --color-border:          rgba(255,255,255,0.07);
  --color-border-strong:   rgba(255,255,255,0.14);
  --color-accent:          #6C63FF;
  --color-accent-light:    #8B85FF;
  --color-accent-glow:     rgba(108,99,255,0.20);
  --color-accent-2:        #00D4AA;
  --color-accent-2-glow:   rgba(0,212,170,0.18);
  --color-danger:          #FF4D6D;

  /* Text */
  --color-text-primary:   #F0F0F8;
  --color-text-secondary: #8888A8;
  --color-text-muted:     #55556A;

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  /* Spacing */
  --section-pad: 6rem 0;
  --container-max: 1200px;
  --container-wide: 1400px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-base: 220ms var(--ease-out);

  /* Shadows */
  --shadow-card: 0 4px 24px rgba(0,0,0,0.45), 0 1px 0 var(--color-border);
  --shadow-glow:  0 0 40px var(--color-accent-glow);
  --shadow-glow-2: 0 0 40px var(--color-accent-2-glow);
}

/* ============================================================
   BASE RESET & GLOBAL STYLES
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--color-base);
  color: var(--color-text-secondary);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-text-primary);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h1 { font-size: clamp(2.6rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); }
h4 { font-size: 1.3rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p { line-height: 1.75; }

a {
  color: var(--color-accent-light);
  text-decoration: none;
  transition: color var(--transition-base);
}
a:hover { color: var(--color-text-primary); }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

code, pre {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

pre {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

:not(pre) > code {
  background: var(--color-surface-3);
  border: 1px solid var(--color-border);
  border-radius: 5px;
  padding: 0.15em 0.5em;
  color: var(--color-accent-2);
}

blockquote {
  border-left: 3px solid var(--color-accent);
  padding: 1rem 1.5rem;
  background: var(--color-surface);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5rem 0;
  color: var(--color-text-primary);
  font-style: italic;
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-wide {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: var(--section-pad);
  position: relative;
}

/* ============================================================
   GRADIENT TEXT UTILITY
   ============================================================ */
.gradient-text {
  background: linear-gradient(135deg, var(--color-accent-light) 0%, var(--color-accent-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   BADGE / PILL UTILITY
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--color-accent-glow);
  border: 1px solid rgba(108,99,255,0.3);
  color: var(--color-accent-light);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.85rem;
  border-radius: 100px;
}

.badge--green {
  background: var(--color-accent-2-glow);
  border-color: rgba(0,212,170,0.3);
  color: var(--color-accent-2);
}

/* ============================================================
   BUTTON SYSTEM
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.75rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition-base);
  text-decoration: none;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn--primary {
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 0 0 0 var(--color-accent-glow);
}
.btn--primary:hover {
  background: var(--color-accent-light);
  color: #fff;
  box-shadow: 0 0 28px var(--color-accent-glow);
  transform: translateY(-2px);
}

.btn--secondary {
  background: transparent;
  color: var(--color-text-primary);
  border: 1px solid var(--color-border-strong);
}
.btn--secondary:hover {
  background: var(--color-surface-2);
  color: var(--color-text-primary);
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--color-accent-light);
  padding: 0;
  gap: 0.4rem;
}
.btn--ghost:hover {
  color: var(--color-text-primary);
  gap: 0.7rem;
}

.btn--lg {
  padding: 1rem 2.25rem;
  font-size: 1.05rem;
}

/* ============================================================
   CARD SYSTEM
   ============================================================ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: all var(--transition-base);
}
.card:hover {
  border-color: var(--color-border-strong);
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

/* ============================================================
   SECTION HEADING PATTERN
   ============================================================ */
.section-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.section-heading {
  font-family: var(--font-display);
  color: var(--color-text-primary);
  margin-bottom: 1rem;
}

.section-subheading {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  max-width: 52ch;
  line-height: 1.7;
}

/* ============================================================
   DIVIDER WITH GLOW
   ============================================================ */
.glow-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-accent), transparent);
  opacity: 0.3;
  border: none;
  margin: 0;
}

/* ============================================================
   NOISE TEXTURE OVERLAY
   ============================================================ */
.noise-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  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)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  border-radius: inherit;
}

/* ============================================================
   GRID BACKGROUND PATTERN
   ============================================================ */
.grid-bg {
  background-image:
    linear-gradient(var(--color-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-border) 1px, transparent 1px);
  background-size: 60px 60px;
  background-position: center center;
}

/* ============================================================
   SCROLLBAR STYLING
   ============================================================ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--color-base); }
::-webkit-scrollbar-thumb { background: var(--color-surface-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-accent); }

/* ============================================================
   SELECTION
   ============================================================ */
::selection {
  background: var(--color-accent-glow);
  color: var(--color-text-primary);
}

/* ============================================================
   FOCUS VISIBLE
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 20px var(--color-accent-glow); }
  50%       { box-shadow: 0 0 40px var(--color-accent-glow), 0 0 80px var(--color-accent-glow); }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.animate-fade-up {
  animation: fadeUp 0.7s var(--ease-out) both;
}

.animate-fade-in {
  animation: fadeIn 0.5s var(--ease-out) both;
}

/* Staggered animation delays */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }
.delay-6 { animation-delay: 0.6s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  :root {
    --section-pad: 4rem 0;
  }
}

/* ============================================================
   WORDPRESS CORE CLASS SUPPORT
   ============================================================ */
.wp-caption { max-width: 100%; }
.wp-caption-text {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 0.5rem;
}
.alignleft  { float: left;  margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { text-align: center; margin: 0 auto; }
.wp-block-image { margin: 1.5rem 0; }

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}
