/* Узел — сайт. Графит, пенька, морская карта. */

:root {
  --bg: #0f1412;
  --bg-2: #141a17;
  --bg-3: #1b2320;
  --line: #26302b;
  --line-2: #34403a;
  --text: #ece7db;
  --text-2: #a9ada4;
  --text-3: #6f756e;
  --hemp: #d6c497;
  --hemp-2: #ebdfbd;
  --hemp-dark: #8a7a56;
  --green: #3d8462;
  --green-2: #4f9a76;
  --green-deep: #24503c;
  --terra: #d1734a;
  --paper: #f4f1ea;
  --ink: #1f2a24;

  --serif: 'Prata', 'Times New Roman', Georgia, serif;
  --sans: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', 'Cascadia Mono', Consolas, monospace;

  --w: 1260px;
  --gutter: clamp(20px, 4vw, 60px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font: 400 17px/1.55 var(--sans);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
p a { color: var(--hemp); text-decoration: underline; text-decoration-color: rgba(214, 196, 151, 0.4); text-underline-offset: 3px; }
p a:hover { text-decoration-color: var(--hemp); }
::selection { background: var(--hemp); color: var(--ink); }

.grain {
  position: fixed; inset: -50%; z-index: 40; pointer-events: none; opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.6 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}
.chart {
  position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none;
  color: var(--green-2); opacity: 0.13;
}
main, header, footer { position: relative; z-index: 1; }

/* ---------- типографика ---------- */

h1, h2, h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.005em; }
h1 { font-size: clamp(44px, 6.6vw, 100px); line-height: 1.02; }
h1 .hemp { color: var(--hemp); }
h2 { font-size: clamp(34px, 4.2vw, 58px); line-height: 1.06; }
h3 { font-size: 24px; line-height: 1.2; }

.eyebrow, .sec-n, .fig, .idx, .foot-note, .dl span, .per, .facts-row span {
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase;
}

/* ---------- кнопки ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 28px; border-radius: 6px;
  font: 500 15px/1 var(--sans); white-space: nowrap;
  transition: transform 0.25s var(--ease), background 0.2s, color 0.2s, box-shadow 0.3s;
}
.btn:active { transform: scale(0.98); }
.btn.sm { height: 42px; padding: 0 18px; font-size: 14px; }
.btn-green { background: var(--green); color: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06) inset, 0 14px 34px -14px rgba(61, 132, 98, 0.9); }
.btn-green:hover { background: var(--green-2); transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 20px 40px -14px rgba(79, 154, 118, 1); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: var(--green); transform: translateY(-2px); }

.link-arrow { font-weight: 500; color: var(--text-2); display: inline-flex; align-items: center; gap: 8px; padding: 12px 4px; }
.link-arrow::after { content: '↓'; font-family: var(--mono); transition: transform 0.3s var(--ease); }
.link-arrow:hover { color: var(--hemp); }
.link-arrow:hover::after { transform: translateY(3px); }

/* ---------- шапка ---------- */

.top {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 32px;
  max-width: var(--w); margin: 0 auto; padding: 18px var(--gutter);
}
.top::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(rgba(15, 20, 18, 0.96) 50%, rgba(15, 20, 18, 0));
}
.wordmark { display: inline-flex; align-items: center; gap: 10px; font: 400 23px/1 var(--serif); }
.wordmark .mark { width: 34px; height: 20px; color: var(--hemp); }
.nav { display: flex; gap: 28px; margin-left: auto; font-size: 14.5px; color: var(--text-2); }
.nav a { position: relative; padding: 6px 0; transition: color 0.2s; }
.nav a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: 2px; height: 1px; background: var(--hemp); transition: right 0.3s var(--ease); }
.nav a:hover { color: var(--text); }
.nav a:hover::after { right: 0; }

/* ---------- обложка ---------- */

.hero { max-width: var(--w); margin: 0 auto; padding: clamp(40px, 7vh, 90px) var(--gutter) 0; position: relative; }
.hero-text { position: relative; z-index: 2; max-width: 780px; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--text-3); margin-bottom: 34px; }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-2); box-shadow: 0 0 0 4px rgba(79, 154, 118, 0.18); animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(79, 154, 118, 0); } }
.lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: var(--text-2); max-width: 580px; margin: 32px 0 36px; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }

.hero-rope { position: relative; margin: -30px calc(50% - 50vw) 0; height: clamp(300px, 40vw, 520px); }
.hero-rope canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fig { position: absolute; right: max(var(--gutter), calc(50vw - var(--w) / 2 + var(--gutter))); bottom: 18px; color: var(--text-3); text-transform: none; letter-spacing: 0.02em; }
.fig b { font-weight: 500; color: var(--text-2); }

/* ---------- коротко ---------- */

.facts { max-width: var(--w); margin: 0 auto; padding: 10px var(--gutter) 0; }
.facts-row { list-style: none; display: grid; grid-template-columns: repeat(5, 1fr); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line); }
.facts-row li { padding: 26px 20px 28px 0; border-right: 1px solid var(--line); }
.facts-row li + li { padding-left: 22px; }
.facts-row li:last-child { border-right: 0; }
.facts-row b { display: block; font: 400 34px/1 var(--serif); color: var(--hemp); margin-bottom: 8px; }
.facts-row span { color: var(--text-3); }

/* ---------- разделы ---------- */

section { max-width: var(--w); margin: 0 auto; padding: clamp(90px, 11vw, 160px) var(--gutter) 0; }
.sec-head { display: grid; grid-template-columns: 90px 1fr; gap: 10px 24px; align-items: baseline; margin-bottom: clamp(44px, 5vw, 72px); }
.sec-n { color: var(--hemp); padding-top: 12px; }
.sec-n::before { content: '§ '; color: var(--text-3); }
.sec-sub { grid-column: 2; max-width: 560px; color: var(--text-2); font-size: 18px; }

/* ---------- три движения ---------- */

.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.step {
  position: relative; padding: 150px 28px 34px; border-radius: 14px;
  background: linear-gradient(160deg, var(--bg-3), var(--bg-2)); border: 1px solid var(--line);
  overflow: hidden; transition: border-color 0.3s, transform 0.4s var(--ease);
}
.step:hover { border-color: var(--line-2); transform: translateY(-3px); }
.big-n {
  position: absolute; left: 18px; top: -22px;
  font: 400 220px/1 var(--serif); color: transparent;
  -webkit-text-stroke: 1.2px var(--hemp); opacity: 0.4;
  transition: opacity 0.4s, -webkit-text-stroke-color 0.4s;
}
.step:hover .big-n { opacity: 0.9; }
.step h3 { margin-bottom: 10px; }
.step p { color: var(--text-2); font-size: 16px; }

/* ---------- почему ---------- */

.why { display: grid; grid-template-columns: 5fr 7fr; gap: 60px; }
.why-lead { position: sticky; top: 110px; align-self: start; }
.why-lead .sec-n { display: block; margin-bottom: 18px; }
.why-quote { margin-top: 30px; font-size: 19px; line-height: 1.5; color: var(--text-2); max-width: 400px; }
.why-list { list-style: none; border-top: 1px solid var(--line-2); }
.why-list li { display: grid; grid-template-columns: 60px 1fr; gap: 12px; padding: 30px 0 32px; border-bottom: 1px solid var(--line); }
.why-list .idx { color: var(--text-3); padding-top: 8px; transition: color 0.2s; }
.why-list li:hover .idx { color: var(--hemp); }
.why-list h3 { margin-bottom: 8px; }
.why-list p { color: var(--text-2); max-width: 520px; }

/* ---------- тарифы: верёвка и бирки ---------- */

.line-rope {
  height: 12px; border-radius: 6px; position: relative; z-index: 1;
  background:
    repeating-linear-gradient(115deg, rgba(0, 0, 0, 0.28) 0 3px, transparent 3px 9px),
    linear-gradient(var(--hemp-2), var(--hemp) 45%, var(--hemp-dark));
  box-shadow: 0 6px 14px -4px rgba(0, 0, 0, 0.7);
  transform-origin: left; transform: scaleX(0); transition: transform 1.4s var(--ease);
}
.line-rope.in { transform: none; }

.tags { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; padding: 0 3%; }
.tag { position: relative; padding-top: 58px; --tilt: -2deg; }
.tag:nth-child(2) { --tilt: 1.5deg; }
.tag:nth-child(3) { --tilt: -1deg; }
.tag:nth-child(4) { --tilt: 2.5deg; }
.tag .string {
  position: absolute; left: 50%; top: -16px; width: 1.5px; height: 86px; background: var(--hemp-dark);
  transform-origin: top; transform: translateX(-50%) rotate(var(--tilt));
}
.tag a {
  display: flex; flex-direction: column; position: relative;
  padding: 30px 24px 22px; border-radius: 6px;
  background: var(--paper); color: var(--ink);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
  transform-origin: 50% -20px; transform: rotate(var(--tilt));
  box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.8);
  transition: transform 0.6s var(--ease), box-shadow 0.4s;
}
.tag a:hover { transform: rotate(0deg) translateY(-4px); box-shadow: 0 30px 50px -18px rgba(0, 0, 0, 0.9); }
.tag .hole { position: absolute; top: 12px; left: 50%; width: 12px; height: 12px; border-radius: 50%; transform: translateX(-50%); background: var(--bg); box-shadow: 0 0 0 3px #c8bfa9; }
.tag .term { font-family: var(--mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase; color: #6b6a62; margin-top: 8px; }
.tag .sum { font: 400 46px/1.1 var(--serif); margin: 8px 0 6px; }
.tag .per { color: #6b6a62; letter-spacing: 0.04em; text-transform: none; font-size: 12px; }
.tag .go { margin-top: 22px; padding-top: 14px; border-top: 1px dashed #c8bfa9; font-weight: 500; font-size: 14px; color: var(--green-deep); }
.tag.best a { background: var(--green); color: #fff; }
.tag.best .term, .tag.best .per { color: rgba(255, 255, 255, 0.7); }
.tag.best .go { color: #fff; border-top-color: rgba(255, 255, 255, 0.35); }
.tag.best .hole { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.5); }
.ribbon {
  position: absolute; right: -34px; top: 24px; transform: rotate(45deg);
  background: var(--hemp); color: var(--ink); font: 600 10.5px/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase;
  padding: 6px 40px;
}
.tag.trial a { background: transparent; color: var(--text); outline: 1.5px dashed var(--hemp-dark); outline-offset: -1.5px; box-shadow: none; }
.tag.trial .term, .tag.trial .per { color: var(--text-3); }
.tag.trial .sum { color: var(--hemp); }
.tag.trial .go { color: var(--hemp); border-top-color: var(--line-2); }
.tag.trial .hole { box-shadow: 0 0 0 3px var(--hemp-dark); }
.table-note { margin-top: 44px; color: var(--text-3); font-size: 15px; max-width: 560px; }

/* ---------- приложения ---------- */

.app-grid { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.app { padding: 30px 26px 30px; background: var(--bg-2); display: flex; flex-direction: column; transition: background 0.3s; }
.app:hover { background: var(--bg-3); }
.pict { width: 52px; height: 52px; stroke: var(--hemp); stroke-width: 1.5; fill: none; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 26px; }
.pict .fill { fill: var(--hemp); }
.app h3 { font-size: 22px; margin-bottom: 10px; }
.app p { color: var(--text-2); font-size: 15px; flex: 1; margin-bottom: 26px; }
.dl { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line-2); font-weight: 500; white-space: nowrap; transition: color 0.2s; }
.dl span { font-size: 11px; letter-spacing: 0.04em; }
.dl span { color: var(--text-3); }
.dl::before { content: '↓ '; color: var(--green-2); font-family: var(--mono); }
.dl:hover { color: var(--hemp); }

/* ---------- вопросы ---------- */

.faq .sec-head { margin-bottom: 20px; }
.faq-list { border-top: 1px solid var(--line-2); max-width: 860px; }
details { border-bottom: 1px solid var(--line); }
summary {
  list-style: none; cursor: pointer; padding: 22px 48px 22px 0; position: relative;
  font-family: var(--serif); font-size: 22px; line-height: 1.25; transition: color 0.2s;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: '+'; position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-family: var(--mono); font-size: 22px; color: var(--text-3); transition: transform 0.3s var(--ease), color 0.2s;
}
details[open] summary, summary:hover { color: var(--hemp); }
details[open] summary::after { transform: translateY(-50%) rotate(45deg); color: var(--hemp); }
details p { padding: 0 0 26px; max-width: 640px; color: var(--text-2); animation: fade 0.4s var(--ease); }
@keyframes fade { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- финал: переворот на бумагу ---------- */

.final { max-width: none; padding: clamp(90px, 11vw, 160px) 0 0; }
.final-inner {
  background: var(--paper); color: var(--ink); text-align: center;
  padding: clamp(80px, 10vw, 130px) var(--gutter);
  position: relative;
}
.final-inner::before {
  /* бумага с обрывом — как страница, вставленная в графит */
  content: ''; position: absolute; left: 0; right: 0; top: -14px; height: 14px;
  background: linear-gradient(135deg, transparent 50%, var(--paper) 50%) 0 0 / 28px 14px repeat-x;
}
.final h2 { font-size: clamp(44px, 6vw, 84px); margin-bottom: 18px; }
.final p { color: #5e6660; font-size: 18px; margin-bottom: 36px; }

/* ---------- подвал ---------- */

.foot {
  max-width: var(--w); margin: 0 auto; padding: 40px var(--gutter) 48px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 18px 40px;
  font-size: 14px; color: var(--text-2);
}
.foot-left { display: flex; align-items: center; gap: 18px; }
.wordmark.small { font-size: 18px; }
.foot-note { color: var(--text-3); }
.foot-links { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot-links a:hover { color: var(--hemp); }

/* ---------- появление ---------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.line-rope.reveal { transform: scaleX(0); }
.line-rope.reveal.in { transform: none; }
.hero .reveal:nth-child(2) { transition-delay: 0.08s; }
.hero .reveal:nth-child(3) { transition-delay: 0.16s; }
.hero .reveal:nth-child(4) { transition-delay: 0.24s; }
.step:nth-child(2), .app:nth-child(2), .facts-row li:nth-child(2), .tag:nth-child(2) { transition-delay: 0.1s; }
.step:nth-child(3), .app:nth-child(3), .facts-row li:nth-child(3), .tag:nth-child(3) { transition-delay: 0.2s; }
.app:nth-child(4), .facts-row li:nth-child(4), .tag:nth-child(4) { transition-delay: 0.3s; }
.facts-row li:nth-child(5) { transition-delay: 0.4s; }
.why-list li { transition-delay: calc(0.06s * var(--i, 0)); }
.tag.reveal { transform: translateY(-14px); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .line-rope { opacity: 1; transform: none !important; transition: none; }
}
body.static .reveal, body.static .line-rope { opacity: 1; transform: none !important; transition: none; }

/* ---------- адаптив ---------- */

@media (max-width: 1100px) {
  .facts-row { grid-template-columns: repeat(3, 1fr); }
  .facts-row li:nth-child(3n) { border-right: 0; }
  .facts-row li:nth-child(3n + 1) { padding-left: 0; }
  .facts-row li:nth-child(n + 4) { border-top: 1px solid var(--line); }
  .app-grid { grid-template-columns: repeat(2, 1fr); }
  .tags { grid-template-columns: repeat(2, 1fr); gap: 70px 28px; }
  .why { grid-template-columns: 1fr; gap: 30px; }
  .why-lead { position: static; }
}

@media (max-width: 820px) {
  body { font-size: 16px; }
  .nav { display: none; }
  .top { gap: 16px; padding-top: 14px; padding-bottom: 14px; }
  .top .btn { margin-left: auto; }
  .hero { padding-top: 24px; }
  .hero-rope { height: 62vw; margin-top: 0; }
  .fig { position: static; padding: 8px var(--gutter) 0; }
  .steps { grid-template-columns: 1fr; gap: 14px; }
  .step { padding-top: 120px; }
  .big-n { font-size: 180px; }
  .sec-head { grid-template-columns: 1fr; gap: 6px; }
  .sec-sub { grid-column: 1; }
  .tags { grid-template-columns: 1fr 1fr; gap: 60px 18px; padding: 0; }
  .tag .sum { font-size: 36px; }
  .app-grid { grid-template-columns: 1fr; }
  summary { font-size: 19px; }
  .foot-links { margin-left: 0; }
}

@media (max-width: 480px) {
  .facts-row { grid-template-columns: 1fr 1fr; }
  .facts-row li { border-right: 0 !important; padding-left: 0 !important; }
  .facts-row li:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .facts-row b { font-size: 28px; }
  .cta .btn { width: 100%; }
  .tags { grid-template-columns: 1fr; }
}
