:root {
  --bg: #3F1236;
  --peach: #F6A86E;
  --peach-hover: #FFC08F;
  --ink-dark: #1E0B22;
  --text: #F3E6EE;
  --text-strong: #FBEFF3;
  --text-soft: #E1CEDE;
  --muted: #C9AFC8;
  --faint: #A68AA6;
  --pink: #EBA3BE;
  --line-peach: rgba(246, 168, 110, .35);
  --line-soft: rgba(201, 175, 200, .35);
  --serif: 'Cormorant Garamond', Georgia, serif;
  --sans: 'Golos Text', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
:focus-visible { outline: 2px solid var(--peach); outline-offset: 3px; }

/* ---------- page + background ---------- */
.page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.orb {
  position: absolute; border-radius: 50%; pointer-events: none;
}
.orb1 { top: -120px; left: -80px; width: 480px; height: 480px; background: #6E4030; opacity: .45; filter: blur(90px); animation: drift1 22s ease-in-out infinite; }
.orb2 { bottom: -160px; right: -100px; width: 540px; height: 540px; background: #8A5638; opacity: .3; filter: blur(110px); animation: drift2 28s ease-in-out infinite; }
.orb3 { top: 38%; left: 55%; width: 320px; height: 320px; background: #240A1F; opacity: .6; filter: blur(100px); animation: drift3 34s ease-in-out infinite; }
.sparkle { position: absolute; pointer-events: none; animation: sparkle 7s ease-in-out infinite both; }
.sparkle path { fill: var(--pink); }

@keyframes drift1 { 50% { transform: translate(80px, 50px) scale(1.15); } }
@keyframes drift2 { 50% { transform: translate(-90px, -40px) scale(.9); } }
@keyframes drift3 { 50% { transform: translate(-50px, 70px) scale(1.1); } }
@keyframes sparkle {
  0%, 100% { opacity: 0; transform: scale(.3) rotate(0deg); }
  45%, 55% { opacity: .9; transform: scale(1) rotate(45deg); }
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes breathe {
  0%, 100% { text-shadow: 0 0 18px rgba(246, 168, 110, .15); }
  50% { text-shadow: 0 0 34px rgba(246, 168, 110, .38); }
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes tagIn { from { opacity: 0; transform: translateY(-6px) rotate(2deg); } to { opacity: 1; transform: translateY(0) rotate(2deg); } }

.rise { animation: fadeUp .9s ease both; }

/* ---------- pills / buttons ---------- */
.pill {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--line-peach);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  transition: color .3s ease, background .3s ease;
}
.pill:hover { color: #FFE7D4; background: rgba(246, 168, 110, .08); }
.pill.is-active {
  background: rgba(246, 168, 110, .14);
  border-color: rgba(246, 168, 110, .4);
  color: var(--text-strong);
}
.pill-small { font-size: 13px; padding: 0 16px; }

.btn {
  min-height: 48px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 15px;
  transition: background .3s ease, opacity .3s ease;
}
.btn-solid {
  border: none;
  background: var(--peach);
  color: var(--ink-dark);
  font-weight: 600;
}
.btn-solid:hover { background: var(--peach-hover); }
.btn-ghost {
  border: 1px solid var(--line-soft);
  background: transparent;
  color: #E9D6E6;
}
.btn-ghost:hover { background: rgba(246, 168, 110, .1); }
.btn-ghost.peach-line { border-color: rgba(246, 168, 110, .45); color: var(--text-strong); }

/* ---------- header ---------- */
.site-header {
  position: relative;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 28px clamp(20px, 5vw, 64px);
}
.logo {
  background: none; border: none; padding: 0;
  font-family: var(--serif); font-style: italic; font-size: 26px;
  color: var(--peach); letter-spacing: .01em;
}
.nav {
  flex: 1 1 560px;
  margin-left: clamp(0px, 4vw, 72px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 8px;
}
.nav-group { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.nav-group.right { gap: 6px; position: relative; }

/* переключатель языка – наклейка */
.sticker {
  margin-left: 10px;
  min-height: 40px; padding: 0 14px;
  display: inline-flex; align-items: center; gap: 6px;
  border-radius: 999px;
  border: 1.5px solid rgba(251, 239, 243, .45);
  background: rgba(246, 168, 110, .2);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  color: #FFD2B0;
  font-size: 12px; font-weight: 700; letter-spacing: .08em;
  transform: rotate(-6deg);
  box-shadow: 0 4px 12px rgba(10, 0, 8, .2);
  transition: transform .25s ease, background .25s ease;
}
.sticker:hover { transform: rotate(0deg) scale(1.06); background: rgba(246, 168, 110, .3); }
.sticker [data-lang] { opacity: .45; }
.sticker [data-lang].is-on { opacity: 1; }
.sticker-sep { opacity: .45; }

/* подсказка «это не переводы» */
.note-tag {
  position: absolute; top: calc(100% + 16px); right: 0; z-index: 15;
  width: 290px; max-width: calc(100vw - 40px);
  padding: 16px 18px 14px;
  border-radius: 18px;
  background: var(--text-strong); color: #2A0F25;
  box-shadow: 0 16px 40px rgba(10, 0, 8, .45);
  display: flex; flex-direction: column; gap: 10px;
  animation: tagIn .5s ease both;
}
.note-title { margin: 0; font-family: var(--serif); font-style: italic; font-size: 20px; line-height: 1.2; color: #8A3A5C; }
.note-text { margin: 0; font-size: 14px; line-height: 1.55; color: #3A1733; }
.note-tag button {
  align-self: flex-start; min-height: 36px; padding: 0 16px;
  border-radius: 999px; border: 1px solid rgba(58, 23, 51, .3);
  background: transparent; color: #3A1733; font-size: 13px; font-weight: 600;
}

.search { position: relative; display: block; width: 260px; max-width: 100%; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); }
.search input {
  width: 100%; min-height: 44px;
  padding: 0 16px 0 42px;
  border-radius: 999px;
  border: 1px solid var(--line-peach);
  background: rgba(255, 240, 245, .05);
  font-size: 14px;
  outline-color: var(--peach);
}
input::placeholder { color: var(--faint); }
input[type="search"]::-webkit-search-cancel-button { filter: invert(.7); }

/* name popover */
.name-wrap { position: relative; }
.popover {
  position: absolute; top: 54px; right: 0; z-index: 20;
  width: 300px; max-width: calc(100vw - 40px);
  padding: 20px;
  border-radius: 28px;
  background: #4A1640;
  border: 1px solid rgba(246, 168, 110, .3);
  box-shadow: 0 24px 60px rgba(10, 0, 8, .55);
  display: flex; flex-direction: column; gap: 12px;
}
.popover label { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--text-strong); }
.popover input {
  min-height: 44px; padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line-peach);
  background: #2E0D27;
  font-size: 15px;
  outline-color: var(--peach);
}
.popover .btn { min-height: 44px; font-size: 14px; }
.popover .reply { margin: 0; font-family: var(--serif); font-size: 21px; line-height: 1.4; color: var(--text-strong); white-space: pre-line; }

/* ---------- main ---------- */
main {
  position: relative; z-index: 2;
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  padding: 0 clamp(20px, 5vw, 64px) 64px;
}
.view { width: 100%; display: flex; flex-direction: column; }

.eyebrow {
  margin: 0; font-size: 12px; letter-spacing: .26em; text-transform: uppercase; color: var(--peach);
}
.h2 {
  margin: 0; font-family: var(--serif); font-weight: 500;
  font-size: clamp(36px, 5vw, 52px); line-height: 1.1; color: var(--text-strong);
}

/* home */
.home {
  max-width: 640px;
  margin-top: clamp(48px, 12vh, 140px);
  align-items: center; text-align: center; gap: 28px;
}
.tagline {
  margin: 0; min-height: 20px;
  font-size: 13px; letter-spacing: .28em; text-transform: uppercase; color: var(--muted);
}
.caret {
  display: inline-block; width: 2px; height: 14px; margin-left: 3px; vertical-align: -2px;
  background: var(--peach); animation: blink 1s step-end infinite;
}
.headline {
  margin: 0; font-family: var(--serif); font-weight: 500;
  font-size: clamp(40px, 6vw, 68px); line-height: 1.05; color: var(--text-strong);
  animation: breathe 6s ease-in-out infinite;
}
.headline .greet { font-style: italic; color: var(--peach); }

.mood-select { position: relative; width: 100%; max-width: 380px; }
.mood-toggle {
  width: 100%; min-height: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid rgba(246, 168, 110, .4);
  background: rgba(255, 240, 245, .05);
  backdrop-filter: blur(8px);
  font-size: 16px;
}
.mood-toggle svg { transition: transform .3s ease; }
.mood-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.mood-list {
  position: absolute; top: 64px; left: 0; right: 0; z-index: 5;
  margin: 0; padding: 8px; list-style: none;
  border-radius: 28px;
  background: rgba(63, 18, 54, .92);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(246, 168, 110, .25);
  box-shadow: 0 24px 60px rgba(5, 0, 8, .35);
  display: flex; flex-direction: column; gap: 2px; text-align: left;
}
.mood-list button {
  width: 100%; min-height: 46px; padding: 0 18px;
  border: none; border-radius: 999px; background: transparent;
  font-size: 15px; text-align: left;
}
.mood-list button:hover, .mood-list button:focus-visible { background: rgba(246, 168, 110, .13); outline: none; }

.nudge {
  margin: -8px 0 0; max-width: 440px;
  font-family: var(--serif); font-size: 21px; line-height: 1.5; letter-spacing: .01em;
  color: #D9C2D6;
}
.show-btn {
  min-height: 52px; padding: 0 30px; font-size: 15px;
  box-shadow: 0 8px 28px rgba(246, 168, 110, .18);
  opacity: .9;
}
.show-btn:disabled { cursor: not-allowed; }
.show-btn:not(:disabled) { opacity: 1; box-shadow: 0 8px 28px rgba(246, 168, 110, .35); }
.divider em { font-style: normal; }
.divider { display: flex; align-items: center; gap: 14px; color: var(--faint); font-size: 13px; }
.divider span { width: 40px; height: 1px; background: var(--line-soft); }

/* poem */
.poem-view { max-width: 760px; margin-top: clamp(32px, 8vh, 96px); gap: 32px; }
.poem-head { display: flex; flex-direction: column; gap: 10px; }
.poem-body {
  font-family: var(--serif); font-size: clamp(21px, 2.4vw, 25px); line-height: 1.6; color: #EBDCE8;
}
.poem-body p { margin: 0; padding-left: 1.4em; text-indent: -1.4em; animation: fadeUp 1s ease both; }
/* длинная строка, перенесённая на новую, получает отступ — так видно, что это продолжение */
.actions { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 8px; }

/* catalog */
.catalog { max-width: 1040px; margin-top: clamp(24px, 6vh, 72px); gap: 28px; }
.catalog-note { margin: 8px 0 0; color: var(--muted); font-size: 15px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column; gap: 10px; text-align: left;
  padding: 26px 28px;
  border-radius: 32px;
  border: 1px solid rgba(201, 175, 200, .18);
  background: rgba(70, 22, 56, .55);
  transition: transform .3s ease, border-color .3s ease;
}
.card:hover { border-color: rgba(246, 168, 110, .6); transform: translateY(-2px); }
.card .c-mood { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--peach); }
.card .c-title { font-family: var(--serif); font-size: 26px; font-weight: 500; color: var(--text-strong); }
.card .c-preview { font-family: var(--serif); font-size: 19px; line-height: 1.5; letter-spacing: .01em; color: var(--muted); }
.empty { margin: 0; font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--muted); }

/* about */
.about {
  max-width: 900px; margin-top: clamp(32px, 8vh, 96px);
  flex-direction: row; flex-wrap: wrap; gap: 48px; align-items: flex-start;
}
.photo {
  flex: 0 0 220px; height: 280px;
  border-radius: 140px 140px 24px 24px;
  border: 1px solid var(--line-peach);
  background: linear-gradient(180deg, #6A2754 0%, #2E0D27 100%);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: var(--faint); font-size: 13px; text-align: center;
}
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.about-text { flex: 999 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.about-paras { display: flex; flex-direction: column; gap: 20px; }
.about-text p { margin: 0; font-size: 16px; line-height: 1.75; color: var(--text-soft); }
.about-text .sign { font-family: var(--serif); font-style: italic; font-size: 24px; color: var(--peach); }

/* footer */
.site-footer {
  position: relative; z-index: 2;
  padding: 24px clamp(20px, 5vw, 64px) 32px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  color: var(--faint); font-size: 13px;
}

/* phone */
@media (max-width: 640px) {
  /* на телефоне наклейка языка всегда в правом верхнем углу, рядом с названием – одинаково на обоих языках */
  .nav-group.right { position: static; }
  .sticker { position: absolute; top: 30px; right: clamp(20px, 5vw, 64px); margin-left: 0; }
  /* окошко «Как тебя зовут?» открывается вправо, чтобы не обрезалось */
  .popover { left: 0; right: auto; }
  .note-tag { right: clamp(20px, 5vw, 64px); }
  .nav { margin-left: 0; }
  .nav-group { width: 100%; }
  .search { flex: 1; width: auto; }
  .about { gap: 32px; }
  .photo { flex-basis: 100%; max-width: 220px; margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
