/* ============================================
   heyEliora — Landing Page Styles
   Inspired by 37signals: bold, warm, human.
   ============================================ */

/* ---- Reset & Base ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --text: #1a1a1a;
  --text-soft: #444;
  --text-muted: #777;
  --bg: #fffdf9;
  --bg-warm: #fef6ec;
  --bg-card: #fff;
  --accent: #e85d3a;
  --accent-hover: #d14a28;
  --accent-light: #fef0ec;
  --green: #2a9d6e;
  --border: #e8e3da;
  --radius: 12px;
  --max-w: 680px;

  /* hand-drawn style */
  --font-hand: "Caveat", cursive;
  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-ui:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono:
    "SF Mono", SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 19px;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
img {
  max-width: 100%;
  display: block;
}

/* ---- Layout ---- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 28px;
}

section {
  padding: 96px 0;
}

/* ---- Typography ---- */
h1 {
  font-family: var(--font-ui);
  font-size: clamp(2.6rem, 6vw, 4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  font-weight: 900;
}

h2 {
  font-family: var(--font-ui);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 800;
}

h3 {
  font-family: var(--font-ui);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

p + p {
  margin-top: 1em;
}

.lead {
  font-size: 1.2rem;
  color: var(--text-soft);
  line-height: 1.65;
}

.small {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Hand-drawn accent text */
.hand {
  font-family: var(--font-hand);
  font-weight: 700;
}

/* Sketchy underline for emphasis */
.squiggle {
  text-decoration: underline wavy var(--accent);
  text-decoration-skip-ink: none;
  text-underline-offset: 4px;
}

/* ---- Nav ---- */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0;
}

.brand {
  font-family: var(--font-ui);
  font-size: 1.2rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

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

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-ui);
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-cta {
  background: var(--text);
  color: #fff !important;
  padding: 9px 22px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: opacity 0.2s;
}

.nav-cta:hover {
  opacity: 0.85;
  text-decoration: none !important;
}

/* ---- Hero ---- */
.hero {
  padding: 100px 0 80px;
}

.hero .container {
  max-width: 1080px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 64px;
  align-items: center;
}

.hero-eyebrow {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 18px;
}

.hero-text h1 {
  margin-bottom: 28px;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero-text .lead {
  max-width: 520px;
  font-size: 1.25rem;
  margin-bottom: 20px;
}

.hero-text .lead + .lead {
  margin-bottom: 36px;
}

/* Hero action buttons */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.cta-pro {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 800;
  padding: 16px 34px;
  border-radius: 50px;
  background: var(--text);
  color: #fff;
  text-decoration: none;
  transition:
    opacity 0.15s,
    transform 0.1s;
}

.cta-pro:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  text-decoration: none;
}

.cta-secondary {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 14px 28px;
  border-radius: 50px;
  border: 2px solid var(--border);
  color: var(--text);
  text-decoration: none;
  transition: all 0.15s;
}

.cta-secondary:hover {
  border-color: var(--text);
  text-decoration: none;
}

.hero-meta {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.hero-meta a {
  color: var(--text-muted);
  text-decoration: underline;
  text-decoration-color: var(--border);
  text-underline-offset: 3px;
}

.hero-meta a:hover {
  color: var(--text);
}

.powered-by {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 8px;
}

.powered-by a {
  color: var(--text-soft);
  font-weight: 600;
  text-decoration: none;
}

.powered-by a:hover {
  color: var(--accent);
}

.hero-annotation {
  font-family: var(--font-hand);
  font-size: 1.5rem;
  color: var(--accent);
  display: block;
  margin-top: 16px;
  text-align: center;
  transform: rotate(-1.5deg);
}

/* ---- Telegram-style chat mockup ---- */
.tg-phone {
  background: #fff;
  border-radius: 28px;
  border: 3px solid #d1d5db;
  overflow: hidden;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.12),
    0 4px 16px rgba(0, 0, 0, 0.06);
  max-width: 420px;
}

.tg-status-bar {
  background: #5b9bd5;
  color: #fff;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 10px 20px 0;
  display: flex;
  justify-content: space-between;
}

.tg-status-icons {
  font-size: 0.65rem;
  letter-spacing: 2px;
}

.tg-top-bar {
  background: #5b9bd5;
  color: #fff;
  padding: 10px 16px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tg-back {
  font-size: 1.6rem;
  font-weight: 300;
  opacity: 0.9;
}

.tg-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.tg-contact-name {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.95rem;
}

.tg-contact-status {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  opacity: 0.85;
}

.tg-messages {
  background: #c8d9eb;
  padding: 16px 12px 48px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tg-bubble {
  max-width: 82%;
  padding: 8px 12px 4px;
  border-radius: 12px;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  line-height: 1.45;
  position: relative;
}

.tg-bubble p {
  margin: 0 0 4px;
}

.tg-bubble p:last-of-type {
  margin-bottom: 0;
}

.tg-bubble strong {
  color: inherit;
}

.tg-in {
  background: #fff;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06);
}

.tg-out {
  background: #eeffde;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.06);
}

.tg-time {
  display: block;
  text-align: right;
  font-size: 0.68rem;
  color: #8e9a8e;
  margin-top: 2px;
  padding-bottom: 2px;
}

.tg-in .tg-time {
  color: #a0a8b4;
}

.tg-check {
  color: #4fae4e;
  font-size: 0.6rem;
}

.tg-input-bar {
  background: #fff;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #e5e7eb;
}

.tg-attach {
  font-size: 1.1rem;
  opacity: 0.5;
}

.tg-input {
  flex: 1;
  background: #f4f4f5;
  padding: 8px 14px;
  border-radius: 20px;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: #999;
}

.tg-mic {
  font-size: 1.1rem;
  opacity: 0.5;
}

/* ---- CTA buttons ---- */
.cta-primary {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-ui);
  font-size: 1.15rem;
  font-weight: 800;
  padding: 18px 40px;
  border-radius: 50px;
  transition:
    background 0.2s,
    transform 0.1s;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.cta-primary:hover {
  background: var(--accent-hover);
  text-decoration: none;
  transform: translateY(-1px);
}

.cta-sub {
  display: block;
  margin-top: 14px;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ---- Letter ---- */
.letter-section {
  background: var(--bg-warm);
}

.letter {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 4px;
  padding: 48px 44px;
  margin: 0 auto;
  max-width: 580px;
  font-size: 1.05rem;
  position: relative;
  box-shadow: 4px 4px 0 var(--border);
}

.letter p {
  margin-bottom: 1em;
}

.letter p:last-of-type {
  margin-bottom: 0;
}

.letter em {
  color: var(--accent);
  font-style: italic;
}

.signature {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 2px dashed var(--border);
  font-family: var(--font-hand);
  font-size: 1.6rem;
  color: var(--text);
}

.signature span {
  display: block;
  font-family: var(--font-ui);
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---- The Pitch (replaces numbered features) ---- */
.pitch-section h2 {
  margin-bottom: 32px;
}

.pitch-point {
  margin-bottom: 40px;
}

.pitch-point:last-child {
  margin-bottom: 0;
}

.pitch-point h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  font-family: var(--font-ui);
}

.pitch-point h3 .hand {
  font-size: 1.6rem;
}

.pitch-point p {
  color: var(--text-soft);
}

/* ---- How it works ---- */
.steps {
  counter-reset: step;
  margin-top: 40px;
}

.step {
  position: relative;
  padding-left: 64px;
  margin-bottom: 44px;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  width: 42px;
  height: 42px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.4rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step h3 {
  margin-bottom: 6px;
}

.step p {
  color: var(--text-soft);
  font-size: 1rem;
}

.step code {
  display: inline-block;
  background: var(--bg-warm);
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 0.88rem;
  font-family: var(--font-mono);
}

/* ---- Pricing ---- */
.pricing-section {
  background: var(--bg-warm);
}

.pricing-section h2 {
  text-align: center;
}

.pricing-section > .container > .lead {
  text-align: center;
  max-width: 440px;
  margin: 10px auto 0;
}

.pricing-anchor {
  text-align: center;
  max-width: 620px;
  margin: 22px auto 0;
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--text);
  font-style: italic;
}

.pricing-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 44px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.plan {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  box-shadow: 4px 4px 0 var(--border);
  display: flex;
  flex-direction: column;
}

.plan ul {
  flex: 1;
}

.plan-featured {
  border-color: var(--accent);
  box-shadow: 4px 4px 0 var(--accent);
  position: relative;
}

.plan-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  font-family: var(--font-hand);
  font-size: 1rem;
  padding: 2px 16px;
  border-radius: 20px;
  white-space: nowrap;
}

.plan h3 {
  font-family: var(--font-ui);
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.price {
  font-family: var(--font-ui);
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 20px;
}

.price span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
}

.plan ul {
  list-style: none;
  margin-bottom: 28px;
}

.plan li {
  padding: 5px 0;
  font-family: var(--font-ui);
  font-size: 0.93rem;
  color: var(--text-soft);
}

.plan li::before {
  content: "✓ ";
  color: var(--green);
  font-weight: 700;
}

.cta-plan {
  display: block;
  text-align: center;
  padding: 13px 20px;
  border-radius: 50px;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.15s;
}

.cta-plan-primary {
  background: var(--accent);
  color: #fff;
}

.cta-plan-primary:hover {
  background: var(--accent-hover);
  text-decoration: none;
}

.cta-plan-secondary {
  background: var(--bg-warm);
  color: var(--text);
  border: 1px solid var(--border);
}

.cta-plan-secondary:hover {
  background: var(--border);
  text-decoration: none;
}

/* ---- Self-host ---- */
.terminal {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.8;
  background: #1e1e1e;
  color: #d4d4d4;
  border: none;
  border-radius: var(--radius);
  padding: 32px;
  max-width: 520px;
  margin: 0 auto;
  overflow-x: auto;
}

.terminal .comment {
  color: #6a9955;
}

.terminal .prompt {
  color: var(--accent);
  user-select: none;
}

/* ---- FAQ ---- */
details {
  border-bottom: 2px solid var(--border);
  padding: 22px 0;
}

details:first-of-type {
  border-top: 2px solid var(--border);
}

summary {
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.08rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text-muted);
  transition: transform 0.2s;
}

details[open] summary::after {
  content: "−";
}

details p {
  margin-top: 14px;
  color: var(--text-soft);
}

details code {
  background: var(--bg-warm);
  padding: 1px 6px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 0.88em;
}

/* ---- Final CTA ---- */
.final-cta {
  background: var(--bg-warm);
  text-align: center;
}

.final-cta h2 {
  max-width: 520px;
  margin: 0 auto;
}

.final-cta .lead {
  max-width: 480px;
  margin: 16px auto 0;
}

.final-cta .hand {
  font-size: 1.6rem;
  display: block;
  margin-top: 8px;
  color: var(--accent);
  transform: rotate(-1.5deg);
}

/* ---- Footer ---- */
footer {
  padding: 44px 0;
  border-top: 2px solid var(--border);
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: var(--text-muted);
}

footer a {
  color: var(--text-muted);
}

footer a:hover {
  color: var(--text);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 14px;
}

/* ---- Utility ---- */
.mt-1 {
  margin-top: 16px;
}
.mt-2 {
  margin-top: 24px;
}
.mt-3 {
  margin-top: 44px;
}
.mb-2 {
  margin-bottom: 24px;
}
.text-center {
  text-align: center;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  body {
    font-size: 17px;
  }
  section {
    padding: 64px 0;
  }
  .hero {
    padding: 80px 0 64px;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .hero-text {
    text-align: center;
  }
  .hero-text .lead {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .tg-phone {
    max-width: 380px;
    margin: 0 auto;
  }
  .letter {
    padding: 32px 24px;
  }
  .pricing-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
  }
  .nav-links a:not(.nav-cta) {
    display: none;
  }
  h1 {
    font-size: 2.4rem;
  }
  .step {
    padding-left: 52px;
  }
}

/* ── Hero carousel ─────────────────────────────────── */

.tg-messages-carousel {
  display: grid;
  background: #c8d9eb;
  position: relative;
}

.tg-messages-carousel::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(transparent, #c8d9eb);
  pointer-events: none;
  z-index: 1;
}

.tg-scene {
  grid-area: 1 / 1;
  max-height: 520px;
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  scrollbar-width: none;
}

.tg-scene::-webkit-scrollbar {
  display: none;
}

.tg-scene.active {
  opacity: 1;
  pointer-events: auto;
}

.scene-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}

.scene-arrow {
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--text-muted);
  padding: 4px 8px;
  transition: color 0.2s;
  line-height: 1;
}

.scene-arrow:hover {
  color: var(--accent);
}

.scene-label-text {
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: var(--text-soft);
  opacity: 0.7;
  min-width: 180px;
  text-align: center;
  transition: opacity 0.3s;
}

.scene-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
}

.scene-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: var(--text-muted);
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}

.scene-dot.active {
  background: var(--accent);
}
