/* teach-app.ru — brand palette from APK loading screen + PT Serif */
@import url("https://fonts.googleapis.com/css2?family=PT+Serif:ital,wght@0,400;0,700;1,400&family=Roboto:wght@400;500;600&display=swap");

:root {
  --navy: #0a1a38;
  --navy-deep: #06101f;
  --navy-veil: rgba(6, 16, 31, 0.86);
  --gold: #fad424;
  --gold-hi: #ffe566;
  --gold-deep: #c99208;
  --accent: #3d9eff;
  --accent-hover: #6bb4ff;
  --text: #f2f6fc;
  --muted: #9eb4d4;
  --card: rgba(10, 26, 56, 0.78);
  --radius: 14px;
  --max: 1120px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --font-serif: "PT Serif", Georgia, "Times New Roman", serif;
  --font-sans: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  --spot-x: 50vw;
  --spot-y: 38vh;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: var(--navy-deep);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

h1,
h2,
h3,
.section-title,
.brand-link span:last-child {
  font-family: var(--font-serif);
  font-weight: 700;
  letter-spacing: -0.01em;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 160ms var(--ease-out);
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
}

/* --- Mimo-style spotlight: bright wallpaper through cursor hole --- */
.page--spotlight {
  position: relative;
}

.spotlight-stack {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.spotlight-stack__wallpaper {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  filter: saturate(1.05) contrast(1.02) brightness(0.72);
}

.spotlight-stack__veil {
  position: absolute;
  inset: 0;
  background: rgba(6, 16, 31, 0.78);
  -webkit-mask-image: radial-gradient(
    circle 260px at var(--spot-x) var(--spot-y),
    transparent 0,
    transparent 100px,
    rgba(0, 0, 0, 0.45) 160px,
    #000 260px
  );
  mask-image: radial-gradient(
    circle 260px at var(--spot-x) var(--spot-y),
    transparent 0,
    transparent 100px,
    rgba(0, 0, 0, 0.45) 160px,
    #000 260px
  );
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

.page--spotlight.no-spotlight .spotlight-stack__veil {
  -webkit-mask-image: none;
  mask-image: none;
  background: rgba(6, 16, 31, 0.88);
}

.page--spotlight > :not(.spotlight-stack) {
  position: relative;
  z-index: 1;
}

.hero--brand,
.hero--pdd,
.hero--stub {
  background-image: var(--hero-wallpaper, none);
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
}

.hero--brand::after,
.hero--pdd::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(6, 16, 31, 0.15) 0%,
    rgba(6, 16, 31, 0.42) 50%,
    rgba(6, 16, 31, 0.9) 100%
  );
  pointer-events: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.35rem;
  background: rgba(6, 16, 31, 0.48);
  backdrop-filter: blur(14px) saturate(1.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.08rem;
  text-decoration: none;
}

.brand-link:hover {
  color: var(--text);
  text-decoration: none;
}

.brand-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(145deg, var(--gold-hi) 0%, var(--gold-deep) 100%);
  display: grid;
  place-items: center;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--navy-deep);
  box-shadow: 0 4px 16px rgba(250, 212, 36, 0.28);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.15rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
}

.nav-links a:hover {
  color: var(--text);
}

.container {
  width: min(var(--max), 100% - 2rem);
  margin-inline: auto;
}

.hero {
  position: relative;
  padding: clamp(3.5rem, 8vw, 5.5rem) 0 clamp(3rem, 6vw, 4rem);
  overflow: hidden;
}

.hero--brand {
  min-height: min(72vh, 640px);
  display: flex;
  align-items: flex-end;
}

.hero--brand .hero__inner {
  animation: hero-enter 700ms var(--ease-out) both;
}

@keyframes hero-enter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero--pdd {
  min-height: min(78vh, 680px);
  display: flex;
  align-items: flex-end;
  padding-bottom: 3.5rem;
}

.hero--pdd .hero__inner {
  animation: hero-enter 700ms var(--ease-out) both;
}

.hero--stub {
  min-height: 52vh;
  display: flex;
  align-items: flex-end;
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(2rem, 5.5vw, 3.1rem);
  line-height: 1.12;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.5);
}

.hero .lead {
  margin: 0 0 1.65rem;
  font-size: clamp(1.02rem, 2.4vw, 1.22rem);
  color: var(--muted);
  max-width: 38em;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}

.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.hero-chip {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--gold-hi);
  background: rgba(250, 212, 36, 0.12);
  border: 1px solid rgba(250, 212, 36, 0.22);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.badge {
  display: inline-block;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(61, 158, 255, 0.18);
  color: var(--accent-hover);
  margin-bottom: 0.85rem;
}

.badge--soon {
  background: rgba(250, 212, 36, 0.14);
  color: var(--gold-hi);
  border: 1px solid rgba(250, 212, 36, 0.25);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.8rem 1.45rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition:
    transform 180ms var(--ease-out),
    box-shadow 180ms var(--ease-out),
    background 180ms var(--ease-out);
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn:active {
  transform: scale(0.97) translateY(0);
  transition-duration: 80ms;
}

.btn-primary {
  background: linear-gradient(180deg, var(--gold-hi) 0%, var(--gold) 55%, var(--gold-deep) 100%);
  color: var(--navy-deep);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.35) inset,
    0 8px 28px rgba(250, 212, 36, 0.28);
}

.btn-primary:hover {
  color: var(--navy-deep);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.4) inset,
    0 12px 36px rgba(250, 212, 36, 0.36);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
}

.btn:disabled,
.btn.disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}

.section {
  padding: 3.25rem 0;
}

.section--solid {
  background: linear-gradient(180deg, rgba(6, 16, 31, 0.35) 0%, rgba(6, 16, 31, 0.92) 14%, rgba(6, 16, 31, 0.98) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.section-title {
  margin: 0 0 1.65rem;
  font-size: clamp(1.35rem, 3vw, 1.65rem);
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 1.35rem;
}

.app-card {
  background: var(--card);
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 12px 40px rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition:
    transform 220ms var(--ease-out),
    box-shadow 220ms var(--ease-out),
    border-color 220ms var(--ease-out);
}

.app-card:hover {
  transform: translateY(-4px);
  border-color: rgba(250, 212, 36, 0.28);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 20px 48px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(250, 212, 36, 0.08);
}

.app-card__media {
  height: 148px;
  background-size: cover;
  background-position: center 22%;
  position: relative;
}

.app-card__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(6, 16, 31, 0.92) 100%);
}

.app-card__body {
  padding: 1.25rem 1.35rem 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 1;
}

.app-card h3 {
  margin: 0;
  font-size: 1.18rem;
}

.app-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  flex: 1;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 1.1rem;
}

.feature {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.3rem 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.22);
  transition: transform 200ms var(--ease-out), border-color 200ms var(--ease-out);
}

.feature:hover {
  transform: translateY(-2px);
  border-color: rgba(61, 158, 255, 0.22);
}

.feature h3 {
  margin: 0 0 0.5rem;
  font-size: 1.02rem;
}

.feature p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.about-block {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.65rem 1.85rem;
  border: 1px solid rgba(255, 255, 255, 0.07);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.25);
}

.about-block p {
  margin: 0 0 0.8rem;
  color: var(--muted);
}

.about-block p:last-child {
  margin-bottom: 0;
}

.site-footer {
  margin-top: 1rem;
  padding: 2.25rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  color: var(--muted);
  background: rgba(6, 16, 31, 0.6);
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--text);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
}

.legal-doc {
  padding: 2rem 0 4rem;
}

.legal-doc article {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  border: 1px solid rgba(255, 255, 255, 0.06);
  max-width: 52rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.legal-doc h1 {
  margin-top: 0;
  font-size: 1.6rem;
}

.legal-doc h2 {
  margin-top: 2rem;
  font-size: 1.15rem;
}

.legal-doc p,
.legal-doc li {
  color: #c8d6ea;
}

.legal-doc ul {
  padding-left: 1.25rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero--brand .hero__inner,
  .hero--pdd .hero__inner {
    animation: none;
  }

  .spotlight-stack__veil {
    -webkit-mask-image: none;
    mask-image: none;
  }
}

@media (max-width: 600px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero--pdd,
  .hero--brand {
    min-height: 58vh;
  }

  .spotlight-stack__veil {
    -webkit-mask-image: none;
    mask-image: none;
    background: rgba(6, 16, 31, 0.9);
  }
}
