/* =========================================================
   WebIQ.sk — stylesheet
   Design concept: "blueprint canvas" — precise grid lines,
   hairline borders instead of shadows, functional mono labels.
   ========================================================= */

:root {
  --bg: #0B0D12;
  --surface: #14161D;
  --surface-2: #1B1E27;
  --line: #262A33;
  --line-soft: #1D2028;
  --text: #EDEEF2;
  --text-dim: #9298A6;
  --text-faint: #5C6270;
  --accent: #4A6CFF;
  --accent-soft: rgba(74, 108, 255, 0.1);
  --accent-2: #FF5A36;
  --good: #3DDC84;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;
  --container: 1200px;
  --container-narrow: 760px;
  --font-display: "Unbounded", "Sora", system-ui, -apple-system, sans-serif;
  --font-body: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

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

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

ul, ol { 
  list-style: none; 
  padding: 0; 
}

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

input, textarea { 
  font: inherit; 
  color: inherit; 
}

h1, h2, h3, h4 { 
  font-weight: 700; 
  line-height: 1.15; 
  letter-spacing: -0.01em; 
}

h1, h2 { 
  font-family: var(--font-display); 
  font-weight: 600; 
}

.logo-text { 
  font-family: var(--font-display); 
  font-weight: 600; 
}

[hidden] { 
  display: none !important; 
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

.mono { 
  font-family: var(--font-mono); 
}

/* ---------- Layout Helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

.container-narrow { 
  max-width: var(--container-narrow); 
}

.section { 
  padding-block: 88px; 
}

.section-alt { 
  background: var(--surface); 
  border-top: 1px solid var(--line-soft); 
  border-bottom: 1px solid var(--line-soft); 
}

.section-head { 
  max-width: 640px; 
  margin-bottom: 48px; 
}

.section-head h2 { 
  font-size: clamp(1.7rem, 1.3rem + 1.6vw, 2.4rem); 
  margin-bottom: 14px; 
}

.section-head p { 
  color: var(--text-dim); 
  font-size: 1.05rem; 
}

/* ---------- Accessibility ---------- */
.skip-link {
  position: absolute; 
  left: 12px; 
  top: -60px;
  background: var(--accent); 
  color: #ffffff;
  padding: 10px 16px; 
  border-radius: var(--radius-s);
  z-index: 1000; 
  transition: top 0.15s ease;
}

.skip-link:focus { 
  top: 12px; 
}

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; 
  align-items: center; 
  justify-content: center;
  gap: 8px; 
  padding: 13px 24px; 
  font-weight: 600; 
  font-size: 0.98rem;
  border-radius: var(--radius-s); 
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s ease;
  white-space: nowrap;
}

.btn:active { 
  transform: translateY(1px); 
}

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

.btn-primary:hover { 
  background: #3958E0; 
}

.btn-ghost { 
  color: var(--text); 
  border-color: var(--line); 
}

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

.btn-outline { 
  border-color: var(--line); 
  color: var(--text); 
  width: 100%; 
}

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

.btn-full { 
  width: 100%; 
}

.btn-small { 
  padding: 9px 16px; 
  font-size: 0.88rem; 
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; 
  top: 0; 
  z-index: 100;
  background: rgba(11, 13, 18, 0.88);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line-soft);
  isolation: isolate;
}

.header-inner {
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  gap: 16px; 
  padding-block: 14px;
}

.logo { 
  display: flex; 
  align-items: center; 
  gap: 8px; 
  font-weight: 800; 
  font-size: 1.15rem; 
}

.logo-mark {
  display: inline-flex; 
  align-items: center; 
  justify-content: center;
  width: 32px; 
  height: 32px; 
  border-radius: 8px;
  background: var(--surface-2); 
  color: var(--accent);
  border: 1px solid var(--line);
}

.logo-accent { color: var(--accent); }
.logo-tld { color: var(--text-faint); font-weight: 600; }

.main-nav ul { display: flex; gap: 28px; }
.main-nav a { font-size: 0.95rem; color: var(--text-dim); transition: color 0.15s ease; }
.main-nav a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: 16px; }

.lang-switch { display: flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 0.85rem; color: var(--text-faint); }
.lang-btn { padding: 4px 6px; color: var(--text-faint); border-radius: 4px; transition: color 0.15s ease; }
.lang-btn.is-active { color: var(--accent); font-weight: 600; }
.lang-btn:hover:not(.is-active) { color: var(--text); }
.lang-sep { color: var(--line); }

.menu-toggle {
  display: none; 
  flex-direction: column; 
  gap: 5px; 
  width: 36px; 
  height: 36px;
  align-items: center; 
  justify-content: center;
  border-radius: var(--radius-s);
}

.menu-toggle span { 
  width: 20px; 
  height: 2px; 
  background: var(--text); 
  transition: transform 0.2s ease, opacity 0.2s ease; 
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { 
  position: relative; 
  padding-block: 80px 60px; 
  overflow: hidden; 
}

.hero-grid {
  position: absolute; 
  inset: 0; 
  pointer-events: none;
  background-image:
    repeating-linear-gradient(to right, var(--line-soft) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(to bottom, var(--line-soft) 0 1px, transparent 1px 80px);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  opacity: 0.6;
}

.hero-inner { 
  position: relative; 
  display: grid; 
  gap: 48px; 
}

.hero-copy, .hero-visual {
  opacity: 0; 
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.hero-visual { transition-delay: 0.12s; }

body.is-ready .hero-copy,
body.is-ready .hero-visual { 
  opacity: 1; 
  transform: none; 
}

.hero-copy h1 { font-size: clamp(2.1rem, 1.5rem + 3.2vw, 3.4rem); margin-bottom: 20px; }
.hero-sub { color: var(--text-dim); font-size: 1.1rem; max-width: 56ch; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 40px; }

.hero-trust { display: flex; flex-wrap: wrap; gap: 28px; }
.hero-trust li { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; color: var(--text-faint); }
.hero-trust .mono { font-size: 1.1rem; color: var(--text); font-weight: 600; }

/* Hero Visual: Browser Mockup */
.browser-card {
  border: 1px solid var(--line); 
  border-radius: var(--radius-l);
  background: var(--surface); 
  overflow: hidden;
  box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.6);
}

.browser-bar {
  display: flex; 
  align-items: center; 
  gap: 8px;
  padding: 12px 14px; 
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.browser-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.browser-url { margin-left: 10px; font-size: 0.78rem; color: var(--text-faint); }

.browser-split { display: grid; grid-template-columns: 1fr 1fr; min-height: 260px; }
.split-code {
  padding: 20px; 
  font-size: 0.82rem; 
  line-height: 1.9; 
  color: var(--text-dim);
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.tok-tag { color: var(--accent); }
.tok-attr { color: var(--accent-2); }
.tok-str { color: var(--good); }
.split-cursor { margin-top: 6px; }

.caret {
  display: inline-block; 
  width: 7px; 
  height: 14px; 
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.split-render { padding: 22px; display: flex; flex-direction: column; gap: 12px; background: var(--surface-2); }
.render-badge { font-size: 0.7rem; color: var(--text-faint); margin-bottom: 6px; }
.render-h { width: 70%; height: 16px; border-radius: 4px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.render-p { width: 100%; height: 9px; border-radius: 4px; background: var(--line); }
.render-p.short { width: 60%; }
.render-btn { margin-top: 10px; width: 110px; height: 32px; border-radius: var(--radius-s); background: var(--accent); }

/* ---------- Stats ---------- */
.stats { border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); padding-block: 40px; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-num { font-size: 2.1rem; font-weight: 600; color: var(--accent); }
.stat-label { color: var(--text-dim); font-size: 0.9rem; max-width: 22ch; }

/* ---------- Cards / Services ---------- */
.card-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.card {
  padding: 28px; 
  border: 1px solid var(--line); 
  border-radius: var(--radius-m);
  background: var(--surface); 
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-icon {
  display: inline-flex; 
  align-items: center; 
  justify-content: center;
  width: 48px; 
  height: 48px; 
  border-radius: var(--radius-s);
  background: var(--accent-soft); 
  color: var(--accent); 
  margin-bottom: 18px;
}

.card h3 { font-size: 1.15rem; margin-bottom: 10px; }
.card p { color: var(--text-dim); font-size: 0.96rem; }

/* ---------- Process (Timeline) ---------- */
.process-list { position: relative; display: grid; gap: 0; }
.process-list::before {
  content: ""; 
  position: absolute; 
  left: 23px; 
  top: 6px; 
  bottom: 6px; 
  width: 2px;
  background: var(--line);
}

.process-item {
  position: relative; 
  display: grid; 
  grid-template-columns: 48px 1fr; 
  gap: 24px;
  padding-block: 22px; 
  align-items: start;
  opacity: 0; 
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.process-item.is-visible { opacity: 1; transform: translateY(0); }

.process-marker {
  position: relative; 
  z-index: 1;
  display: flex; 
  align-items: center; 
  justify-content: center;
  width: 48px; 
  height: 48px; 
  border-radius: 50%;
  background: var(--surface); 
  border: 1.5px solid var(--line);
  transform: scale(0.7); 
  transition: transform 0.5s ease, border-color 0.5s ease, background-color 0.5s ease;
}

.process-item.is-visible .process-marker {
  transform: scale(1); 
  border-color: var(--accent); 
  background: var(--accent-soft);
}

.process-num { color: var(--text-faint); font-size: 0.85rem; transition: color 0.4s ease; }
.process-item.is-visible .process-num { color: var(--accent); }

.process-body { padding-top: 6px; }
.process-item h3 { font-size: 1.1rem; margin-bottom: 6px; }
.process-item p { color: var(--text-dim); max-width: 60ch; }

/* ---------- Compare Table ---------- */
.compare { border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.compare-row {
  display: grid; 
  grid-template-columns: 1fr 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.compare-row:last-child { border-bottom: none; }
.compare-row > span { padding: 16px 18px; font-size: 0.92rem; }
.compare-head { background: var(--surface); font-weight: 600; }
.compare-label { color: var(--text-dim); font-weight: 600; background: var(--surface); }
.compare-highlight { background: var(--accent-soft); color: var(--text); font-weight: 500; }
.compare-head .compare-highlight { color: var(--accent); }

/* ---------- Brand Statement Section ---------- */
.brand-statement {
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--surface);
  padding: 40px 32px;
  position: relative;
  overflow: hidden;
}

.brand-badge {
  font-size: 0.8rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  display: block;
}

.brand-statement h2 {
  font-size: clamp(1.4rem, 1.1rem + 1vw, 2rem);
  margin-bottom: 16px;
}

.brand-statement p {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 68ch;
  line-height: 1.7;
}

.brand-statement strong {
  color: var(--text);
  font-weight: 600;
}

/* ---------- Work Grid ---------- */
.work-grid { display: grid; grid-template-columns: 1fr; gap: 24px; }
.work-card { border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; background: var(--bg); }
.work-thumb {
  height: 180px; 
  display: flex; 
  align-items: center; 
  justify-content: center;
  background: var(--surface-2);
  background-image:
    repeating-linear-gradient(to right, var(--line-soft) 0 1px, transparent 1px 22px),
    repeating-linear-gradient(to bottom, var(--line-soft) 0 1px, transparent 1px 22px);
}

.work-icon { width: 64px; height: 64px; }
.work-thumb-1 .work-icon { color: var(--accent); }
.work-thumb-2 .work-icon { color: var(--accent-2); }
.work-thumb-3 .work-icon { color: var(--good); }
.work-card h3 { padding: 20px 20px 6px; font-size: 1.08rem; }
.work-card p { padding: 0 20px 20px; color: var(--text-dim); font-size: 0.94rem; }

/* ---------- FAQ ---------- */
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  border: 1px solid var(--line); 
  border-radius: var(--radius-m);
  padding: 18px 20px; 
  background: var(--bg);
}

.faq-item summary {
  cursor: pointer; 
  font-weight: 600; 
  list-style: none; 
  position: relative;
  padding-right: 28px;
}

.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; 
  position: absolute; 
  right: 0; 
  top: -2px; 
  font-size: 1.3rem; 
  color: var(--accent);
  transition: transform 0.15s ease;
}

.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { color: var(--text-dim); margin-top: 14px; font-size: 0.95rem; }

/* ---------- Contact / Form ---------- */
.cta-section { padding-block: 96px; }
.cta-inner { display: grid; gap: 48px; }
.cta-copy h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.2rem); margin-bottom: 14px; }
.cta-copy p { color: var(--text-dim); margin-bottom: 30px; max-width: 48ch; }

.contact-info { display: flex; flex-direction: column; gap: 14px; }
.contact-info li { display: flex; gap: 10px; align-items: baseline; font-size: 0.98rem; }
.contact-info .mono {
  font-family: var(--font-body); 
  font-weight: 600;
  color: var(--text-faint); 
  font-size: 0.85rem; 
  min-width: 56px;
}
.contact-info a:hover { color: var(--accent); }

.contact-form {
  position: relative;
  border: 1px solid var(--line); 
  border-radius: var(--radius-l);
  padding: 36px; 
  background: var(--surface);
  box-shadow: 0 40px 70px -40px rgba(0, 0, 0, 0.55);
}

.form-fields { display: flex; flex-direction: column; gap: 20px; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
.form-row { display: flex; flex-direction: column; gap: 8px; }
.form-row label { font-size: 0.85rem; color: var(--text-dim); font-weight: 500; }
.form-row input, .form-row textarea {
  background: var(--bg); 
  border: 1px solid var(--line); 
  border-radius: var(--radius-m);
  padding: 13px 16px; 
  color: var(--text); 
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-row input:focus, .form-row textarea:focus {
  border-color: var(--accent); 
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-note { color: var(--text-faint); font-size: 0.78rem; text-align: center; }

/* Form Error & Success States */
.form-error {
  color: var(--accent-2); 
  font-size: 0.85rem; 
  text-align: center;
  border: 1px solid var(--accent-2); 
  border-radius: var(--radius-s); 
  padding: 10px 14px;
  background: rgba(255, 90, 54, 0.05);
}

.form-success {
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  text-align: center;
  gap: 14px; 
  padding: 24px 8px;
  animation: fadeIn 0.4s ease forwards;
}

.form-success-icon {
  display: flex; 
  align-items: center; 
  justify-content: center;
  width: 56px; 
  height: 56px; 
  border-radius: 50%;
  background: rgba(61, 220, 132, 0.12); 
  color: var(--good);
  border: 1px solid rgba(61, 220, 132, 0.25);
}

.form-success h3 { font-size: 1.2rem; }
.form-success p { color: var(--text-dim); max-width: 38ch; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 520px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line-soft); padding-top: 56px; }
.footer-inner {
  display: flex; 
  flex-direction: column; 
  gap: 40px; 
  padding-bottom: 40px;
}

.footer-brand { max-width: 340px; }
.footer-brand p { color: var(--text-dim); margin-top: 14px; max-width: 32ch; font-size: 0.92rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 56px; }
.footer-nav h4 { font-size: 0.85rem; color: var(--text-faint); margin-bottom: 14px; font-weight: 600; }
.footer-nav ul { display: flex; flex-direction: column; gap: 10px; }
.footer-nav a { color: var(--text-dim); font-size: 0.92rem; }
.footer-nav a:hover { color: var(--accent); }

.footer-bottom {
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 16px;
  padding-block: 20px; 
  border-top: 1px solid var(--line-soft);
  color: var(--text-faint); 
  font-size: 0.82rem; 
  flex-wrap: wrap;
}

/* =========================================================
   Responsive Breakpoints
   ========================================================= */

@media (max-width: 719px) {
  .main-nav {
    position: absolute; 
    top: 100%; 
    left: 0; 
    right: 0;
    max-height: calc(100vh - 60px); 
    overflow-y: auto;
    background: var(--bg);
    padding: 12px 20px 24px; 
    transform: translateY(-6px);
    opacity: 0; 
    visibility: hidden; 
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
    border-top: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
  }

  .main-nav.is-open {
    opacity: 1; 
    visibility: visible; 
    pointer-events: auto; 
    transform: translateY(0);
    transition: opacity 0.18s ease, transform 0.18s ease;
  }

  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav a { display: block; padding: 15px 4px; border-bottom: 1px solid var(--line-soft); font-size: 1.05rem; }
  .header-actions .btn-small { display: none; }
  .menu-toggle { display: flex; }
  .browser-split { grid-template-columns: 1fr; }
  .split-code { border-right: none; border-bottom: 1px solid var(--line); }
}

@media (max-width: 640px) {
  .compare-row { grid-template-columns: 1fr; }
  .compare-head span:first-child { display: none; }
  .compare-row > span { border-bottom: 1px solid var(--line-soft); }
  .compare-row > span:last-child { border-bottom: none; }
  .compare-label { border-top: 1px solid var(--line); background: var(--surface-2); }
  .brand-statement { padding: 28px 20px; }
}

@media (min-width: 640px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 720px) {
  .header-actions .btn-small { display: inline-flex; }
}

@media (min-width: 860px) {
  .hero-inner { grid-template-columns: 1.1fr 1fr; align-items: center; }
  .cta-inner { grid-template-columns: 1fr 1fr; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-inner { flex-direction: row; align-items: flex-start; justify-content: flex-start; gap: 80px; }
}

@media (min-width: 1000px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
  .compare-row > span { padding: 20px 24px; }
}
