/* ============================================
   ФАРВАТЕР — Guide page styles
   ============================================ */

/* Hero */
.guide-hero {
  padding: 100px 0 50px;
  background: linear-gradient(180deg, var(--bg-elev) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
  position: relative;
}

.guide-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, var(--acc-soft) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, var(--acc-soft) 0%, transparent 40%);
  pointer-events: none;
}

.guide-hero > .container {
  position: relative;
  z-index: 1;
}

.guide-hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: var(--acc-soft);
  border: 1px solid var(--acc-soft-2);
  border-radius: 100px;
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--acc-2);
  margin-bottom: 24px;
}

.guide-hero__kicker .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acc);
}

.guide-hero__title {
  font-family: var(--f-display);
  font-size: clamp(2.25rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--t-1);
}

.guide-hero__sub {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
  color: var(--t-2);
  margin-bottom: 24px;
  line-height: 1.55;
  max-width: 720px;
}

.guide-hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  font-family: var(--f-mono);
  font-size: 0.8125rem;
  color: var(--t-3);
}

/* TOC */
.guide-toc {
  padding: 32px 0;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line);
}

.guide-toc__title {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t-3);
  margin-bottom: 14px;
}

.guide-toc__list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 6px 24px;
  counter-reset: toc;
  list-style: none;
}

.guide-toc__list li {
  counter-increment: toc;
}

.guide-toc__list li a {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  color: var(--t-2);
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.guide-toc__list li a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--f-mono);
  font-size: 0.75rem;
  color: var(--acc);
  flex-shrink: 0;
}

.guide-toc__list li a:hover {
  color: var(--t-1);
  border-bottom-color: var(--acc-soft-2);
}

/* Article */
.guide {
  padding: 60px 0 80px;
}

.guide__section {
  margin-bottom: 60px;
  scroll-margin-top: 80px;
}

.guide__section h2 {
  font-family: var(--f-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 24px;
  color: var(--t-1);
  letter-spacing: -0.015em;
}

.guide__section h3 {
  font-size: 1.375rem;
  font-weight: 700;
  margin-top: 36px;
  margin-bottom: 14px;
  color: var(--t-1);
}

.guide__section p {
  font-size: 1.0625rem;
  color: var(--t-2);
  line-height: 1.75;
  margin-bottom: 18px;
}

.guide__section p b {
  color: var(--t-1);
  font-weight: 600;
}

.guide__section a {
  color: var(--acc-2);
  border-bottom: 1px dotted var(--acc-soft-2);
}

.guide__section a:hover {
  color: var(--acc);
}

/* Lead quote */
.guide__lead-quote {
  margin-top: 24px !important;
  padding: 20px 24px;
  border-left: 3px solid var(--acc);
  background: var(--acc-soft);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 1.125rem !important;
  font-style: italic;
  color: var(--t-1) !important;
}

/* Lists */
.guide__list {
  margin: 0 0 18px;
  padding-left: 0;
  list-style: none;
}

.guide__list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 10px;
  font-size: 1rem;
  color: var(--t-2);
  line-height: 1.6;
}

.guide__list li::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--acc);
}

.guide__list--ordered {
  counter-reset: ord;
}

.guide__list--ordered li {
  counter-increment: ord;
  padding-left: 36px;
}

.guide__list--ordered li::before {
  content: counter(ord);
  position: absolute;
  left: 0;
  top: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--acc-soft);
  color: var(--acc);
  font-family: var(--f-mono);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Checklist */
.guide__checklist {
  list-style: none;
  margin: 0 0 24px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}

.guide__checklist li {
  position: relative;
  padding-left: 32px;
  margin-bottom: 12px;
  font-size: 1rem;
  color: var(--t-2);
}

.guide__checklist li:last-child {
  margin-bottom: 0;
}

.guide__checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  width: 18px;
  height: 18px;
  border: 2px solid var(--acc);
  border-radius: 4px;
}

.guide__checklist li::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 6px;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--acc);
  border-bottom: 2px solid var(--acc);
  transform: rotate(-45deg);
  opacity: 0.5;
}

/* Figures */
.guide__figure {
  margin: 28px 0;
  padding: 0;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.guide__figure img {
  width: 300px !important;
  max-width: 300px !important;
  height: auto;
  flex-shrink: 0;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  display: block;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.guide__figure figcaption {
  flex: 1;
  margin: 0;
  padding: 14px 18px;
  background: var(--bg-card);
  border-left: 3px solid var(--acc);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 0.9375rem;
  color: var(--t-2);
  line-height: 1.55;
  text-align: left;
}

.guide__figure figcaption b {
  color: var(--acc-2);
}

@media (max-width: 700px) {
  .guide__figure {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .guide__figure img {
    width: 240px !important;
    max-width: 240px !important;
  }

  .guide__figure figcaption {
    width: 100%;
  }
}

/* ===== iPhone-style frame around screenshots ===== */
.phone-frame {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  padding: 12px 8px 14px;
  background: linear-gradient(180deg, #1a1d22 0%, #0d0f12 100%);
  border-radius: 38px;
  box-shadow:
    /* Inner highlight for the bezel edge */
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    /* Outer rim shadow */
    0 0 0 1.5px #000,
    /* Drop shadow for depth */
    0 24px 48px -12px rgba(0, 0, 0, 0.6),
    0 8px 16px -4px rgba(0, 0, 0, 0.4),
    /* Subtle accent glow */
    0 0 60px -10px rgba(255, 140, 66, 0.12);
  /* Make sure it doesn't grow inside flex */
  align-self: flex-start;
  /* iPhone aspect-correct width */
  width: max-content;
  max-width: 100%;
}

/* Dynamic Island notch */
.phone-frame::before {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 86px;
  height: 22px;
  background: #000;
  border-radius: 999px;
  z-index: 2;
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.05);
}

/* Side button hints — subtle */
.phone-frame::after {
  content: '';
  position: absolute;
  left: -2px;
  top: 100px;
  width: 3px;
  height: 60px;
  background: linear-gradient(180deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
  border-radius: 2px 0 0 2px;
}

.phone-frame img {
  display: block !important;
  width: 280px !important;
  max-width: 280px !important;
  height: auto;
  border-radius: 28px;
  border: none !important;
  box-shadow: none !important;
  position: relative;
  z-index: 1;
}

/* Phone-frame figures: center the frame, caption full-width below */
.guide__figure:has(.phone-frame) {
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.guide__figure:has(.phone-frame) figcaption {
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}

@media (max-width: 700px) {
  .phone-frame {
    padding: 10px 7px 12px;
    border-radius: 32px;
  }
  .phone-frame::before {
    top: 15px;
    width: 70px;
    height: 18px;
  }
  .phone-frame::after {
    top: 80px;
    height: 50px;
  }
  .phone-frame img {
    width: 240px !important;
    max-width: 240px !important;
    border-radius: 24px;
  }
}

@media (max-width: 380px) {
  .phone-frame img {
    width: 200px !important;
    max-width: 200px !important;
  }
}

/* ===== Fish cards (header for each species) ===== */
.fish-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 40px 0 16px;
  padding: 18px 22px;
  background: linear-gradient(135deg, rgba(85, 200, 220, 0.06) 0%, rgba(255, 140, 66, 0.06) 100%);
  border: 1px solid rgba(85, 200, 220, 0.18);
  border-radius: var(--r-lg);
  overflow: hidden;
  isolation: isolate;
}

/* Subtle holographic glow behind fish */
.fish-card::before {
  content: '';
  position: absolute;
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(85, 200, 220, 0.18) 0%, transparent 60%);
  pointer-events: none;
  z-index: -1;
}

.fish-card__img {
  width: 110px;
  height: 110px;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(85, 200, 220, 0.35)) drop-shadow(0 0 20px rgba(85, 200, 220, 0.18));
  animation: fishFloat 4s ease-in-out infinite;
}

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

.fish-card__title {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--t-1);
  margin: 0;
  letter-spacing: -0.015em;
  line-height: 1.1;
}

@media (max-width: 600px) {
  .fish-card {
    gap: 14px;
    padding: 14px 16px;
    margin: 32px 0 14px;
  }
  .fish-card__img {
    width: 80px;
    height: 80px;
  }
  .fish-card__title {
    font-size: 1.5rem;
  }
}

/* CTA */
.guide__cta {
  margin: 80px 0 40px;
}

.guide__cta-card {
  padding: 48px 36px;
  background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-2) 100%);
  border: 1px solid var(--acc-soft-2);
  border-radius: var(--r-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.guide__cta-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--acc-soft) 0%, transparent 70%);
  pointer-events: none;
}

.guide__cta-title {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--t-1);
  position: relative;
}

.guide__cta-sub {
  font-size: 1.0625rem;
  color: var(--t-2);
  margin-bottom: 28px;
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  position: relative;
}

.guide__cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

/* Active nav link */
.nav__link--active {
  color: var(--t-1) !important;
  position: relative;
}

.nav__link--active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--acc);
  border-radius: 2px;
}

/* Footer (if not in main style) */
.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--line);
}

.footer__brand {
  max-width: 320px;
}

.footer__desc {
  font-size: 0.9375rem;
  color: var(--t-3);
  line-height: 1.6;
}

.footer__col h4 {
  font-family: var(--f-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t-3);
  margin-bottom: 16px;
  font-weight: 500;
}

.footer__col a {
  display: block;
  padding: 6px 0;
  font-size: 0.9375rem;
  color: var(--t-2);
  transition: color 0.2s;
}

.footer__col a:hover {
  color: var(--acc);
}

.footer__bottom {
  padding: 20px 0;
  font-family: var(--f-mono);
  font-size: 0.8125rem;
  color: var(--t-4);
}

/* Mobile */
@media (max-width: 768px) {
  .guide-hero {
    padding: 80px 0 36px;
  }

  .guide__section {
    margin-bottom: 44px;
  }

  .guide__cta-card {
    padding: 36px 24px;
  }

  .footer__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .guide-toc__list {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   GUIDE — финальная мобильная полировка
   ===================================================== */
@media (max-width: 768px) {
  html, body { overflow-x: hidden; }

  .guide-hero { padding: 84px 0 36px; }
  .guide-hero__title { font-size: clamp(2rem, 8vw, 2.75rem); margin-bottom: 18px; }
  .guide-hero__sub { font-size: 1rem; margin-bottom: 18px; }
  .guide-hero__kicker { margin-bottom: 18px; padding: 5px 12px; font-size: 0.7rem; }
  .guide-hero__meta { font-size: 0.75rem; }

  .guide-toc { padding: 24px 0; }
  .guide-toc__list { gap: 4px; }
  .guide-toc__list li a { padding: 10px 0; font-size: 0.9375rem; }

  .guide { padding: 40px 0 64px; }
  .guide__section { margin-bottom: 44px; scroll-margin-top: 64px; }
  .guide__section h2 {
    font-size: clamp(1.5rem, 6.5vw, 2rem);
    margin-bottom: 18px;
    line-height: 1.2;
  }
  .guide__section h3 {
    font-size: 1.1875rem;
    margin-top: 28px;
    margin-bottom: 12px;
  }
  .guide__section p {
    font-size: 1rem;
    line-height: 1.65;
    margin-bottom: 14px;
  }
  .guide__list li {
    font-size: 0.9375rem;
    margin-bottom: 8px;
  }
  .guide__lead-quote {
    font-size: 1rem !important;
    padding: 16px 18px;
  }

  .guide__figure {
    margin: 24px 0;
    gap: 14px;
  }
  .guide__figure figcaption {
    font-size: 0.875rem;
    padding: 12px 14px;
    line-height: 1.55;
  }

  .guide__checklist {
    padding: 18px;
  }
  .guide__checklist li {
    font-size: 0.9375rem;
    padding-left: 28px;
  }

  .guide__cta { margin: 56px 0 28px; }
  .guide__cta-card { padding: 32px 20px; border-radius: var(--r-lg); }
  .guide__cta-title { margin-bottom: 12px; }
  .guide__cta-sub { font-size: 0.9375rem; margin-bottom: 22px; }
  .guide__cta-actions { gap: 10px; flex-direction: column; }
  .guide__cta-actions .btn { width: 100%; justify-content: center; }
}

/* iPhone SE / mini */
@media (max-width: 380px) {
  .guide-hero { padding: 76px 0 28px; }
  .guide__section { margin-bottom: 36px; }
  .guide__section h2 { font-size: 1.5rem; }
  .guide__section p { font-size: 0.9375rem; }

  .fish-card {
    gap: 12px;
    padding: 12px 14px;
    margin: 26px 0 12px;
  }
  .fish-card__img { width: 70px; height: 70px; }
  .fish-card__title { font-size: 1.375rem; }
}
