/* ===== Шрифт Forum (локальные копии в assets/fonts) ===== */
@font-face {
  font-family:forum;
  font-style:normal;
  font-weight:400;
  src:url('assets/fonts/forum-regular-cyrillic-extended.woff2') format('woff2');
  unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F;
  font-display:swap
}

@font-face {
  font-family:forum;
  font-style:normal;
  font-weight:400;
  src:url('assets/fonts/forum-regular-cyrillic.woff2') format('woff2');
  unicode-range:U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
  font-display:swap
}

@font-face {
  font-family:forum;
  font-style:normal;
  font-weight:400;
  src:url('assets/fonts/forum-regular-latin-extended.woff2') format('woff2');
  unicode-range:U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF;
  font-display:swap
}

@font-face {
  font-family:forum;
  font-style:normal;
  font-weight:400;
  src:url('assets/fonts/forum-regular-latin.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
  font-display:swap
}

/* ===== Общие стили (как на главной странице) ===== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #000;
  color: #fff;
  font: 19px/1.4 forum, Georgia, serif;
}

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

a:focus-visible,
button:focus-visible {
  outline: 2px solid #b79752;
  outline-offset: 5px;
}

h1, h2, h3, p {
  margin: 0;
}

[hidden] {
  display: none !important;
}

.site-header {
  padding: 48px 24px;
}

.header-inner {
  max-width: 800px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  font-size: 25px;
  letter-spacing: .1em;
  white-space: nowrap;
}

nav {
  display: flex;
  gap: 28px;
  font-size: 18px;
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.button {
  background: #000;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 28px;
  font: inherit;
  font-size: 18px;
  line-height: 24px;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

footer {
  padding: 67px 16px 12px;
  text-align: center;
  font-size: 14px;
}

footer p {
  line-height: 1.5;
}

/* ===== Заголовок страницы ===== */
.intro {
  text-align: center;
  padding: 8px 20px 0;
}

.intro h1 {
  font-size: 50px;
  font-weight: normal;
  line-height: 1.15;
}

.intro p {
  font-size: 25px;
  margin-top: 22px;
  color: #d8d8d8;
}

/* ===== Гадание ===== */
.reading {
  max-width: 804px;
  margin: 56px auto 0;
  padding: 0 24px;
  display: flex;
  justify-content: center;
  gap: 48px;
}

.reading.is-open {
  justify-content: space-between;
  align-items: flex-start;
}

.stage {
  flex: 0 0 auto;
  width: 280px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tarot {
  width: 250px;
  aspect-ratio: 300 / 380;
  perspective: 1400px;
}

.tarot-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform .9s cubic-bezier(.4,.2,.2,1);
}

.tarot.is-flipped .tarot-inner {
  transform: rotateY(180deg);
}

.tarot-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.tarot-face img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tarot-back svg {
  animation: glow 3.2s ease-in-out infinite;
}

.tarot-front {
  transform: rotateY(180deg);
}

/* ===== Медальон числа ===== */
.tarot.medal {
  width: 270px;
  aspect-ratio: 1;
}

.tarot-face svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.medal .ring {
  transform-origin: 150px 150px;
}

.medal .star {
  transform-origin: 150px 150px;
}

.medal.is-shuffling .tarot-back .ring {
  animation: spin 1.4s cubic-bezier(.5,0,.3,1);
}

.medal.is-shuffling .tarot-back .star {
  animation: spin-back 1.4s cubic-bezier(.5,0,.3,1);
}

.medal .ring-digit.is-active {
  fill: #fff4d0;
}

.medal.is-flipped #number-text {
  animation: rise .9s .5s ease-out both;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes spin-back {
  to { transform: rotate(-200deg); }
}

@keyframes rise {
  from { opacity: 0; }
  to   { opacity: 1; }
}



@keyframes glow {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(183,151,82,.15)); }
  50%      { filter: drop-shadow(0 0 22px rgba(183,151,82,.45)); }
}



.draw {
  margin-top: 36px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.draw-hint {
  font-size: 17px;
  line-height: 1.4;
  color: #bdbdbd;
  max-width: 280px;
}

.button-light {
  background: #fff;
  color: #000;
  padding: 12px 32px;
  font-size: 20px;
  transition: background-color .2s, color .2s;
}

.button-light:hover {
  background: #b79752;
  color: #000;
}

.button-light:disabled {
  cursor: default;
  background: #b79752;
}

/* ===== Результат (белая карточка, как у практиков) ===== */
.result {
  flex: 1 1 auto;
  max-width: 460px;
  padding: 34px 32px 32px;
  background: linear-gradient(#eee, #fff 115px);
  color: #000;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  animation: appear .6s ease-out both;
}

@keyframes appear {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.result-date {
  font-size: 15px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #666;
}

.result-group {
  margin-top: 14px;
  font-size: 16px;
  color: #7a6231;
}

.result h2 {
  margin-top: 4px;
  font-size: 32px;
  line-height: 1.15;
  font-weight: normal;
}

.result-position {
  margin-top: 10px;
  letter-spacing: .03em;
  padding-bottom: 14px;
  border-bottom: 1px solid #555;
  min-width: 200px;
  font-size: 19px;
}

.result-keys {
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.35;
  font-style: italic;
  color: #444;
}

.result-text {
  margin-top: 14px;
  font-size: 19px;
  line-height: 1.45;
  text-align: left;
}

.result-love {
  margin-top: 18px;
  width: 100%;
  text-align: left;
}

.result-love h3 {
  font-size: 16px;
  font-weight: normal;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #a4424f;
}

.result-love p {
  margin-top: 6px;
  font-size: 19px;
  line-height: 1.45;
}

.result-advice {
  margin-top: 20px;
  width: 100%;
  padding: 16px 18px;
  border: 1px solid #b79752;
  border-radius: 3px;
  background: #faf7f0;
}

.result-advice h3 {
  font-size: 16px;
  font-weight: normal;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #7a6231;
}

.result-advice p {
  margin-top: 6px;
  font-size: 19px;
  line-height: 1.4;
}

.result-note {
  margin: 20px 0 18px;
  font-size: 15px;
  line-height: 1.4;
  color: #666;
}

/* ===== О гадании ===== */
.about {
  max-width: 804px;
  margin: 110px auto 0;
  padding: 0 24px;
}

.about h2 {
  font-size: 32px;
  font-weight: normal;
  text-align: center;
  margin-bottom: 22px;
}

.about p {
  color: #d8d8d8;
  line-height: 1.5;
}

.about p + p {
  margin-top: 14px;
}

/* ===== Шапка по центрам боковых фото, как на главной ===== */
@media (min-width: 1024px) {
  .site-header {
    padding-inline: 0;
  }
  .header-inner {
    max-width: none;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(430px, 560px) minmax(0, 1fr);
    gap: 0;
  }
  .header-inner .brand {
    grid-column: 1;
    justify-self: center;
  }
  .header-inner nav {
    grid-column: 3;
    justify-self: center;
  }
}

/* ===== Телефон ===== */
@media (max-width: 767px) {
  .site-header {
    padding: 20px 16px 12px;
  }
  .header-inner {
    flex-direction: column;
    gap: 8px;
  }
  .brand {
    font-size: 24px;
    letter-spacing: .08em;
  }
  nav {
    gap: 26px;
  }
  .intro {
    padding: 24px 16px 0;
  }
  .intro h1 {
    font-size: clamp(34px, 10vw, 44px);
  }
  .intro p {
    font-size: 21px;
    margin-top: 14px;
  }
  .reading,
  .reading.is-open {
    flex-direction: column;
    align-items: center;
    gap: 36px;
    margin-top: 36px;
    padding: 0 16px;
  }
  .stage {
    width: 100%;
  }
  .tarot.medal {
    width: min(240px, 66vw);
  }
  .result {
    width: 100%;
    max-width: 440px;
    padding: 28px 20px 24px;
    background: #fff;
  }
  .result h2 {
    font-size: 29px;
  }
  .about {
    margin-top: 80px;
    padding: 0 16px;
  }
  .about h2 {
    font-size: 28px;
  }
  footer {
    padding: 44px 16px 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tarot-inner,
  .result {
    transition: none;
    animation: none;
  }
  .tarot-back svg,
  .medal .ring,
  .medal .star,
  .medal #number-text {
    animation: none !important;
  }
}

/* ===== Ссылки на другие разделы ===== */
.more {
  max-width: 804px;
  margin: 90px auto 0;
  padding: 0 24px;
}

.more h2 {
  font-size: 32px;
  font-weight: normal;
  text-align: center;
  margin-bottom: 22px;
}

.more-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.more-links a:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.more-links a {
  display: block;
  padding: 18px 20px;
  border: 1px solid rgba(183, 151, 82, .45);
  border-radius: 3px;
  transition: border-color .2s;
}

.more-links a:hover {
  border-color: #b79752;
}

.more-links strong {
  display: block;
  font-size: 22px;
  font-weight: normal;
}

.more-links span {
  display: block;
  margin-top: 4px;
  font-size: 16px;
  line-height: 1.4;
  color: #bdbdbd;
}

@media (max-width: 767px) {
  .more {
    margin-top: 70px;
    padding: 0 16px;
  }
  .more h2 {
    font-size: 28px;
  }
  .more-links {
    grid-template-columns: 1fr;
  }
}
