/* Страница «О чем твой блог?»: палитра референса (розовый лист, зеленый круг, бледное кольцо), шрифт сайта Inter */

/* ═══ ШРИФТЫ: те же файлы Inter, что на главной ═══ */
/* cyrillic-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(../assets/fonts/inter-normal-cyrillic-ext.woff2) format('woff2');
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}
/* cyrillic */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(../assets/fonts/inter-cyrillic-v2.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(../assets/fonts/inter-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20BC, U+20BE-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* знак рубля отдельным крошечным файлом, чтобы ради него не качать весь latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(../assets/fonts/inter-rub-v2.woff2) format('woff2');
  unicode-range: U+20BD;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(../assets/fonts/inter-latin-v2.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ═══ ТОКЕНЫ ═══ */
:root {
  --pink: #e27cbd;          /* лист референса */
  --ring: #efadd0;          /* бледное кольцо вокруг круга */
  --wedge: #eb9dc6;         /* клин, в котором выпадает раздел */
  --green: #0b8a52;         /* круг */
  --green-deep: #08703f;    /* подсказка: белый текст читается */
  --ink: #141112;
  --white: #fffdfd;
  --font: "Inter", -apple-system, "Segoe UI", Arial, sans-serif;
  --pad-x: clamp(1rem, 4vw, 3.5rem);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --spin-ease: cubic-bezier(0.12, 0.8, 0.22, 1);  /* круг разгоняется и мягко останавливается */
  --radius-btn: 22px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background-color: var(--pink);
  background-image: url(../assets/guide/grain.png);
  background-size: 128px 128px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
[hidden] { display: none !important; }

/* ═══ ШАПКА: как на главной, логотип и черная пилюля ═══ */
.gnav {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .75rem var(--pad-x);
}
.gnav__logo { font-size: 1.15rem; font-weight: 500; letter-spacing: -0.02em; text-decoration: none; }
.gnav__btn, .pill {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: .75rem 1.6rem;
  border: 0;
  border-radius: var(--radius-btn);
  background: var(--ink); color: var(--white);
  font-size: .8rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: transform 200ms var(--ease), background-color 200ms var(--ease);
}
.gnav__btn:hover, .pill:hover { background: #000; transform: translateY(-1px); }
.gnav__btn:active, .pill:active { transform: translateY(1px); }

/* ═══ ИГРА: круг и выпавший вопрос ═══ */
.game {
  flex: 1;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: clamp(1.4rem, 4vw, 2.4rem);
  padding: clamp(.8rem, 3vw, 2rem) var(--pad-x) clamp(2rem, 5vw, 3.5rem);
}

.wheel {
  width: min(100%, 560px);
  padding: clamp(10px, 3.2%, 20px);   /* бледное кольцо */
  border-radius: 50%;
  background: var(--ring);
  box-shadow: 0 18px 40px -22px rgba(90, 20, 60, .45);
}
.wheel__disc {
  position: relative;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  container-type: inline-size;
  background-color: var(--green);
  background-image: url(../assets/guide/grain.png);
  background-size: 128px 128px;
  color: var(--white);
}
.wheel__title {
  position: absolute;
  left: 50%; top: 13%;
  width: 72%;
  transform: translateX(-50%);
  text-align: center;
  font-size: 8.4cqi;
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: .01em;
  text-transform: uppercase;
  text-wrap: balance;
}
.wheel__sub {
  display: block;
  margin: 3.2cqi auto 0;
  max-width: 84%;
  font-size: 4.1cqi;
  line-height: 1.2;
  letter-spacing: .03em;
}

/* клин, как вырез в бумажном круге: от центра влево вниз; при прокрутке делает два оборота */
.wheel__wedge {
  position: absolute; inset: 0;
  background: var(--wedge);
  clip-path: polygon(50% 50%, 6.5% 51.2%, 21.8% 81%);
  color: var(--ink);
  transform-origin: 50% 50%;
}
.wheel__wedge.is-spinning { animation: wedge-spin 1400ms var(--spin-ease); }
@keyframes wedge-spin { from { transform: rotate(0deg); } to { transform: rotate(720deg); } }

/* название раздела вдоль середины клина: положение, размер и разрядку считает js/guide.js */
.wheel__label {
  position: absolute; left: 30%; top: 58%;
  transform: translate(-50%, -50%) rotate(-24.2deg);
  font-size: 3cqi;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
  text-transform: uppercase;
  transition: opacity 250ms var(--ease);
}
.wheel__wedge.is-spinning .wheel__label { opacity: 0; }

/* латунная заклепка в центре: главная кнопка игры, пульсирует, пока круг ни разу не крутили */
.wheel__rivet {
  position: absolute; left: 50%; top: 50%;
  width: 11cqi; height: 11cqi; min-width: 40px; min-height: 40px;
  transform: translate(-50%, -50%);
  border: 0; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6d6 0 8%, #d8bc6c 22%, #a3822f 58%, #5c4514 100%);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .45), inset 0 -1px 2px rgba(0, 0, 0, .35);
  cursor: pointer;
  transition: transform 300ms var(--ease);
}
.wheel__rivet:hover { transform: translate(-50%, -50%) scale(1.08); }
.wheel__rivet:active { transform: translate(-50%, -50%) scale(.94); }
.wheel__rivet:focus-visible { outline: 2px solid var(--white); outline-offset: 3px; }
.game:not(.is-played) .wheel__rivet { animation: rivet-call 1800ms ease-in-out infinite; }
@keyframes rivet-call {
  0%, 100% { box-shadow: 0 1px 2px rgba(0, 0, 0, .45), inset 0 -1px 2px rgba(0, 0, 0, .35), 0 0 0 0 rgba(255, 246, 214, .55); }
  50% { box-shadow: 0 1px 2px rgba(0, 0, 0, .45), inset 0 -1px 2px rgba(0, 0, 0, .35), 0 0 0 10px rgba(255, 246, 214, 0); }
}

/* выпавший вопрос */
.deal { width: min(100%, 40rem); display: grid; gap: 1.2rem; justify-items: center; text-align: center; }
.deal__card { display: grid; gap: .8rem; justify-items: center; }
.deal__card.is-new { animation: card-in 500ms var(--ease); }
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.deal__part {
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.deal__question {
  font-size: clamp(1.3rem, 1.05rem + 1.3vw, 1.9rem);
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.deal__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .8rem 1.2rem; }
.deal__more {
  min-height: 44px; padding: .7rem 1.2rem;
  border: 1px solid rgba(20, 17, 18, .55);
  border-radius: var(--radius-btn);
  background: transparent;
  font-size: .78rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase;
  cursor: pointer;
  transition: background-color 200ms var(--ease), color 200ms var(--ease);
}
.deal__more:hover { background: var(--ink); color: var(--white); }

/* подсказка: пилюля, по нажатию раскрывается зеленый лист */
.hint { width: 100%; display: grid; justify-items: center; }
.hint summary {
  display: inline-flex; align-items: center; gap: .55rem;
  min-height: 40px; padding: .45rem 1rem;
  border: 1px solid rgba(20, 17, 18, .45);
  border-radius: var(--radius-btn);
  font-size: .72rem; font-weight: 500; letter-spacing: .09em; text-transform: uppercase;
  cursor: pointer;
  list-style: none;
  transition: background-color 200ms var(--ease), color 200ms var(--ease), border-color 200ms var(--ease);
}
.hint summary::-webkit-details-marker { display: none; }
.hint summary:hover { border-color: var(--ink); }
.hint[open] summary { background: var(--ink); border-color: var(--ink); color: var(--white); }
.hint__icon { position: relative; width: 9px; height: 9px; }
.hint__icon::before, .hint__icon::after {
  content: ""; position: absolute; left: 0; top: 4px; width: 9px; height: 1.5px; background: currentColor;
  transition: transform 250ms var(--ease);
}
.hint__icon::after { transform: rotate(90deg); }
.hint[open] .hint__icon::after { transform: rotate(0deg); }
.hint__body {
  display: block;
  margin-top: .8rem;
  padding: clamp(1.1rem, 3vw, 1.6rem);
  border-radius: 18px;
  background-color: var(--green-deep);
  background-image: url(../assets/guide/grain.png);
  background-size: 128px 128px;
  color: var(--white);
  font-size: clamp(.98rem, .95rem + .15vw, 1.05rem);
  line-height: 1.55;
  text-align: left;
}
.hint[open] .hint__body { animation: card-in 450ms var(--ease); }
.hint__body p { margin: 0; }
.hint__body p + p { margin-top: .8rem; }
.hint__body::after { content: ""; display: block; clear: both; }
/* на телефоне колонка рядом с фото узкая: переносы, как в текстах главной страницы */
@media (max-width: 600px) {
  .hint__photo + p { -webkit-hyphens: auto; hyphens: auto; }
}
/* фото героя сбоку, текст обтекает слева */
.hint__photo {
  float: right;
  width: min(36%, 200px);
  margin: .25rem 0 .7rem 1.1rem;
}
.hint__photo img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .55);
}
.hint__body a { color: #ffd6ec; text-underline-offset: 3px; }
.hint__body .hint__src { font-size: .88rem; opacity: .85; }
/* последний абзац подсказки обращен к читательнице: выделен весом */
.hint__body p:last-child { font-weight: 500; }

/* ═══ ПОДВАЛ ═══ */
.gfoot { display: grid; gap: .4rem; padding: 1.2rem var(--pad-x) 1.6rem; color: rgba(20, 17, 18, .75); font-size: .75rem; line-height: 1.45; }
/* соцсети по краям перед сноской про Meta, как в подвале главной: Instagram слева, Telegram справа */
.gfoot__links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  column-gap: 1rem;
  margin-bottom: .6rem;
}
.gfoot__links a {
  display: grid;
  gap: .15rem;
  color: var(--ink);
  text-decoration: none;
}
.gfoot__links a:last-child { justify-items: end; text-align: right; }
/* instagram* слева и telegram справа, как в подвале главной */
.gfoot__word {
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: underline;
  text-decoration-color: rgba(20, 17, 18, .35);
  text-underline-offset: 3px;
  transition: text-decoration-color 200ms var(--ease);
}
.gfoot__links a:hover .gfoot__word { text-decoration-color: var(--ink); }

/* ═══ ШИРОКИЕ ЭКРАНЫ: круг слева, вопрос справа ═══ */
@media (min-width: 900px) {
  .game {
    grid-template-columns: minmax(0, 560px) minmax(0, 32rem);
    justify-content: center;
    column-gap: clamp(2.5rem, 5vw, 5rem);
    padding-top: clamp(1.5rem, 4vh, 3rem);
  }
  /* круг стоит на месте, когда подсказка раскрывается и колонка с вопросом растет */
  .wheel { align-self: start; position: sticky; top: 1.5rem; }
  .deal { align-self: center; }
  .deal, .deal__card, .hint { justify-items: start; text-align: left; }
  .deal__actions { justify-content: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
