/* ==========================================================================
   One7Tools — Design System & Main Stylesheet
   Aesthetic: Premium Black + Minimal + Modern + High-End SaaS
   ========================================================================== */

:root {
  /* Surface & Background Hierarchy */
  --bg-void: #050505;        /* Deepest black (Hero & primary canvas) */
  --bg-base: #080808;        /* Subtle elevation (Transition layers) */
  --bg-surface: #0B0B0B;     /* Sectional charcoal surface */
  --bg-card: #101010;        /* Component card background */
  --bg-card-hover: #141414;  /* Card hover state */
  --bg-glass: rgba(11, 11, 11, 0.75);

  /* Border Tokens */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.14);
  --border-hover: rgba(255, 255, 255, 0.22);
  --border-accent: rgba(99, 102, 241, 0.35);

  /* Typography Colors */
  --text-primary: #F5F5F7;    /* Near-white for confident clarity */
  --text-secondary: #A1A1AA;  /* Refined muted gray for descriptions */
  --text-muted: #71717A;      /* Subtle metadata & labels */
  --text-faint: #52525B;      /* Micro-captions */

  /* Brand Accents — Restrained Electric Blue to Violet */
  --accent-blue: #3B82F6;
  --accent-violet: #8B5CF6;
  --accent-gradient: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
  --accent-gradient-subtle: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
  --accent-glow: rgba(99, 102, 241, 0.18);
  --accent-glow-strong: rgba(99, 102, 241, 0.32);

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

  /* Layout & Sizing */
  --container-max: 1200px;
  --container-narrow: 840px;
  --nav-height: 72px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  /* Transition Curves */
  --ease-out-quint: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --duration-fast: 200ms;
  --duration-normal: 300ms;
  --duration-slow: 600ms;
}

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

html {
  font-family: var(--font-sans);
  background-color: var(--bg-void);
  color: var(--text-primary);
  line-height: 1.6;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  background-color: var(--bg-void);
  overflow-x: hidden;
  position: relative;
}

/* Subtle background noise texture effect (CSS-only) */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.025;
  background-image: radial-gradient(rgba(255, 255, 255, 0.8) 1px, transparent 0);
  background-size: 24px 24px;
}

/* Typography Scale */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.028em;
}

p {
  color: var(--text-secondary);
  font-weight: 400;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--duration-fast) ease;
}

ul, ol {
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

.container-narrow {
  width: 100%;
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/* Section Wrapper Base */
.section {
  position: relative;
  padding: 120px 0;
  z-index: 2;
}

.section-transition-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  pointer-events: none;
  background: linear-gradient(180deg, var(--bg-void) 0%, transparent 100%);
}

.section-transition-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  pointer-events: none;
  background: linear-gradient(0deg, var(--bg-void) 0%, transparent 100%);
}

/* Section Header Typography */
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 20px;
  backdrop-filter: blur(8px);
}

.section-tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-gradient);
  box-shadow: 0 0 8px var(--accent-blue);
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 3.25rem);
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: -0.032em;
}

.section-desc {
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 620px;
  margin-bottom: 48px;
  line-height: 1.6;
}

.text-center {
  text-align: center;
}

.text-center .section-desc {
  margin-left: auto;
  margin-right: auto;
}

/* Brand Accent Text */
.accent-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.text-accent {
  color: var(--accent-blue);
}

/* Buttons — Sophisticated & Restrained */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 24px;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  outline: none;
  text-decoration: none;
  position: relative;
  transition: transform var(--duration-fast) var(--ease-out-quint),
              box-shadow var(--duration-normal) var(--ease-out-quint),
              border-color var(--duration-normal) var(--ease-out-quint),
              background var(--duration-normal) var(--ease-out-quint),
              color var(--duration-fast) ease;
  will-change: transform;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: #111114;
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.4), rgba(139, 92, 246, 0.4));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.35;
  transition: opacity var(--duration-normal) ease;
  pointer-events: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: #15151A;
  color: #FFFFFF;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 20px var(--accent-glow);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-primary:hover::before {
  opacity: 1;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-primary);
  border-color: var(--border-medium);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.875rem;
  border-radius: var(--radius-sm);
}

.btn-arrow {
  display: inline-block;
  transition: transform var(--duration-fast) ease;
}

.btn:hover .btn-arrow {
  transform: translateX(3px);
}

/* Scroll Reveal Animations — GPU Friendly */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  filter: blur(4px);
  transition: opacity 0.8s var(--ease-smooth),
              transform 0.8s var(--ease-smooth),
              filter 0.8s var(--ease-smooth);
  will-change: opacity, transform, filter;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}

/* Stagger Delays */
.delay-1 { transition-delay: 80ms; }
.delay-2 { transition-delay: 160ms; }
.delay-3 { transition-delay: 240ms; }
.delay-4 { transition-delay: 320ms; }
.delay-5 { transition-delay: 400ms; }

/* Subtle Interactive Link */
.interactive-link {
  color: var(--text-secondary);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  transition: color var(--duration-fast) ease;
}

.interactive-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0%;
  height: 1px;
  background: var(--accent-gradient);
  transition: width var(--duration-normal) var(--ease-out-quint);
}

.interactive-link:hover {
  color: var(--text-primary);
}

.interactive-link:hover::after {
  width: 100%;
}

/* Accessibility Focus States */
:focus-visible {
  outline: 2px solid var(--accent-blue);
  outline-offset: 3px;
}

/* Reduced Motion Override */
@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;
  }
  
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
