/* ── tokens ─────────────────────────────────────── */
:root {
  --bg: #faf9f6;
  --card: #ffffff;
  --ink: #1c1b18;
  --body-c: #45433d;
  --muted: #79766d;
  --faint: #a6a299;
  --hairline: #e8e5dd;
  --border: #dbd7cc;
  --accent: #17734f;
  --accent-ring: rgba(23, 115, 79, 0.15);
  --danger: #b42318;
  --danger-ring: rgba(180, 35, 24, 0.12);
  --chip-bg: #f4f2ec;
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

/* ── base ───────────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; background: var(--bg); }

body {
  background: var(--bg);
  color: var(--body-c);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

/* ambient color washes */
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1100px 700px at 88% -12%, rgba(23, 115, 79, 0.07), transparent 60%),
    radial-gradient(900px 650px at -12% 34%, rgba(188, 152, 94, 0.06), transparent 62%),
    radial-gradient(1000px 700px at 105% 88%, rgba(23, 115, 79, 0.05), transparent 60%);
}

/* fine paper grain */
body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 160px 160px;
  opacity: 0.05;
}

h1, h2, h3 { color: var(--ink); }

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

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

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

::selection { background: rgba(23, 115, 79, 0.16); }

.container { max-width: 980px; margin: 0 auto; padding: 0 28px; }

section { scroll-margin-top: 80px; }

[hidden] { display: none !important; }

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

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

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

.sep { color: var(--faint); margin: 0 10px; }

/* ── motion ─────────────────────────────────────── */
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.hero > * { opacity: 0; animation: rise 0.65s cubic-bezier(0.22, 0.61, 0.36, 1) forwards; }
.hero > :nth-child(2) { animation-delay: 0.08s; }
.hero > :nth-child(3) { animation-delay: 0.16s; }
.hero > :nth-child(4) { animation-delay: 0.24s; }
.hero > :nth-child(5) { animation-delay: 0.34s; }

.js .reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.65s ease, transform 0.65s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ── nav ────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(250, 249, 246, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
  transition: box-shadow 0.25s ease;
}

.nav.scrolled { box-shadow: 0 6px 20px rgba(30, 25, 10, 0.05); }

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

.logo { font-weight: 600; font-size: 16.5px; letter-spacing: -0.01em; color: var(--ink); transition: color 0.15s; }
.logo:hover { text-decoration: none; color: var(--accent); }

.nav-links { display: flex; gap: 28px; }

.nav-links a { position: relative; color: var(--muted); font-size: 14px; transition: color 0.15s; }
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 100%; height: 1px;
  background: var(--ink);
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.25s ease;
}
.nav-links a:hover { color: var(--ink); text-decoration: none; }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ── buttons ────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 20px; border-radius: 10px;
  font-size: 14.5px; font-weight: 500; line-height: 1;
  transition: background 0.15s, transform 0.18s ease, box-shadow 0.18s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--ink); color: var(--bg);
  box-shadow: 0 1px 2px rgba(28, 27, 24, 0.2);
}
.btn-primary:hover {
  background: #000; text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(28, 27, 24, 0.18);
}
.btn-primary:active { transform: none; box-shadow: 0 1px 2px rgba(28, 27, 24, 0.2); }
.btn:disabled { opacity: 0.55; pointer-events: none; }

/* ── hero ───────────────────────────────────────── */
.hero { padding: 104px 0 0; }

.hero h1 {
  font-size: clamp(38px, 6.2vw, 58px);
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -0.028em;
  margin-bottom: 24px;
}

.hero h1 em { font-style: normal; color: var(--accent); }

.lede { max-width: 540px; font-size: 17px; margin-bottom: 30px; }

.hero-actions { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 26px; }

.hero-link { display: inline-block; font-size: 14.5px; font-weight: 500; transition: transform 0.18s ease; }
.hero-link:hover { transform: translateX(3px); }

.hero-contacts { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.hero-contacts a, .hero-contacts .linklike { color: var(--muted); font-family: var(--mono); font-size: 13px; }
.hero-contacts a:hover, .hero-contacts .linklike:hover { color: var(--ink); text-decoration: none; }
.hero-contacts .discord-tag { color: var(--ink); }

/* stats */
.stats {
  display: flex; flex-wrap: wrap; gap: 20px 56px;
  margin-top: 56px; padding-top: 30px;
  border-top: 1px solid var(--hairline);
}

.stat-value {
  font-size: 24px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--ink); line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.stat-value[data-count] { min-width: 4ch; }
.stat-label {
  font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--faint); margin-top: 4px;
}

/* ── sections ───────────────────────────────────── */
.section { margin-top: 96px; }

.section-grid {
  display: grid; grid-template-columns: 190px 1fr; gap: 24px 48px;
  padding-top: 34px; border-top: 1px solid var(--hairline);
}

.section-label {
  font-family: var(--mono); font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--faint);
  padding-top: 8px;
}

.section-body h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 18px; }

.section-body p + p { margin-top: 14px; }

/* ── services ───────────────────────────────────── */
.services-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px 44px;
  margin-top: 26px;
}

.service h3 { font-size: 15.5px; font-weight: 600; margin-bottom: 5px; }
.service p { font-size: 14.5px; color: var(--muted); }

/* ── contact ────────────────────────────────────── */
.contact-sub { font-size: 14.5px; color: var(--muted); margin-bottom: 26px; }

.form-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 32px clamp(22px, 4vw, 38px) 38px;
  box-shadow: 0 1px 2px rgba(30, 25, 10, 0.03), 0 12px 32px rgba(30, 25, 10, 0.04);
}

.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--hairline); margin-bottom: 30px; }

.tab {
  position: relative;
  padding: 0 0 12px;
  font-size: 14.5px; font-weight: 500; color: var(--muted);
  transition: color 0.15s;
}
.tab::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.28s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--ink); }
.tab.active::after { transform: scaleX(1); }

/* ── forms ──────────────────────────────────────── */
.form { display: none; }
.form.active { display: block; }

.form-sub {
  font-family: var(--mono); font-size: 11.5px; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.13em;
  color: var(--faint);
  margin: 30px 0 15px;
}
.form-sub:first-of-type { margin-top: 0; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field-full { grid-column: 1 / -1; }

.field label { font-size: 13.5px; font-weight: 500; color: var(--ink); }

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

.hint { color: var(--muted); font-size: 13px; line-height: 1.6; }

.cmd {
  font-family: var(--mono); font-size: 12.5px;
  background: var(--chip-bg); border: 1px solid var(--hairline); border-radius: 6px;
  padding: 2px 7px; color: var(--ink); white-space: nowrap;
}

.cmd-copy { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.cmd-copy:hover { text-decoration: underline; }
.cmd-copy.copied { color: var(--ink); }

input, textarea, select {
  width: 100%;
  background: #fdfcfa;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 11px 13px;
  color: var(--ink);
  font: inherit; font-size: 14.5px;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

input::placeholder, textarea::placeholder { color: var(--faint); }

input:focus, textarea:focus, select:focus {
  outline: none;
  background: #fff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-ring);
}

textarea { resize: vertical; min-height: 88px; }

select { appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%2379766d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 15px;
}
select:invalid { color: var(--faint); }

input.invalid, textarea.invalid, select.invalid, .dropzone.invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-ring);
}

.check-row {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px !important; font-weight: 400 !important; color: var(--body-c) !important;
  line-height: 1.55; cursor: pointer;
}
.check-row input[type="checkbox"] {
  width: auto; margin-top: 3px; flex: none;
  accent-color: var(--accent);
  cursor: pointer;
}
.check-row input[type="checkbox"].invalid {
  outline: 2px solid var(--danger); outline-offset: 2px;
  box-shadow: none;
}

input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* dropzone */
.dropzone {
  border: 1px dashed #cfcbbf; border-radius: 10px;
  padding: 24px 16px; text-align: center;
  color: var(--muted); font-size: 14px;
  cursor: pointer; background: #fdfcfa;
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover { border-color: var(--muted); }
.dropzone.drag { border-color: var(--accent); background: #f2f8f4; }
.dropzone .browse { color: var(--accent); font-weight: 500; }

.file-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.file-chips:empty { margin-top: 0; }

.file-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--chip-bg); border-radius: 7px;
  padding: 5px 6px 5px 10px;
  font-size: 13px; color: var(--ink);
}

.file-size { color: var(--muted); font-size: 12px; }

.file-remove {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 5px;
  color: var(--muted); font-size: 15px; line-height: 1;
}
.file-remove:hover { color: var(--danger); background: var(--danger-ring); }

.field-error { color: var(--danger); font-size: 13px; margin-top: 6px; }

.captcha-slot { margin-top: 26px; }
.captcha-slot:empty { margin: 0; }

/* form footer */
.form-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 30px; flex-wrap: wrap;
}
.form-foot .btn { margin-left: auto; }

.form-error { color: var(--danger); font-size: 13.5px; flex: 1 1 240px; }

.form-error:not([hidden]) { animation: rise 0.35s ease both; }

/* success */
.form-success { padding: 6px 0 14px; }
.form-success:not([hidden]) { animation: rise 0.5s ease both; }
.form-success h3 { font-size: 19px; font-weight: 600; margin-bottom: 8px; }
.form-success p { color: var(--muted); font-size: 14.5px; margin-bottom: 16px; max-width: 430px; }

/* ── footer ─────────────────────────────────────── */
.footer { margin-top: 110px; border-top: 1px solid var(--hairline); padding: 26px 0 36px; }

.footer-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 12.5px; color: var(--faint);
}
.footer-inner a, .footer-inner .linklike { color: var(--muted); font-family: var(--mono); font-size: 12.5px; }
.footer-inner a:hover, .footer-inner .linklike:hover { color: var(--ink); text-decoration: none; }

/* ── responsive ─────────────────────────────────── */
@media (max-width: 800px) {
  .section-grid { grid-template-columns: 1fr; gap: 10px; }
  .section-label { padding-top: 0; }
  .section { margin-top: 72px; }
}

@media (max-width: 640px) {
  .nav-links { gap: 18px; }
  .nav-links a { font-size: 13.5px; }
  .hero { padding-top: 68px; }
  .stats { gap: 18px 36px; }
  .services-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-foot .btn { width: 100%; }
}

/* ── reduced motion ─────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hero > *, .reveal { opacity: 1 !important; transform: none !important; }
}
