/* Rahimov School — Matematika olimpiadasi. Everything below the first screen.
 * The first screen's styles (and the design tokens) are inline in index.html, so they paint at once.
 * All rules are scoped to .rs-olimp; ":not(#_)" only raises specificity above Tilda's own rules. */

.rs-olimp:not(#_) .rs-olimp-cta:active,
.rs-olimp:not(#_) .rs-olimp-cta.rs-olimp-is-pressed { transform: scale(.98); }
.rs-olimp:not(#_) .rs-olimp-cta:focus-visible,
.rs-olimp:not(#_) button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
@media (hover: hover) {
  .rs-olimp:not(#_) .rs-olimp-cta:hover { background: var(--btn-dark); }
  .rs-olimp:not(#_) .rs-olimp-cta--yellow:hover { background: #f2a900; }
}
.rs-olimp:not(#_) .rs-olimp-cta.rs-olimp-is-pressed .rs-olimp-cta__icon { animation: rs-olimp-spin .9s linear infinite; }
@keyframes rs-olimp-spin { to { transform: rotate(360deg); } }

/* ---------- sections + headings ---------- */
.rs-olimp:not(#_) .rs-olimp-section { padding: 68px 0; }
.rs-olimp:not(#_) .rs-olimp-section--flush { padding-top: 0; }
.rs-olimp:not(#_) .rs-olimp-head { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 30px; }
.rs-olimp:not(#_) .rs-olimp-title { font-size: 31px; line-height: 1.2; text-wrap: balance; }
.rs-olimp:not(#_) .rs-olimp-wave { width: 168px; height: 16px; margin-top: 6px; }
.rs-olimp:not(#_) .rs-olimp-wave path { fill: none; stroke: var(--blue); stroke-width: 3; stroke-linecap: round; }
.rs-olimp:not(#_) .rs-olimp-sub { text-align: center; max-width: 46ch; margin: -10px auto 32px; }

/* ---------- why: flat pastel blocks with a playful shape ---------- */
.rs-olimp:not(#_) .rs-olimp-why { display: grid; gap: 20px; max-width: 640px; margin: 0 auto; }
.rs-olimp:not(#_) .rs-olimp-card h3:last-child { margin-bottom: 0; }
.rs-olimp:not(#_) .rs-olimp-card { position: relative; background: var(--bg-blue); border-radius: 20px; padding: 88px 26px 30px; }
.rs-olimp:not(#_) .rs-olimp-card--green { background: var(--bg-green); }
.rs-olimp:not(#_) .rs-olimp-card--purple { background: var(--bg-purple); }
.rs-olimp:not(#_) .rs-olimp-shape { position: absolute; top: 0; left: 0; display: block; background: #fff; border-radius: 0 0 32px 0; padding: 4px 18px 16px 4px; }
.rs-olimp:not(#_) .rs-olimp-shape svg { width: 44px; height: 44px; }
.rs-olimp:not(#_) .rs-olimp-shape--flower { color: var(--purple); }
.rs-olimp:not(#_) .rs-olimp-shape--clover { color: var(--yellow); }
.rs-olimp:not(#_) .rs-olimp-shape--dots { color: var(--blue); }
.rs-olimp:not(#_) .rs-olimp-shape--spiral { color: var(--purple); }
.rs-olimp:not(#_) .rs-olimp-shape circle { fill: currentColor; }
.rs-olimp:not(#_) .rs-olimp-shape .rs-olimp-stroke { fill: none; stroke: currentColor; stroke-width: 9; stroke-linecap: round; }
.rs-olimp:not(#_) .rs-olimp-shape .rs-olimp-stroke--thin { stroke-width: 3.5; }
.rs-olimp:not(#_) .rs-olimp-card__big { font-weight: 900; font-size: 35px; line-height: 1.1; color: var(--blue); margin-bottom: 14px; }
.rs-olimp:not(#_) .rs-olimp-card__big span { font-weight: 900; font-size: .6em; white-space: nowrap; }
.rs-olimp:not(#_) .rs-olimp-card--green .rs-olimp-card__big { color: #1c9a55; } /* --btn-dark is a hair under 3:1 on this tint */
.rs-olimp:not(#_) .rs-olimp-card--purple .rs-olimp-card__big { color: var(--purple); }
.rs-olimp:not(#_) .rs-olimp-card h3 { font-size: 19px; line-height: 1.3; margin-bottom: 8px; }
.rs-olimp:not(#_) .rs-olimp-card__text { max-width: 46ch; }

/* ---------- prizes: the money is the hero ---------- */
.rs-olimp:not(#_) .rs-olimp-prizes { display: grid; gap: 52px; padding-top: 32px; }
.rs-olimp:not(#_) .rs-olimp-prize { position: relative; background: var(--bg-yellow); border-radius: 20px; padding: 52px 20px 34px; text-align: center; }
.rs-olimp:not(#_) .rs-olimp-prize--2 { background: var(--bg-blue); }
.rs-olimp:not(#_) .rs-olimp-prize--3 { background: var(--bg-purple); }
.rs-olimp:not(#_) .rs-olimp-prize__num { position: absolute; top: -32px; left: 50%; margin-left: -32px; width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 30px; line-height: 1; background: var(--yellow); color: var(--ink); }
.rs-olimp:not(#_) .rs-olimp-prize--2 .rs-olimp-prize__num { background: var(--blue); color: #fff; }
.rs-olimp:not(#_) .rs-olimp-prize--3 .rs-olimp-prize__num { background: var(--purple); color: #fff; }
.rs-olimp:not(#_) .rs-olimp-prize h3 { font-size: 20px; line-height: 1.3; margin-bottom: 16px; }
.rs-olimp:not(#_) .rs-olimp-prize__money { font-weight: 900; line-height: 1; }
.rs-olimp:not(#_) .rs-olimp-prize__money b { display: block; font-size: clamp(46px, 14vw, 58px); white-space: nowrap; }
.rs-olimp:not(#_) .rs-olimp-prize__money span { display: block; font-weight: 900; font-size: 24px; margin-top: 6px; }
.rs-olimp:not(#_) .rs-olimp-prize--2 .rs-olimp-prize__money { color: var(--blue); }
.rs-olimp:not(#_) .rs-olimp-prize--3 .rs-olimp-prize__money { color: var(--purple); }
.rs-olimp:not(#_) .rs-olimp-prize__extra { font-size: 17px; margin-top: 18px; }

/* ---------- photo carousel: swipe, arrows, dots ---------- */
.rs-olimp:not(#_) .rs-olimp-gallery { max-width: 900px; margin: 0 auto; }
.rs-olimp:not(#_) .rs-olimp-gallery__track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain; border-radius: 20px; scrollbar-width: none; }
.rs-olimp:not(#_) .rs-olimp-gallery__track::-webkit-scrollbar { display: none; }
.rs-olimp:not(#_) .rs-olimp-gallery__track:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.rs-olimp:not(#_) .rs-olimp-slide { flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 20px; background: var(--bg-blue); }
.rs-olimp:not(#_) .rs-olimp-slide img { width: 100%; height: 100%; object-fit: cover; }
.rs-olimp:not(#_) .rs-olimp-gallery__nav { display: flex; align-items: center; justify-content: center; gap: 20px; margin-top: 18px; }
.rs-olimp:not(#_) .rs-olimp-gallery__arrow { display: flex; align-items: center; justify-content: center; width: 48px; height: 48px; border-radius: 50%; background: var(--bg-green); color: var(--ink); cursor: pointer; }
.rs-olimp:not(#_) .rs-olimp-gallery__arrow:disabled { opacity: .35; cursor: default; }
.rs-olimp:not(#_) .rs-olimp-gallery__arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.rs-olimp:not(#_) .rs-olimp-gallery__dots { display: flex; gap: 8px; }
.rs-olimp:not(#_) .rs-olimp-gallery__dots span { display: block; width: 10px; height: 10px; border-radius: 50px; background: #c9d4dc; transition: width .2s ease, background-color .2s ease; }
.rs-olimp:not(#_) .rs-olimp-gallery__dots span.rs-olimp-is-active { width: 26px; background: var(--blue); }

/* ---------- final call ---------- */
.rs-olimp:not(#_) .rs-olimp-final { display: flex; flex-direction: column; align-items: center; text-align: center; background: var(--bg-green); border-radius: 20px; padding: 48px 18px; }
.rs-olimp:not(#_) .rs-olimp-final .rs-olimp-head { margin-bottom: 20px; }
.rs-olimp:not(#_) .rs-olimp-final__line { max-width: 44ch; margin-bottom: 30px; }
.rs-olimp:not(#_) .rs-olimp-final__price { margin: -16px 0 30px; }
.rs-olimp:not(#_) .rs-olimp-final .rs-olimp-cta { max-width: 360px; padding-left: 14px; padding-right: 14px; }

@media (max-width: 379px) {
  .rs-olimp:not(#_) .rs-olimp-final .rs-olimp-cta { font-size: 15px; gap: 8px; }
}

/* ---------- footer ---------- */
.rs-olimp:not(#_) .rs-olimp-footer { background: var(--green); padding: 36px 0 calc(104px + env(safe-area-inset-bottom)); font-family: var(--ui); font-weight: 600; font-size: 13px; }
.rs-olimp:not(#_) .rs-olimp-footer__row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.rs-olimp:not(#_) .rs-olimp-footer__logo { width: 112px; height: 48px; }

/* ---------- sticky bar ---------- */
.rs-olimp:not(#_) .rs-olimp-sticky .rs-olimp-cta { max-width: 440px; min-height: 52px; padding-top: 12px; padding-bottom: 12px; margin: 0 auto; }

/* ---------- helper sheet ---------- */
.rs-olimp:not(#_) .rs-olimp-sheet { position: fixed; inset: 0; z-index: 2147483001; display: flex; align-items: flex-end; justify-content: center; }
.rs-olimp:not(#_) .rs-olimp-sheet__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
.rs-olimp:not(#_) .rs-olimp-sheet__panel { position: relative; display: grid; gap: 14px; width: 100%; max-width: 480px; text-align: center; background: #fff; border-radius: 20px 20px 0 0; padding: 30px 20px calc(18px + env(safe-area-inset-bottom)); animation: rs-olimp-sheetIn .22s ease-out; }
@keyframes rs-olimp-sheetIn { from { transform: translateY(40%); opacity: 0; } to { transform: none; opacity: 1; } }
.rs-olimp:not(#_) .rs-olimp-sheet__title { font-size: 26px; line-height: 1.2; }
.rs-olimp:not(#_) .rs-olimp-dots { display: inline-block; background: var(--bg-green); border-radius: 8px; padding: 0 8px; }
.rs-olimp:not(#_) .rs-olimp-sheet__link { font-family: var(--ui); font-size: 14px; word-break: break-all; }
.rs-olimp:not(#_) .rs-olimp-btn-ghost,
.rs-olimp:not(#_) .rs-olimp-sheet__close { width: 100%; min-height: 52px; border-radius: 50px; font-family: var(--ui); font-weight: 600; font-size: 16px; line-height: normal; color: var(--ink); cursor: pointer; }
.rs-olimp:not(#_) .rs-olimp-btn-ghost { border: 1.6px solid var(--btn); }
.rs-olimp:not(#_) .rs-olimp-btn-ghost.rs-olimp-is-done { background: var(--bg-green); }

/* ---------- tablet ---------- */
@media (min-width: 600px) {
  .rs-olimp:not(#_) .rs-olimp-section { padding: 88px 0; }
  .rs-olimp:not(#_) .rs-olimp-section--flush { padding-top: 0; }
  .rs-olimp:not(#_) .rs-olimp-head { margin-bottom: 42px; }
  .rs-olimp:not(#_) .rs-olimp-title { font-size: 42px; }
  .rs-olimp:not(#_) .rs-olimp-sub { margin: -20px auto 44px; font-size: 17px; }
  .rs-olimp:not(#_) .rs-olimp-card { padding: 96px 32px 36px; }
  .rs-olimp:not(#_) .rs-olimp-prizes { max-width: 520px; margin: 0 auto; }
  .rs-olimp:not(#_) .rs-olimp-final { padding: 72px 40px; }
}

/* ---------- desktop ---------- */
@media (min-width: 960px) {
  .rs-olimp:not(#_) .rs-olimp-section { padding: 112px 0; }
  .rs-olimp:not(#_) .rs-olimp-section--flush { padding-top: 0; }
  .rs-olimp:not(#_) .rs-olimp-head { margin-bottom: 48px; }
  .rs-olimp:not(#_) .rs-olimp-title { font-size: 48px; }
  .rs-olimp:not(#_) .rs-olimp-sub { margin: -26px auto 48px; max-width: 60ch; }
  .rs-olimp:not(#_) .rs-olimp-why { grid-template-columns: 1fr 1fr; gap: 24px; max-width: 1040px; }
  .rs-olimp:not(#_) .rs-olimp-card { padding: 104px clamp(28px, 3vw, 40px) 44px; }
  .rs-olimp:not(#_) .rs-olimp-card__big { font-size: clamp(32px, 3.1vw, 44px); }
  .rs-olimp:not(#_) .rs-olimp-card h3 { font-size: 21px; }
  .rs-olimp:not(#_) .rs-olimp-prizes { grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: none; }
  .rs-olimp:not(#_) .rs-olimp-prize { padding: 64px 24px 48px; }
  .rs-olimp:not(#_) .rs-olimp-prize__money b { font-size: clamp(44px, 4.6vw, 62px); }
  .rs-olimp:not(#_) .rs-olimp-footer { padding: 48px 0; font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .rs-olimp:not(#_) .rs-olimp-cta.rs-olimp-is-pressed .rs-olimp-cta__icon,
  .rs-olimp:not(#_) .rs-olimp-sheet__panel { animation: none; }
  .rs-olimp:not(#_) .rs-olimp-sticky,
  .rs-olimp:not(#_) .rs-olimp-gallery__dots span { transition: none; }
}
