/* Общие стили сайта StudyPlay: лендинг и страницы «Родителям», «Учителям»,
   «Школам». Палитра и шрифт те же, что в приложении. Страницы добавляют
   свои секции во встроенном <style>; здесь только то, что нужно всем. */

:root {
  --plum: #38204D;
  --plum-deep: #2A1639;
  --plum-soft: #4B2567;
  --ink: #30213F;
  --muted: #6A5D76;
  --line: #E5DEED;
  --lavender: #F6F2FA;
  --cream: #FFFBF4;
  --white: #FFFFFF;
  --sun: #FFD33D;
  --sun-deep: #E9B800;
  --coral: #FF786D;
  --max: 1120px;
  --r-xl: 36px;
  --r-l: 24px;
  --r-m: 16px;
  --shadow-phone: 0 30px 60px -20px rgba(42, 22, 57, 0.45);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  font-family: 'Nunito', 'Segoe UI', system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--plum); outline-offset: 4px; border-radius: 6px; }
.on-plum :focus-visible { outline-color: var(--sun); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: min(100% - 48px, var(--max)); margin-inline: auto; }
h1, h2, h3 { font-weight: 900; line-height: 1.08; letter-spacing: -0.02em; }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 20px; max-width: 18ch; }
.lead { font-size: clamp(1.1rem, 1.6vw, 1.35rem); color: var(--muted); max-width: 56ch; }
p { max-width: 62ch; }
section { padding-block: clamp(64px, 9vw, 120px); }
.text-link { color: var(--plum); font-weight: 800; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.on-plum .text-link { color: var(--sun); }

/* Кнопки: одна форма, два тона. Жёлтая — главное действие. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 14px 26px; border-radius: 18px;
  font: inherit; font-weight: 800; font-size: 1.05rem; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.btn-sun { background: var(--sun); color: var(--plum-deep); box-shadow: 0 5px 0 var(--sun-deep); }
.btn-sun:hover { background: #FFDB5C; }
.btn-sun:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--sun-deep); }
.btn-ghost { background: transparent; color: var(--cream); border-color: rgba(255, 251, 244, 0.45); }
.btn-ghost:hover { border-color: var(--cream); }
.btn-plum { background: var(--plum); color: var(--cream); box-shadow: 0 5px 0 var(--plum-deep); }
.btn-plum:hover { background: var(--plum-soft); }
.btn-plum:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--plum-deep); }
.btn-outline { background: transparent; color: var(--plum); border-color: var(--plum); }
.btn-outline:hover { background: var(--lavender); }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* Навигация: бренд, разделы по аудиториям, заявка */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 251, 244, 0.86); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.25rem; text-decoration: none; letter-spacing: -0.01em; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.nav-links { display: flex; gap: 28px; list-style: none; }
.nav-links a { text-decoration: none; font-weight: 600; color: var(--muted); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"] { font-weight: 800; }
.nav-cta { min-height: 44px; padding: 8px 18px; font-size: .95rem; border-radius: 14px; }
@media (max-width: 880px) { .nav-links { display: none; } }

/* Герой: сливовое поле. На лендинге справа знак и телефон, на страницах — окно кабинета или экран. */
.hero { background: var(--plum); color: var(--cream); overflow: hidden; padding-block: clamp(56px, 8vw, 104px) clamp(48px, 7vw, 96px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { font-size: clamp(2.5rem, 5.6vw, 4.5rem); max-width: 15ch; color: var(--cream); }
.hero .lead { color: rgba(255, 251, 244, 0.82); margin-top: 22px; }
.hero .crumbs { display: flex; gap: 10px; margin-bottom: 18px; font-size: .95rem; font-weight: 700; color: rgba(255, 251, 244, 0.7); list-style: none; }
.hero .crumbs a { text-decoration: none; }
.hero .crumbs li + li::before { content: "→"; margin-right: 10px; }
.status {
  display: flex; align-items: flex-start; gap: 12px; margin-top: 30px;
  font-size: .95rem; color: rgba(255, 251, 244, 0.78); max-width: 48ch;
}
.status .dot { flex: none; width: 12px; height: 12px; margin-top: 8px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 5px rgba(255, 211, 61, 0.22); }
.hero-visual { position: relative; min-height: 560px; }
.mark-big {
  position: absolute; right: -10%; top: 42%; width: min(460px, 88%);
  transform: translateY(-50%) rotate(-8deg); border-radius: 26%;
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.35));
}
.phone {
  position: relative; z-index: 2; width: 300px; margin-inline: auto;
  padding: 12px; border-radius: 44px; background: var(--plum-deep);
  box-shadow: var(--shadow-phone), inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}
.phone img { border-radius: 34px; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; }
.phone-sm { width: 240px; padding: 10px; border-radius: 36px; }
.phone-sm img { border-radius: 28px; }
@media (prefers-reduced-motion: no-preference) {
  .mark-big { animation: mark-in 900ms cubic-bezier(.2, .8, .2, 1) both; }
  .phone.hero-phone, .browser.hero-browser { animation: rise-in 700ms cubic-bezier(.2, .8, .2, 1) 220ms both; }
  .hero-copy > * { animation: rise-in 600ms cubic-bezier(.2, .8, .2, 1) both; }
  .hero-copy > :nth-child(2) { animation-delay: 80ms; }
  .hero-copy > :nth-child(3) { animation-delay: 160ms; }
  .hero-copy > :nth-child(4) { animation-delay: 240ms; }
  .hero-copy > :nth-child(5) { animation-delay: 320ms; }
}
@keyframes mark-in { from { opacity: 0; transform: translateY(-46%) rotate(-22deg) scale(.86); } to { opacity: 1; transform: translateY(-50%) rotate(-8deg) scale(1); } }
.phone.hero-phone { margin-inline: 4% auto; }
@keyframes rise-in { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
@media (max-width: 880px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { min-height: 0; margin-top: 12px; }
  .mark-big { width: 62%; right: -10%; top: 46%; }
  .phone { width: 250px; }
}

/* Окно кабинета: рамка браузера вокруг настоящего снимка */
.browser {
  position: relative; z-index: 2; min-width: 0; max-width: 100%; border-radius: 18px; padding: 8px;
  background: var(--plum-deep); box-shadow: var(--shadow-phone), inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}
.browser .bar { display: flex; align-items: center; gap: 6px; padding: 6px 8px 12px; }
.browser .bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 251, 244, 0.28); }
.browser .bar .url {
  margin-left: 10px; flex: 1; min-width: 0; max-width: 340px; padding: 3px 12px; border-radius: 999px;
  background: rgba(255, 251, 244, 0.1); color: rgba(255, 251, 244, 0.7); font-size: .78rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.browser img { border-radius: 10px; width: 100%; }
.hero .browser.hero-browser { transform: rotate(-1.5deg); }
@media (max-width: 880px) { .hero .browser.hero-browser { transform: none; } }

/* Галерея экранов: снимок и подпись чередуются сторонами */
.gallery { display: grid; gap: clamp(48px, 7vw, 96px); margin-top: 48px; list-style: none; }
.gallery li { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.gallery li:nth-child(even) .caption { order: -1; }
.gallery .caption h3 { font-size: 1.45rem; margin-bottom: 10px; }
.gallery .caption p { color: var(--muted); }
.gallery .caption ul { margin-top: 12px; padding-left: 0; list-style: none; color: var(--muted); display: grid; gap: 6px; }
.gallery .caption li { padding-left: 24px; position: relative; }
.gallery .caption li::before { content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 12px; border-radius: 4px; background: var(--sun); transform: rotate(8deg); }
.gallery .num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--sun); color: var(--plum-deep); font-weight: 900; margin-bottom: 14px; }
@media (max-width: 880px) { .gallery li { grid-template-columns: minmax(0, 1fr); } .gallery li:nth-child(even) .caption { order: 0; } }

/* Экраны телефона в ряд с подписями */
.shots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); margin-top: 48px; list-style: none; }
.shots li { display: grid; grid-template-rows: auto 1fr; gap: 18px; }
.shots figure { margin: 0; }
.shots figcaption h3 { font-size: 1.25rem; margin-bottom: 8px; }
.shots figcaption p { color: var(--muted); font-size: 1rem; }
.shots .phone { margin: 0 auto; }
@media (max-width: 880px) { .shots { grid-template-columns: minmax(0, 1fr); } }

/* Списки с жёлтой галочкой-квадратиком */
.facts, .promise { list-style: none; display: grid; gap: 14px 40px; }
.facts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 36px; max-width: 900px; }
.promise { gap: 12px; margin-top: 28px; color: var(--muted); }
.facts li, .promise li { position: relative; padding-left: 30px; }
.facts li::before, .promise li::before { content: ""; position: absolute; left: 0; top: .55em; width: 16px; height: 16px; border-radius: 5px; background: var(--sun); transform: rotate(8deg); }
.promise li::before { width: 14px; height: 14px; top: .5em; }
@media (max-width: 720px) { .facts { grid-template-columns: 1fr; } }

/* Шаги по порядку: вертикальная лента */
.timeline { list-style: none; counter-reset: tl; display: grid; gap: 22px; margin-top: 40px; max-width: 820px; }
.timeline li { counter-increment: tl; display: grid; grid-template-columns: 48px 1fr; gap: 18px; align-items: start; }
.timeline li::before {
  content: counter(tl); display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px;
  background: var(--sun); color: var(--plum-deep); font-weight: 900; font-size: 1.15rem;
}
.timeline h3 { font-size: 1.25rem; margin-bottom: 6px; }
.timeline p { color: var(--muted); }

/* Сравнительная таблица (виды заданий, роли) — складывается в строки на телефоне */
.grid-table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 40px; border: 2px solid var(--line); border-radius: var(--r-l); overflow: hidden; background: var(--white); }
.grid-table th, .grid-table td { padding: 16px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); font-size: 1rem; }
.grid-table tr:last-child td { border-bottom: 0; }
.grid-table thead th { background: var(--lavender); font-size: 1.05rem; }
.grid-table tbody th { font-weight: 800; }
.grid-table td { color: var(--muted); }
@media (max-width: 760px) {
  .grid-table, .grid-table tbody, .grid-table tr, .grid-table td, .grid-table th { display: block; }
  .grid-table thead { display: none; }
  .grid-table tr { padding: 8px 0; }
  .grid-table tbody th { padding-bottom: 4px; border-bottom: 0; font-size: 1.1rem; }
  .grid-table td { padding-top: 6px; }
  .grid-table td::before { content: attr(data-col); display: block; font-size: .8rem; font-weight: 800; color: var(--plum); margin-bottom: 2px; }
}

/* Честно о границах: две колонки «уже есть» и «пока нет» */
.truth { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 40px; }
.truth > div { padding: 28px 32px; border-radius: var(--r-l); background: var(--white); border: 2px solid var(--line); }
.truth h3 { font-size: 1.25rem; margin-bottom: 14px; }
.truth ul { list-style: none; display: grid; gap: 10px; color: var(--muted); }
.truth li { padding-left: 28px; position: relative; }
.truth .yes li::before { content: "✓"; position: absolute; left: 0; top: 0; font-weight: 900; color: #1C633A; }
.truth .not li::before { content: "—"; position: absolute; left: 0; top: 0; font-weight: 900; color: var(--coral); }
@media (max-width: 760px) { .truth { grid-template-columns: 1fr; } }

/* Вопросы: раскрывающиеся ответы без лишней рамки */
.faq { background: var(--lavender); }
.faq-list { margin-top: 32px; max-width: 760px; border-top: 2px solid var(--line); }
.faq details { border-bottom: 2px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 44px 20px 0; font-weight: 800; font-size: 1.15rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-size: 1.7rem; font-weight: 400; color: var(--plum); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--muted); }

/* Полоса с призывом и переходы к другим аудиториям */
.band { background: var(--plum); color: var(--cream); }
.band h2 { color: var(--cream); }
.band .lead { color: rgba(255, 251, 244, 0.8); }
.also { background: var(--cream); padding-block: clamp(48px, 6vw, 80px); border-top: 1px solid var(--line); }
.also-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 24px; }
.also-grid a {
  display: grid; gap: 6px; padding: 24px 28px; border-radius: var(--r-l); background: var(--white); border: 2px solid var(--line);
  text-decoration: none; transition: border-color .12s ease, transform .12s ease;
}
.also-grid a:hover { border-color: var(--plum); transform: translateY(-2px); }
.also-grid b { font-size: 1.2rem; }
.also-grid span { color: var(--muted); font-size: 1rem; }
@media (max-width: 720px) { .also-grid { grid-template-columns: 1fr; } }

footer { padding: 40px 0 48px; background: var(--cream); border-top: 1px solid var(--line); font-size: .95rem; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
footer .foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; }
footer .foot-links a { text-decoration: none; font-weight: 700; }
footer .foot-links a:hover { color: var(--ink); }
