/* ==========================================================================
   Nodvya Design System - Production Grade (DESIGN_RULES.md Compliant)
   ========================================================================== */

:root {
  /* Core Neutral Palette (Cool Slate, Single Family) */
  --slate-50:  #F8FAFC;
  --slate-100: #F1F5F9;
  --slate-200: #E2E8F0;
  --slate-300: #CBD5E1;
  --slate-400: #94A3B8;
  --slate-500: #64748B;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1E293B;
  --slate-900: #0F172A;
  --slate-950: #020617;

  /* Single Accent Token */
  --accent-primary: #0F172A;
  --accent-primary-hover: #1E293B;
  --accent-interactive: #0284C7;

  /* Semantic Status Color (Only for real status, never decoration) */
  --semantic-success: #059669;
  --semantic-success-bg: #F0FDF4;

  /* Universal Radius & Border (Strict single value) */
  --radius-ui: 8px;
  --border-ui: 1px solid #E2E8F0;
  --border-ui-strong: 1px solid #CBD5E1;

  /* Typography */
  --font-arabic: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-latin: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  /* Overlay Shadow (Allowed ONLY on truly overlaying elements: dropdowns, modals, toasts) */
  --shadow-overlay: 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* Base Document Setup */
html {
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--slate-50);
  color: var(--slate-800);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

html[dir="rtl"] body {
  font-family: var(--font-arabic);
  line-height: 1.65;
}

html[dir="ltr"] body {
  font-family: var(--font-latin);
  line-height: 1.55;
}

/* Monospace text elements */
.font-mono, input.domain-input, td.font-mono {
  font-family: var(--font-mono);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--slate-100);
}
::-webkit-scrollbar-thumb {
  background: var(--slate-300);
  border-radius: var(--radius-ui);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--slate-400);
}

/* Focus Visible Accessible Rings */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent-interactive);
  outline-offset: 2px;
}

/* Header Sticky States (No heavy shadows, 1px border only) */
header#main-header {
  transition: background-color 140ms ease-out, border-color 140ms ease-out;
}
header#main-header.is-sticky {
  background-color: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--slate-200);
}

/* Button & Interactive Utility - No lift, no bloom, border/bg transition only */
.btn-interactive {
  transition: background-color 140ms ease-out, border-color 140ms ease-out, color 140ms ease-out;
}

/* Clean 1px Bordered Cards - Zero Drop Shadow */
.ui-card {
  background-color: #FFFFFF;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-ui);
  transition: border-color 140ms ease-out;
}
.ui-card-hover:hover {
  border-color: var(--slate-400);
}

/* Featured Plan Card (Solid 2px border emphasis, zero shadow) */
.pricing-card-featured {
  background-color: #FFFFFF;
  border: 2px solid var(--slate-900);
  border-radius: var(--radius-ui);
  position: relative;
}

/* Segmented Control (Billing Period Switcher) */
.segmented-control {
  background-color: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-ui);
  padding: 4px;
  display: inline-flex;
  gap: 4px;
}
.segmented-control-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: 6px;
  transition: background-color 140ms ease-out, color 140ms ease-out;
  color: var(--slate-600);
}
.segmented-control-btn:hover {
  color: var(--slate-900);
}
.segmented-control-btn.is-active {
  background-color: #FFFFFF;
  color: var(--slate-900);
  border: 1px solid var(--slate-200);
}

/* Domain Search Bar (Clean 1px border architecture, zero shadow) */
.domain-search-box {
  background: #FFFFFF;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-ui);
  transition: border-color 140ms ease-out;
}
.domain-search-box:focus-within {
  border-color: var(--slate-900);
}

/* Custom Table Styling */
.ui-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.ui-table th {
  background-color: var(--slate-50);
  color: var(--slate-600);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.025em;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--slate-200);
}
.ui-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--slate-100);
  color: var(--slate-700);
  font-size: 0.875rem;
}
.ui-table tr:last-child td {
  border-bottom: none;
}
.ui-table tr:hover td {
  background-color: var(--slate-50);
}

/* FAQ Accordion Transitions */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 200ms ease-out, opacity 140ms ease-out;
  opacity: 0;
  padding-top: 0;
  padding-bottom: 0;
}
.faq-item.open .faq-answer {
  max-height: 2500px;
  opacity: 1;
  padding-top: 0.75rem;
  padding-bottom: 1.25rem;
}
.faq-item .faq-icon {
  transition: transform 160ms ease-out;
}
.faq-item.open .faq-icon {
  transform: rotate(180deg);
  color: var(--slate-900);
}

/* Step / Process Numbers (Clean monochrome badge) */
.step-index-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: var(--radius-ui);
  background-color: var(--slate-100);
  border: 1px solid var(--slate-200);
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--slate-700);
}

/* Icon Rule: Icons sit directly on the background at text size without any box/chip */
.ui-icon {
  display: inline-block;
  color: currentColor;
  flex-shrink: 0;
}

/* Overlay Elements (Dropdowns, Drawer, Toasts - Only places where tight 0 1px 2px shadow is allowed) */
.ui-overlay {
  box-shadow: var(--shadow-overlay);
}

/* RTL / LTR utilities */
html[dir="rtl"] .ltr-only { display: none !important; }
html[dir="ltr"] .rtl-only { display: none !important; }

/* Hero Tech Background & Subtle Digital Canvas */
.hero-tech-backdrop {
  z-index: 1;
}

.hero-grid-pattern {
  background-image: radial-gradient(circle, #CBD5E1 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: 0 0;
  opacity: 0.55;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 45%, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.65) 60%, rgba(0, 0, 0, 1) 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 45%, rgba(0, 0, 0, 0.15) 0%, rgba(0, 0, 0, 0.65) 60%, rgba(0, 0, 0, 1) 100%);
}

.hero-radial-vignette {
  background: radial-gradient(ellipse 85% 75% at 50% 40%, rgba(255, 255, 255, 0.94) 0%, rgba(255, 255, 255, 0.7) 45%, rgba(255, 255, 255, 0.15) 80%, rgba(255, 255, 255, 0) 100%);
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-grid-pattern {
    opacity: 0.35;
  }
}


