/* Colors mirror lib/presentation/theme/app_colors.dart and language_level_colors.dart. */
:root {
  --main: #214280;
  --background: #f7f9fb;
  --card-border: #e2e5e9;
  --title-text: #1a1a18;
  --subtitle-text: #636b78;
  --positive: #3b6d11;
  --negative: #b8411a;

  --a1: #fde4a6;
  --a2: #f7cb6e;
  --b1: #c4e5ff;
  --b2: #9ed4ff;
  --c1: #e8e0ff;
  --c2: #d5c6ff;
  --a-strong: #8a5a00;
  --b-strong: #185fa5;
  --c-strong: #5b3fb0;

  --radius: 16px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.6;
  color: var(--title-text);
  background: var(--background);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0;
}

p {
  margin: 0;
}

.container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */

.site-header {
  background: var(--main);
}

.header-inner {
  display: flex;
  align-items: center;
  height: 80px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  text-decoration: none;
}

/* Hero */

.hero {
  background: var(--main);
  color: #fff;
  padding: 48px 0 72px;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(32px, 5vw, 48px);
}

.lead {
  margin-top: 20px;
  font-size: 19px;
  color: rgba(255, 255, 255, 0.85);
  max-width: 34em;
}

.store-button {
  display: inline-block;
  margin-top: 32px;
  padding: 14px 28px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--main);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
}

a.store-button:hover {
  background: var(--b1);
}

/* The app's study screen in a phone, with two level-colored flashcards fanned out behind it */

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  padding: 12px 0;
}

.deco-card {
  position: absolute;
  top: 70px;
  width: 160px;
  height: 230px;
  border-radius: 22px;
}

.deco-card-a {
  left: calc(50% - 205px);
  background: var(--a2);
  transform: rotate(-14deg);
}

.deco-card-c {
  right: calc(50% - 205px);
  top: 170px;
  background: var(--c2);
  transform: rotate(12deg);
}

.phone {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 280px;
  height: 560px;
  border: 9px solid #0f1b33;
  border-radius: 40px;
  overflow: hidden;
  background: #f3faff; /* B1's tint */
  color: var(--title-text);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.35);
}

.phone svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.phone-app-bar {
  position: relative;
  padding: 22px 16px 12px;
  background: var(--b1);
  text-align: center;
}

.phone-title {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
}

.phone-subtitle {
  color: var(--subtitle-text);
  font-size: 12px;
}

.phone-menu {
  position: absolute;
  top: 30px;
  right: 14px;
  width: 22px;
  height: 22px;
}

.phone-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(to right, var(--b-strong) 18%, rgba(24, 95, 165, 0.18) 18%);
}

/* Sizes are the app's (study_screen.dart, flashcard.dart, translations.dart) at about 0.7 */

.phone-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 14px 14px 16px;
}

.flashcard {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 196px;
  padding: 28px 34px;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.06);
  text-align: center;
}

.star {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 22px;
  height: 22px;
  color: #80868b;
}

.star path {
  stroke-width: 1.8;
}

.word {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
}

.part-of-speech {
  margin-top: 9px;
  padding: 1px 6px;
  border: 1px solid #cbd2da;
  border-radius: 4px;
  color: var(--subtitle-text);
  font-size: 10px;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.3px;
}

.translations {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-top: 17px;
}

/* The level's color at 70% over white */
.translations span {
  padding: 5px 11px;
  border-radius: 999px;
  background: #d6edff;
  color: var(--main);
  font-size: 12px;
  font-weight: 500;
}

.actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.action {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
}

.action svg {
  width: 18px;
  height: 18px;
}

.action.negative {
  border: 1.5px solid #dfaa98;
  background: #fff;
  color: var(--negative);
}

.action.positive {
  background: var(--positive);
  color: #fff;
}

/* Sections */

.features,
.levels {
  padding: 72px 0 0;
}

.levels {
  padding-bottom: 80px;
}

h2 {
  font-size: clamp(26px, 4vw, 34px);
}

.section-lead {
  margin-top: 12px;
  color: var(--subtitle-text);
  font-size: 17px;
  max-width: 40em;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 32px;
}

.feature {
  padding: 24px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: #fff;
}

.feature h3 {
  font-size: 20px;
  color: var(--main);
}

.feature p {
  margin-top: 8px;
  color: var(--subtitle-text);
}

.level-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.level {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background: #fff;
  font-weight: 500;
}

.level-badge {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  font-weight: 700;
}

.level-a1 .level-badge { background: var(--a1); color: var(--a-strong); }
.level-a2 .level-badge { background: var(--a2); color: var(--a-strong); }
.level-b1 .level-badge { background: var(--b1); color: var(--b-strong); }
.level-b2 .level-badge { background: var(--b2); color: var(--b-strong); }
.level-c1 .level-badge { background: var(--c1); color: var(--c-strong); }
.level-c2 .level-badge { background: var(--c2); color: var(--c-strong); }

/* Footer */

.site-footer {
  border-top: 1px solid var(--card-border);
  background: #fff;
  color: var(--subtitle-text);
  font-size: 15px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 24px;
  padding-bottom: 24px;
}

.site-footer a {
  color: var(--main);
}

/* Privacy policy */

.legal .container {
  max-width: 760px;
  padding-top: 48px;
  padding-bottom: 72px;
}

.legal h1 {
  font-size: clamp(30px, 5vw, 40px);
}

.legal h2 {
  margin-top: 40px;
  font-size: 22px;
  color: var(--main);
}

.legal p,
.legal ul {
  margin: 12px 0 0;
}

.legal ul {
  padding-left: 22px;
}

.legal li + li {
  margin-top: 4px;
}

.legal a {
  color: var(--main);
}

.legal-date {
  color: var(--subtitle-text);
}

/* Narrow screens */

@media (max-width: 760px) {
  .hero {
    padding: 24px 0 56px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .feature-grid,
  .level-grid {
    grid-template-columns: 1fr;
  }
}
