/* ============================================
   Hideloop — Styles
   Theme-aware with electric accent
   ============================================ */

:root {
  color-scheme: light dark;
  --bg:         #f8fafc;
  --bg-alt:     #eef2ff;
  --surface:    #ffffff;
  --border:     #dbe3ef;
  --text:       #0f172a;
  --text-muted: #475569;
  --accent:     #6d5cff;
  --accent-hover: #8577ff;
  --accent-glow: rgba(109, 92, 255, 0.15);
  --hero-grid-line: rgba(109, 92, 255, 0.08);
  --nav-scrolled-bg: rgba(248, 250, 252, 0.85);
  --text-dim:   #64748b;
  --input-placeholder: #64748b;
  --toggle-hover: #eef2ff;
  --radius:     12px;
  --radius-sm:  8px;
  --font:       'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:       'JetBrains Mono', monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:         #11131a;
    --bg-alt:     #171a24;
    --surface:    #1f2432;
    --border:     #30384b;
    --text:       #f5f7ff;
    --text-muted: #b3bdd2;
    --accent:     #7a8bff;
    --accent-hover: #93a0ff;
    --accent-glow: rgba(122, 139, 255, 0.22);
    --nav-scrolled-bg: rgba(17, 19, 26, 0.8);
    --text-dim:   #7b859e;
    --input-placeholder: #7b859e;
    --toggle-hover: #2a3142;
    --hero-grid-line: rgba(122, 139, 255, 0.22);
  }
}

:root[data-theme='light'] {
  --bg:         #f8fafc;
  --bg-alt:     #eef2ff;
  --surface:    #ffffff;
  --border:     #dbe3ef;
  --text:       #0f172a;
  --text-muted: #475569;
  --nav-scrolled-bg: rgba(248, 250, 252, 0.85);
  --text-dim:   #64748b;
  --input-placeholder: #64748b;
  --toggle-hover: #eef2ff;
  --hero-grid-line: rgba(109, 92, 255, 0.08);
}

:root[data-theme='dark'] {
  --bg:         #11131a;
  --bg-alt:     #171a24;
  --surface:    #1f2432;
  --border:     #30384b;
  --text:       #f5f7ff;
  --text-muted: #b3bdd2;
  --accent:     #7a8bff;
  --accent-hover: #93a0ff;
  --accent-glow: rgba(122, 139, 255, 0.22);
  --nav-scrolled-bg: rgba(17, 19, 26, 0.8);
  --text-dim:   #7b859e;
  --input-placeholder: #7b859e;
  --toggle-hover: #2a3142;
  --hero-grid-line: rgba(122, 139, 255, 0.22);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4 {
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); }
h3 { font-size: 1.25rem; }

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

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: var(--font);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 30px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 0.875rem;
}

.btn-full {
  width: 100%;
}

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 20px 0;
  transition: all 0.3s ease;
}

.nav.scrolled {
  padding: 12px 0;
  background: var(--nav-scrolled-bg);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-links .btn {
  color: #fff;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all 0.3s ease;
}

/* ============================================
   Hero
   ============================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--hero-grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--hero-grid-line) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 20%, transparent 70%);
}

.hero-content {
  position: relative;
}

.hero-tag {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 24px;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 40px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 80px;
}

.hero-stats {
  display: flex;
  gap: 64px;
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================
   Sections
   ============================================ */
.section {
  padding: 120px 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-tag {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.section-title {
  margin-bottom: 64px;
}

/* ============================================
   Services
   ============================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px;
  transition: all 0.3s ease;
}

.card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 40px var(--accent-glow);
  transform: translateY(-2px);
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  color: var(--accent);
  margin-bottom: 20px;
}

.card h3 {
  margin-bottom: 12px;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ============================================
   Process
   ============================================ */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.process-step {
  position: relative;
}

.step-num {
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin-bottom: 16px;
}

.process-step h3 {
  margin-bottom: 12px;
}

.process-step p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ============================================
   Advantages
   ============================================ */
.advantages-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px 64px;
}

.advantage h3 {
  margin-bottom: 12px;
  font-size: 1.15rem;
}

.advantage p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* ============================================
   About
   ============================================ */
.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-text p {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 16px;
}

.about-text .section-title {
  margin-bottom: 32px;
}

.about-values {
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding-top: 60px;
}

.value {
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.value h4 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.value p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ============================================
   Contact
   ============================================ */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.contact-text p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.contact-text .section-title {
  margin-bottom: 24px;
}

.contact-info a {
  font-size: 1.1rem;
  color: var(--accent);
  font-weight: 600;
  transition: color 0.2s;
}

.contact-info a:hover {
  color: var(--accent-hover);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-group input,
.form-group textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font);
  transition: border-color 0.2s;
  outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--input-placeholder);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 60px 0 40px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 12px;
}

.footer-links {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-bottom {
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-tools {
  display: flex;
  justify-content: flex-start;
}

.theme-toggle {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--toggle-hover);
}

.theme-icon {
  display: block;
}

.theme-icon-sun {
  display: none;
}

.theme-toggle[data-theme='dark'] .theme-icon-sun {
  display: block;
}

.theme-toggle[data-theme='dark'] .theme-icon-moon {
  display: none;
}

/* ============================================
   Animations
   ============================================ */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Responsive
   ============================================ */
@media (max-width: 1024px) {
  .process-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 48px;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-alt);
    flex-direction: column;
    align-items: flex-start;
    padding: 80px 32px;
    gap: 24px;
    transition: right 0.3s ease;
    border-left: 1px solid var(--border);
  }

  .nav-links.open {
    right: 0;
  }

  .nav-links a {
    font-size: 1.1rem;
    color: var(--text);
  }

  .hero {
    min-height: auto;
    padding: 140px 0 80px;
  }

  .hero-stats {
    flex-direction: column;
    gap: 24px;
  }

  .hero-actions {
    flex-direction: column;
    margin-bottom: 48px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .process-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .advantages-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-container,
  .contact-container {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .about-values {
    padding-top: 0;
  }

  .footer-links {
    gap: 20px;
  }

  .section {
    padding: 80px 0;
  }

  .section-title {
    margin-bottom: 40px;
  }

  .card {
    padding: 28px;
  }
}

@media (max-width: 480px) {
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.75rem; }

  .container {
    padding: 0 16px;
  }
}
