:root {
  color-scheme: dark;
  --surface: #14192a;
  --ink: #f7f8ff;
  --muted: #b7bfd4;
  --line: #ffffff24;
  --harvest: #ddfaad;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 0;
  min-height: 100vh;
  font-family: 'Rubik', system-ui, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(ellipse 45rem 26rem at 90% 3%, #292547, transparent),
    radial-gradient(ellipse 38rem 37rem at 4% 51%, #10273a, transparent),
    #0d111e;
}

.shell { width: min(1200px, calc(100% - 72px)); margin-inline: auto; }

.topbar {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: clamp(19px, 3vw, 25px);
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand img { display: block; }

.lang-row {
  display: flex;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0d111e95;
}

.lang {
  min-width: 43px;
  min-height: 36px;
  padding: 0 9px;
  border: 0;
  border-radius: 8px;
  color: var(--muted);
  font: 600 13px 'Rubik', system-ui, sans-serif;
  background: transparent;
  cursor: pointer;
}

.lang:hover { color: white; }
.lang[aria-pressed='true'] { color: white; background: #3c3a58; }
:is(a, button):focus-visible { outline: 3px solid #bef6ff; outline-offset: 4px; }

.feature {
  display: flex;
  align-items: flex-end;
  min-height: clamp(330px, 36vw, 490px);
  isolation: isolate;
  position: relative;
  overflow: hidden;
  border: 1px solid #e4f4cd47;
  border-radius: 28px;
  background: #253546;
  box-shadow: 0 22px 60px #03051049;
}

.feature::before, .feature::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
}

.feature::before {
  left: 25%;
  background: url('../assets/thumbs/harvest.jpg') center 48% / cover no-repeat;
}

.feature::after {
  background:
    linear-gradient(90deg, #111622 25%, #111622d9 34%, #11162255 49%, #11162200 74%),
    linear-gradient(0deg, #1116228a 1%, transparent 55%);
}

.feature-content { padding: clamp(26px, 5vw, 60px); }

.feature h2 {
  margin: 0;
  max-width: 9em;
  color: #f4ffd9;
  font-size: clamp(40px, 6.5vw, 89px);
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.065em;
  text-wrap: balance;
}

.feature-text {
  max-width: 32ch;
  margin: 17px 0 28px;
  color: #e1e9df;
  font-size: clamp(15px, 1.6vw, 19px);
  line-height: 1.5;
}

.feature-play {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  padding: 13px 20px;
  border-radius: 10px;
  color: #18241b;
  font-weight: 700;
  text-decoration: none;
  background: var(--harvest);
  box-shadow: 0 6px 20px #10180870;
  transition: background-color 180ms ease, transform 180ms ease;
}

.feature-arrow::after, .world-go::after { content: '→'; font-size: 1.2em; line-height: 1; }
.feature-play:hover { transform: translateY(-2px); background: #f0ffd9; }

.catalog { padding: 42px 0 64px; }
.catalog-heading { margin: 0 0 18px; }
.catalog-heading h2 { margin: 0 0 6px; font-size: clamp(25px, 4vw, 37px); letter-spacing: -0.045em; }
.tagline { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.45; }

.worlds {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.8vw, 22px);
}

.world {
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 17px;
  color: var(--ink);
  text-decoration: none;
  background: var(--surface);
  box-shadow: 0 14px 24px #03051037;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.world:is(:hover, :focus-visible) {
  border-color: color-mix(in srgb, var(--world-accent) 62%, transparent);
  box-shadow: 0 18px 32px #03051078;
}

.world:hover { transform: translateY(-4px); }

.world-picture {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: 33% center;
  background: color-mix(in srgb, var(--world-accent) 15%, var(--surface));
}

:is(.world-racing, .world-fair, .world-astro) .world-picture { object-position: center; }

.world-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: 'title arrow' 'description arrow';
  align-content: start;
  align-items: center;
  gap: 7px 12px;
  padding: 17px 17px 19px;
  border-top: 1px solid var(--line);
}

.world-title {
  grid-area: title;
  margin: 0;
  font-size: clamp(18px, 2.15vw, 24px);
  font-weight: 750;
  letter-spacing: -0.04em;
  overflow-wrap: anywhere;
}

.world-text { grid-area: description; margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; }

.world-go {
  grid-area: arrow;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--world-accent) 37%, transparent);
  border-radius: 50%;
  color: var(--world-accent);
  background: color-mix(in srgb, var(--world-accent) 12%, transparent);
}

@media (max-width: 820px) {
  .shell { width: calc(100% - 40px); }
  .worlds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 510px) {
  .topbar { min-height: 67px; }
  .shell { width: calc(100% - 28px); }
  .feature { min-height: 380px; border-radius: 21px; }
  .feature::before { left: 0; background-position: 53% top; background-size: auto 80%; }
  .feature::after { background: linear-gradient(0deg, #111622 3%, #111622e8 29%, #11162208 70%); }
  .feature-content { padding: 24px; }
  .feature-text { margin: 12px 0 19px; }
  .catalog { padding-top: 32px; }
  .world-body { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'title' 'description'; padding: 11px 12px 14px; }
  .world-text { font-size: 13px; }
  .world-go { display: none; }
}

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

@media (prefers-reduced-motion: reduce) {
  .world, .feature-play { transition: none; }
  .world:hover, .feature-play:hover { transform: none; }
}
