/* Intelisoft.ee — tume indigo-violetne identiteet, eristuv Infrasoft'i
   puhtast sinisest. Space Grotesk (pealkirjad) + Inter (tekst).
   Signatuur: canvas-põhine võrgustik-animatsioon taustal + gradient-
   aktsent, mis kannab kogu lehe visuaalset läbivust. */

:root {
  --bg: #080911;
  --surface: rgba(20, 21, 36, 0.72);
  --surface-solid: #14152499;
  --border: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(167, 139, 250, 0.45);
  --text: #f3f2fa;
  --muted: #928fa8;
  --accent-1: #6366f1;
  --accent-2: #a855f7;
  --accent-gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  --accent-glow: rgba(124, 92, 255, 0.28);

  --radius: 16px;
  --font-display: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

#network {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: var(--bg);
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 5vw, 64px);
  backdrop-filter: blur(12px);
  background: rgba(8, 9, 17, 0.55);
  border-bottom: 1px solid var(--border);
}
.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.topbar-cta {
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--accent-gradient);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.topbar-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--accent-glow);
}

main { position: relative; z-index: 1; }

/* Hero */
.hero {
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(72px, 14vw, 140px) 24px clamp(56px, 10vw, 96px);
  text-align: center;
}
.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 9vw, 5.5rem);
  line-height: 1;
  margin: 0 0 20px;
  letter-spacing: -0.02em;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.15rem, 2.6vw, 1.5rem);
  color: var(--text);
  margin: 0 0 20px;
  line-height: 1.4;
}
.hero-desc {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 560px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Teenuseplokid */
.services {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.service-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  text-align: left;
  padding: 28px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(6px);
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.service-card:hover, .service-card:focus-visible {
  border-color: var(--border-hover);
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px var(--accent-glow) inset;
}
.service-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(168, 85, 247, 0.18));
  color: #c4b5fd;
}
.service-icon svg { width: 22px; height: 22px; }
.service-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.08rem;
}
.service-short {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

/* Kontaktiplokk */
.contact-section {
  max-width: 1100px;
  margin: 24px auto 80px;
  padding: 0 24px;
}
.contact-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 36px 40px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(168, 85, 247, 0.14));
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.contact-card:hover, .contact-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 20px 50px var(--accent-glow);
}
.contact-eyebrow {
  display: block;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #c4b5fd;
  font-weight: 600;
  margin-bottom: 6px;
}
.contact-title {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
}
.contact-arrow {
  font-size: 1.8rem;
  color: #c4b5fd;
  flex-shrink: 0;
}

/* Footer */
.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px 56px;
  color: var(--muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(4, 5, 10, 0.72);
  backdrop-filter: blur(8px);
}
.modal-backdrop.open { display: flex; }
.modal {
  position: relative;
  max-width: 560px;
  width: 100%;
  background: #12131f;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
  animation: modal-in 220ms ease;
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.06);
}
.modal-close:hover { color: var(--text); background: rgba(255, 255, 255, 0.12); }
.modal-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  margin: 0 0 16px;
  padding-right: 32px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.modal-body {
  color: #d3d1e0;
  font-size: 0.98rem;
  line-height: 1.75;
  white-space: pre-line;
  margin: 0;
}
.modal-body a { color: #c4b5fd; font-weight: 600; }

/* Responsiivsus */
@media (max-width: 860px) {
  .services { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .services { grid-template-columns: 1fr; }
  .contact-card { flex-direction: column; align-items: flex-start; gap: 12px; }
  .site-footer { flex-direction: column; gap: 8px; align-items: flex-start; }
  .modal { padding: 32px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .service-card, .contact-card, .topbar-cta { transition: none; }
  .modal { animation: none; }
}
