/* ════════════════════════════════════════════════════════
   «Мой огонёк» — минималистичная презентабельная вёрстка
   Только системные шрифты. Никаких внешних зависимостей.
   ════════════════════════════════════════════════════════ */

/* ─────────  ПАЛИТРА И ТОКЕНЫ  ───────── */
:root {
  --bg:           #faf6f0;
  --bg-alt:       #f3ece1;
  --ink:          #1c1917;
  --ink-soft:     #57534e;
  --ink-mute:     #8a827a;
  --accent:       #ea580c;
  --accent-soft:  #fdba74;
  --accent-deep:  #9a3412;
  --border:       #e7ddcd;
  --border-soft:  #efe7d8;

  --footer-bg:    #1c1917;
  --footer-text:  #d6cfc4;
  --footer-mute:  #8a827a;

  --shadow-sm:    0 1px 2px rgba(28, 25, 23, .04);
  --shadow-md:    0 8px 24px -10px rgba(28, 25, 23, .12);

  --radius:       14px;
  --radius-sm:    8px;

  --maxw:         1120px;
  --maxw-narrow:  760px;

  --ease:         cubic-bezier(.2, .7, .3, 1);
}

/* ─────────  БАЗА  ───────── */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

::selection {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

/* ─────────  РАЗМЕТКА  ───────── */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow { max-width: var(--maxw-narrow); }

.section {
  padding: 96px 0;
  position: relative;
}
.section-alt { background: var(--bg-alt); }

@media (max-width: 720px) {
  .section { padding: 64px 0; }
}

/* ─────────  ТИПОГРАФИКА  ───────── */
h1, h2, h3, h4 {
  margin: 0 0 .5em;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.2rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.accent {
  color: var(--accent);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}

.lead {
  font-size: 1.125rem;
  color: var(--ink-soft);
  max-width: 56ch;
}

.section-head {
  margin-bottom: 56px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.section-head .lead {
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 720px) {
  .section-head { margin-bottom: 36px; }
}

/* ─────────  ШАПКА  ───────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 246, 240, 0.85);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  transition: opacity .2s var(--ease);
}
.logo:hover { opacity: .8; }

.logo-icon {
  fill: var(--accent);
  flex-shrink: 0;
}
.logo-text { line-height: 1; }

.main-nav {
  display: flex;
  gap: 4px;
}
.main-nav a {
  padding: 10px 16px;
  font-size: .95rem;
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: var(--radius-sm);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.main-nav a:hover {
  color: var(--accent);
  background: rgba(234, 88, 12, .06);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}
.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--ink);
  transition: transform .25s var(--ease), opacity .2s var(--ease);
}
.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 720px) {
  .menu-toggle { display: flex; }
  .main-nav {
    position: fixed;
    inset: 68px 0 auto 0;
    flex-direction: column;
    gap: 0;
    padding: 8px 16px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    transform: translateY(-110%);
    transition: transform .3s var(--ease);
    box-shadow: var(--shadow-md);
  }
  .main-nav.is-open { transform: translateY(0); }
  .main-nav a {
    padding: 14px 8px;
    border-bottom: 1px solid var(--border-soft);
    border-radius: 0;
    font-size: 1rem;
  }
  .main-nav a:last-child { border-bottom: 0; }
}

/* ─────────  HERO  ───────── */
.hero {
  position: relative;
  padding: 88px 0 96px;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40% 0 0 0;
  background:
    radial-gradient(60% 50% at 50% 30%, rgba(234, 88, 12, .12), transparent 70%),
    radial-gradient(40% 30% at 80% 20%, rgba(251, 191, 36, .10), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-mark {
  margin-bottom: 32px;
  filter: drop-shadow(0 8px 20px rgba(234, 88, 12, .25));
  animation: float 5s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.hero-title {
  margin-bottom: 18px;
}

.hero-sub {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 52ch;
  margin: 0 auto 36px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  transition: color .2s var(--ease);
}
.scroll-cue:hover { color: var(--accent); }
.scroll-cue svg { animation: bob 1.8s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(4px); }
}

@media (max-width: 720px) {
  .hero { padding: 56px 0 80px; }
  .scroll-cue { display: none; }
}

/* ─────────  КНОПКИ  ───────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .2s var(--ease), background .2s var(--ease),
              border-color .2s var(--ease), color .2s var(--ease),
              box-shadow .2s var(--ease);
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 12px -4px rgba(234, 88, 12, .55);
}
.btn-primary:hover {
  background: var(--accent-deep);
  box-shadow: 0 6px 16px -4px rgba(234, 88, 12, .65);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(234, 88, 12, .04);
}

/* ─────────  ПРОЗА / ABOUT  ───────── */
.prose { font-size: 1.0625rem; }
.prose p {
  margin-bottom: 1.25em;
  color: var(--ink-soft);
}
.prose .callout {
  margin-top: 2em;
  padding: 22px 26px;
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-weight: 500;
  color: var(--ink);
  font-size: 1.1rem;
}

/* ─────────  ИНСТРУМЕНТЫ  ───────── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 860px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .tools-grid { grid-template-columns: 1fr; } }

.tool-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .25s var(--ease), border-color .25s var(--ease),
              box-shadow .25s var(--ease);
}
.tool-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-soft);
  box-shadow: var(--shadow-md);
}
.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  background: rgba(234, 88, 12, .08);
  color: var(--accent);
  border-radius: 10px;
}
.tool-name {
  font-weight: 600;
  font-size: 1.02rem;
}

/* ─────────  ТЭГИ / РОЛИ  ───────── */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  max-width: 800px;
  margin: 0 auto;
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: 10px 22px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 500;
  font-size: .98rem;
  color: var(--ink-soft);
  transition: color .2s var(--ease), border-color .2s var(--ease),
              background .2s var(--ease), transform .2s var(--ease);
  cursor: default;
}
.tag:hover {
  color: var(--accent);
  border-color: var(--accent-soft);
  background: rgba(234, 88, 12, .06);
  transform: translateY(-1px);
}

/* ─────────  FEATURES  ───────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 860px) { .features-grid { grid-template-columns: 1fr; } }

.feature-card {
  padding: 36px 30px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: transform .25s var(--ease), border-color .25s var(--ease),
              box-shadow .25s var(--ease);
}
.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-soft);
  box-shadow: var(--shadow-md);
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  margin-bottom: 20px;
  background: rgba(234, 88, 12, .08);
  color: var(--accent);
  border-radius: 12px;
}
.feature-card h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
}
.feature-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 1rem;
}

/* ─────────  ПОДВАЛ  ───────── */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 72px 0 32px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(214, 207, 196, .12);
}

.logo-light { color: #fafaf9; }
.logo-light .logo-icon { fill: var(--accent-soft); }

.footer-tagline {
  margin: 10px 0 0;
  color: var(--footer-mute);
  font-size: .92rem;
}

.footer-contacts {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--footer-text);
  font-size: .98rem;
  transition: color .2s var(--ease), transform .2s var(--ease);
}
.contact-link:hover {
  color: var(--accent-soft);
  transform: translateX(2px);
}
.contact-link svg { color: var(--accent-soft); flex-shrink: 0; }

.footer-bottom {
  padding-top: 24px;
}
.copyright {
  margin: 0;
  font-size: .85rem;
  color: var(--footer-mute);
}

@media (max-width: 720px) {
  .footer-inner { flex-direction: column; gap: 32px; }
}

/* ─────────  АНИМАЦИЯ ПОЯВЛЕНИЯ  ───────── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
