/* www: the landing page. One full-viewport screen. Values are from the
   "Yumuşak gece" mockups (G-ana, G-ana-mobil); the phone values apply below
   720px. Colours and fonts come from base.css. */

.landing-body {
  background: var(--color-page);
}

.landing {
  /* Wide-screen values; the media query below swaps in the phone ones. */
  --screen-min-height: 720px;
  --shade-end: rgba(20, 19, 43, 0.88);
  --main-padding: 24px 24px 52px;
  --logo-width: 430px;
  --join-address-size: 30px;
  --splash-size: 25px;
  --splash-right: -78px;
  --splash-bottom: 30px;
  --logo-shadow: 0 12px 24px rgba(8, 7, 24, 0.55);
  --title-size: 25px;
  --subtitle-size: 16px;
  --menu-width: 420px;
  --menu-margin: 26px;
  --menu-size: 19px;
  --play-icon: 15px;

  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  /* At least one screen; taller when the server details are open on a short
     screen, in which case the page scrolls. */
  min-height: max(100vh, var(--screen-min-height));
  min-height: max(100dvh, var(--screen-min-height));
  overflow: hidden;
  background: var(--color-page);
  color: var(--text);
  font-family: var(--font-heading);
  font-weight: 600;
}

@keyframes hop {
  0%, 4% { transform: translateY(0) scale(1, 1); }
  7.6% { transform: translateY(0) scale(1.036, 0.94); }
  10% { transform: translateY(-2.8%) scale(0.97, 1.05); }
  12.8% { transform: translateY(-4%) scale(0.988, 1.02); }
  15% { transform: translateY(-3.3%) scale(1, 1); }
  17.2% { transform: translateY(-1.1%) scale(1, 1); }
  18% { transform: translateY(0) scale(1.015, 0.975); }
  18.8% { transform: translateY(0) scale(1.03, 0.95); }
  22.4% { transform: translateY(0) scale(0.985, 1.025); }
  26% { transform: translateY(0) scale(1.006, 0.99); }
  31%, 100% { transform: translateY(0) scale(1, 1); }
}

@keyframes splash {
  0%, 100% { transform: rotate(-16deg) scale(1); }
  50% { transform: rotate(-16deg) scale(1.1); }
}

@keyframes pan {
  0%, 100% { transform: scale(1.12) translateX(-2.5%); }
  50% { transform: scale(1.12) translateX(2.5%); }
}

.landing-pan {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  animation: pan 70s ease-in-out infinite;
}

.landing-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 19, 43, 0.5), var(--shade-end));
}

.landing-main {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: var(--main-padding);
}

.landing-brand {
  position: relative;
}

/* The yellow line of the Minecraft title screen: tilted, pulsing in and out. */
.landing-splash {
  position: absolute;
  right: var(--splash-right);
  bottom: var(--splash-bottom);
  font-size: var(--splash-size);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  color: #FFE83D;
  text-shadow: 2px 2px 0 #3F3A00;
  transform: rotate(-16deg);
  animation: splash 1.1s ease-in-out infinite;
  pointer-events: none;
}

.landing-logo {
  display: block;
  transform-origin: 50% 100%;
  animation: hop 5s linear infinite;
}

.landing-logo img {
  display: block;
  width: var(--logo-width);
  filter: drop-shadow(var(--logo-shadow));
}

.landing-title {
  margin: 12px 0 0;
  text-align: center;
  font-size: var(--title-size);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-strong);
}

.landing-subtitle {
  margin: 6px 0 0;
  text-align: center;
  font-family: var(--font-body);
  font-size: var(--subtitle-size);
  font-weight: 700;
  color: var(--text-muted);
}

.landing-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: var(--menu-width);
  margin-top: var(--menu-margin);
  font-size: var(--menu-size);
}

.landing-menu-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.landing-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  margin: 0;
  padding: 0;
  background: var(--surface-button);
  border: 0;
  border-radius: 16px;
  box-shadow: 0 5px 0 var(--button-shadow);
  font: inherit;
  color: var(--text);
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

a.landing-btn:hover,
.landing-btn:hover {
  color: var(--text-strong);
  filter: brightness(1.12);
}

.landing-btn:active {
  transform: translateY(2px);
}

.landing-btn-play {
  gap: 10px;
  height: 54px;
  background: linear-gradient(180deg, var(--gold-top), var(--gold-bottom));
  box-shadow: 0 5px 0 var(--gold-shadow);
  color: var(--gold-text);
}

.landing-btn-play:hover {
  color: var(--gold-text);
  filter: brightness(1.06);
}

.landing-btn-play svg {
  flex: none;
  width: var(--play-icon);
  height: var(--play-icon);
}

/* "Oyna" opens this: the address with its copy button, then version and ports.
   A centred card on wide screens, a sheet rising from the bottom on phones. */
.join {
  width: min(460px, calc(100% - 32px));
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  color: var(--text);
  font-family: var(--font-heading);
  font-weight: 600;
}

.join::backdrop {
  background: rgba(10, 9, 26, 0.66);
  backdrop-filter: blur(7px);
  animation: join-fade 0.28s ease both;
}

.join-card {
  position: relative;
  padding: 30px 26px 26px;
  background: linear-gradient(180deg, #26245A 0%, var(--surface-panel) 70%);
  border: 1px solid var(--line-input);
  border-radius: 26px;
  box-shadow: 0 30px 70px rgba(5, 4, 18, 0.65);
  text-align: center;
}

.join[open] .join-card {
  animation: join-pop 0.5s cubic-bezier(0.22, 1.25, 0.36, 1) both;
}

.join[open] .join-address {
  animation: join-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.join[open] .join-facts {
  animation: join-rise 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both;
}

.join.is-closing .join-card {
  animation: join-out 0.18s ease both;
}

.join.is-closing::backdrop {
  animation: join-fade 0.18s ease reverse both;
}

@keyframes join-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes join-pop {
  from { opacity: 0; transform: translateY(28px) scale(0.93); }
  to { opacity: 1; transform: none; }
}

@keyframes join-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@keyframes join-out {
  to { opacity: 0; transform: translateY(16px) scale(0.97); }
}

@keyframes join-sheet {
  from { transform: translateY(100%); }
  to { transform: none; }
}

@keyframes join-sheet-out {
  to { transform: translateY(100%); }
}

.join-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: var(--radius-control);
  color: var(--text-muted);
  cursor: pointer;
}

.join-close:hover {
  background: var(--surface-band);
  color: var(--text-strong);
}

.join-close svg {
  width: 20px;
  height: 20px;
}

.join-title {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-strong);
}

.join-lead {
  margin: 8px auto 0;
  max-width: 320px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-muted);
}

.join-address {
  margin-top: 22px;
  padding: 18px 16px 16px;
  background: var(--surface-well);
  border: 2px solid var(--line-input);
  border-radius: 20px;
}

.join-label {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
}

.join-address code {
  display: block;
  margin-top: 2px;
  font-family: inherit;
  font-size: var(--join-address-size);
  line-height: 1.2;
  color: var(--text-strong);
  overflow-wrap: anywhere;
}

.join-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 52px;
  margin-top: 14px;
  background: linear-gradient(180deg, #FFD84D, #FFB21F);
  border: 0;
  border-radius: 16px;
  box-shadow: 0 5px 0 #B36B00;
  font-family: inherit;
  font-size: 18px;
  font-weight: 600;
  color: #2A1B00;
  cursor: pointer;
}

.join-copy:hover {
  filter: brightness(1.06);
}

.join-copy:active {
  transform: translateY(2px);
  box-shadow: 0 3px 0 #B36B00;
}

.join-copy svg {
  width: 18px;
  height: 18px;
}

.join-facts {
  margin: 14px 0 0;
  background: var(--surface-well);
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: left;
}

.join-fact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
  padding: 0 18px;
}

.join-fact + .join-fact {
  border-top: 1px solid var(--line);
}

.join-fact dt {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
}

.join-fact dd {
  margin: 0;
  font-size: 17px;
  color: var(--text-strong);
}

.landing-noscript {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 40px;
  margin: 0;
  text-align: center;
  font-size: 16px;
  color: var(--text-strong);
}

.landing-foot {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 14px;
  margin: 0;
  text-align: center;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

@media (max-width: 719.98px) {
  .landing {
    --screen-min-height: 700px;
    --shade-end: rgba(20, 19, 43, 0.9);
    --main-padding: 20px 24px 48px;
    --logo-width: 260px;
    --join-address-size: 26px;
    --splash-size: 17px;
    --splash-right: -30px;
    --splash-bottom: 12px;
    --logo-shadow: 0 10px 18px rgba(8, 7, 24, 0.55);
    --title-size: 22px;
    --subtitle-size: 15px;
    --menu-width: 320px;
    --menu-margin: 22px;
    --menu-size: 18px;
    --play-icon: 14px;
  }

  .landing-pan {
    object-position: 70% 50%;
  }

  .join {
    width: 100%;
    margin: auto 0 0;
  }

  .join-card {
    padding: 28px 18px calc(22px + env(safe-area-inset-bottom));
    border-bottom: 0;
    border-radius: 26px 26px 0 0;
  }

  .join[open] .join-card {
    animation: join-sheet 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .join.is-closing .join-card {
    animation: join-sheet-out 0.2s ease both;
  }
}

@media (prefers-reduced-motion: reduce) {
  .landing-logo,
  .landing-pan,
  .landing-splash {
    animation: none;
  }

  .join::backdrop,
  .join[open] .join-card,
  .join[open] .join-address,
  .join[open] .join-facts,
  .join.is-closing .join-card,
  .join.is-closing::backdrop {
    animation: none;
  }
}
