/* VSign — dark technical theme. Brand: orange #ed5300 */

:root {
  --bg:        #0b0d10;
  --bg-alt:    #10131a;
  --surface:   #151922;
  --line:      #232a35;
  --text:      #e9edf2;
  --muted:     #9aa5b1;
  --accent:    #ed5300;
  --accent-hi: #ff6a1f;
  --mono:      "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans:      "Fira Sans", system-ui, -apple-system, sans-serif;
  --display:   "Space Grotesk", var(--sans);
}

* { box-sizing: border-box; margin: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 780px; }

::selection { background: var(--accent); color: #fff; }

/* ---------- typography ---------- */

h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }

h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 1.1rem; }

.kicker {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}
.kicker::before { content: "// "; color: var(--muted); }

.content p { color: var(--muted); margin-bottom: 1rem; }
.content strong { color: var(--text); font-weight: 600; }
.content em { color: var(--text); }
.content a { color: var(--accent-hi); }

.content ul {
  list-style: none;
  padding: 0;
  margin: 1.4rem 0;
  display: grid;
  gap: 0.9rem;
}
.content ul li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--muted);
}
.content ul li::before {
  content: "▸";
  position: absolute;
  left: 0.2rem;
  color: var(--accent);
}
.content ul li strong { color: var(--text); }

code { font-family: var(--mono); font-size: 0.9em; }

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 16, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand img { display: block; }

.nav-links { display: flex; align-items: center; gap: 1.8rem; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover { color: var(--text); }
.nav-links .nav-cta { color: var(--accent-hi); }
.nav-links .lang-switch {
  font-family: var(--mono);
  font-size: 0.78rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.3rem 0.7rem;
}
.nav-links .lang-switch:hover { border-color: var(--accent); color: var(--accent-hi); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--text);
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */

.hero {
  padding: clamp(5rem, 12vh, 8.5rem) 0 clamp(4rem, 9vh, 6rem);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 0%, transparent 70%);
  opacity: 0.35;
  pointer-events: none;
}
.hero .wrap { position: relative; }

.hero-carousel {
  position: relative;
  display: grid;
}
.hero-slide {
  grid-area: 1 / 1;
  display: block;
  text-decoration: none;
  color: inherit;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 0.7s ease, transform 0.7s ease, visibility 0.7s;
}
.hero-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}
.hero-slide h2 {
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  max-width: 18ch;
  margin-bottom: 1.2rem;
}
.hero-slide h2::after {
  content: " \2192";
  color: var(--accent-hi);
  font-family: var(--mono);
  font-weight: 400;
}
.hero-slide:hover h2 { color: var(--accent-hi); }
.hero-slide .hero-line {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--muted);
  max-width: 56ch;
}
.hero-slide .hero-line strong { color: var(--text); }

.hero-controls {
  grid-row: 2;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 2.4rem;
}
.hero-dots {
  display: flex;
  gap: 0.55rem;
}
.hero-pause {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: border-color 0.2s, color 0.2s;
}
.hero-pause:hover { border-color: var(--accent); color: var(--accent-hi); }
.hero-pause svg { width: 12px; height: 12px; }
.hero-pause .icon-play { display: none; }
.hero-pause.paused .icon-pause { display: none; }
.hero-pause.paused .icon-play { display: block; }
.hero-dot {
  width: 26px;
  height: 10px;
  padding: 3px 0;
  border: 0;
  border-radius: 3px;
  background: var(--line);
  background-clip: content-box;
  cursor: pointer;
  transition: background 0.25s, width 0.25s;
}
.hero-dot:hover { background: #3a4350; }
.hero-dot.active { background: var(--accent); width: 44px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 8px;
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
}
.btn-primary:hover { background: var(--accent-hi); border-color: var(--accent-hi); }
.btn-ghost {
  color: var(--text);
  border: 1px solid var(--line);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-hi); }

/* ---------- sections ---------- */

[id] { scroll-margin-top: 84px; }

.section { padding: clamp(3.5rem, 8vh, 5.5rem) 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

/* ---------- services ---------- */

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.6rem;
}
.service-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 2rem;
  transition: border-color 0.2s, transform 0.2s;
}
.service-card:hover { border-color: rgba(237, 83, 0, 0.4); }
.service-icon {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: rgba(237, 83, 0, 0.12);
  color: var(--accent-hi);
  margin-bottom: 1.2rem;
}
.service-icon svg { width: 24px; height: 24px; }

/* ---------- stack strip ---------- */

.stack-strip {
  margin-top: 2.6rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.2rem;
}
.stack-label {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  margin-bottom: 0.7rem;
}
.stack-legacy .stack-label { color: var(--muted); }
.stack-modern .stack-label { color: var(--accent-hi); }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip {
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 0.28rem 0.65rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}
.stack-modern .chip {
  border-color: rgba(237, 83, 0, 0.35);
  color: var(--text);
  background: rgba(237, 83, 0, 0.07);
}
.stack-arrow { width: 28px; height: 28px; color: var(--accent); flex-shrink: 0; }

/* ---------- contact ---------- */

.contact-form { margin-top: 2rem; display: grid; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.contact-form input:not(.hp),
.contact-form textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  padding: 0.8rem 1rem;
  transition: border-color 0.15s;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: #5c6673; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.contact-form textarea { resize: vertical; min-height: 120px; }

.hp { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

.form-foot { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.form-status { font-size: 0.92rem; color: var(--muted); }
.form-status.ok { color: #4ade80; }
.form-status.err { color: #f87171; }

.contact-alt { margin-top: 1.6rem; color: var(--muted); font-size: 0.95rem; }
.contact-alt a { color: var(--accent-hi); text-decoration: none; }
.contact-alt a:hover { text-decoration: underline; }

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0;
  text-align: center;
}
.footer-inner { display: grid; gap: 0.6rem; justify-items: center; }
.footer p { color: var(--muted); font-size: 0.9rem; }
.footer .muted { color: #5c6673; font-size: 0.82rem; }

/* ---------- reveal animation ---------- */

.js .section .wrap > *,
.js .service-card {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.js .section .wrap.in > *,
.js .service-card.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .section .wrap > *, .service-card { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 800px) {
  .services { grid-template-columns: 1fr; }
  .stack-strip { grid-template-columns: 1fr; }
  .stack-arrow { transform: rotate(90deg); justify-self: center; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: absolute;
    top: 64px;
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--bg-alt);
    border-bottom: 1px solid var(--line);
    padding: 0.6rem 24px 1rem;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.7rem 0; width: 100%; }
  .nav-links .lang-switch { width: auto; margin-top: 0.5rem; }
}
