/* ===== TOKENS ===== */
:root {
  /* Тёмный hero */
  --ink-deep: #05080f;
  --ink-950: #0a0e1a;
  --ink-900: #0f172a;
  --ink-800: #1e293b;
  --ink-700: #334155;

  /* Свет */
  --paper: #fafaf7;
  --paper-warm: #f4f2ec;
  --paper-ink: #1a1a1a;
  --paper-mute: #6b6b68;
  --paper-line: #e4e2dc;

  /* Акценты */
  --amber: #c99a3f;
  --amber-warm: #d4a850;
  --slate-cool: #4a5b70;

  /* Типографика */
  --font-display: "Cabinet Grotesk", ui-serif, Georgia, serif;
  --font-body: "General Sans", -apple-system, "Segoe UI", system-ui, sans-serif;

  /* Размеры */
  --wrap: 1180px;
  --wrap-narrow: 780px;
  --radius: 4px;
  --radius-lg: 8px;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--paper-ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: #e8eaf0;
  background: var(--ink-deep);
  overflow: hidden;
  isolation: isolate;
}

#shader {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  opacity: 0.9;
}

.hero__grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    /* тонкая виньетка снизу для читаемости */
    linear-gradient(
      to bottom,
      transparent 0%,
      transparent 55%,
      rgba(5, 8, 15, 0.35) 85%,
      rgba(5, 8, 15, 0.65) 100%
    );
}

/* Тонкая горизонтальная линейка сверху — как в Bloomberg Terminal */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(232, 234, 240, 0.15) 20%,
    rgba(232, 234, 240, 0.15) 80%,
    transparent 100%
  );
  z-index: 1;
}

.nav {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 24px clamp(20px, 4vw, 40px);
  max-width: var(--wrap);
  margin: 0 auto;
  width: 100%;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.01em;
  color: #f0f2f7;
}

.nav__links {
  display: none;
  gap: 32px;
  font-size: 14px;
  color: rgba(232, 234, 240, 0.7);
}

.nav__links a {
  transition: color 0.2s var(--ease-out);
}
.nav__links a:hover {
  color: #f0f2f7;
}

.nav__cta {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (min-width: 900px) {
  .nav__links {
    display: flex;
  }
}

.hero__content {
  position: relative;
  z-index: 2;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 80px clamp(20px, 4vw, 40px) 120px;
  max-width: 900px;
  margin: 0 auto;
}

.hero__eyebrow {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--amber);
  margin: 0 0 32px;
  opacity: 0;
  animation: rise 900ms 100ms var(--ease-out) forwards;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(42px, 6.8vw, 88px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 28px;
  color: #f5f6fa;
  opacity: 0;
  animation: rise 900ms 200ms var(--ease-out) forwards;
}

.hero__title-accent {
  background: linear-gradient(
    120deg,
    var(--amber-warm) 0%,
    #e8c67b 40%,
    var(--amber) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: italic;
  font-weight: 500;
}

.hero__subtitle {
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.6;
  color: rgba(232, 234, 240, 0.72);
  max-width: 560px;
  margin: 0 0 20px;
  opacity: 0;
  animation: rise 900ms 320ms var(--ease-out) forwards;
}

.hero__filter {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--accent);
  margin: 0 0 40px;
  opacity: 0;
  animation: rise 900ms 380ms var(--ease-out) forwards;
}

.hero__actions {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  animation: rise 900ms 440ms var(--ease-out) forwards;
}

.hero__scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: rgba(232, 234, 240, 0.5);
  animation: bob 2.4s ease-in-out infinite;
}
.hero__scroll svg {
  color: rgba(232, 234, 240, 0.5);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bob {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(6px);
  }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  transition:
    background 0.2s var(--ease-out),
    color 0.2s var(--ease-out),
    transform 0.15s var(--ease-out);
  white-space: nowrap;
}

.btn--primary {
  background: #f0f2f7;
  color: var(--ink-deep);
}
.btn--primary:hover {
  background: #fff;
  transform: translateY(-1px);
}

.btn--ghost {
  color: rgba(232, 234, 240, 0.85);
}
.btn--ghost:hover {
  color: #fff;
}

.btn--lg {
  padding: 14px 28px;
  font-size: 15px;
}

.btn--link {
  padding: 10px 4px;
  color: rgba(232, 234, 240, 0.75);
}
.btn--link:hover {
  color: #f0f2f7;
}
.btn--link svg {
  transition: transform 0.2s var(--ease-out);
}
.btn--link:hover svg {
  transform: translateX(3px);
}

/* Светлая версия кнопок для секций на светлом фоне */
.try .btn--primary,
.cta .btn--primary {
  background: var(--paper-ink);
  color: var(--paper);
}
.try .btn--primary:hover,
.cta .btn--primary:hover {
  background: #000;
}

/* ===== COMMON SECTION ===== */
section {
  padding: clamp(64px, 10vw, 128px) 0;
}

.section-eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  color: var(--amber);
  margin: 0 0 20px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(32px, 4.4vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  max-width: 720px;
}

.section-lead {
  font-size: clamp(16px, 1.3vw, 18px);
  line-height: 1.65;
  color: var(--paper-mute);
  max-width: 640px;
  margin: 0 0 48px;
}

/* ===== TRY ===== */
.try {
  background: var(--paper);
  border-bottom: 1px solid var(--paper-line);
}

.prompt {
  position: relative;
  max-width: 780px;
  border: 1px solid var(--paper-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(10, 14, 26, 0.04);
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}

.prompt:focus-within {
  border-color: var(--paper-ink);
  box-shadow: 0 0 0 3px rgba(10, 14, 26, 0.06);
}

.prompt__input {
  width: 100%;
  padding: 20px 60px 20px 24px;
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  color: var(--paper-ink);
  background: transparent;
  border: 0;
  outline: 0;
  resize: none;
  min-height: 72px;
  font-family: var(--font-body);
}

.prompt__input::placeholder {
  color: #999995;
}

.prompt__submit {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--paper-ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s var(--ease-out), transform 0.15s var(--ease-out);
}
.prompt__submit:hover {
  background: #000;
  transform: translateY(-1px);
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 20px;
  max-width: 780px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--paper-ink);
  background: #fff;
  border: 1px solid var(--paper-line);
  border-radius: 999px;
  transition:
    border-color 0.2s var(--ease-out),
    background 0.2s var(--ease-out),
    transform 0.15s var(--ease-out);
}
.chip:hover {
  border-color: var(--paper-ink);
  background: var(--paper-warm);
  transform: translateY(-1px);
}
.chip__icon {
  color: var(--amber);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
}

.try__note {
  margin-top: 24px;
  font-size: 13px;
  color: var(--paper-mute);
}

/* ===== HOW ===== */
.how {
  background: var(--paper-warm);
}

.how__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 40px 32px;
  margin-top: 24px;
}

.how__card {
  padding-top: 24px;
  border-top: 1px solid var(--paper-line);
}

.how__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.08em;
  color: var(--amber);
  margin-bottom: 16px;
}

.how__card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 0 0 12px;
}

.how__card p {
  font-size: 15px;
  color: var(--paper-mute);
  line-height: 1.6;
  margin: 0;
}

/* ===== AUDIENCE ===== */
.audience {
  background: var(--paper);
}

.audience__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.audience__card {
  position: relative;
  padding: 32px 28px;
  background: #fff;
  border: 1px solid var(--paper-line);
  border-radius: var(--radius-lg);
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.audience__card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(10, 14, 26, 0.06);
}

.audience__card--featured {
  background: var(--ink-950);
  color: #f0f2f7;
  border-color: var(--ink-950);
}

.audience__badge {
  position: absolute;
  top: -10px;
  left: 28px;
  padding: 4px 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-950);
  background: var(--amber-warm);
  border-radius: 999px;
  font-weight: 600;
}

.audience__card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.audience__price {
  font-size: 14px;
  color: var(--paper-mute);
  margin: 0 0 24px;
}

.audience__card--featured .audience__price {
  color: rgba(232, 234, 240, 0.6);
}

.audience__card ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.audience__card li {
  position: relative;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.5;
}

.audience__card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-left: 1px solid var(--amber);
  border-bottom: 1px solid var(--amber);
  transform: rotate(-45deg);
}

/* ===== STATS ===== */
.stats {
  background: var(--ink-950);
  color: #e8eaf0;
  border-top: 1px solid rgba(232, 234, 240, 0.08);
  border-bottom: 1px solid rgba(232, 234, 240, 0.08);
  padding: 80px 0;
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 40px;
  text-align: left;
}

.stat__num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(36px, 4vw, 52px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: #f5f6fa;
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}

.stat__label {
  font-size: 13px;
  color: rgba(232, 234, 240, 0.6);
  letter-spacing: 0.02em;
}

/* ===== CTA ===== */
.cta {
  background: var(--paper-warm);
  text-align: center;
}

.cta h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  max-width: 640px;
  margin-inline: auto;
}

.cta p {
  font-size: 16px;
  color: var(--paper-mute);
  margin: 0 0 32px;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--ink-deep);
  color: rgba(232, 234, 240, 0.6);
  padding: 48px 0 40px;
  font-size: 13px;
}

.footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: flex-start;
  justify-content: space-between;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer__brand span {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  color: #f0f2f7;
}

.footer__brand p {
  margin: 0;
  font-size: 12px;
}

.footer nav {
  display: flex;
  gap: 24px;
}
.footer nav a {
  transition: color 0.2s var(--ease-out);
}
.footer nav a:hover {
  color: #f0f2f7;
}

.footer__copy {
  margin: 0;
  font-size: 12px;
  width: 100%;
  padding-top: 24px;
  border-top: 1px solid rgba(232, 234, 240, 0.08);
}

/* ===== MOBILE ===== */
@media (max-width: 700px) {
  .nav__cta .btn--ghost {
    display: none;
  }
  .hero__content {
    padding: 60px 20px 100px;
  }
  .hero__actions {
    flex-direction: column;
    width: 100%;
  }
  .hero__actions .btn {
    width: 100%;
  }
  .stats__grid {
    grid-template-columns: 1fr 1fr;
    gap: 32px 20px;
  }
}

/* Accessible native dialog; inherits the prototype's palette. */
#info-dialog {
  width: min(90vw, 540px);
  max-height: 85vh;
  margin: auto;
  padding: 32px;
  border: 1px solid #d9dce3;
  border-radius: 16px;
  background: #fff;
  color: #0a0e1a;
  line-height: 1.6;
}
#info-dialog::backdrop { background: rgb(10 14 26 / 70%); }
#info-dialog h2 { font-size: 24px; margin-bottom: 16px; }
#info-dialog p { margin-bottom: 24px; }
:focus-visible { outline: 3px solid #b5894d; outline-offset: 4px; }


/* Editorial block, matching the warm paper and amber landing palette. */
.guides-preview { border-bottom: 1px solid var(--paper-line); background: var(--paper-warm); }
.guides-preview__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.guides-preview__grid article { display: flex; flex-direction: column; min-width: 0; padding: 28px; border: 1px solid var(--paper-line); background: var(--paper); }
.guides-preview__grid h3 { font-family: var(--font-display); font-weight: 500; font-size: 26px; line-height: 1.2; margin: 0 0 18px; }
.guides-preview__grid article > p:not(.guides-preview__label) { color: var(--paper-mute); margin: 0 0 28px; }
.guides-preview__label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--slate-cool); margin: 0 0 24px; }
.guides-preview__link { margin-top: auto; text-decoration: underline; text-underline-offset: 5px; }
.guides-preview__all { display: inline-block; margin-top: 32px; text-decoration: underline; text-underline-offset: 5px; }
.guides-preview a:focus-visible { outline: 2px solid var(--amber); outline-offset: 5px; }
.guides-preview a:hover { color: var(--slate-cool); }
@media (max-width: 850px) { .guides-preview__grid { grid-template-columns: 1fr; } }
