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

/* ===== Landing ===== */
.landing {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 64px 32px;
  text-align: center;
}

.mark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}
.sigil {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, var(--accent), var(--accent-2) 60%, var(--accent-deep));
  box-shadow: 0 0 22px rgba(124, 92, 255, 0.55);
  position: relative;
}
.sigil::after {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.85);
}
.wordmark {
  font-family: "Inter", sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.34em;
}
.wordmark span { color: var(--accent); }

.landing h1 {
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  max-width: 16ch;
  margin: 0 auto 22px;
}
.landing h1 em {
  font-style: italic;
  color: var(--accent);
}
.landing .lede {
  max-width: 56ch;
  color: var(--text-dim);
  font-size: 1.02rem;
  margin: 0 auto 8px;
}

.entry-rule {
  width: 1px; height: 56px;
  background: linear-gradient(180deg, transparent, var(--border-strong), transparent);
  margin: 56px auto 40px;
}

.choose {
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 46px;
}

.flags {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 38px;
  width: 100%;
  max-width: 920px;
}

.flag {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 14px 8px 8px;
  border-radius: 18px;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s;
}
.flag::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: radial-gradient(120px 80px at 50% 20%, rgba(168, 144, 255, 0.1), transparent 70%);
  opacity: 0;
  transition: opacity 0.45s;
}
.flag:hover { transform: translateY(-6px); }
.flag:hover::before { opacity: 1; }

.flag-cloth {
  width: 130px;
  height: 86px;
  border-radius: 8px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 10px 30px -8px rgba(0, 0, 0, 0.7),
    0 24px 50px -20px rgba(124, 92, 255, 0.25);
  overflow: hidden;
  position: relative;
  transition: box-shadow 0.5s, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.flag:hover .flag-cloth {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.08) inset,
    0 16px 40px -8px rgba(0, 0, 0, 0.8),
    0 34px 70px -16px rgba(124, 92, 255, 0.55);
  transform: translateY(-2px) scale(1.03);
}

.flag-label {
  margin-top: 22px;
  font-family: "Fraunces", serif;
  font-size: 1.06rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s 0.05s, transform 0.45s 0.05s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
  white-space: nowrap;
}
.flag-label small {
  display: block;
  font-family: "Inter", sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 6px;
  font-weight: 600;
}
.flag:hover .flag-label,
.flag:focus-visible .flag-label {
  opacity: 1;
  transform: translateY(0);
}

.flag-arrow {
  position: absolute;
  right: 16px; top: 14px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  display: grid; place-items: center;
  opacity: 0;
  transition: opacity 0.4s, transform 0.4s;
  color: var(--accent);
}
.flag:hover .flag-arrow { opacity: 1; transform: translate(2px,-2px); }

/* Flags */
.flag-at {
  background: linear-gradient(#ed2939 0 33.3%, #fff 33.3% 66.6%, #ed2939 66.6% 100%);
}
.flag-de {
  background: linear-gradient(#000 0 33.3%, #dd0000 33.3% 66.6%, #ffce00 66.6% 100%);
}
.flag-fr {
  background: linear-gradient(90deg, #0055a4 0 33.3%, #fff 33.3% 66.6%, #ef4135 66.6% 100%);
}
.flag-eu {
  background: #003399;
  position: relative;
}
.flag-eu svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ===== WIP flags ===== */
.flag-wip {
  cursor: default;
}
.flag-wip:hover {
  transform: none;
}
.flag-wip:hover::before {
  opacity: 0;
}
.flag-wip:hover .flag-cloth {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 10px 30px -8px rgba(0, 0, 0, 0.7),
    0 24px 50px -20px rgba(124, 92, 255, 0.25);
  transform: none;
}
.flag-wip-overlay {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.08);
  transition: background 0.5s;
}
.flag-wip:hover .flag-wip-overlay {
  background: rgba(0, 0, 0, 0.15);
}

.flag-wip-overlay .stripes {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(255, 206, 0, 0.2) 0px,
    rgba(255, 206, 0, 0.2) 12px,
    rgba(0, 0, 0, 0.2) 12px,
    rgba(0, 0, 0, 0.2) 24px
  );
  background-size: 34px 34px;
  animation: stripe-move 2s linear infinite;
  transition: opacity 0.5s;
}
.flag-wip:hover .stripes {
  opacity: 0.7;
}

@keyframes stripe-move {
  to { background-position: 34px 34px; }
}

.gear-wrap {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  opacity: 0.7;
  animation: gear-spin 4s linear infinite;
  transition: opacity 0.5s;
}
.flag-wip:hover .gear-wrap {
  opacity: 1;
}
.gear-wrap .gear {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 0.5s;
  transform-origin: center;
}
.flag-wip:hover .gear {
  transform: scale(1.15);
}
@keyframes gear-spin {
  to { transform: rotate(360deg); }
}

.flag-label.wip-label {
  white-space: nowrap;
}
.flag-label.wip-label small {
  color: var(--text-mute);
}

.foot {
  margin-top: 64px;
  font-size: 0.78rem;
  color: var(--text-mute);
  letter-spacing: 0.05em;
}

@media (max-width: 860px) {
  .flags { grid-template-columns: repeat(2, 1fr); gap: 28px; max-width: 440px; }
}
@media (max-width: 420px) {
  .flag-cloth { width: 108px; height: 72px; }
}
