:root {
  --purple: #6c5ce7;
  --purple-dark: #5a4bd1;
  --purple-light: #e8e4ff;
  --teal: #00b894;
  --teal-light: #dff9f3;
  --orange: #e17055;
  --orange-light: #ffe8e2;
  --navy: #2d3436;
  --grey: #636e72;
  --bg: #f5f6fa;
  --white: #ffffff;
  --shadow: 0 12px 40px rgba(108, 92, 231, 0.12);
  --radius: 20px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--navy);
  background:
    radial-gradient(circle at top left, rgba(108, 92, 231, 0.08), transparent 40%),
    radial-gradient(circle at bottom right, rgba(0, 184, 148, 0.08), transparent 35%),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  padding: 1.25rem 0 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.brand img {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(108, 92, 231, 0.18);
}

.brand-text strong {
  display: block;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-text span {
  color: var(--grey);
  font-size: 0.9rem;
}

.lang-toggle {
  border: 1px solid rgba(108, 92, 231, 0.18);
  background: var(--white);
  color: var(--purple);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.lang-toggle:hover {
  background: var(--purple-light);
  transform: translateY(-1px);
}

.hero {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 2rem 0 3rem;
}

.hero-copy {
  text-align: center;
  margin: 0 auto 2.5rem;
  max-width: 720px;
}

.hero-copy h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hero-copy p {
  margin: 0;
  color: var(--grey);
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  line-height: 1.6;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.app-card {
  position: relative;
  overflow: hidden;
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.app-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 48px rgba(108, 92, 231, 0.18);
}

.app-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 5px;
}

.app-card.teacher::before {
  background: linear-gradient(90deg, var(--purple), #a29bfe);
}

.app-card.class::before {
  background: linear-gradient(90deg, var(--teal), #55efc4);
}

.app-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.app-card.teacher .app-icon {
  background: var(--purple-light);
}

.app-card.class .app-icon {
  background: var(--teal-light);
}

.app-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.45rem;
}

.app-card p {
  margin: 0 0 1.25rem;
  color: var(--grey);
  line-height: 1.55;
  min-height: 4.5rem;
}

.app-card ul {
  margin: 0 0 1.5rem;
  padding-left: 1.1rem;
  color: var(--grey);
  line-height: 1.6;
}

.app-card li + li {
  margin-top: 0.35rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.95rem 1.2rem;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.btn-teacher {
  background: var(--purple);
  color: var(--white);
}

.btn-class {
  background: var(--teal);
  color: var(--white);
}

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border: 1px solid rgba(45, 52, 54, 0.12);
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.store-row .btn {
  width: auto;
  flex: 1 1 180px;
}

.detail-page .hero {
  align-items: flex-start;
  padding-top: 1rem;
}

.detail-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
}

.detail-card h1 {
  margin-top: 0;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
}

.detail-card .lead {
  color: var(--grey);
  font-size: 1.05rem;
  line-height: 1.65;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--purple);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.note {
  margin-top: 1.5rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: var(--purple-light);
  color: var(--navy);
  line-height: 1.55;
  font-size: 0.95rem;
}

.note.teal {
  background: var(--teal-light);
}

.site-footer {
  padding: 1.5rem 0 2rem;
  text-align: center;
  color: var(--grey);
  font-size: 0.9rem;
}

.site-footer a {
  color: var(--purple);
  font-weight: 600;
}

.site-footer p {
  margin: 0.35rem 0;
}

[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  .app-grid {
    grid-template-columns: 1fr;
  }

  .app-card p {
    min-height: auto;
  }
}
