:root {
  --ink: #101820;
  --ink-soft: #2a3540;
  --mist: #f2f4f6;
  --paper: #e8ecef;
  --line: rgba(16, 24, 32, 0.12);
  --muted: #5c6b78;
  --gold: #c9a24a;
  --gold-soft: #e4c67a;
  --teal: #2f6f6a;
  --telegram: #2aabee;
  --telegram-dark: #1e96d1;
  --radius: 2px;
  --font-display: "Literata", "Times New Roman", serif;
  --font-body: "Onest", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 4.25rem;
  --telegram-url: "https://t.me/memorytime_ru";
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 100% 0%, rgba(201, 162, 74, 0.12), transparent 55%),
    linear-gradient(180deg, #eef1f4 0%, var(--paper) 45%, #dde3e8 100%);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img,
video,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.noise {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 60;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

/* Header — glass over hero, solid after scroll */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0 clamp(1.25rem, 4vw, 3rem);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background 0.45s var(--ease),
    border-color 0.45s var(--ease),
    backdrop-filter 0.45s var(--ease),
    box-shadow 0.45s var(--ease);
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(8, 12, 18, 0.55), rgba(8, 12, 18, 0));
  opacity: 1;
  transition: opacity 0.45s var(--ease);
  pointer-events: none;
}

.site-header.is-scrolled {
  background: rgba(16, 24, 32, 0.82);
  backdrop-filter: blur(18px) saturate(1.2);
  border-bottom-color: rgba(244, 241, 234, 0.08);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28);
}

.site-header.is-scrolled::before {
  opacity: 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: #f4f1ea;
  min-width: 0;
}

.logo-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 32% 28%, #f0d78a 0%, #c9a24a 28%, #2f6f6a 68%, #122826 100%);
  box-shadow:
    0 0 0 1px rgba(244, 241, 234, 0.18),
    0 0 24px rgba(201, 162, 74, 0.35);
}

.logo-mark i {
  display: block;
  width: 2px;
  border-radius: 99px;
  background: rgba(247, 239, 216, 0.92);
  transform-origin: center;
  animation: logo-pulse 1.35s ease-in-out infinite;
}

.logo-mark i:nth-child(1) { height: 28%; animation-delay: 0s; }
.logo-mark i:nth-child(2) { height: 48%; animation-delay: 0.1s; }
.logo-mark i:nth-child(3) { height: 72%; animation-delay: 0.18s; }
.logo-mark i:nth-child(4) { height: 44%; animation-delay: 0.08s; }
.logo-mark i:nth-child(5) { height: 32%; animation-delay: 0.22s; }

@keyframes logo-pulse {
  0%, 100% { transform: scaleY(0.55); opacity: 0.55; }
  50% { transform: scaleY(1); opacity: 1; }
}

.logo-text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  line-height: 1.05;
}

.logo-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.logo-tag {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.55);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem;
  border: 1px solid rgba(244, 241, 234, 0.14);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
}

.nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.95rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(244, 241, 234, 0.78);
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}

.nav a span {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 0.78rem;
  color: var(--gold-soft);
  opacity: 0.85;
}

.nav a:hover,
.nav a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.btn-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.65rem;
  padding: 0.5rem 1.05rem;
  border: 1px solid rgba(244, 241, 234, 0.28);
  border-radius: var(--radius);
  background: rgba(244, 241, 234, 0.1);
  color: #f7efd8;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.01em;
  backdrop-filter: blur(10px);
  transition:
    transform 0.3s var(--ease),
    background 0.3s var(--ease),
    border-color 0.3s var(--ease),
    color 0.3s var(--ease),
    box-shadow 0.3s var(--ease);
}

.btn-header-cta:hover {
  transform: translateY(-1px);
  background: var(--telegram);
  border-color: var(--telegram);
  color: #fff;
  box-shadow: 0 10px 28px rgba(42, 171, 238, 0.35);
}

.btn-header-cta:focus-visible {
  outline: 2px solid var(--gold-soft);
  outline-offset: 3px;
}

.site-header.is-scrolled .btn-header-cta {
  background: var(--telegram);
  border-color: var(--telegram);
  color: #fff;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 3.15rem;
  padding: 0.8rem 1.45rem;
  border: 0;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.btn-sm {
  min-height: 2.5rem;
  padding: 0.45rem 1rem;
  font-size: 0.88rem;
}

.btn-telegram {
  background: var(--telegram);
  color: #fff;
  box-shadow: 0 12px 30px rgba(42, 171, 238, 0.28);
}

.btn-telegram:hover {
  background: var(--telegram-dark);
}

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #f4f1ea;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transform: scale(1.04);
  animation: hero-drift 18s ease-in-out infinite alternate;
}

@keyframes hero-drift {
  from { transform: scale(1.04) translate3d(0, 0, 0); }
  to { transform: scale(1.08) translate3d(-1.2%, -1%, 0); }
}

.hero-veil {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  padding:
    calc(var(--header-h) + 2.5rem)
    clamp(1.25rem, 4vw, 3rem)
    clamp(3.2rem, 8vw, 5rem);
  animation: rise 1s var(--ease) both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.brand-lockup {
  margin: 0 0 0.85rem;
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 8vw, 4.8rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: #f7efd8;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.35);
}

.hero h1 {
  margin: 0 0 1rem;
  max-width: 12ch;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4.2vw, 2.7rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-lead {
  margin: 0 0 1.75rem;
  max-width: 36ch;
  font-size: clamp(1rem, 2vw, 1.12rem);
  color: rgba(244, 241, 234, 0.88);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero .btn-telegram {
  animation: pulse-cta 2.8s ease-in-out infinite;
}

@keyframes pulse-cta {
  0%, 100% { box-shadow: 0 12px 30px rgba(42, 171, 238, 0.28); }
  50% { box-shadow: 0 16px 40px rgba(42, 171, 238, 0.48); }
}

/* Sections */
.section {
  padding: clamp(4.5rem, 10vw, 7rem) 0;
}

.section-inner {
  width: min(980px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 0.7rem;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
}

.section h2 {
  margin: 0 0 0.8rem;
  max-width: 14ch;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.section-lead {
  margin: 0;
  max-width: 42ch;
  color: var(--muted);
  font-size: 1.05rem;
}

/* Example */
.section-example {
  background:
    radial-gradient(700px 380px at 80% 10%, rgba(47, 111, 106, 0.1), transparent 60%),
    linear-gradient(180deg, rgba(242, 244, 246, 0.65), transparent);
}

.example-stage {
  margin: 2.5rem 0 0;
  padding: 0;
}

.example-video {
  width: min(420px, 100%);
  margin-inline: auto;
  aspect-ratio: 734 / 960;
  object-fit: cover;
  background: #0d141a;
  box-shadow: 0 30px 80px rgba(16, 24, 32, 0.22);
}

.example-caption {
  margin: 1rem auto 0;
  max-width: 36ch;
  text-align: center;
  font-size: 0.92rem;
  color: var(--muted);
}

/* Need */
.section-need {
  background:
    linear-gradient(180deg, transparent, rgba(16, 24, 32, 0.03)),
    var(--mist);
}

.need-list {
  list-style: none;
  margin: 2.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.need-item {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

.need-item:last-child {
  border-bottom: 1px solid var(--line);
}

.need-num {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--gold);
  padding-top: 0.15rem;
}

.need-item h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.need-item p {
  margin: 0;
  max-width: 46ch;
  color: var(--muted);
}

.need-cta {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}

.need-note {
  margin: 0;
  max-width: 40ch;
  font-size: 0.92rem;
  color: var(--muted);
}

/* Price */
.section-price {
  background:
    radial-gradient(700px 420px at 0% 0%, rgba(201, 162, 74, 0.12), transparent 55%),
    linear-gradient(180deg, #101820 0%, #16202a 100%);
  color: #f4f1ea;
}

.section-price .eyebrow {
  color: var(--gold-soft);
}

.section-price .section-lead {
  color: rgba(244, 241, 234, 0.68);
}

.price-grid {
  margin-top: 2.75rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid rgba(244, 241, 234, 0.14);
  border-bottom: 1px solid rgba(244, 241, 234, 0.14);
}

.price-block {
  padding: 1.75rem 0;
}

.price-block + .price-block {
  padding-left: clamp(1.5rem, 4vw, 3rem);
  border-left: 1px solid rgba(244, 241, 234, 0.14);
}

.price-label {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.5);
}

.price-value {
  margin: 0 0 0.75rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: rgba(244, 241, 234, 0.88);
}

.price-value span {
  font-weight: 700;
  color: #f7efd8;
}

.price-hint {
  margin: 0;
  max-width: 28ch;
  font-size: 0.95rem;
  color: rgba(244, 241, 234, 0.58);
}

.price-notes {
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.55rem;
}

.price-notes li {
  position: relative;
  padding-left: 1.15rem;
  color: rgba(244, 241, 234, 0.7);
  font-size: 0.95rem;
}

.price-notes li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--gold);
}

.section-price .need-cta {
  margin-top: 2.25rem;
}

/* Footer */
.site-footer {
  padding: 2.75rem 0 3rem;
  border-top: 1px solid var(--line);
  background: #e3e8ec;
}

.footer-inner {
  width: min(980px, calc(100% - 2.5rem));
  margin: 0 auto;
  display: grid;
  gap: 0.85rem;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-about {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-docs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
}

.footer-docs a {
  color: var(--ink-soft);
  font-size: 0.92rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-docs a:hover {
  color: var(--teal);
}

.footer-req {
  margin-top: 0.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.footer-req p {
  margin: 0 0 0.25rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.footer-tg {
  color: var(--telegram-dark);
  font-weight: 700;
  width: fit-content;
}

.need-item a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.copy {
  margin: 0.35rem 0 0 !important;
  font-size: 0.8rem !important;
  color: var(--muted);
}

/* Back to top */
.to-top {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1.1rem, env(safe-area-inset-bottom));
  z-index: 70;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(16, 24, 32, 0.9);
  color: #f4f1ea;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(16, 24, 32, 0.22);
  backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition:
    opacity 0.28s var(--ease),
    transform 0.28s var(--ease),
    visibility 0.28s,
    background 0.2s ease;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  background: #1a2834;
}

.to-top:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.to-top svg {
  width: 1.15rem;
  height: 1.15rem;
}

.to-top[hidden] {
  display: none;
}

.to-top.is-visible[hidden] {
  display: grid;
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
.site-footer .logo {
  color: var(--ink);
}

.site-footer .logo-tag {
  color: var(--muted);
}

.site-footer .logo-mark {
  box-shadow: 0 0 0 1px rgba(16, 24, 32, 0.08), 0 0 18px rgba(47, 111, 106, 0.2);
}

@media (max-width: 800px) {
  .nav {
    display: none;
  }

  .logo-tag {
    display: none;
  }

  .hero-photo {
    object-position: center 18%;
  }

  .need-item {
    grid-template-columns: 3.2rem 1fr;
  }

  .price-grid {
    grid-template-columns: 1fr;
  }

  .price-block + .price-block {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid rgba(244, 241, 234, 0.14);
  }
}

@media (max-width: 520px) {
  .btn-header-cta {
    font-size: 0.8rem;
    padding-inline: 0.75rem;
    min-height: 2.4rem;
  }

  .btn-header-cta svg {
    display: none;
  }

  .brand-lockup {
    font-size: clamp(2.4rem, 12vw, 3.4rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .hero-photo {
    transform: none;
  }
}
