/* Тропа VPN — brand system per BRIEF.md
   Deep green on near-black. Flat surfaces, hairlines, no glass, no orbs. */

:root {
  --bg: #0c0b09;
  --bg-raised: #151310;
  --bg-hover: #1a1712;
  --text: #f1eee8;
  --text-2: #a59d90;
  --text-3: #6e675b;
  --accent: #e8a54b;        /* warm amber — live-route signal */
  --accent-ink: #171006;    /* text on accent */
  --line: rgba(241, 238, 232, 0.08);
  --line-strong: rgba(241, 238, 232, 0.16);

  --font-body: "Golos Text", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", monospace;

  --pad: clamp(1.25rem, 4vw, 3.5rem);
  --max: 1240px;
  --radius: 18px;
  --radius-sm: 10px;
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* Film grain over everything — the only "texture", fixed and non-interactive */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

::selection {
  background: rgba(232, 165, 75, 0.26);
  color: var(--text);
}

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

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

h1,
h2,
h3 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
  margin: 0;
}

p {
  margin: 0;
}

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

main,
.site-header,
.site-footer {
  position: relative;
  z-index: 1;
}

/* --- Header --- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  width: 100%;
  height: var(--header-h);
  border-bottom: 1px solid var(--line);
  background: rgba(12, 11, 9, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.site-header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: var(--max);
  height: 100%;
  margin: 0 auto;
  padding: 0 var(--pad);
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  width: fit-content;
  justify-self: start;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  color: var(--accent);
  flex-shrink: 0;
}

.nav-links {
  display: none;
  gap: 2rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-2);
}

.nav-links a {
  transition: color 0.2s var(--ease);
}

.nav-links a:hover {
  color: var(--text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.25s var(--ease),
    color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

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

.btn-primary:hover {
  background: #f0b263;
  transform: translateY(-1px);
}

/* Trailing arrow chip: the arrow lives in its own circle, flush right */
.btn-arrow {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: -0.35rem;
  border-radius: 50%;
  background: rgba(5, 17, 12, 0.14);
  transition: transform 0.25s var(--ease);
}

.btn-arrow svg {
  width: 11px;
  height: 11px;
}

.btn-primary:hover .btn-arrow {
  transform: translate(2px, -2px);
}

.btn-nav {
  justify-self: end;
  padding: 0.6rem 1.2rem;
  font-size: 0.9rem;
}

@media (min-width: 1024px) {
  .nav-links {
    display: flex;
  }
}

/* --- Hero --- */

.hero {
  display: grid;
  gap: 3rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: 3.5rem var(--pad) 0;
  min-height: calc(88svh - var(--header-h));
  align-items: center;
  position: relative;
  overflow: visible;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 35rem;
}

.eyebrow {
  margin: 0 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}

.eyebrow-mark,
.closing-mark {
  flex-shrink: 0;
  display: block;
}

.hero h1 {
  font-size: clamp(2.55rem, 4.5vw, 3.6rem);
  line-height: 1.04;
  max-width: 24ch;
  margin-bottom: 1.4rem;
}

.lede {
  max-width: 27rem;
  color: var(--text-2);
  font-size: clamp(1.02rem, 1.3vw, 1.15rem);
  line-height: 1.6;
  margin-bottom: 2.25rem;
}

.cta-stack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.1rem 1.5rem;
  margin-bottom: 2.5rem;
}

.cta-note {
  margin: 0;
  color: var(--text-2);
  font-size: 0.9rem;
}

.cta-side {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.cta-rating {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-2);
}

.cta-rating strong {
  color: var(--text);
  font-weight: 700;
}

.stars {
  flex: none;
  width: 84px;
  height: 17px;
  color: var(--accent);
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--text-3);
}

.status-dot {
  width: 7px;
  height: 7px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2.6s var(--ease) infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(232, 165, 75, 0.4);
  }
  70%,
  100% {
    box-shadow: 0 0 0 9px rgba(232, 165, 75, 0);
  }
}

/* Globe: anchored to the bottom-right edge, deliberately cropped */
.hero-visual {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.globe-field {
  position: absolute;
  inset: -12% -25% -12% -35%;
  background-image: radial-gradient(
    circle,
    rgba(232, 165, 75, 0.32) 0.8px,
    transparent 1px
  );
  background-size: 20px 20px;
  mask-image: radial-gradient(ellipse 65% 65% at 62% 50%, #000 8%, transparent 70%);
  -webkit-mask-image: radial-gradient(
    ellipse 65% 65% at 62% 50%,
    #000 8%,
    transparent 70%
  );
  opacity: 0.35;
  pointer-events: none;
}

.globe-wrap {
  position: relative;
  width: min(100%, 480px);
  aspect-ratio: 1;
  margin: 0 calc(-1 * var(--pad)) -14% 0;
}

#globe-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.globe-arcs {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

@media (min-width: 1024px) {
  .hero {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    gap: 1rem;
    padding-top: 2rem;
  }

  .hero-visual {
    min-height: 600px;
  }

  .globe-wrap {
    width: min(52vw, 660px);
    margin-right: calc(-2 * var(--pad));
    margin-bottom: -22%;
  }
}

@media (max-width: 1023px) {
  .hero-visual {
    order: 2;
  }
}

/* Headline break control: forced break only where there is room for it */
.hero h1 br {
  display: none;
}

@media (min-width: 720px) {
  .hero h1 br {
    display: inline;
  }
}

/* --- Sections: editorial left rail --- */

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4.5rem, 13vh, 8.5rem) var(--pad);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

.section-label {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}

.section-label em {
  font-style: normal;
  color: var(--accent);
  margin-right: 0.75rem;
}

.section h2 {
  font-size: clamp(1.75rem, 3.2vw, 2.7rem);
  max-width: 21ch;
}

.section-intro {
  max-width: 34rem;
  color: var(--text-2);
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  line-height: 1.6;
}

.section-body {
  display: grid;
  gap: 1.75rem;
}

@media (min-width: 900px) {
  .section {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 2rem;
    align-items: start;
  }

  .section > .section-label {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
  }
}

/* Problem statement — plain editorial type, key phrase in green */
.problem .section h2,
.problem h2 {
  max-width: 26ch;
}

.problem h2 em {
  font-style: normal;
  color: var(--accent);
}

/* How it works — numbered index rows */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
}

.steps li {
  display: grid;
  grid-template-columns: 3.2rem 1fr;
  gap: 0.5rem 1.25rem;
  padding: 1.6rem 0.25rem;
  border-top: 1px solid var(--line);
  transition: background 0.25s var(--ease);
}

.steps li:last-child {
  border-bottom: 1px solid var(--line);
}

.steps li:hover {
  background: rgba(237, 242, 238, 0.02);
}

.step-num {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.8rem;
  color: var(--accent);
  padding-top: 0.35rem;
}

.steps h3 {
  font-size: 1.15rem;
  margin-bottom: 0.3rem;
}

.steps p {
  color: var(--text-2);
  font-size: 0.98rem;
  max-width: 46ch;
  grid-column: 2;
}

@media (min-width: 720px) {
  .steps li {
    grid-template-columns: 3.2rem 14rem 1fr;
    align-items: baseline;
    gap: 1.5rem;
  }

  .steps h3 {
    margin-bottom: 0;
  }

  .steps p {
    grid-column: auto;
  }
}

/* Why Тропа — asymmetric bento: 7 / 5 / full-width */
.pillar-grid {
  display: grid;
  gap: 0.85rem;
}

.pillar-grid article {
  padding: 1.6rem 1.5rem;
  border-radius: var(--radius);
  background: var(--bg-raised);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(237, 242, 238, 0.04);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}

.pillar-grid article:hover {
  border-color: rgba(232, 165, 75, 0.35);
  background: var(--bg-hover);
}

.pillar-grid h3 {
  font-size: 1.15rem;
  margin-bottom: 0.55rem;
}

.pillar-grid p {
  color: var(--text-2);
  font-size: 0.95rem;
  max-width: 52ch;
}

.pillar-grid article:last-child p {
  max-width: 68ch;
}

@media (min-width: 900px) {
  .pillar-grid {
    grid-template-columns: repeat(12, 1fr);
  }

  .pillar-grid article:nth-child(1) {
    grid-column: span 7;
  }

  .pillar-grid article:nth-child(2) {
    grid-column: span 5;
  }

  .pillar-grid article:nth-child(3) {
    grid-column: span 12;
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr);
    gap: 0.5rem 2rem;
    align-items: baseline;
  }
}

/* --- Comparison table --- */

.compare-scroller {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  -webkit-overflow-scrolling: touch;
}

.compare {
  width: 100%;
  min-width: 680px;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-raised);
}

.compare th,
.compare td {
  padding: 1.15rem 1.3rem;
  text-align: left;
  vertical-align: top;
  font-size: 0.93rem;
  line-height: 1.55;
}

.compare thead th {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  border-bottom: 1px solid var(--line);
}

.compare thead .col-tropa {
  color: var(--accent);
}

.compare tbody th {
  width: 24%;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
}

.compare tbody td {
  color: var(--text-2);
}

.compare td strong {
  font-weight: 600;
  color: var(--text);
}

.compare tbody tr + tr th,
.compare tbody tr + tr td {
  border-top: 1px solid var(--line);
}

.compare tbody tr {
  transition: background 0.2s var(--ease);
}

.compare tbody tr:hover {
  background: rgba(237, 242, 238, 0.02);
}

.compare .col-tropa {
  background: rgba(232, 165, 75, 0.05);
  border-left: 1px solid rgba(232, 165, 75, 0.24);
  border-right: 1px solid rgba(232, 165, 75, 0.24);
}

.compare td.col-tropa strong {
  color: var(--accent);
}

/* Tables don't clip cell backgrounds — round the corner cells explicitly */
.compare thead td:first-child {
  border-top-left-radius: var(--radius);
}

.compare thead th:last-child {
  border-top-right-radius: var(--radius);
}

.compare tbody tr:last-child th:first-child {
  border-bottom-left-radius: var(--radius);
}

.compare tbody tr:last-child td:last-child {
  border-bottom-right-radius: var(--radius);
}

.compare-corner {
  background: var(--bg-raised);
  border-bottom: 1px solid var(--line);
}

/* --- Pricing: rate card rows, no badges --- */

.plans {
  display: grid;
}

.plan {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 0.35rem 2rem;
  padding: 1.55rem 1.25rem;
  border-top: 1px solid var(--line);
  transition: background 0.25s var(--ease);
}

.plan:last-of-type {
  border-bottom: 1px solid var(--line);
}

.plan:hover {
  background: rgba(237, 242, 238, 0.02);
}

.plan-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-left: 0.9rem;
  white-space: nowrap;
}

.plan-left {
  min-width: 0;
}

.plan-term {
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
}

.plan-total {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.6rem;
}

.plan-total s {
  color: var(--text-3);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration-thickness: 1px;
}

.plan-total strong {
  font-weight: 800;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.plan-monthly {
  color: var(--text-2);
  font-size: 0.92rem;
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.plan-monthly strong {
  color: var(--text);
  font-weight: 600;
  font-size: 1rem;
}

.pricing .btn {
  margin-top: 2rem;
}

@media (max-width: 560px) {
  .plan {
    grid-template-columns: 1fr;
  }

  .plan-monthly {
    text-align: left;
  }
}

/* --- Closing --- */

.closing {
  text-align: left;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4rem, 12vh, 8rem) var(--pad);
}

.closing h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  max-width: 14ch;
}

.closing p {
  color: var(--text-2);
  max-width: 36ch;
  margin-bottom: 1rem;
}

/* --- Footer --- */

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 3rem var(--pad) 2rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 2.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  width: fit-content;
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.footer-tagline {
  margin: 0.9rem 0 0;
  max-width: 30ch;
  color: var(--text-2);
  font-size: 0.92rem;
}

.footer-col h4 {
  margin: 0 0 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
}

.footer-col a {
  color: var(--text-2);
  font-size: 0.92rem;
  transition: color 0.2s var(--ease);
}

.footer-col a:hover {
  color: var(--text);
}

.footer-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-contact svg {
  color: var(--accent);
  flex-shrink: 0;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
}

.footer-bottom p {
  margin: 0;
}

.footer-motto {
  font-style: italic;
  color: var(--text-3);
}

.muted {
  color: var(--text-2);
}

.tiny {
  font-size: 0.8rem;
  color: var(--text-3);
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
}

/* --- Scroll reveals (JS adds .is-in; without JS everything stays visible) --- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  filter: blur(5px);
  transition:
    opacity 0.75s var(--ease),
    transform 0.75s var(--ease),
    filter 0.75s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}

.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js [data-reveal] {
    opacity: 1;
    transform: none;
    filter: none;
    transition: none;
  }

  .status-dot {
    animation: none;
  }

  .btn:hover,
  .btn:active {
    transform: none;
  }
}

/* --- Floating Telegram support button (bottom-right) --- */

.tg-fab {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 80;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 12px 32px rgba(232, 164, 75, 0.28);
  transition:
    transform 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.tg-fab svg {
  width: 26px;
  height: 26px;
}

.tg-fab:hover,
.tg-fab:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(232, 164, 75, 0.4);
}

.tg-fab:active {
  transform: translateY(-1px) scale(0.97);
}

/* Soft pulse ring to draw the eye */
.tg-fab::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid var(--accent);
  animation: fab-pulse 2.6s var(--ease) infinite;
  pointer-events: none;
}

@keyframes fab-pulse {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }

  70%,
  100% {
    transform: scale(1.35);
    opacity: 0;
  }
}

.tg-fab-label {
  /* floating tooltip chip, shown on hover on wide screens */
  position: absolute;
  right: calc(100% + 0.75rem);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg-raised);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.25s var(--ease),
    transform 0.25s var(--ease);
}

@media (hover: hover) and (min-width: 760px) {
  .tg-fab:hover .tg-fab-label,
  .tg-fab:focus-visible .tg-fab-label {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
  }
}

@media (max-width: 759px) {
  .tg-fab {
    width: 56px;
    height: 56px;
  }

  .tg-fab-label {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tg-fab {
    transition: none;
  }

  .tg-fab::before {
    animation: none;
    opacity: 0;
  }
}
