/* Add project styles here */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
}

body {
  font-family: "Nunito", Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1A0F0A; /* основной текст: тёплый почти чёрный */
  background: #FFF9F2; /* тёплый кремовый фон основной части */
  margin: 0;
}

h1, h2, h3, h4, h5, h6, .page-header__brand, .hero__eyebrow {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

.hero__eyebrow,
.page-header__brand,
.section__title,
.card__title,
.feature-card__title,
.hero__title,
.footer__text {
  font-weight: 600;
}
 .page-header {
  background: rgba(255,249,242,0.96); /* бежевый, лёгкая прозрачность */
  border-bottom: 1px solid rgba(16,12,8,0.06);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000; /* stay above everything */
  backdrop-filter: blur(6px);
}

.page-header__container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
}
.page-header__brand {
  text-decoration: none;
  color: #111111;
  font-weight: 700;
  font-size: 1.1rem;
}
.page-header__nav {
  display: flex;
  gap: 40px;
  justify-content: center;
  align-items: center;
}
.page-header__link {
  text-decoration: none;
  color: #333333;
  font-size: 0.98rem;
  padding: 6px 8px;
  display: inline-block;
}
.page-header__link:hover,
.page-header__link:focus {
  color: #7B4FD8; /* насыщенный фиолетовый для ссылок */
}
main {
  padding: 72px 0 0;
  max-width: none;
  margin: 0 auto;
}
.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 0.78fr);
  align-items: center;
  gap: 52px;
  text-align: left;
  padding: 72px max(20px, calc((100vw - 1080px) / 2)) 64px;
  background:
    linear-gradient(90deg, rgba(8, 10, 28, 0.56), rgba(8, 10, 28, 0.1) 52%, rgba(8, 10, 28, 0.72)),
    linear-gradient(180deg, #22104B 0%, #07172E 100%);
  color: #FFFFFF;
  overflow: hidden;
  width: 100%;
}

/* decorative stars layer */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  /* many small stars using repeating-radial-gradient for coverage */
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.95) 0.8px, transparent 1px),
    radial-gradient(circle, rgba(255,255,255,0.85) 0.7px, transparent 1px),
    radial-gradient(circle, rgba(255,255,255,0.8) 0.6px, transparent 1px);
  background-size: 120px 120px, 180px 180px, 220px 220px;
  background-position: 10% 10%, 40% 60%, 80% 30%;
  opacity: 0.9;
  mix-blend-mode: screen;
  animation: stars-move 8s linear infinite;
}

@keyframes stars-move {
  0% { transform: translateY(0px); opacity: 0.9; }
  50% { transform: translateY(-2px); opacity: 1; }
  100% { transform: translateY(0px); opacity: 0.9; }
}
.hero__body {
  max-width: 620px;
  position: relative;
  z-index: 2; /* ensure content sits above stars */
}
.hero__eyebrow {
  margin: 0 0 16px;
  color: #F5C542; /* золотой акцент */
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
}
.hero__title {
  margin: 0;
  font-size: clamp(3rem, 5vw, 4.8rem);
  line-height: 0.98;
  color: #FFFFFF;
  font-weight: 700;
  overflow-wrap: anywhere;
  hyphens: none;
}
.hero__word {
  display: inline-block;
  white-space: nowrap;
}
.hero__word span {
  display: inline-block;
  will-change: transform;
}

@media (min-width: 768px) {
  .hero__title {
    display: inline-block;
  }
  .hero__word span {
    display: inline-block;
    will-change: transform;
    animation-name: hero-fade-up;
    animation-duration: 700ms;
    animation-timing-function: ease-in-out;
    animation-iteration-count: 1;
    animation-fill-mode: both;
    animation-delay: calc(var(--i) * 0.018s);
  }

  @keyframes hero-fade-up {
    from {
      opacity: 0;
      transform: translateY(12px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}
.hero__text {
  margin: 24px 0 28px;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #FFFFFF;
}
.hero__media {
  position: relative;
  z-index: 2;
  align-self: stretch;
  min-height: 492px;
  margin: -72px min(-20px, calc((1080px - 100vw) / 2)) -64px 0;
  overflow: hidden;
}

.hero__media::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: 0;
  background:
    linear-gradient(90deg, #170d39 0%, rgba(23, 13, 57, 0.62) 14%, transparent 42%),
    linear-gradient(180deg, rgba(7, 23, 46, 0.08), rgba(7, 23, 46, 0.28));
  filter: none;
}

.hero__image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% center;
  filter: none;
}
.hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: linear-gradient(180deg, #FFF0A2 0%, #F5C542 48%, #E6AD33 100%);
  color: #0F0A1E; /* темный текст на кнопке */
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  border: 1px solid rgba(155, 110, 16, 0.92);
  box-shadow: 0 6px 0 rgba(221, 163, 36, 0.94), 0 18px 34px rgba(15,10,30,0.32);
  text-shadow: 0 1px 1px rgba(0,0,0,0.12);
  transition: box-shadow 180ms ease, transform 120ms ease, background 180ms ease;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.12) 40%, rgba(255,255,255,0) 100%),
    linear-gradient(90deg, #C48A17 0%, #F8CE5C 14%, #F5C542 50%, #F8CE5C 86%, #C48A17 100%);
}
.hero__cta::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(30deg, rgba(255,255,255,0.45) 0%, rgba(255,255,255,0.08) 26%, rgba(255,255,255,0) 52%);
  opacity: 0.65;
  transform: translateX(-25%) skewX(-10deg);
  transition: transform 180ms ease, opacity 180ms ease;
}
.hero__cta:hover,
.hero__cta:focus {
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0.08) 40%, rgba(255,255,255,0) 100%),
    linear-gradient(90deg, #B77D16 0%, #E7C33E 14%, #D9A333 50%, #E7C33E 86%, #B77D16 100%);
  box-shadow: 0 4px 0 rgba(221, 163, 36, 0.94), 0 14px 26px rgba(15,10,30,0.24);
  transform: translateY(3px);
}
.hero__cta:hover::before,
.hero__cta:focus::before {
  transform: translateX(5%) skewX(-10deg);
  opacity: 0.75;
}
.hero__cta:active {
  transform: translateY(6px) scale(0.98);
  box-shadow: none;
}
.hero__cta:active::before {
  transform: translateX(60%) skewX(-10deg);
  opacity: 0;
}
.section {
  padding: 64px 20px;
}
.section_gray {
  background: linear-gradient(180deg, rgba(255, 248, 232, 0.95), rgba(255, 241, 215, 1));
  padding: 72px 20px;
}
#about {
  padding-bottom: 28px;
}
#how {
  padding-top: 36px;
}
.section__container {
  max-width: 1080px;
  margin: 0 auto;
}
.section__title {
  margin: 0 0 28px;
  font-size: clamp(2rem, 3.2vw, 2.4rem);
  color: #24124f; /* более глубокий фиолет */
  letter-spacing: 0;
}
.section__lead {
  margin: 0 0 34px;
  font-size: 1.1rem;
  color: #2a1f3f;
  max-width: 760px;
}
.section__eyebrow {
  margin: 0 0 12px;
  color: #8a5b16;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.section__eyebrow_light {
  color: #f5c542;
}
.section__title_large {
  max-width: 650px;
  font-size: clamp(2.5rem, 4.4vw, 4rem);
  line-height: 1.02;
}
.section__text p {
  margin: 0 0 16px;
  line-height: 1.75;
  color: #1A0F0A;
}
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.75fr);
  column-gap: clamp(48px, 8vw, 112px);
  row-gap: 20px;
  align-items: start;
}
.about-layout__content {
  max-width: 560px;
  padding-top: 8px;
}
.about-layout__content > p {
  margin: 24px 0 28px;
  color: #463d4f;
  font-size: 1.05rem;
  line-height: 1.8;
}
.about-quote {
  margin: 0;
  padding-left: 24px;
  border-left: 3px solid #f5c542;
  color: #24124f;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.65rem, 2.5vw, 2.2rem);
  font-weight: 600;
  line-height: 1.18;
}
.grid {
  display: grid;
  gap: 20px;
}
.grid_3 {
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 28px;
}
.card,
.feature-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 215, 130, 0.35);
  border-radius: 20px;
  padding: 32px 32px 34px;
  box-shadow: 0 24px 64px rgba(79, 67, 90, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.feature-card_link {
  display: block;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}
.card:hover,
.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 32px 78px rgba(79, 67, 90, 0.12);
}
.card__icon,
.feature-card__icon {
  display: block;
  margin-bottom: 20px;
  width: 48px;
  height: 48px;
}
.card__step {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  background: #f5c542;
  color: #24124f;
  border-radius: 16px;
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 20px;
}
.process-flow {
  display: flex;
  align-items: stretch;
  gap: 14px;
}
.process-step {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1 1 0;
  align-items: flex-start;
  gap: 18px;
  min-width: 0;
  min-height: 210px;
  padding: 28px;
  border-radius: 8px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.process-step::after {
  content: '';
  position: absolute;
  z-index: -1;
  right: 18px;
  bottom: -18px;
  left: 18px;
  height: 34px;
  border-radius: 50%;
  opacity: 0.34;
  filter: blur(18px);
  transition: opacity 180ms ease, transform 180ms ease;
}
.process-step_input {
  border: 1px solid rgba(177, 119, 11, 0.24);
  background: #fff3d2;
}
.process-step_input::after {
  background: #d99c24;
}
.process-step_ai {
  background: #24124f;
  color: #ffffff;
  box-shadow: 0 18px 38px rgba(36, 18, 79, 0.16);
}
.process-step_ai::after {
  background: #5f3bb0;
  opacity: 0.46;
}
.process-step_result {
  border: 1px solid rgba(36, 18, 79, 0.14);
  background: #ffffff;
}
.process-step_result::after {
  background: #8ba9d8;
}
.process-step:hover {
  transform: translateY(-4px);
}
.process-step:hover::after {
  opacity: 0.56;
  transform: translateY(4px) scaleX(1.03);
}
.process-step_reveal {
  opacity: 0;
  transform: translateX(-64px) rotate(-1.5deg);
  transform-origin: left center;
  transition:
    opacity 620ms ease,
    transform 720ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 180ms ease;
  transition-delay: calc(var(--reveal-index, 0) * 130ms);
}
.process-step_reveal::after {
  opacity: 0;
}
.process-step_reveal.process-step_visible {
  opacity: 1;
  transform: translateX(0) rotate(0);
}
.process-step_reveal.process-step_visible::after {
  opacity: 0.34;
  transition-delay: calc(var(--reveal-index, 0) * 130ms + 240ms);
}
.process-step_ai.process-step_reveal.process-step_visible::after {
  opacity: 0.46;
}
.process-step__number {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
  opacity: 0.72;
}
.process-step h3 {
  margin: 4px 0 14px;
  color: inherit;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.55rem;
  line-height: 1.15;
}
.process-step p {
  margin: 0;
  color: inherit;
  line-height: 1.65;
  opacity: 0.76;
}
.process-flow__arrow {
  display: grid;
  flex: 0 0 26px;
  place-items: center;
  color: #b1770b;
  font-size: 1.8rem;
}
@media (prefers-reduced-motion: reduce) {
  .process-step,
  .process-step::after {
    transition: none;
  }
  .process-step_reveal {
    opacity: 1;
    transform: none;
  }
}

.section_example {
  background: #111126;
  color: #ffffff;
}
.section_continue {
  background: #0d2233;
  color: #ffffff;
}
.section_continue .example-layout__content .section__title {
  color: #ffffff;
}
.section_continue .example-layout__lead {
  color: #c8dde8;
}
.section_continue .story-excerpt {
  border-left-color: #4fc3f7;
  color: #e8f4fb;
}
.section_continue .example-features li {
  border-color: rgba(255, 255, 255, 0.16);
  color: #c8dde8;
}
.section_continue .text-link {
  color: #4fc3f7;
}
.example-layout_reverse .example-layout__media { order: 2; }
.example-layout_reverse .example-layout__content { order: 1; }
.example-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.72fr);
  gap: clamp(48px, 7vw, 96px);
  align-items: center;
}
.example-layout__media {
  position: relative;
}
.example-layout__media-link {
  display: block;
  color: inherit;
  text-decoration: none;
}
.example-book {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1.879 / 1;
  object-fit: cover;
  border-radius: 18px;
  box-shadow: 0 30px 72px rgba(0, 0, 0, 0.38);
}
.example-book__badge {
  position: absolute;
  left: 18px;
  bottom: 18px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(17, 17, 38, 0.76);
  color: #fff3c3;
  font-size: 0.82rem;
  font-weight: 700;
  backdrop-filter: blur(8px);
}
.example-layout__content .section__title {
  color: #ffffff;
}
.example-layout__lead {
  margin: 0 0 24px;
  color: #d9d7e5;
  font-size: 1.05rem;
  line-height: 1.75;
}
.story-excerpt {
  margin: 0 0 26px;
  padding: 18px 0 18px 20px;
  border-left: 2px solid #f5c542;
  color: #fff8e1;
  font-family: "Nunito", "Trebuchet MS", Arial, sans-serif;
  font-size: 1.02rem;
  line-height: 1.8;
}
.example-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}
.example-features li {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  color: #d9d7e5;
  font-size: 0.86rem;
}
.text-link {
  color: #f5c542;
  font-weight: 800;
  text-decoration: none;
}
.text-link:hover,
.text-link:focus {
  text-decoration: underline;
}

.account-page {
  padding-top: 120px;
}

.account-card {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(178, 147, 90, 0.24);
  border-radius: 28px;
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: 0 18px 44px rgba(76, 55, 20, 0.08);
}

.account-card_centered {
  text-align: center;
}

.account-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-bottom: 24px;
}

.plan-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 470px;
  padding: 30px;
  border: 1px solid rgba(36, 18, 79, 0.14);
  border-radius: 20px;
  background: #ffffff;
  text-align: left;
  box-shadow: 0 20px 54px rgba(45, 31, 66, 0.08);
}

.plan-card_featured {
  border-color: #5d3aa7;
  background: #24124f;
  color: #ffffff;
  box-shadow: 0 26px 64px rgba(36, 18, 79, 0.2);
}

.plan-card__badge {
  position: absolute;
  top: 18px;
  right: 18px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f5c542;
  color: #24124f;
  font-size: 0.76rem;
  font-weight: 800;
}

.plan-card__header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-right: 76px;
}

.plan-card__count {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
}

.plan-card__title {
  margin: 0;
  color: inherit;
  font-size: 1.65rem;
}

.plan-card__caption {
  margin: 4px 0 0;
  color: inherit;
  font-size: 0.88rem;
  opacity: 0.66;
}

.plan-card__price {
  margin: 28px 0 6px;
  color: inherit;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 3.8rem;
  font-weight: 700;
  line-height: 1;
}

.plan-card__saving {
  margin: 0 0 14px;
  color: #f5c542;
  font-size: 0.88rem;
  font-weight: 700;
}

.plan-card__features {
  display: grid;
  gap: 12px;
  margin: 24px 0 30px;
  padding: 0;
  list-style: none;
}

.plan-card__features li {
  position: relative;
  padding-left: 22px;
  color: inherit;
  line-height: 1.5;
  opacity: 0.82;
}

.plan-card__features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #b1770b;
  font-weight: 800;
}

.plan-card_featured .plan-card__features li::before {
  color: #f5c542;
}

.plan-card__button {
  width: 100%;
  margin-top: auto;
}

.payment-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 28px;
  align-items: start;
}

.payment-products {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.payment-summary {
  position: sticky;
  top: 100px;
  padding: 26px;
  border: 1px solid rgba(36, 18, 79, 0.14);
  border-radius: 18px;
  background: #fff3d2;
}

.payment-summary__label {
  margin: 0 0 8px;
  color: #8a5b16;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.payment-summary__email {
  display: block;
  overflow-wrap: anywhere;
  color: #24124f;
}

.payment-summary__balance {
  display: grid;
  gap: 6px;
  margin: 24px 0 14px;
  padding: 18px 0;
  border-top: 1px solid rgba(36, 18, 79, 0.14);
  border-bottom: 1px solid rgba(36, 18, 79, 0.14);
}

.payment-summary__balance-label {
  color: #695f70;
  font-size: 0.84rem;
}

.payment-summary__balance-value {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.payment-summary__balance-value strong {
  color: #24124f;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.8rem;
  line-height: 0.9;
}

.payment-summary__balance-value span {
  color: #5f5368;
  font-size: 0.9rem;
  font-weight: 700;
}

.payment-summary__note {
  margin: 0;
  color: #695f70;
  font-size: 0.88rem;
  line-height: 1.55;
}

.payment-history {
  margin-top: 52px;
  padding-top: 34px;
  border-top: 1px solid rgba(36, 18, 79, 0.14);
}

.payment-history__header h2 {
  margin: 0;
  color: #24124f;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
}

.payment-history__list {
  display: grid;
  margin-top: 22px;
  border-top: 1px solid rgba(36, 18, 79, 0.12);
}

.payment-history__item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 24px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid rgba(36, 18, 79, 0.12);
}

.payment-history__title {
  margin: 0 0 4px;
  color: #24124f;
  font-weight: 800;
}

.payment-history__date,
.payment-history__empty {
  margin: 0;
  color: #7a707f;
  font-size: 0.88rem;
}

.payment-history__amount {
  color: #24124f;
  font-weight: 800;
}

.payment-status {
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.payment-status_pending {
  background: #fff0bd;
  color: #775000;
}

.payment-status_paid {
  background: #dff5e5;
  color: #236b35;
}

.payment-status_failed,
.payment-status_refunded {
  background: #fde3e3;
  color: #963b3b;
}

.payment-checkout-link {
  display: inline-flex;
  margin-top: 14px;
  color: #7b4fd8;
  font-weight: 800;
  text-decoration: none;
}
.payment-checkout-link_button {
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  font: inherit;
}

.payment-checkout-link:hover,
.payment-checkout-link:focus {
  text-decoration: underline;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: transform 150ms ease, box-shadow 150ms ease, background 150ms ease, filter 150ms ease;
  box-shadow: 0 10px 20px rgba(123, 79, 216, 0.18);
}

.button_primary {
  background: linear-gradient(180deg, #FFF0A2 0%, #F5C542 48%, #E6AD33 100%);
  color: #0F0A1E;
  border: 1px solid rgba(155, 110, 16, 0.92);
  box-shadow: 0 6px 0 rgba(221, 163, 36, 0.94), 0 18px 34px rgba(15,10,30,0.32);
  text-shadow: 0 1px 1px rgba(0,0,0,0.12);
}

.button_secondary {
  background: #F5F0FF;
  color: #4F3D63;
}

.button:hover,
.button:focus {
  transform: translateY(3px);
  box-shadow: 0 4px 0 rgba(221, 163, 36, 0.94), 0 14px 26px rgba(15,10,30,0.24);
}

.button_primary:hover,
.button_primary:focus {
  background-image:
    linear-gradient(180deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0.08) 40%, rgba(255,255,255,0) 100%),
    linear-gradient(90deg, #B77D16 0%, #E7C33E 14%, #D9A333 50%, #E7C33E 86%, #B77D16 100%);
  filter: none;
}

.account-form {
  display: grid;
  gap: 16px;
}

.account-form__label {
  font-size: 0.95rem;
  color: #3f2f5c;
}

.account-form__input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(121, 95, 169, 0.25);
  border-radius: 16px;
  font-size: 1rem;
}

.account-notice {
  margin-top: 14px;
  color: #3d3a3a;
}

.feed-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 22px;
}

.feed-page {
  min-height: 100vh;
  padding-top: 72px;
  background: #f7f2eb;
}

.feed-shell {
  padding: 42px 20px 80px;
}

.feed-guest {
  max-width: 820px;
  margin: 0 auto;
  padding: 68px;
  border-radius: 20px;
  background:
    linear-gradient(90deg, rgba(25, 20, 51, 0.98), rgba(36, 18, 79, 0.9)),
    url('assets/img/hero-storybook-optimized.jpg') center / cover;
  color: #ffffff;
  text-align: left;
  box-shadow: 0 28px 70px rgba(36, 18, 79, 0.2);
}

.feed-guest h1 {
  max-width: 620px;
  margin: 0 0 18px;
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  line-height: 0.98;
}

.feed-guest > p:not(.section__eyebrow) {
  max-width: 570px;
  margin: 0 0 28px;
  color: #e6e1ef;
  font-size: 1.05rem;
  line-height: 1.7;
}

.feed-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 44px;
  align-items: end;
  padding: 44px;
  border-radius: 20px;
  background:
    linear-gradient(90deg, rgba(25, 20, 51, 0.98), rgba(36, 18, 79, 0.88)),
    url('assets/img/hero-storybook-optimized.jpg') right center / cover;
  color: #ffffff;
  box-shadow: 0 26px 64px rgba(36, 18, 79, 0.17);
}

.feed-dashboard__welcome {
  margin: 0 0 12px;
  color: #dcd5e8;
}

.feed-dashboard__welcome strong {
  color: #ffffff;
}

.feed-dashboard h1 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(2.4rem, 4.7vw, 4rem);
  line-height: 1;
}

.feed-dashboard__actions {
  display: grid;
  gap: 16px;
  justify-items: stretch;
  min-width: 210px;
}

.feed-balance {
  display: grid;
  gap: 7px;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.feed-balance__label {
  color: #dcd5e8;
  font-size: 0.84rem;
}

.feed-balance__value {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.feed-balance__value strong {
  color: #f5c542;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2.8rem;
  line-height: 0.9;
}

.feed-balance__value span {
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
}

.feed-create-button {
  width: 100%;
}

.feed-dashboard__notice {
  min-height: 1.4em;
  margin-top: 16px;
  color: #fff3c3;
}

.feed-payment-prompt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-top: 22px;
  padding: 18px 22px;
  border: 1px solid rgba(177, 119, 11, 0.25);
  border-radius: 12px;
  background: #fff3d2;
}

.feed-payment-prompt[hidden] {
  display: none;
}

.feed-payment-prompt strong {
  color: #24124f;
}

.feed-payment-prompt p {
  margin: 4px 0 0;
  color: #695f70;
  font-size: 0.9rem;
}

.feed-library {
  margin-top: 54px;
}

.feed-library__header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 24px;
}

.feed-library__header h2 {
  margin: 0;
  color: #24124f;
  font-size: clamp(2.2rem, 4vw, 3.2rem);
}

.feed-pagination {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.feed-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 310px;
  padding: 42px;
  border: 1px dashed rgba(36, 18, 79, 0.24);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.56);
  text-align: center;
}

.feed-empty__symbol {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: #fff3d2;
  color: #b1770b;
  font-size: 1.5rem;
}

.feed-empty h3 {
  margin: 0 0 10px;
  color: #24124f;
  font-size: 1.65rem;
}

.feed-empty p {
  max-width: 480px;
  margin: 0;
  color: #71677a;
  line-height: 1.65;
}

.story-card {
  position: relative;
  min-height: 260px;
  padding: 26px;
  border: 1px solid rgba(36, 18, 79, 0.12);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 44px rgba(45, 31, 66, 0.07);
  overflow: hidden;
}

.story-card__cover-link {
  display: block;
  margin: -26px -26px 0;
  overflow: hidden;
  border-radius: 18px 18px 0 0;
}

.story-card__cover {
  display: block;
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.story-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: linear-gradient(90deg, #f5c542, #7b4fd8);
}

.story-card__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.story-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(86, 54, 165, 0.1);
  color: #5636a5;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.story-card h2 {
  margin: 18px 0 14px;
  color: #24124f;
  font-size: 1.65rem;
  line-height: 1.15;
}

.story-card p {
  margin: 0;
  color: #655c6c;
  line-height: 1.7;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.story-card__link {
  display: inline-flex;
  margin-top: 20px;
  color: #5636a5;
  font-weight: 700;
  text-decoration: none;
}

.story-card__link:hover,
.story-card__link:focus {
  color: #24124f;
}

.story-page {
  max-width: none;
  padding: 132px 20px 80px;
  background: #fff9f2;
}

.story-reader {
  width: min(820px, 100%);
  margin: 0 auto;
}

.story-reader__header {
  max-width: 720px;
}

.story-reader__header h1 {
  margin: 8px 0 12px;
  color: #24124f;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.05;
}

.story-reader__meta {
  margin: 0;
  color: #6b6176;
}

.story-reader__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 20px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(36, 18, 79, 0.12);
}

.story-reader__controls {
  margin: 36px 0 20px;
}

.story-reader__controls[hidden] {
  display: none;
}

.story-reader__back-button {
  display: flex;
  width: 100%;
  justify-content: center;
  margin-bottom: 12px;
}

.story-reader__controls .story-reader__actions {
  margin: 0;
}

.story-reader__controls .story-reader__actions .button {
  flex: 1 1 220px;
}

.story-reader__actions_public {
  justify-content: center;
}

.story-reader__actions_public .button {
  min-width: 220px;
}

.story-reader__actions .button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

@media (max-width: 720px) {
  .story-reader__controls .story-reader__actions .button,
  .story-reader__actions_public .button {
    width: 100%;
    min-width: 0;
  }
}

.story-reader__actions[hidden] {
  display: none;
}

.story-reader__notice {
  min-height: 24px;
  margin-bottom: 20px;
  color: #5636a5;
  font-weight: 700;
}

.story-reader__cover {
  margin: 12px 0 36px;
}

.story-reader__cover img {
  display: block;
  width: 100%;
  max-height: 560px;
  border-radius: 8px;
  object-fit: cover;
}

.story-reader__illustration {
  margin: 32px 0;
}

.story-reader__illustration img {
  display: block;
  width: 100%;
  max-height: 560px;
  border-radius: 8px;
  object-fit: cover;
}

.story-reader__text {
  color: #281f2f;
}

.story-reader__text h2 {
  margin: 42px 0 14px;
  color: #24124f;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
}

.story-reader__text p {
  margin: 0 0 22px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.12rem;
  line-height: 1.9;
}

body.print-mode .page-header,
body.print-mode .story-reader__actions,
body.print-mode .story-reader__notice,
body.print-mode .modal {
  display: none !important;
}

body.print-mode .story-page {
  padding: 24px 0;
  background: #ffffff;
}

body.print-mode .story-reader {
  width: min(760px, 100%);
}

@media print {
  .page-header,
  .story-reader__actions,
  .story-reader__notice,
  .modal {
    display: none !important;
  }

  .story-page {
    padding: 0;
    background: #ffffff;
  }

  .story-reader {
    width: 100%;
  }

  .story-reader__cover img,
  .story-reader__illustration img {
    max-height: none;
    break-inside: avoid;
  }
}

.continue-story-dialog {
  max-width: 620px;
}

.continue-story-dialog > p:not(.section__eyebrow) {
  color: #5c5265;
  line-height: 1.65;
}

.page-header__button_link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.modal__content.create-story-dialog {
  width: min(680px, calc(100% - 40px));
  max-width: 680px;
}

.create-story-dialog > h2 {
  margin: 0 0 8px;
  color: #24124f;
  font-size: 2.5rem;
}

.create-story-dialog__lead {
  margin: 0 0 24px;
  color: #695f70;
  line-height: 1.6;
}

.create-story-form {
  gap: 18px;
}

.create-story-form__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 130px;
  gap: 16px;
}

.create-story-form__field {
  display: grid;
  gap: 8px;
}

.create-story-form__field > span,
.create-story-form__upload > span {
  color: #3f2f5c;
  font-size: 0.92rem;
  font-weight: 700;
}

.create-story-form__upload {
  display: grid;
  gap: 9px;
  padding: 16px;
  border: 1px dashed rgba(121, 95, 169, 0.35);
  border-radius: 14px;
  background: #ffffff;
}

.create-story-form__upload small {
  color: #82778a;
  font-weight: 400;
}

.create-story-form__actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.photo-preview {
  display: block;
}

.photo-preview[hidden] {
  display: none;
}

/* Modal styles */
.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 2000;
}
.modal_hidden {
  display: none;
}
.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}
.modal__content {
  position: relative;
  z-index: 2;
  background-color: #FFF9F2 !important;
  background-image: none !important;
  border: 1px solid rgba(178, 147, 90, 0.24);
  border-radius: 28px;
  padding: 28px;
  max-width: 720px;
  width: calc(100% - 40px);
  box-shadow: 0 18px 44px rgba(76, 55, 20, 0.08);
}
.modal-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: #1a0e2e;
  margin: 0 0 20px;
}
.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(178, 147, 90, 0.3);
  border-radius: 50%;
  color: #3f2f5c;
  font-size: 22px;
  cursor: pointer;
}

/* Create story form layout */
.create-story-form {
  display: grid;
  gap: 12px;
}
.create-story-form label {
  font-size: 0.95rem;
  color: #3f2f5c;
  display: block;
}
.create-story-form input[type="text"],
.create-story-form input[type="number"],
.create-story-form textarea,
.create-story-form input[type="file"] {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border: 1px solid rgba(121, 95, 169, 0.25);
  border-radius: 16px;
  font-size: 1rem;
  background: #fff;
}
.create-story-form textarea {
  min-height: 96px;
}
.create-story-form fieldset {
  border: 1px solid rgba(178, 147, 90, 0.24);
  padding: 14px 16px;
  border-radius: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.96);
}
.create-story-form fieldset legend {
  padding: 0 8px;
  font-weight: 700;
  font-size: 0.95rem;
}
.create-story-form fieldset label {
  margin: 0;
  font-weight: 600;
}
.create-story-form .button {
  padding: 14px 22px;
  border-radius: 999px;
}

/* Photo preview styling */
#photo-preview img {
  border-radius: 18px;
  display: block;
  max-height: 220px;
  object-fit: cover;
  width: 100%;
}

.card_empty {
  text-align: center;
  opacity: 0.85;
}

.page-header__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: #7B4FD8;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}
.card__title,
.feature-card__title {
  margin: 0 0 14px;
  font-size: 1.2rem;
  line-height: 1.3;
  color: #211538;
}
.card__text,
.feature-card__text {
  margin: 0;
  color: #4e4b56;
  line-height: 1.85;
}
.feature-card {
  position: relative;
  min-height: 250px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 20px;
  row-gap: 22px;
  padding: 28px;
  overflow: hidden;
}
.feature-card__text {
  grid-column: 1 / -1;
  max-width: 36ch;
  margin: 0;
  line-height: 1.72;
}
.feature-card__icon {
  align-self: start;
  width: 56px;
  height: 56px;
  margin: 0;
  padding: 10px;
  border-radius: 14px;
  background: #fff3d2;
}
.feature-card__title {
  align-self: center;
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.16;
}
.cards-inline .feature-card:nth-child(2) .feature-card__icon {
  background: #eee8ff;
}
.cards-inline .feature-card:nth-child(3) .feature-card__icon {
  background: #e9f3ff;
}
.section_testimonials {
  background: #ffffff;
}
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid rgba(36, 18, 79, 0.14);
  border-bottom: 1px solid rgba(36, 18, 79, 0.14);
}
.testimonial {
  margin: 0;
  padding: 32px;
}
.testimonial + .testimonial {
  border-left: 1px solid rgba(36, 18, 79, 0.14);
}
.testimonial blockquote {
  margin: 0 0 24px;
  color: #24124f;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.55rem;
  font-weight: 600;
  line-height: 1.25;
}
.testimonial figcaption {
  color: #71677a;
  font-size: 0.9rem;
}
.section_cta {
  padding: 0;
  background: #191433;
}
.cta-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(440px, 0.9fr);
  align-items: center;
  gap: clamp(32px, 5vw, 64px);
  max-width: 1180px;
  min-height: 520px;
  padding: 68px 20px;
}
.cta-layout__content {
  max-width: 640px;
}
.cta-card__title {
  margin: 0 0 14px;
  font-size: clamp(2.8rem, 5vw, 4.6rem);
  line-height: 0.98;
  color: #ffffff;
}
.cta-card__subtitle {
  margin: 0 0 24px;
  font-size: 1.1rem;
  color: #d8d4e4;
  line-height: 1.7;
}
.cta-layout__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-bottom: 30px;
  color: #fff3c3;
  font-size: 0.88rem;
}
.cta-layout__meta span {
  position: relative;
  padding-left: 14px;
}
.cta-layout__meta span::before {
  content: '';
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #f5c542;
}
.cta-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 34px;
  min-width: 280px;
  background: linear-gradient(180deg, #F5C542 0%, #D99C24 100%);
  color: #0F0A1E;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 10px 0 rgba(177, 119, 11, 0.75), 0 18px 30px rgba(177, 119, 11, 0.20);
  position: relative;
  overflow: hidden;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}
.cta-layout__visual {
  position: relative;
  align-self: stretch;
  min-height: 380px;
  overflow: hidden;
}
.cta-layout__visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #191433 0%, transparent 28%),
    linear-gradient(270deg, #191433 0%, transparent 20%);
}
.cta-layout__visual img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 64% center;
  opacity: 0.82;
}
.cta-card__button::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(30deg, rgba(255,255,255,0.35) 0%, rgba(255,255,255,0.08) 26%, rgba(255,255,255,0) 52%);
  opacity: 0.55;
  transform: translateX(-30%) skewX(-10deg);
  transition: transform 140ms ease, opacity 140ms ease;
}
.cta-card__button:hover,
.cta-card__button:focus {
  transform: translateY(2px);
  box-shadow: 0 6px 0 rgba(177, 119, 11, 0.75), 0 16px 24px rgba(177, 119, 11, 0.18);
}
.cta-card__button:active {
  transform: translateY(4px) scale(0.995);
  box-shadow: none;
}
.cta-card__button:active::before {
  transform: translateX(60%) skewX(-10deg);
  opacity: 0;
}
.cta-card__button:hover::before,
.cta-card__button:focus::before {
  transform: translateX(0%) skewX(-10deg);
  opacity: 0.72;
}
.footer {
  padding: 36px 0;
  background: #ffffff;
}
.footer__container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 40px;
  align-items: center;
}
.footer__brand {
  color: #24124f;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}
.footer__text {
  margin: 4px 0 0;
  font-size: 0.88rem;
  color: #71677a;
}
.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}
.footer__nav a,
.footer__legal a {
  color: #4e4557;
  font-size: 0.9rem;
  text-decoration: none;
}
.footer__nav a:hover,
.footer__nav a:focus,
.footer__legal a:hover,
.footer__legal a:focus {
  color: #7b4fd8;
}
.footer__legal {
  display: grid;
  justify-items: end;
  gap: 5px;
  color: #837a8a;
  font-size: 0.82rem;
}
h1 {
  margin: 0;
  font-size: 2rem;
}
.page-header__button {
  border: 1px solid rgba(245,197,66,0.18);
  background: linear-gradient(180deg, #12101F 0%, #0F0A1E 100%);
  color: #F5C542; /* золотой текст */
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.98rem;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 6px 0 rgba(15,10,30,0.65), 0 12px 26px rgba(15,10,30,0.22);
  transition: box-shadow 160ms ease, transform 120ms ease, background 120ms ease;
  background-image: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0) 40%), linear-gradient(180deg, #12101F 0%, #0F0A1E 100%);
}
.page-header__button:hover,
.page-header__button:focus {
  background: #0B0716; /* чуть темнее */
  box-shadow: none; /* remove drop shadow on hover */
  transform: translateY(4px);
}
.page-header__button:active {
  transform: translateY(6px) scale(0.98);
  box-shadow: inset 0 -6px 12px rgba(0,0,0,0.34);
}
.page-header__account {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 20px;
}
.page-header__account-link {
  color: #24124f;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.page-header__account-link:hover,
.page-header__account-link:focus {
  color: #7b4fd8;
}
.page-header__profile {
  position: relative;
}
.page-header__profile-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 10px);
  right: 0;
  min-width: 132px;
  padding: 7px;
  border: 1px solid rgba(36, 18, 79, 0.12);
  border-radius: 14px;
  background: #fffaf2;
  box-shadow: 0 16px 36px rgba(36, 18, 79, 0.18);
}
.page-header__profile-menu[hidden] {
  display: none;
}
.page-header__logout {
  width: 100%;
  border: 0;
  border-radius: 9px;
  padding: 10px 12px;
  background: transparent;
  color: #24124f;
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.page-header__logout:hover,
.page-header__logout:focus-visible {
  outline: none;
  background: #f0e9ff;
}
.page-header__avatar {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #0a6cff;
  color: #ffffff;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
}
.page-header__avatar-letter {
  line-height: 1;
}
.page-header__avatar-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff4d4f;
  border: 2px solid #fff7eb;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.page-header__avatar_has-update .page-header__avatar-badge {
  opacity: 1;
  transform: scale(1);
}
.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 1000;
}
.modal_hidden {
  display: none;
}
.modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}
.modal__content {
  position: relative;
  width: min(480px, calc(100% - 40px));
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  background: #ffffff;
  border-radius: 18px;
  padding: 34px 30px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.12);
  z-index: 1;
}
.modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  border: none;
  background: transparent;
  color: #444444;
  font-size: 1.5rem;
  cursor: pointer;
}
.auth-form {
  display: grid;
  gap: 16px;
}
.auth-form__label {
  font-size: 0.95rem;
  color: #333333;
}
.auth-form__input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #d4d4d4;
  border-radius: 12px;
  font-size: 1rem;
}
.auth-form__field {
  position: relative;
}
.auth-form__input_password {
  padding-right: 44px;
}
.auth-form__password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 8px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 140ms ease, opacity 140ms ease;
}
.auth-form__password-toggle:hover,
.auth-form__password-toggle:focus {
  outline: none;
}
.auth-form__password-toggle:active {
  transform: translateY(-50%) scale(0.88);
}
.auth-form__password-toggle img {
  width: 20px;
  height: 20px;
  display: block;
  color: #555555;
  transition: color 140ms ease;
}
.auth-form__consent {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}
.auth-form__checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: #4a3d5c;
  cursor: pointer;
}
.auth-form__checkbox-label input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: #7c3aed;
  cursor: pointer;
}
.auth-form__checkbox-label a {
  color: #7c3aed;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.auth-form__checkbox-label a:hover {
  color: #5b21b6;
}
.auth-form__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.auth-form__meta {
  display: flex;
  justify-content: flex-start;
}
.auth-form__button,
.auth-form__toggle {
  padding: 12px 18px;
  border-radius: 14px;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
}
.auth-form__button {
  background: linear-gradient(180deg, rgba(255,255,255,0.14) 0%, rgba(255,255,255,0) 40%), linear-gradient(180deg, #12101F 0%, #0F0A1E 100%);
  color: #F5C542; /* gold text */
  box-shadow: 0 6px 0 rgba(15,10,30,0.55), 0 10px 18px rgba(15,10,30,0.22);
  transition: box-shadow 160ms ease, transform 120ms ease, background 120ms ease;
}
.auth-form__button:hover,
.auth-form__button:focus {
  box-shadow: none;
  transform: translateY(4px);
}
.auth-form__button:active {
  transform: translateY(6px) scale(0.98);
  box-shadow: inset 0 -6px 12px rgba(0,0,0,0.28);
}
.auth-form__toggle {
  background: #f3f4f6;
  color: #111111;
}
.auth-form__link {
  padding: 0;
  border: none;
  background: transparent;
  color: #0a6cff;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.auth-form__link[disabled] {
  opacity: 0.6;
  cursor: default;
}
.auth-result {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  font-size: 0.95rem;
  line-height: 1.5;
  background: #eef4ff;
  color: #2756a5;
}
.auth-result_info {
  background: #eef4ff;
  color: #2756a5;
}
.auth-result_success {
  background: #edf8ef;
  color: #1f6b3b;
}
.auth-result_error {
  background: #fff1f1;
  color: #a93b3b;
  border: 1px solid rgba(169, 59, 59, 0.12);
}
.auth-result:empty {
  display: none;
  padding: 0;
  font-size: 0.95rem;
}
.reset-shell {
  min-height: 100vh;
  padding: 120px 20px 56px;
  background:
    radial-gradient(circle at top, rgba(245, 197, 66, 0.18), transparent 32%),
    linear-gradient(180deg, #fff8ed 0%, #f7f5ff 100%);
}
.reset-card {
  width: min(100%, 520px);
  margin: 0 auto;
  padding: 32px 28px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(24, 18, 52, 0.14);
}
.reset-card__title {
  margin: 0 0 10px;
  color: #1d1438;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(2.1rem, 5vw, 3rem);
  line-height: 0.98;
}
.reset-card__text {
  margin: 0 0 24px;
  color: #4f4866;
}
.reset-card__link {
  margin-top: 20px;
}
.not-found-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 16%, rgba(245, 197, 66, 0.22), transparent 24%),
    radial-gradient(circle at 84% 12%, rgba(123, 79, 216, 0.18), transparent 20%),
    linear-gradient(180deg, #fff9ef 0%, #f4f1ff 100%);
}
.not-found-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.9fr);
  gap: 44px;
  align-items: center;
  padding: 116px max(20px, calc((100vw - 1080px) / 2)) 40px;
}
.not-found-hero__copy {
  max-width: 560px;
}
.not-found-hero__title {
  margin: 0 0 18px;
  color: #1d1438;
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(3rem, 6vw, 4.9rem);
  line-height: 0.95;
}
.not-found-hero__text {
  margin: 0;
  color: #554b6d;
  font-size: 1.06rem;
  line-height: 1.8;
}
.not-found-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 24px;
  align-items: center;
  margin-top: 28px;
}
.not-found-hero__visual {
  position: relative;
  min-height: 420px;
  display: grid;
  place-items: center;
}
.not-found-hero__visual::before {
  content: '';
  position: absolute;
  inset: 32px 18px 12px;
  border-radius: 36px;
  background:
    radial-gradient(circle at 20% 24%, rgba(255, 255, 255, 0.96) 0 2px, transparent 2.8px),
    radial-gradient(circle at 78% 18%, rgba(255, 255, 255, 0.88) 0 1.8px, transparent 2.6px),
    radial-gradient(circle at 66% 32%, rgba(255, 255, 255, 0.72) 0 1.6px, transparent 2.4px),
    linear-gradient(180deg, #24114d 0%, #0b1d39 100%);
  box-shadow: 0 34px 70px rgba(17, 12, 36, 0.22);
}
.not-found-hero__orb {
  position: absolute;
  top: 12px;
  left: 10px;
  z-index: 2;
  width: 124px;
  height: 124px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 35%, #fff4bf 0%, #f5c542 58%, #d99000 100%);
  color: #2a174c;
  font-family: "Cormorant Garamond", serif;
  font-size: 3rem;
  font-weight: 800;
  box-shadow: 0 18px 34px rgba(213, 145, 0, 0.28);
}
.not-found-hero__image {
  position: relative;
  z-index: 1;
  width: min(100%, 470px);
  border-radius: 30px;
  object-fit: cover;
  box-shadow: 0 28px 58px rgba(12, 19, 41, 0.24);
  transform: rotate(-4deg);
}
.not-found-links {
  padding: 20px 0 64px;
}
.not-found-links__header {
  margin-bottom: 20px;
}
@media (max-width: 860px) {
  main {
    padding-top: 64px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
    padding: 56px 20px 52px;
  }

  .hero__body {
    max-width: 720px;
    margin: 0 auto;
  }

  .hero__media {
    min-height: 0;
    max-width: 520px;
    margin: 0 auto;
    overflow: visible;
    aspect-ratio: 1.879 / 1;
  }

  .hero__media::before {
    background: linear-gradient(180deg, transparent 68%, rgba(7, 23, 46, 0.28));
  }

  .hero__image {
    position: absolute;
    object-position: center;
    border-radius: 16px;
  }

  .not-found-hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-top: 104px;
    text-align: center;
  }

  .not-found-hero__copy {
    max-width: 680px;
    margin: 0 auto;
  }

  .not-found-hero__actions {
    justify-content: center;
  }

  .not-found-hero__visual {
    min-height: 340px;
  }

  .not-found-hero__visual::before {
    inset: 24px 0 6px;
    border-radius: 28px;
  }

  .not-found-hero__orb {
    width: 100px;
    height: 100px;
    font-size: 2.5rem;
  }

  .not-found-hero__image {
    width: min(100%, 360px);
    transform: rotate(-2deg);
  }

  .reset-shell {
    padding-top: 104px;
  }

  .reset-card {
    padding: 28px 20px;
    border-radius: 22px;
  }

  .about-layout,
  .example-layout,
  .cta-layout {
    grid-template-columns: 1fr;
  }

  .about-layout {
    gap: 24px;
  }

  .about-layout__content {
    max-width: 720px;
    padding-top: 0;
  }

  .process-flow {
    flex-direction: column;
  }

  .process-flow__arrow {
    flex: 0 0 24px;
    flex-basis: 24px;
    transform: rotate(90deg);
  }

  .process-step {
    flex: 0 0 auto;
    width: 100%;
    min-height: 150px;
  }

  .example-layout {
    gap: 38px;
  }

  .example-layout__media {
    max-width: 720px;
  }

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

  .testimonial + .testimonial {
    border-top: 1px solid rgba(36, 18, 79, 0.14);
    border-left: 0;
  }

  .cta-layout {
    min-height: 0;
    padding: 64px 20px 0;
  }

  .cta-layout__visual {
    min-height: 340px;
    margin: 0 -20px;
  }

  .cta-layout__visual::after {
    background: linear-gradient(180deg, #191433 0%, transparent 38%);
  }

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

  .footer__legal {
    grid-column: 1 / -1;
    justify-items: start;
  }

  .payment-dashboard {
    grid-template-columns: 1fr;
  }

  .payment-summary {
    position: static;
  }

  .feed-dashboard {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .feed-dashboard__actions {
    grid-template-columns: minmax(180px, 240px) minmax(180px, 240px);
    justify-content: start;
    align-items: stretch;
  }

  .grid_3 {
    grid-template-columns: 1fr;
  }
}
.page-header__burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.page-header__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #111;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.page-header_open .page-header__burger span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.page-header_open .page-header__burger span:nth-child(2) {
  opacity: 0;
}
.page-header_open .page-header__burger span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 640px) {
  .page-header__container {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 12px 16px;
  }
  .page-header__brand {
    flex: 1;
  }
  .page-header__burger {
    display: flex;
    margin-left: 8px;
  }
  .page-header__nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255,249,242,0.98);
    border-bottom: 1px solid rgba(16,12,8,0.08);
    padding: 8px 16px 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  }
  .page-header_open .page-header__nav {
    display: flex;
  }
  .page-header__link {
    padding: 12px 0;
    font-size: 1rem;
    width: 100%;
    border-bottom: 1px solid rgba(16,12,8,0.06);
  }
  .page-header__link:last-child {
    border-bottom: none;
  }
  .page-header__button {
    padding: 8px 14px;
    font-size: 0.92rem;
    margin-left: 8px;
  }
  .page-header__account {
    gap: 7px;
    margin-left: 0;
  }
  .page-header__account-link {
    font-size: 0.82rem;
  }
  .hero {
    padding: 36px 20px 44px;
  }
  .hero__title {
    font-size: clamp(2.25rem, 12vw, 3rem);
    line-height: 1.02;
  }
  .hero__text {
    font-size: 1rem;
    line-height: 1.65;
  }
  .hero__image {
    width: 100%;
  }
  .section__title_large {
    font-size: 2.6rem;
  }
  .process-step {
    align-items: flex-start;
    gap: 14px;
    min-height: 0;
    padding: 20px 18px;
    border-radius: 16px;
  }
  .process-step__number {
    width: 44px;
    height: 44px;
    font-size: 1rem;
  }
  .process-step h3 {
    margin: 2px 0 10px;
    font-size: clamp(1.35rem, 7vw, 1.6rem);
  }
  .process-step p {
    font-size: 0.96rem;
    line-height: 1.5;
  }
  .process-flow__arrow {
    flex-basis: 20px;
    font-size: 1.45rem;
  }
  .feature-card {
    min-height: 0;
  }
  .example-book__badge {
    left: 10px;
    bottom: 10px;
  }
  .story-excerpt {
    padding-left: 18px;
    font-size: 1.25rem;
  }
  .testimonial {
    padding: 24px 0;
  }
  .testimonial blockquote {
    font-size: 1.4rem;
  }
  .cta-card__title {
    font-size: 2.7rem;
  }
  .cta-card__button {
    min-width: 0;
    width: 100%;
    max-width: 360px;
  }
  .cta-layout__visual {
    min-height: 260px;
  }
  .footer__container {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer__nav {
    gap: 12px 18px;
  }
  .footer__legal {
    grid-column: auto;
  }
  .payment-products {
    grid-template-columns: 1fr;
  }
  .plan-card {
    min-height: 0;
    padding: 24px;
  }
  .plan-card__header {
    padding-right: 60px;
  }
  .payment-history__item {
    grid-template-columns: 1fr auto;
    gap: 10px 16px;
  }
  .payment-history__item .payment-status {
    justify-self: start;
  }
  .feed-shell {
    padding: 24px 16px 56px;
  }
  .feed-guest {
    padding: 38px 24px;
  }
  .feed-dashboard {
    gap: 28px;
    padding: 28px 24px;
  }
  .feed-dashboard__actions {
    grid-template-columns: 1fr;
    width: 100%;
  }
  .feed-payment-prompt {
    align-items: stretch;
    flex-direction: column;
  }
  .feed-payment-prompt .button {
    width: 100%;
  }
  .feed-library {
    margin-top: 40px;
  }
  .feed-grid {
    grid-template-columns: 1fr;
  }
  .feed-empty {
    min-height: 260px;
    padding: 32px 22px;
  }
  .create-story-form__grid {
    grid-template-columns: 1fr;
  }
  .create-story-form__actions {
    flex-direction: column-reverse;
  }
  .create-story-form__actions .button {
    width: 100%;
  }
  .section {
    padding: 44px 20px;
  }
  .section_gray {
    padding: 52px 20px;
  }
  #about {
    padding-bottom: 24px;
  }
  #how {
    padding-top: 32px;
  }
  .card,
  .feature-card {
    padding: 22px;
  }
}
