/* Helve Mobile — Nordic night, Estonian-blue accent, editorial serif headlines.
   Одна easing-кривая на всё: сильный ease-out (emil-design-eng). */
:root {
  --bg: #0c111c;
  --surface: #131a29;
  --surface-2: #182134;
  --ink: #edf1f7;
  --muted: #97a3b8;
  --accent: #58a6ff;        /* эстонский синий, поднятый для тёмного фона */
  --accent-ink: #0b1220;
  --line: rgba(151, 163, 184, 0.16);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}

/* Тонкая сетка на фоне — глубина без градиентного слоупа */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(88, 166, 255, 0.10), transparent 70%),
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 100% 100%, 64px 64px, 64px 64px;
  opacity: 0.35;
  pointer-events: none;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); margin: 0.4em 0; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin: 0 0 1.2em; }
h3 { font-size: 1.15rem; margin: 0 0 0.4em; }
p { margin: 0 0 1em; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- NAV ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.9rem clamp(1rem, 4vw, 3rem);
  background: rgba(12, 17, 28, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 600;
  white-space: nowrap;
}
.logo:hover { text-decoration: none; }
.logo svg { color: var(--accent); }
.nav-links { display: flex; gap: 1.4rem; margin-left: auto; }
.nav-links a { color: var(--muted); font-size: 0.95rem; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-right { display: flex; align-items: center; gap: 0.8rem; }

.lang {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
  transition: color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
.lang:hover { color: var(--ink); border-color: var(--muted); }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  padding: 0.7rem 1.3rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 160ms var(--ease-out), border-color 160ms var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #6fb2ff; text-decoration: none; }
.btn-ghost { border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--muted); text-decoration: none; }
.btn-sm { padding: 0.45rem 0.95rem; font-size: 0.88rem; }

/* ---------- LAYOUT ---------- */
.section { max-width: 1080px; margin: 0 auto; padding: clamp(3.5rem, 8vw, 6rem) clamp(1rem, 4vw, 2rem); }

/* ---------- HERO ---------- */
.hero {
  max-width: 1080px;
  margin: 0 auto;
  padding: clamp(4rem, 10vw, 8rem) clamp(1rem, 4vw, 2rem) clamp(3rem, 6vw, 5rem);
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}
.lede { font-size: clamp(1.05rem, 2vw, 1.25rem); color: var(--muted); max-width: 34em; }
.hero-cta { display: flex; gap: 0.9rem; flex-wrap: wrap; margin-top: 2rem; }

/* ---------- SERVICES: редакционные строки, не карточная сетка ---------- */
.svc-list { border-top: 1px solid var(--line); }
.svc-row {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 1.5rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}
.svc-num {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--accent);
  padding-top: 0.35em;
}
.svc-row p { color: var(--muted); margin: 0; max-width: 38em; }

/* ---------- PROCESS ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  counter-reset: step;
}
.steps li { position: relative; padding-top: 0.4rem; }
.steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 1.05rem;
  left: calc(100% - 0.4rem);
  width: 0.9rem;
  border-top: 1px dashed var(--line);
}
.step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 0.9rem;
  margin-bottom: 0.9rem;
}
.steps p { color: var(--muted); font-size: 0.95rem; margin: 0; }

/* ---------- WORK ---------- */
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.4rem; }
.work-card {
  display: block;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.4rem;
  transition: transform 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
.work-card:hover { transform: translateY(-3px); border-color: var(--muted); text-decoration: none; }
.work-card p { color: var(--muted); font-size: 0.92rem; margin: 0; }
.work-mock {
  height: 130px;
  border-radius: 9px;
  margin-bottom: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.85);
}
.mock-est { background: linear-gradient(160deg, #1d3a2a, #0f2018); }
.work-icon {
  width: 130px;
  height: 130px;
  border-radius: 30px;
  margin-bottom: 1.1rem;
  display: block;
  border: 1px solid var(--line);
}
.mock-baltic { background: linear-gradient(160deg, #16324f, #0c1a2b); }
.mock-nord { background: linear-gradient(160deg, #33254d, #1a1430); position: relative; }
.work-tag {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid var(--line);
  background: rgba(12, 17, 28, 0.6);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
}

/* ---------- CONTACT ---------- */
.section-contact { max-width: 720px; }
.field { display: block; margin-bottom: 1.1rem; }
.field span {
  display: block;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.4rem;
}
.field input, .field textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  transition: border-color 160ms var(--ease-out);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.form-hint { color: var(--muted); font-size: 0.88rem; margin: 0; }
.form-status { min-height: 1.4em; margin: 0.8rem 0 0; font-size: 0.92rem; }
.form-status.ok { color: #7ee2a8; }
.form-status.err { color: #ff8b8b; }

/* ---------- FOOTER ---------- */
.footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
  padding: 2rem clamp(1rem, 4vw, 3rem);
  text-align: center;
}
.footer-legal { opacity: 0.7; font-size: 0.8rem; }

/* ---------- SCROLL REVEAL ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 500ms var(--ease-out), transform 500ms var(--ease-out);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .work-card { transition: none; }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps li:not(:last-child)::after { display: none; }
  .work-grid { grid-template-columns: 1fr; }
  .svc-row { grid-template-columns: 3rem 1fr; gap: 1rem; }
}
