/* Связка by Galera Club — base styles extracted from artifact. */

:root {
  --bg: #FCFCFB;
  --ink: #0F0F0F;
  --yellow: #F4C430;
  --yellow-soft: #FEF9E7;
  --yellow-mid: #FEF3C7;
  --gray-card: #F5F5F4;
  --cream: #FAF8F2;
  --mute: #A8A29E;
  --mute-2: #525252;
  --border: #E7E5E4;
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg); color: var(--ink);
  font-family: 'Manrope', system-ui, sans-serif;
  font-feature-settings: 'ss01','cv11';
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body { overflow-x: hidden; }
a { color: inherit; }
button { font-family: inherit; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.scribble { font-family: 'Caveat', cursive; }
::selection { background: var(--yellow); color: var(--ink); }

/* hand-drawn yellow underline behind a word */
.hl { position: relative; display: inline-block; white-space: nowrap; }
.hl::after {
  content: ""; position: absolute; left: -2px; right: -2px; bottom: .08em;
  height: .34em; background: var(--yellow); z-index: -1;
  border-radius: 8px 4px 12px 6px;
  transform: rotate(-.6deg);
}
.hl-thin::after { height: .18em; bottom: .04em; border-radius: 8px; }

/* yellow blob behind big numbers */
.blob { position: relative; display: inline-block; }
.blob > .blob-bg {
  position: absolute; inset: auto; left: -6%; right: -6%; bottom: 6%;
  height: 34%; background: var(--yellow); z-index: -1;
  border-radius: 62% 38% 55% 45% / 55% 60% 40% 45%;
  transform: rotate(-1.2deg);
  filter: saturate(1.05);
}

/* reveal animations — disabled for MVP (content always visible).
   Original JSX had useReveal() hook for fade-in-on-scroll, but it caused blank pages
   on slow JS init. Keep .reveal selectors for future re-enable, but no opacity:0 default. */
.reveal { /* no-op, reserved for future animation */ }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  padding: .95em 1.4em; font-weight: 600; font-size: 16px;
  letter-spacing: -.005em; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .15s ease;
}
.btn-primary {
  background: var(--ink); color: #fff;
  box-shadow: 0 2px 0 rgba(0,0,0,.12), 0 8px 18px -10px rgba(0,0,0,.5);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 0 rgba(0,0,0,.18), 0 14px 26px -12px rgba(0,0,0,.55);
}
.btn-yellow {
  background: var(--yellow); color: var(--ink);
  box-shadow: 0 2px 0 rgba(0,0,0,.10), 0 10px 22px -14px rgba(0,0,0,.4);
}
.btn-yellow:hover { transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--ink); border: 1px solid var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: #fff; }

/* chips */
.chip {
  display: inline-flex; align-items: center; gap: .4em; padding: .45em .9em;
  border-radius: 999px; font-size: 13px; font-weight: 500;
  background: #fff; border: 1px solid var(--border); color: #3f3f3f; cursor: pointer;
  transition: all .15s ease;
}
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }

/* cards */
.card {
  background: #fff; border-radius: 20px; border: 1px solid var(--border);
  transition: transform .2s ease, box-shadow .2s ease, border-color .15s ease;
}
.card-h:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -22px rgba(0,0,0,.25), 0 2px 6px -2px rgba(0,0,0,.05);
}

/* layout */
.container { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 760px) { .container { padding: 0 20px; } }

details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }

/* sticky header */
.nav {
  position: sticky; top: 0; z-index: 50;
  transition: background .25s ease, box-shadow .25s ease, border-color .25s ease;
  border-bottom: 1px solid transparent;
}
.nav.stuck {
  background: rgba(252,252,251,.85);
  backdrop-filter: saturate(1.4) blur(14px);
  border-color: var(--border);
  box-shadow: 0 6px 18px -16px rgba(0,0,0,.3);
}

/* drift animation */
@keyframes drift {
  0%, 100% { transform: translateY(0) rotate(var(--rot, 0deg)); }
  50% { transform: translateY(-4px) rotate(var(--rot, 0deg)); }
}
.drift { animation: drift 3.4s ease-in-out infinite; }

/* logo tile rotate on card hover */
.card-h:hover .logo-tile { transform: rotate(-3deg); }
.logo-tile { transition: transform .25s cubic-bezier(.2,.7,.2,1); }

/* modal */
.mdl-back {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 200;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.mdl-back.open { opacity: 1; pointer-events: auto; }
.mdl {
  background: #fff; border-radius: 24px; max-width: 560px; width: 100%;
  padding: 36px; box-shadow: 0 30px 80px -20px rgba(0,0,0,.4);
  transform: translateY(24px);
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.mdl-back.open .mdl { transform: none; }

/* faq */
.faq-row { border-bottom: 1px solid var(--border); }
.faq-row[open] .faq-q { color: var(--ink); }
.faq-q {
  font-weight: 600; font-size: 19px; padding: 22px 0;
  display: flex; gap: 1em; align-items: flex-start; justify-content: space-between;
  color: #2a2a2a;
}
.faq-plus {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--yellow-soft);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
  transition: transform .25s ease;
}
.faq-row[open] .faq-plus { transform: rotate(45deg); background: var(--yellow); }
.faq-a {
  padding: 0 0 24px; color: #3f3f3f; font-size: 17px; line-height: 1.6; max-width: 780px;
  border-top: 1px dashed var(--yellow); margin-top: -4px; padding-top: 18px;
}

/* counter / parallax */
.num-anim { font-variant-numeric: tabular-nums; }
.parallax { will-change: transform; }

/* hand-drawn arrow positions */
.scribble-arrow { position: absolute; pointer-events: none; }

/* placeholder logo grid */
.ph-stripes {
  background:
    repeating-linear-gradient(135deg, rgba(0,0,0,.05) 0 1px, transparent 1px 14px),
    #FAFAF9;
  border: 1px dashed var(--border); border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  color: #777; padding: 12px; text-align: center;
}

/* staggered step reveal — for "Как это работает" 4-step grids */
.how4-step { opacity: 0; transform: translateY(14px) scale(.98); }
.how4-arrow { opacity: 0; transform: translate(-8px, -50%); }
.reveal.in .how4-step {
  animation: how4StepIn .55s cubic-bezier(.2,.6,.2,1) both;
  animation-delay: calc(var(--i, 0) * 260ms);
}
.reveal.in .how4-arrow {
  animation: how4ArrowIn .45s cubic-bezier(.2,.6,.2,1) both;
  animation-delay: calc(var(--i, 0) * 260ms + 160ms);
}
@keyframes how4StepIn { to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes how4ArrowIn { to { opacity: 1; transform: translate(0, -50%); } }

/* scrollbars subtle */
*::-webkit-scrollbar { height: 8px; width: 8px; }
*::-webkit-scrollbar-thumb { background: #0001; border-radius: 8px; }
