*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

/* Base: warm / demonic tones only — RS3 green comes from the right pane spill, not the page bg */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: Arial, Helvetica, sans-serif;
  color: #fef5d3;
  background: linear-gradient(
    90deg,
    #0d0402 0%,
    #1a0a00 38%,
    #241008 72%,
    #2a120a 100%
  );
  background-attachment: fixed;
}

.split {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
}

.pane {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  overflow: hidden;
}

/*
  Desktop row: bias toward OSRS (66%) on wide viewports, easing to 50/50 as the
  viewport narrows toward the mobile breakpoint (769px). 1200px = full 66/34 split.
*/
@media (min-width: 769px) {
  .pane--osrs,
  .pane--rs3 {
    transition:
      flex-basis 0.35s ease-out,
      max-width 0.35s ease-out;
  }

  .pane--osrs {
    flex: 0 0
      calc(
        (0.5 + 0.16 * min(1, max(0, (100vw - 769px) / (1200px - 769px)))) * 100vw
      );
    max-width: calc(
      (0.5 + 0.16 * min(1, max(0, (100vw - 769px) / (1200px - 769px)))) * 100vw
    );
  }

  .pane--rs3 {
    flex: 0 0
      calc(
        (0.5 - 0.16 * min(1, max(0, (100vw - 769px) / (1200px - 769px)))) * 100vw
      );
    max-width: calc(
      (0.5 - 0.16 * min(1, max(0, (100vw - 769px) / (1200px - 769px)))) * 100vw
    );
  }
}

/* Join overlay sits above both pane backgrounds (see .split-join) */
.pane--osrs::after {
  display: none;
}

.pane--rs3::before {
  display: none;
}

/*
  Seam cover: centered on the column boundary, above both panes (z-index), so the
  green feather hides the hard edge instead of sitting behind the RS3 pane.
*/
.split-join {
  pointer-events: none;
  z-index: 2;
}

@media (min-width: 769px) {
  .pane {
    z-index: 1;
  }

  .split-join {
    position: absolute;
    top: 0;
    bottom: 0;
    left: calc(
      (0.5 + 0.16 * min(1, max(0, (100vw - 769px) / (1200px - 769px)))) * 100vw
    );
    transform: translateX(-50%);
    width: min(56vw, 720px);
    background: linear-gradient(
      90deg,
      rgba(6, 26, 18, 0) 0%,
      rgba(8, 34, 26, 0.45) 38%,
      rgba(10, 48, 36, 1) 50%,
      rgba(8, 40, 30, 0.85) 62%,
      rgba(6, 26, 18, 0) 100%
    );
  }
}

.pane--osrs {
  background-color: #1a0a00;
  background-image:
    radial-gradient(ellipse 120% 80% at 70% 45%, rgba(255, 80, 20, 0.18), transparent 55%),
    radial-gradient(ellipse 90% 60% at 20% 80%, rgba(139, 0, 0, 0.35), transparent 50%),
    url("../images/BG.png");
  background-repeat: repeat, no-repeat, repeat;
  background-size: auto, auto, auto;
}

.pane--osrs::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.pane--rs3 {
  background-color: #061a12;
  background-image:
    radial-gradient(ellipse 100% 70% at 50% 40%, rgba(46, 213, 160, 0.12), transparent 60%),
    radial-gradient(ellipse 80% 50% at 80% 20%, rgba(0, 212, 255, 0.08), transparent 45%),
    radial-gradient(ellipse 60% 90% at 10% 60%, rgba(16, 120, 72, 0.25), transparent 55%),
    linear-gradient(160deg, rgba(4, 30, 20, 0.92) 0%, rgba(8, 45, 32, 0.75) 50%, rgba(2, 18, 12, 0.95) 100%);
  background-repeat: no-repeat;
}

.pane--rs3::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 70%, rgba(0, 255, 200, 0.06) 0%, transparent 35%),
    radial-gradient(circle at 70% 30%, rgba(180, 255, 200, 0.05) 0%, transparent 40%);
  pointer-events: none;
}

.pane__inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 28rem;
  width: 100%;
}

.pane__logo {
  width: min(264px, 72vw);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 24px rgba(255, 60, 0, 0.35));
}

.pane__art {
  width: min(100%, 380px);
  height: auto;
  object-fit: contain;
  filter:
    drop-shadow(0 0 32px rgba(46, 213, 160, 0.2))
    drop-shadow(0 0 80px rgba(46, 213, 160, 0.12));
  opacity: 0.95;
  mix-blend-mode: screen;
  /* Extra-aggressive feathering to hide visible image boundaries. */
  -webkit-mask-size: 118% 118%;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-image:
    radial-gradient(
      ellipse 54% 64% at 50% 48%,
      rgba(0, 0, 0, 1) 20%,
      rgba(0, 0, 0, 0.85) 34%,
      rgba(0, 0, 0, 0.45) 48%,
      rgba(0, 0, 0, 0.12) 58%,
      rgba(0, 0, 0, 0) 66%
    );
  mask-size: 118% 118%;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-image:
    radial-gradient(
      ellipse 54% 64% at 50% 48%,
      rgba(0, 0, 0, 1) 20%,
      rgba(0, 0, 0, 0.85) 34%,
      rgba(0, 0, 0, 0.45) 48%,
      rgba(0, 0, 0, 0.12) 58%,
      rgba(0, 0, 0, 0) 66%
    );
  margin-bottom: 0.5rem;
}

.pane__title {
  margin: 1rem 0 0;
  font-size: clamp(1.1rem, 2.5vw, 1.45rem);
  font-weight: 700;
  line-height: 1.35;
  color: #fef5d3;
  text-shadow: 0 0 20px rgba(255, 102, 0, 0.25);
}

.pane__title--osrs .pane__subtitle {
  display: block;
  margin-top: 0.35em;
  font-size: 0.92em;
  font-weight: 400;
  color: #ffcc66;
}

.pane__title--rs3 {
  font-family: "Cinzel", "Times New Roman", serif;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e8dcc4;
  text-shadow:
    0 0 20px rgba(0, 220, 200, 0.45),
    0 2px 4px rgba(0, 40, 30, 0.8);
}

.pane__title--rs3 .pane__subtitle {
  display: block;
  margin-top: 0.35em;
  font-size: 0.92em;
  letter-spacing: 0.08em;
  color: #d4c4a8;
}

.coming-soon {
  margin: 1.25rem 0 0;
  font-family: "Cinzel Decorative", "Cinzel", serif;
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #d4c4a8;
  text-shadow:
    0 0 18px rgba(0, 230, 200, 0.55),
    0 0 40px rgba(0, 140, 120, 0.35);
}

.pane__label {
  margin: 1.25rem 0 0.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(254, 245, 211, 0.75);
}

.pane__label--live {
  font-size: 1.1rem;
  color: #ffcc66;
  text-shadow: 0 0 12px rgba(255, 153, 0, 0.5);
}

.countdown {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  width: 100%;
}

.countdown__unit {
  min-width: 4.25rem;
  padding: 0.65rem 0.5rem 0.55rem;
  border-radius: 8px;
  background: rgba(51, 10, 0, 0.35);
  border: 1px solid rgba(204, 51, 0, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.countdown__value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #fef5d3;
  line-height: 1.2;
}

.countdown__name {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(254, 245, 211, 0.7);
}

.cta {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  color: #fef5d3;
  background: rgba(51, 10, 0, 0.35);
  border: 1px solid rgba(204, 51, 0, 0.35);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.cta--osrs:hover {
  background: rgba(78, 16, 0, 0.55);
  border-color: #ff3300;
  box-shadow: 0 0 0 2px rgba(255, 102, 0, 0.35), 0 6px 18px rgba(0, 0, 0, 0.35);
}

.cta--osrs:focus-visible {
  outline: 2px solid #ff6600;
  outline-offset: 3px;
}

.site-disclaimer {
  margin: 0;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  pointer-events: none;
  padding: 0.65rem 1rem 0.75rem;
  text-align: center;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: rgba(254, 245, 211, 0.65);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

@media (max-width: 768px) {
  body {
    background: linear-gradient(
      180deg,
      #0d0402 0%,
      #1a0a00 35%,
      #2a1008 70%,
      #321208 100%
    );
    background-attachment: fixed;
  }

  .split {
    flex-direction: column;
  }

  .pane {
    min-height: auto;
    flex: none;
    z-index: 1;
  }

  .split-join {
    display: none;
  }

  .pane--osrs,
  .pane--rs3 {
    max-width: none;
    width: 100%;
    transition: none;
  }

  .pane--osrs {
    padding-bottom: 2rem;
  }

  .pane--rs3 {
    padding-top: 2rem;
  }

  .site-disclaimer {
    font-size: 0.68rem;
    padding-bottom: 0.9rem;
    background: rgba(0, 0, 0, 0.82);
  }
}
