/* Homepage only (index.html, ru/index.html). Loaded after style.css. */

.home {
  --round: ui-rounded, "SF Pro Rounded", var(--font);
}

.home section { padding: 72px 0; }
.home section + section { border-top: none; }

.home h1,
.home h2,
.home .home-app-name {
  font-family: var(--round);
}

.home h2 {
  font-size: clamp(1.8rem, 3.6vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: 10px;
}

.home-lede {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 34em;
  margin-bottom: 36px;
}

/* ─── Hero ─────────────────────────────────────────────────────── */
.home-hero { padding: 88px 0 64px; }

.home-hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 56px;
  align-items: center;
}

.home-hero h1 {
  font-size: clamp(2.5rem, 6vw, 3.9rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.04;
  margin-bottom: 22px;
}

.home-hero h1 span { display: block; color: var(--text-secondary); }

.home-hero-sub {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 30em;
  margin-bottom: 32px;
}

/* The "home screen": every app icon, like on a phone */
.home-screen {
  justify-self: end;
  width: min(100%, 380px);
  padding: 30px 22px 26px;
  border-radius: 44px;
  background: var(--bg-alt);
  rotate: 3deg;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px 10px;
}

.home-screen a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  border-radius: 12px;
  animation: home-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: calc(var(--i) * 60ms + 150ms);
}
.home-screen a:hover { text-decoration: none; }

.home-screen .app-card-icon {
  width: 100%;
  max-width: 66px;
  height: auto;
  aspect-ratio: 1;
  transition: transform 0.2s;
}
.home-screen a:hover .app-card-icon { transform: scale(1.08); }

@keyframes home-pop {
  from { opacity: 0; transform: scale(0.6) translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* ─── Apps ─────────────────────────────────────────────────────── */
.home-apps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.home-app {
  --tint: var(--accent);
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  padding: 24px;
  border-radius: 26px;
  background: color-mix(in srgb, var(--tint) 8%, var(--bg));
  transition: background 0.2s;
}
.home-app:hover { background: color-mix(in srgb, var(--tint) 14%, var(--bg)); }

.home-app .app-card-icon { width: 64px; height: 64px; }

.home-app-name {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 6px;
}

.home-app-name a { color: var(--text); }
.home-app-name a:hover { text-decoration: none; }
/* The whole card opens the app page */
.home-app-name a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}
.home-app-name a:focus-visible { outline: none; }
.home-app:has(.home-app-name a:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.home-app-tagline {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.home-app-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.home-app-meta a {
  position: relative;
  z-index: 1;
  font-weight: 600;
  color: color-mix(in srgb, var(--tint) 75%, var(--text));
}

/* ─── About ────────────────────────────────────────────────────── */
.home-about {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 56px;
  align-items: start;
}

.home-about-text p {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 16px;
  max-width: 36em;
}

.home-note {
  padding: 26px;
  border-radius: 26px;
  background: var(--bg-alt);
  font-size: 0.95rem;
}

.home-note h3 {
  font-family: var(--round);
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.home-note p { color: var(--text-secondary); margin-bottom: 18px; }

.home-note ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.home-note li {
  font-size: 0.8rem;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: 980px;
  background: var(--bg-card);
}

.home-note > a { font-weight: 600; }

/* ─── Contact ──────────────────────────────────────────────────── */
.home-email {
  display: inline-block;
  font-family: var(--round);
  font-size: clamp(1.3rem, 4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  word-break: break-word;
  margin-bottom: 12px;
}

.home footer { border-top: none; }

/* ─── Small screens ────────────────────────────────────────────── */
@media (max-width: 760px) {
  .home-hero { padding: 48px 0 40px; }
  .home-hero-inner,
  .home-about { grid-template-columns: 1fr; gap: 40px; }
  .home-screen { justify-self: start; rotate: -2deg; }
  .home-apps { grid-template-columns: 1fr; }
  .home section { padding: 56px 0; }
}

@media (max-width: 420px) {
  .home-app { grid-template-columns: 52px 1fr; padding: 20px; gap: 14px; }
  .home-app .app-card-icon { width: 52px; height: 52px; }
  .home-screen { padding: 24px 16px 20px; border-radius: 36px; gap: 18px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-screen a { animation: none; }
}
