/* ============================================================
   Recallie — recallie.ru
   Light theme · indigo → violet → amber signature gradient
   ============================================================ */

:root {
  --bg: #fbfaff;
  --bg-tinted: #f4f2fb;
  --surface: #ffffff;
  --ink: #1b1633;
  --ink-soft: #565070;
  --ink-faint: #8a85a3;
  --line: #e7e4f2;
  --indigo: #6366f1;
  --violet: #8b5cf6;
  --amber: #f59e0b;
  --green: #10b981;
  --red: #f43f5e;
  --grad: linear-gradient(100deg, var(--indigo), var(--violet) 52%, var(--amber));
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-sm: 0 1px 2px rgba(27, 22, 51, .06), 0 4px 14px rgba(27, 22, 51, .05);
  --shadow-md: 0 2px 6px rgba(27, 22, 51, .07), 0 18px 44px -12px rgba(80, 60, 180, .18);
  --shadow-lg: 0 30px 80px -20px rgba(80, 60, 180, .35);
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --maxw: 1140px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: rgba(139, 92, 246, .22); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  letter-spacing: -.02em;
  font-weight: 700;
}

h1 { font-size: clamp(2.3rem, 5.2vw, 3.9rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.22rem; }

img, svg, canvas { max-width: 100%; }

a { color: inherit; }

.container {
  width: min(100% - 2.5rem, var(--maxw));
  margin-inline: auto;
}
.container-narrow { --maxw: 780px; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 100;
  background: var(--ink);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: 8px;
  transition: top .2s;
}
.skip-link:focus { top: 1rem; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--violet);
  margin-bottom: .9rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .98rem;
  padding: .85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn-primary {
  background: var(--grad);
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(124, 88, 240, .55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -8px rgba(124, 88, 240, .6); }
.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: #cfc9e6; }
.btn-light {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .35);
}
.btn-light:hover { transform: translateY(-2px); }
.btn-sm { padding: .55rem 1.15rem; font-size: .9rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 255, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -.02em;
  text-decoration: none;
}
.nav-links {
  display: none;
  list-style: none;
  gap: 1.7rem;
  margin-left: auto;
}
.nav-links a {
  text-decoration: none;
  font-size: .94rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color .15s;
}
.nav-links a:hover { color: var(--ink); }
.nav-cta { margin-left: auto; }
@media (min-width: 760px) {
  .nav-links { display: flex; }
  .nav-cta { margin-left: 0; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(3.5rem, 8vw, 6.5rem) 0 clamp(3rem, 7vw, 5.5rem);
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  inset: -30% -10% auto;
  height: 640px;
  background:
    radial-gradient(420px 320px at 22% 30%, rgba(99, 102, 241, .20), transparent 70%),
    radial-gradient(460px 340px at 62% 12%, rgba(139, 92, 246, .18), transparent 70%),
    radial-gradient(380px 300px at 86% 42%, rgba(245, 158, 11, .14), transparent 70%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 4rem; }
}
.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  color: var(--ink-soft);
  max-width: 34rem;
  margin-top: 1.3rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-top: 2rem;
}
.hero-note {
  margin-top: 1.1rem;
  font-size: .86rem;
  color: var(--ink-faint);
}

/* ---------- CSS product mockup ---------- */
.mockup-wrap { position: relative; }
.mockup {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.mockup-bar {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .8rem 1.1rem;
  background: #f7f6fc;
  border-bottom: 1px solid var(--line);
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: #ddd9ec; }
.dot:nth-child(1) { background: #f87171; }
.dot:nth-child(2) { background: #fbbf24; }
.dot:nth-child(3) { background: #34d399; }
.mockup-title {
  margin-left: .6rem;
  font-size: .76rem;
  color: var(--ink-faint);
  font-weight: 500;
}
.mockup-body {
  display: grid;
  grid-template-columns: 74px 1fr;
  min-height: 300px;
}
.mockup-side {
  background: #faf9fe;
  border-right: 1px solid var(--line);
  padding: 1rem .9rem;
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
.side-item {
  height: 9px;
  border-radius: 5px;
  background: #e6e3f2;
}
.side-item.active { background: var(--grad); }
.side-item.short { width: 60%; }
.mockup-main {
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.review-card {
  background: #fbfaff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.3rem;
  box-shadow: var(--shadow-sm);
}
.tag {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .25rem .6rem;
  border-radius: 999px;
  margin-bottom: .7rem;
}
.tag-violet { background: rgba(139, 92, 246, .12); color: var(--violet); }
.review-q {
  font-family: var(--font-display);
  font-size: .98rem;
  line-height: 1.5;
  color: var(--ink);
}
.review-q mark {
  background: linear-gradient(transparent 62%, rgba(245, 158, 11, .45) 62%);
  color: inherit;
  padding: 0 .1em;
}
.review-actions {
  display: flex;
  gap: .55rem;
  margin-top: 1rem;
}
.chip {
  font-family: var(--font-display);
  font-size: .78rem;
  font-weight: 600;
  padding: .4rem .9rem;
  border-radius: 999px;
}
.chip-red { background: rgba(244, 63, 94, .1); color: var(--red); }
.chip-amber { background: rgba(245, 158, 11, .13); color: #b45309; }
.chip-green { background: rgba(16, 185, 129, .12); color: #047857; }
.review-stats {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}
.stat-pill {
  flex: 1 1 auto;
  text-align: center;
  font-size: .78rem;
  color: var(--ink-soft);
  background: #fbfaff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .55rem .4rem;
}
.stat-pill strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--ink);
}
.stat-pill.streak strong { color: var(--amber); }
.mockup-shadow {
  position: absolute;
  inset: auto 8% -34px;
  height: 40px;
  background: radial-gradient(50% 100% at 50% 0, rgba(80, 60, 180, .25), transparent 75%);
  filter: blur(6px);
  z-index: -1;
}

.float { animation: float 7s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(-.4deg); }
  50% { transform: translateY(-12px) rotate(.4deg); }
}

/* ---------- Proof strip ---------- */
.proof {
  padding: 1.8rem 0 2.4rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.proof-label {
  text-align: center;
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1.1rem;
}
.proof-logos {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem 2.8rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  color: #a49fc0;
}

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-tinted { background: var(--bg-tinted); }
.section-head {
  max-width: 44rem;
  margin: 0 auto 3rem;
  text-align: center;
}
.section-sub {
  margin-top: 1rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* ---------- Bento ---------- */
.bento {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-wide { grid-column: span 2; }
}
@media (min-width: 1020px) {
  .bento { grid-template-columns: repeat(3, 1fr); }
  .bento-lg { grid-column: span 2; grid-row: span 2; }
  .bento-wide { grid-column: span 2; }
}
.bento-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
  transition: transform .22s ease, box-shadow .22s ease;
}
.bento-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.bento-card h3 { margin: 1rem 0 .5rem; }
.bento-card p { color: var(--ink-soft); font-size: .95rem; }
.bento-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: rgba(139, 92, 246, .1);
  color: var(--violet);
}
.bento-icon svg { width: 22px; height: 22px; }
.mini-flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem;
  margin-top: 1.4rem;
}
.flow-pill {
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 600;
  padding: .45rem .85rem;
  border-radius: 999px;
  background: var(--bg-tinted);
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.flow-accent {
  background: var(--grad);
  color: #fff;
  border-color: transparent;
}
.flow-arrow { color: var(--ink-faint); }

/* ---------- Demo ---------- */
.demo {
  max-width: 860px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(1.2rem, 3vw, 2.2rem);
}
.demo-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.demo-toggle {
  display: flex;
  align-items: center;
  gap: .8rem;
}
.toggle-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: .95rem;
  color: var(--ink-soft);
}
.switch {
  position: relative;
  width: 56px;
  height: 30px;
  border-radius: 999px;
  border: none;
  background: #d8d4e8;
  cursor: pointer;
  padding: 0;
  transition: background .25s ease;
  flex-shrink: 0;
}
.switch[aria-checked="true"] { background: var(--grad); }
.switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
  transition: transform .25s ease;
}
.switch[aria-checked="true"] .switch-thumb { transform: translateX(26px); }
.switch:focus-visible {
  outline: 3px solid rgba(139, 92, 246, .5);
  outline-offset: 2px;
}
.demo-stat {
  font-size: .95rem;
  color: var(--ink-soft);
}
.demo-stat strong {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--ink);
}
.demo-canvas-wrap { position: relative; }
#curveCanvas {
  width: 100%;
  height: auto;
  display: block;
}
.demo-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.6rem;
  margin-top: 1rem;
  font-size: .82rem;
  color: var(--ink-soft);
}
.demo-legend span { display: inline-flex; align-items: center; gap: .45rem; }
.legend-line {
  width: 26px;
  height: 3px;
  border-radius: 2px;
  display: inline-block;
}
.legend-decay { background: #b9b3d4; }
.legend-spaced { background: linear-gradient(90deg, var(--indigo), var(--violet)); }
.noscript-note { font-size: .9rem; color: var(--ink-soft); margin-top: 1rem; }

/* ---------- Testimonials ---------- */
.quotes {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .quotes { grid-template-columns: repeat(3, 1fr); }
}
.quote {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.9rem;
  box-shadow: var(--shadow-sm);
}
.quote blockquote {
  font-size: .98rem;
  color: var(--ink-soft);
  flex: 1;
}
.quote blockquote::before {
  content: "“";
  display: block;
  font-family: var(--font-display);
  font-size: 2.6rem;
  line-height: .6;
  margin-bottom: .7rem;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.quote figcaption {
  display: flex;
  align-items: center;
  gap: .8rem;
  font-size: .86rem;
  color: var(--ink-soft);
  line-height: 1.4;
}
.avatar {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  color: #fff;
  background: linear-gradient(135deg, var(--indigo), var(--violet));
}
.avatar-amber { background: linear-gradient(135deg, var(--amber), #f97316); }
.avatar-green { background: linear-gradient(135deg, var(--green), #0d9488); }

/* ---------- Pricing ---------- */
.tiers {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 1fr;
  align-items: stretch;
  max-width: 1020px;
  margin: 0 auto;
}
@media (min-width: 900px) {
  .tiers { grid-template-columns: repeat(3, 1fr); }
}
.tier {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.8rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.tier-featured {
  border: 2px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    var(--grad) border-box;
  box-shadow: var(--shadow-md);
}
@media (min-width: 900px) {
  .tier-featured { transform: translateY(-10px); }
}
.tier-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--grad);
  color: #fff;
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .3rem .9rem;
  border-radius: 999px;
  white-space: nowrap;
}
.tier h3 { font-size: 1.05rem; color: var(--ink-soft); font-weight: 600; }
.tier-price {
  display: flex;
  align-items: baseline;
  gap: .5rem;
  margin: .8rem 0 .3rem;
}
.amount {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -.03em;
}
.per { font-size: .85rem; color: var(--ink-faint); }
.tier-desc { font-size: .9rem; color: var(--ink-soft); margin-bottom: 1.4rem; }
.tier-list {
  list-style: none;
  display: grid;
  gap: .65rem;
  margin-bottom: 1.8rem;
  flex: 1;
}
.tier-list li {
  position: relative;
  padding-left: 1.6rem;
  font-size: .92rem;
  color: var(--ink-soft);
}
.tier-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .32rem;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: rgba(139, 92, 246, .13) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b5cf6' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center/9px no-repeat;
}

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: .8rem; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
  padding: 1.15rem 1.4rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:focus-visible {
  outline: 3px solid rgba(139, 92, 246, .5);
  outline-offset: -3px;
  border-radius: var(--radius);
}
.faq-icon {
  position: relative;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  background: var(--violet);
  border-radius: 2px;
  transition: transform .25s ease;
}
.faq-icon::before { width: 14px; height: 2.5px; }
.faq-icon::after { width: 2.5px; height: 14px; }
.faq-item[open] .faq-icon::after { transform: rotate(90deg) scaleY(0); }
.faq-body { padding: 0 1.4rem 1.3rem; }
.faq-body p { color: var(--ink-soft); font-size: .94rem; max-width: 60ch; }

/* ---------- CTA ---------- */
.cta { padding: 0 0 clamp(4rem, 9vw, 7rem); }
.cta-card {
  position: relative;
  overflow: hidden;
  text-align: center;
  background: #201a3d;
  color: #fff;
  border-radius: calc(var(--radius-lg) + 6px);
  padding: clamp(3rem, 7vw, 5rem) clamp(1.5rem, 5vw, 4rem);
  box-shadow: var(--shadow-lg);
}
.cta-card::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 480px;
  background:
    radial-gradient(380px 260px at 30% 30%, rgba(99, 102, 241, .5), transparent 70%),
    radial-gradient(400px 280px at 68% 20%, rgba(139, 92, 246, .45), transparent 70%),
    radial-gradient(320px 240px at 88% 55%, rgba(245, 158, 11, .35), transparent 70%);
  pointer-events: none;
}
.cta-card > * { position: relative; }
.cta-card p {
  margin: 1.1rem 0 2rem;
  color: rgba(255, 255, 255, .75);
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-tinted);
  padding-top: 3.5rem;
}
.footer-grid {
  display: grid;
  gap: 2.2rem;
  grid-template-columns: 1fr;
  padding-bottom: 2.8rem;
}
@media (min-width: 720px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
.footer-brand p {
  margin-top: .9rem;
  font-size: .9rem;
  color: var(--ink-soft);
  max-width: 24ch;
}
.footer-col h4 {
  font-size: .82rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1rem;
}
.footer-col ul { list-style: none; display: grid; gap: .6rem; }
.footer-col a {
  text-decoration: none;
  font-size: .92rem;
  color: var(--ink-soft);
  transition: color .15s;
}
.footer-col a:hover { color: var(--violet); }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding: 1.4rem 0 1.8rem;
  font-size: .84rem;
  color: var(--ink-faint);
}

/* ---------- Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .3, 1);
}
.reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: .08s; }
.d2 { transition-delay: .16s; }
.d3 { transition-delay: .24s; }
.d4 { transition-delay: .32s; }

/* If JS is off, reveal elements must still be visible */
html.no-js .reveal { opacity: 1; transform: none; }

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