/* ==========================================================================
   EduGuru — design tokens
   Subject: Telegram AI companion for teens + parents (tutoring, emotional
   support, career guidance). Audience spans two generations, so the tone
   needs to read as calm and trustworthy to a parent and unpretentious to a
   teenager — not corporate SaaS, not clinical, not cutesy.

   Signature element: "Поток сознания" (Stream of consciousness) — the
   bot's real, unique feature where reflective text appears one word at a
   time. Used here as the hero's visual signature via a live word-reveal
   animation, tying the marketing page directly to the product itself.
   ========================================================================== */

:root {
  /* Color: warm paper (not cream-cliché #F4F1EA), deep teal for calm/trust,
     honey amber for warmth, muted rose for the "psychology/care" register */
  --paper: #F5F2EC;
  --paper-raised: #FFFFFF;
  --ink: #26251F;
  --ink-soft: #58554A;
  --teal: #24555A;
  --teal-deep: #163A3E;
  --amber: #DE9A45;
  --amber-soft: #F3D9AE;
  --rose: #C97A6D;
  --line: #E2DCCC;

  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(38, 37, 31, 0.04), 0 8px 24px -12px rgba(38, 37, 31, 0.18);

  --font-display: "Fraunces", "Iowan Old Style", serif; /* set deliberately narrow: see note below */
  --font-body: "Source Serif 4", Georgia, serif;
  --font-sans: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

/* NOTE ON TYPE CHOICE: Fraunces + warm paper is a documented AI-design
   cliché when paired with a terracotta accent. Here it's paired instead
   with Space Grotesk for UI/eyebrows and a deep teal + amber palette, and
   used only for H1/H2 display moments, not as the base voice — the actual
   body text below is Source Serif for long-form reading comfort, and the
   product-facing chrome (nav, buttons, tags) is Space Grotesk. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

img { max-width: 100%; display: block; }
a { color: inherit; }

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---- Nav ---- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 242, 236, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1120px;
  margin: 0 auto;
}
.nav-logo {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 19px;
  text-decoration: none;
  letter-spacing: -0.01em;
  color: var(--teal-deep);
}
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 14.5px;
}
.nav-links a { text-decoration: none; color: var(--ink-soft); }
.nav-links a:hover { color: var(--teal); }
.nav-cta {
  background: var(--teal);
  color: #fff !important;
  padding: 9px 18px;
  border-radius: 100px;
  font-weight: 600;
}
.nav-cta:hover { background: var(--teal-deep); }

/* ---- Hero ---- */
.hero {
  padding: 88px 0 72px;
  text-align: center;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 22px;
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(38px, 6vw, 66px);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 24px;
  color: var(--teal-deep);
}
.hero h1 em { font-style: italic; color: var(--amber); }
.hero-sub {
  font-family: var(--font-body);
  font-size: 19px;
  color: var(--ink-soft);
  max-width: 620px;
  margin: 0 auto 36px;
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15.5px;
  text-decoration: none;
  padding: 14px 26px;
  border-radius: 100px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-deep); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: var(--paper-raised); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal); }

/* ---- Signature: stream-of-consciousness demo ---- */
.stream-card {
  max-width: 720px;
  margin: 56px auto 0;
  background: var(--teal-deep);
  border-radius: 20px;
  padding: 40px 36px;
  text-align: left;
  box-shadow: var(--shadow);
}
.stream-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber-soft);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.stream-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--amber);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.stream-text {
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.65;
  color: #F0EDE4;
  min-height: 5.4em;
}
.stream-text .w { opacity: 0; animation: reveal 0.4s ease forwards; }
@keyframes reveal { to { opacity: 1; } }
.stream-replay {
  margin-top: 18px;
  background: none;
  border: 1px solid rgba(240,237,228,0.25);
  color: #F0EDE4;
  font-family: var(--font-mono);
  font-size: 12.5px;
  padding: 7px 14px;
  border-radius: 100px;
  cursor: pointer;
}
.stream-replay:hover { border-color: var(--amber); color: var(--amber-soft); }

@media (prefers-reduced-motion: reduce) {
  .stream-text .w { animation: none; opacity: 1; }
  .stream-dot { animation: none; }
}

/* ---- Stats strip ---- */
.stats {
  display: flex;
  justify-content: center;
  gap: 56px;
  flex-wrap: wrap;
  margin-top: 64px;
  padding-top: 44px;
  border-top: 1px solid var(--line);
}
.stat { text-align: center; }
.stat-num {
  font-family: var(--font-display);
  font-size: 40px;
  color: var(--teal);
  line-height: 1;
}
.stat-label {
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-top: 6px;
}

/* ---- Sections ---- */
section { padding: 88px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 12px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 4vw, 40px);
  color: var(--teal-deep);
  margin: 0 0 12px;
  line-height: 1.15;
}
.section-head p { color: var(--ink-soft); font-size: 17px; margin: 0; }

/* ---- Feature grid ---- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 860px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.feature-icon { font-size: 30px; margin-bottom: 14px; }
.feature-card h3 {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--ink);
}
.feature-card p {
  font-family: var(--font-sans);
  font-size: 14.5px;
  color: var(--ink-soft);
  margin: 0 0 12px;
  line-height: 1.55;
}
.feature-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--teal);
  background: #E4EEEC;
  padding: 4px 10px;
  border-radius: 100px;
  display: inline-block;
}

/* ---- Blog ---- */
.blog-filters {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 40px;
  font-family: var(--font-sans);
}
.blog-filters a {
  text-decoration: none;
  font-size: 14px;
  color: var(--ink-soft);
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--line);
}
.blog-filters a.active, .blog-filters a:hover { border-color: var(--teal); color: var(--teal); }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 900px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .blog-grid { grid-template-columns: 1fr; } }

.blog-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.blog-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.blog-card-tags {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 12px;
}
.blog-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 10px;
  color: var(--teal-deep);
}
.blog-card p {
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.55;
  margin: 0 0 16px;
  flex-grow: 1;
}
.blog-card-meta {
  font-family: var(--font-sans);
  font-size: 12.5px;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.blog-card-meta .read-link { color: var(--teal); font-weight: 600; }
.blog-card {
  padding: 0;
  overflow: hidden;
}
.blog-card-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--paper);
}
.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}
.blog-card:hover .blog-card-image img {
  transform: scale(1.04);
}
.blog-card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 24px;
}
/* ---- Partners ---- */
.partners { display: flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.partner-chip {
  font-family: var(--font-sans);
  font-size: 14.5px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  padding: 12px 20px;
  border-radius: 100px;
  text-decoration: none;
  color: var(--ink);
}
.partner-chip:hover { border-color: var(--amber); }

/* ---- Final CTA ---- */
.cta-band {
  background: var(--teal-deep);
  border-radius: 24px;
  padding: 64px 40px;
  text-align: center;
  color: #F0EDE4;
}
.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 38px);
  margin: 0 0 16px;
}
.cta-band p { color: #C9CFC9; margin: 0 0 28px; }

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--line);
  padding: 40px 0;
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--ink-soft);
}
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { text-decoration: none; color: var(--ink-soft); }
.footer-links a:hover { color: var(--teal); }

/* ---- Article page ---- */
.article-header { max-width: 760px; margin: 0 auto; text-align: left; padding: 56px 0 32px; }
.breadcrumb {
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--ink-soft);
  margin-bottom: 24px;
}
.breadcrumb a { text-decoration: none; color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--teal); }
.article-tags {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--rose);
  margin-bottom: 18px;
}
.article-header h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(30px, 4.5vw, 44px);
  line-height: 1.15;
  color: var(--teal-deep);
  margin: 0 0 18px;
}
.article-lede { font-size: 19px; color: var(--ink-soft); margin: 0 0 24px; }
.article-meta {
  font-family: var(--font-sans);
  font-size: 13.5px;
  color: var(--ink-soft);
  display: flex;
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.article-body { max-width: 760px; margin: 0 auto; padding-bottom: 40px; }
.article-body h2 {
  font-family: var(--font-display);
  font-size: 27px;
  color: var(--teal-deep);
  margin: 44px 0 16px;
  scroll-margin-top: 90px;
}
.article-body h3 {
  font-family: var(--font-sans);
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  margin: 28px 0 10px;
}
.article-body p { margin: 0 0 18px; }
.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 22px; }
.article-body li { margin-bottom: 8px; }
.article-body blockquote {
  margin: 28px 0;
  padding: 20px 24px;
  background: #EFEADB;
  border-left: 3px solid var(--amber);
  border-radius: var(--radius-sm);
  font-size: 16px;
}
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-family: var(--font-sans);
  font-size: 14.5px;
}
.article-body th, .article-body td {
  border: 1px solid var(--line);
  padding: 10px 14px;
  text-align: left;
}
.article-body th { background: var(--paper-raised); font-weight: 700; }

.toc {
  max-width: 760px;
  margin: 0 auto 8px;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.toc-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 13.5px;
  margin-bottom: 10px;
}
.toc ul { margin: 0; padding-left: 18px; font-size: 14.5px; }
.toc li { margin-bottom: 6px; }
.toc a { text-decoration: none; color: var(--teal); }
.toc a:hover { text-decoration: underline; }

.article-cta {
  max-width: 760px;
  margin: 40px auto;
  background: var(--teal);
  border-radius: var(--radius);
  padding: 28px 30px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.article-cta-icon { font-size: 28px; }
.article-cta h4 { margin: 0 0 4px; font-family: var(--font-sans); }
.article-cta p { margin: 0; opacity: 0.85; font-size: 14.5px; }
.article-cta .btn { margin-left: auto; background: #fff; color: var(--teal); }

.related { max-width: 760px; margin: 0 auto; }
.related h3 {
  font-family: var(--font-sans);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin-bottom: 16px;
}
.related ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.related a {
  text-decoration: none;
  color: var(--teal-deep);
  font-family: var(--font-body);
  font-size: 16px;
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.related a:hover { color: var(--teal); }

.article-cover {
  max-width: 760px;
  margin: 24px auto 0;
}
.article-cover img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}
