:root {
  --bg: #071a2b;
  --bg-2: #0c2a42;
  --card: rgba(255, 255, 255, 0.05);
  --line: rgba(255, 255, 255, 0.12);
  --text: #e8f0f7;
  --muted: #9fb3c4;
  --accent: #3ec5d6;
  --max: 1080px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; background: var(--bg); }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg) linear-gradient(180deg, var(--bg-2) 0, var(--bg) 700px) no-repeat;
  min-height: 100vh;
}

a { color: var(--accent); }
a:hover { text-decoration: none; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap;
}
.brand {
  font-weight: 800; letter-spacing: 0.04em; font-size: 1.15rem;
  color: var(--text); text-decoration: none;
}
.brand b { color: var(--accent); font-weight: inherit; }
.nav { display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.95rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.lang { border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; }

/* Hero */
.hero { padding: 72px 0 40px; }
.hero h1 { font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; margin: 0 0 16px; }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 640px; margin: 0; }

/* App cards */
.apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; padding: 24px 0 48px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 24px; display: flex; flex-direction: column; gap: 10px;
}
.card h2, .card h3 { margin: 0; font-size: 1.3rem; }
.card p { margin: 0; color: var(--muted); }
.card .more { margin-top: auto; font-weight: 600; text-decoration: none; }

.stores { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.badge { display: inline-flex; align-items: center; line-height: 0; border-radius: 8px; }
.badge img { display: block; width: auto; }
.badge-as img { height: 40px; }
.badge-gp img { height: 40px; }
.badge:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* Content pages */
.page { padding: 48px 0 64px; max-width: 760px; }
.page h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); line-height: 1.2; margin: 0 0 12px; }
.page h2 { margin-top: 36px; font-size: 1.3rem; }
.page .lead { font-size: 1.12rem; color: var(--muted); }
.steps { list-style: none; padding: 0; display: grid; gap: 14px; margin: 24px 0; }
.steps li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.steps strong { display: block; margin-bottom: 4px; }
.features { padding-left: 20px; }
.features li { margin: 6px 0; }
.note { color: var(--muted); font-size: 0.92rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--muted); font-size: 0.9rem; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.site-footer a { color: var(--muted); }

/* Images */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { border-radius: 8px; background: #fff1; }
.hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: center; }
.hero-img { width: 100%; max-width: 360px; height: auto; justify-self: center; }
@media (max-width: 720px) {
  .hero { grid-template-columns: 1fr; padding-top: 40px; }
  .hero-img { max-width: 260px; }
}
.app-title { display: flex; align-items: center; gap: 16px; }
.app-title img { border-radius: 14px; }

/* Home cards with icons */
.card-head { display: flex; align-items: center; gap: 14px; }
.card-head img { width: 56px; height: 56px; border-radius: 14px; flex: none; box-shadow: 0 4px 14px rgba(0,0,0,.35); }

/* App pages */
.app { --app: var(--accent); }
.app-wordfeud { --app: #6cc3f0; }
.app-wwf { --app: #f5a623; }
.app-scrabble { --app: #e2bd7f; }
.card-wordfeud { border-top: 3px solid #6cc3f0; }
.card-wwf { border-top: 3px solid #f5a623; }
.card-scrabble { border-top: 3px solid #e2bd7f; }

.app-hero {
  display: flex; gap: 28px; align-items: center; padding: 56px 0 8px;
}
.app-icon {
  width: 128px; height: 128px; border-radius: 28px; flex: none;
  box-shadow: 0 10px 30px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.08);
}
.app-hero h1 { font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.1; margin: 0 0 6px; }
.tagline { color: var(--app); font-size: 1.15rem; font-weight: 600; margin: 0 0 14px; }
.app-hero .note { margin: 10px 0 0; }
.app-intro { max-width: 760px; margin: 24px 0 8px; }
.app-section { margin: 40px 0; }
.app-section h2 { font-size: 1.35rem; margin: 0 0 16px; }

.gallery {
  list-style: none; margin: 0; padding: 4px 4px 14px; display: grid;
  grid-auto-flow: column; grid-auto-columns: minmax(170px, 220px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
}
.gallery li { scroll-snap-align: start; }
.gallery img {
  display: block; width: 100%; height: auto; border-radius: 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4); border: 1px solid var(--line);
}

.video {
  position: relative; display: block; max-width: 720px; aspect-ratio: 16 / 9;
  border-radius: 16px; overflow: hidden; background: #000;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
}
.video img, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video .play {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px;
  border-radius: 50%; background: var(--app); box-shadow: 0 6px 20px rgba(0,0,0,.5);
  transition: transform .15s ease;
}
.video .play::after {
  content: ""; position: absolute; left: 30px; top: 22px;
  border-style: solid; border-width: 16px 0 16px 26px; border-color: transparent transparent transparent #0b1b2b;
}
.video:hover .play, .video:focus-visible .play { transform: scale(1.08); }
.video:focus-visible { outline: 3px solid var(--app); outline-offset: 3px; }

.app-cols { display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; }
.app .steps li { display: flex; gap: 14px; align-items: flex-start; }
.app .steps .num {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center;
  background: var(--app); color: #0b1b2b; font-weight: 800;
}
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 30px; }
.checks li::before {
  content: "✓"; position: absolute; left: 0; top: 0; color: var(--app); font-weight: 800;
}
.disclaimer { margin: 8px 0 56px; }

@media (max-width: 720px) {
  .app-hero { flex-direction: column; align-items: flex-start; gap: 18px; padding-top: 36px; }
  .app-icon { width: 96px; height: 96px; border-radius: 22px; }
  .app-cols { grid-template-columns: 1fr; gap: 0; }
  .gallery { grid-auto-columns: 62%; }
}
@media (prefers-reduced-motion: reduce) { .video .play { transition: none; } }

/* FAQ and cross-links on app pages */
.faq-item { margin: 0 0 18px; }
.faq-item h3 { font-size: 1.05rem; margin: 0 0 4px; }
.faq-item p { margin: 0; color: var(--muted); }
.more-apps ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px 24px; }

/* Language switcher */
.langs { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.nav .langs a { padding: 1px 7px; font-size: 0.82rem; letter-spacing: 0.03em; }
.nav .langs a + a { border-left: 1px solid var(--line); }
.nav .langs a[aria-current="true"] { color: var(--bg); background: var(--accent); font-weight: 700; }

/* Home hero v2 */
.hero { position: relative; isolation: isolate; }
body { overflow-x: clip; }
.hero-bg {
  position: absolute; z-index: -1; top: -40px; bottom: 0; left: calc(50% - 50vw); right: calc(50% - 50vw); pointer-events: none;
  background:
    radial-gradient(circle at 75% 45%, rgba(62,197,214,.22), transparent 34%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.045) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.045) 0 1px, transparent 1px 44px);
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 60% 45%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 60% 70% at 60% 45%, #000 30%, transparent 75%);
}
.tiles { display: flex; gap: 6px; margin-bottom: 22px; }
.tile, .float-tile {
  position: relative; display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 7px;
  background: linear-gradient(180deg, #ffffff, #e4e9ee); color: #13202c;
  font-weight: 800; font-size: 1.3rem; line-height: 1;
  box-shadow: 0 3px 0 #b9c3cc, 0 8px 18px rgba(0,0,0,.35);
}
.tile sub, .float-tile sub { position: absolute; right: 4px; bottom: 3px; font-size: .55rem; font-weight: 700; }
.tile:nth-child(4) { background: linear-gradient(180deg, #ffe7b3, #f5a623); box-shadow: 0 3px 0 #c47f10, 0 8px 18px rgba(0,0,0,.35); }
.hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); line-height: 1.08; letter-spacing: -0.02em; }
.grad {
  display: block;
  background: linear-gradient(90deg, #6cc3f0, #3ec5d6 45%, #f5a623);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.chips { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  font-size: .9rem; padding: 6px 12px 6px 28px; border-radius: 999px; position: relative;
  background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--text);
}
.chips li::before { content: "✓"; position: absolute; left: 11px; color: var(--accent); font-weight: 800; }
.cta {
  display: inline-block; margin-top: 26px; padding: 12px 22px; border-radius: 999px;
  background: var(--accent); color: #07202b; font-weight: 700; text-decoration: none;
  box-shadow: 0 8px 22px rgba(62,197,214,.35);
}
.cta:hover { filter: brightness(1.08); }
.cta:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.hero-visual { position: relative; justify-self: center; }
.hero-visual .hero-img { position: relative; display: block; filter: drop-shadow(0 24px 40px rgba(0,0,0,.5)); }
.float-tile { position: absolute; z-index: 1; animation: bob 6s ease-in-out infinite; }
.ft1 { top: 6%; left: -6%; transform: rotate(-12deg); }
.ft2 { bottom: 14%; left: 2%; transform: rotate(8deg); animation-delay: -2s; }
.ft3 { top: 18%; right: -4%; transform: rotate(14deg); animation-delay: -4s;
  background: linear-gradient(180deg, #ffe7b3, #f5a623); box-shadow: 0 3px 0 #c47f10, 0 8px 18px rgba(0,0,0,.35); }
@keyframes bob { 50% { translate: 0 -8px; } }
@media (prefers-reduced-motion: reduce) { .float-tile { animation: none; } }
@media (max-width: 720px) {
  .tiles { gap: 4px; }
  .tile { width: 34px; height: 34px; font-size: 1.1rem; }
  .hero-bg { -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 40%, #000 30%, transparent 75%); mask-image: radial-gradient(ellipse 90% 60% at 50% 40%, #000 30%, transparent 75%); }
}
