/* ===== Шрифт 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: 260px;
  aspect-ratio: 300 / 527;
  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;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(183,151,82,.35), 0 18px 40px rgba(0,0,0,.6);
}

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

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

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

.tarot.is-reversed .tarot-front img {
  transform: rotate(180deg);
}

.tarot.is-shuffling .tarot-inner {
  animation: shuffle .9s ease-in-out;
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 1px rgba(183,151,82,.35), 0 0 18px rgba(183,151,82,.12), 0 18px 40px rgba(0,0,0,.6); }
  50%      { box-shadow: 0 0 0 1px rgba(183,151,82,.6),  0 0 34px rgba(183,151,82,.35), 0 18px 40px rgba(0,0,0,.6); }
}

@keyframes shuffle {
  0%   { transform: translateX(0) rotate(0); }
  20%  { transform: translateX(-14px) rotate(-4deg); }
  40%  { transform: translateX(12px) rotate(3deg); }
  60%  { transform: translateX(-8px) rotate(-2deg); }
  80%  { transform: translateX(5px) rotate(1deg); }
  100% { transform: translateX(0) rotate(0); }
}

.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;
  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-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 {
    width: min(240px, 70vw);
  }
  .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,
  .tarot.is-shuffling .tarot-inner {
    animation: none;
  }
}
