/* The online multiplayer launch at the top of the home page (templates/_online_launch.html).
   Its own palette, taken from the game: deep sea, lagoon, sand, sun and the logo's flame red, and
   the game's own title lettering (traced from the game's font) for the headline and the buttons. */

@font-face {
  font-family: "BBR Title";
  src: url("../online/Title.ttf") format("truetype");
  font-display: swap;
}

.ol {
  --ol-ink: #0a2540;
  --ol-sea: #0f7fa1;
  --ol-lagoon: #39c6d9;
  --ol-sand: #f3e1b6;
  --ol-sun: #ffd233;
  --ol-flame: #e5432b;
  --ol-game: "BBR Title", "Inter", system-ui, sans-serif;
  position: relative;
  color: #fff;
  background: var(--ol-ink);
  font-family: "Inter", system-ui, sans-serif;
  isolation: isolate;
}

/* ---- the stage: the 10-car grid at sunset, the headline, the three downloads ---------------- */

.ol-stage {
  position: relative;
  display: grid;
  grid-template-rows: 1fr auto;
  min-height: min(92vh, 860px);
  padding: clamp(28px, 5vw, 64px) clamp(16px, 5vw, 72px) clamp(28px, 4vw, 48px);
  overflow: hidden;
}
.ol-photo {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 62%;
}
.ol-stage::before {                       /* the sky darkened behind the words, the sand behind the buttons */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 37, 64, .88) 0%, rgba(10, 37, 64, .62) 38%, rgba(10, 37, 64, 0) 70%),
    linear-gradient(0deg, rgba(10, 37, 64, .92) 0%, rgba(10, 37, 64, 0) 42%);
}

.ol-head { align-self: center; max-width: 40rem; }
.ol-logo {
  display: block;
  width: clamp(200px, 30vw, 430px);
  height: auto;
  margin: 0 0 clamp(8px, 1.5vw, 18px) -2%;
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .35));
  transform-origin: 30% 60%;
  animation: ol-boing .9s cubic-bezier(.2, 1.6, .4, 1) both;
}
@keyframes ol-boing { from { transform: scale(.4); opacity: 0; } }
.ol-stage--guide { min-height: min(78vh, 720px); }
.ol-stage--guide .ol-logo { width: clamp(170px, 22vw, 300px); }
.ol-title {
  margin: 0;
  font-family: var(--ol-game);
  font-weight: 400;
  font-size: clamp(2.2rem, 5.6vw, 4.9rem);
  line-height: .98;
  letter-spacing: .01em;
  color: #fff;
  paint-order: stroke fill;
  -webkit-text-stroke: .14em var(--ol-ink);
  text-shadow: 0 .07em 0 var(--ol-ink);
  text-wrap: balance;
}
.ol-sub {
  max-width: 34rem;
  margin: clamp(14px, 1.6vw, 22px) 0 0;
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, .92);
}

/* the downloads, drawn as the game's own square buttons: green Android, blue Windows, and the
   title screen's round Play for the browser */
.ol-get {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 28px);
  max-width: 980px;
  margin: clamp(24px, 4vw, 40px) 0 0;
  padding: 0;
  list-style: none;
}
.ol-tile {
  position: relative;
  display: grid;
  grid-template-rows: auto auto 1fr;
  justify-items: center;
  gap: 6px;
  height: 100%;
  padding: 0 4px 6px;
  color: #fff;
  text-align: center;
  text-decoration: none;
  border-radius: 18px;
  outline: none;
  transition: transform .12s ease-out;
}
.ol-tile:active { transform: scale(.95); }              /* the game's press: 5% smaller */
.ol-tile:focus-visible { box-shadow: 0 0 0 4px var(--ol-sun); }
.ol-pad {
  display: grid;
  place-items: center;
  width: clamp(116px, 13vw, 168px);
  aspect-ratio: 232 / 200;
  background: center / 100% 100% no-repeat;
  filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .35));
}
.ol-tile--android .ol-pad { background-image: url("../online/button_square_whatsapp.png"); }
.ol-tile--windows .ol-pad { background-image: url("../online/button_square_a.png"); transform: scaleY(-1); }
.ol-tile--windows .ol-pad svg { transform: scaleY(-1); }
.ol-tile--web .ol-pad { width: clamp(150px, 17vw, 214px); aspect-ratio: 300 / 180; background-image: url("../online/button_play.png"); }
.ol-pad svg { width: 46%; height: auto; fill: #fff; filter: drop-shadow(0 3px 0 rgba(10, 37, 64, .85)); }
.ol-pad img { width: 70%; height: auto; }
.ol-tile:hover .ol-pad, .ol-tile:focus-visible .ol-pad { filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .35)) brightness(1.12); }
.ol-name {
  font-family: var(--ol-game);
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1;
  paint-order: stroke fill;
  -webkit-text-stroke: .16em var(--ol-ink);
  text-shadow: 0 .07em 0 var(--ol-ink);
}
.ol-meta { max-width: 15rem; font-size: .88rem; line-height: 1.4; color: rgba(255, 255, 255, .85); }
.ol-alt { margin: 16px 0 0; font-size: .9rem; color: rgba(255, 255, 255, .82); }
.ol-alt + .ol-alt { margin-top: 4px; }
.ol-alt a { font-weight: 700; color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.ol-alt a:hover { color: var(--ol-sun); }
.ol-alt a:focus-visible { outline: 3px solid var(--ol-sun); outline-offset: 2px; border-radius: 3px; }
.ol-yours {
  position: absolute;
  top: -10px;
  right: 6%;
  display: none;
  padding: 4px 10px 5px;
  font-size: .78rem;
  font-weight: 700;
  color: var(--ol-ink);
  background: var(--ol-sun);
  border-radius: 999px;
  transform: rotate(4deg);
  box-shadow: 0 3px 0 rgba(10, 37, 64, .6);
}
.ol-tile.is-yours .ol-yours { display: block; }

/* ---- below the stage: on the sand ------------------------------------------------------------ */

.ol-more {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  grid-template-areas: "shots shots" "help podium" "foot foot";
  gap: clamp(20px, 3vw, 40px) clamp(20px, 4vw, 56px);
  padding: clamp(28px, 4vw, 56px) clamp(16px, 5vw, 72px) clamp(28px, 4vw, 48px);
  color: var(--ol-ink);
  background: var(--ol-sand);
}
.ol-help { grid-area: help; align-self: center; }
.ol-help details { border-bottom: 2px solid rgba(10, 37, 64, .16); }
.ol-help details:first-child { border-top: 2px solid rgba(10, 37, 64, .16); }
.ol-help summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 2px;
  font-size: 1.08rem;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}
.ol-help summary::-webkit-details-marker { display: none; }
.ol-help summary::after {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 3px solid var(--ol-sea);
  border-bottom: 3px solid var(--ol-sea);
  transform: rotate(45deg) translate(-3px, -3px);
  transition: transform .2s ease;
}
.ol-help details[open] summary::after { transform: rotate(225deg) translate(-3px, -3px); }
.ol-help summary:focus-visible { outline: 3px solid var(--ol-sea); outline-offset: 2px; border-radius: 4px; }
.ol-help p { max-width: 36rem; margin: 0 0 18px; font-size: 1rem; line-height: 1.6; }
.ol-guide {
  display: inline-block;
  margin-top: 18px;
  font-weight: 700;
  color: var(--ol-sea);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.ol-guide:hover { color: var(--ol-ink); }
.ol-guide:focus-visible { outline: 3px solid var(--ol-sea); outline-offset: 3px; border-radius: 4px; }

.ol-podium { grid-area: podium; margin: 0; }
.ol-podium img {
  display: block;
  width: 100%;
  height: auto;
  border: 5px solid #fff;
  border-radius: 14px;
  box-shadow: 0 10px 0 rgba(10, 37, 64, .18);
  transform: rotate(-1.2deg);
}
.ol-podium figcaption { margin-top: 14px; font-weight: 600; font-size: .95rem; text-align: right; }

.ol-foot {
  grid-area: foot;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 18px 32px;
  padding-top: clamp(16px, 2vw, 24px);
  border-top: 2px solid rgba(10, 37, 64, .16);
}
.ol-groups { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; font-weight: 600; }
.ol-groups a {
  padding: 9px 16px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  background: var(--ol-sea);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--ol-ink);
}
.ol-groups a:hover { background: #0c6e8c; }
.ol-groups a:focus-visible { outline: 3px solid var(--ol-flame); outline-offset: 2px; }

/* screenshots on the sand, like photos laid down: a hint of the guide's features */
.ol-shots { grid-area: shots; }
.ol-shots ul {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 28px);
  margin: 0;
  padding: 0;
  list-style: none;
}
.ol-shots li a { display: block; color: var(--ol-ink); text-decoration: none; }
.ol-shots img {
  display: block;
  width: 100%;
  height: auto;
  border: 4px solid #fff;
  border-radius: 12px;
  box-shadow: 0 8px 0 rgba(10, 37, 64, .16);
  transform: rotate(-1.5deg);
  transition: transform .15s ease-out;
}
.ol-shots li:nth-child(even) img { transform: rotate(1.2deg); }
.ol-shots a:hover img, .ol-shots a:focus-visible img { transform: rotate(0) scale(1.03); }
.ol-shots span { display: block; margin-top: 12px; font-weight: 700; font-size: 1.02rem; }
.ol-shots li a:focus-visible { outline: 3px solid var(--ol-sea); outline-offset: 6px; border-radius: 8px; }

/* ---- the credit: a band of its own, on the home page and the guide ---------------------------- */

.ol-made {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(20px, 4vw, 56px);
  padding: clamp(32px, 5vw, 60px) clamp(16px, 5vw, 72px);
  font-family: "Inter", system-ui, sans-serif;
  color: #fff;
  background: radial-gradient(circle at 14% 50%, rgba(255, 210, 51, .2), transparent 42%) #0a2540;
  border-top: 6px solid #ffd233;
}
.ol-made-logo { width: clamp(150px, 22vw, 290px); height: auto; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .45)); }
.ol-made .ol-made-title {
  margin: 0 0 10px;
  font-family: "BBR Title", "Inter", system-ui, sans-serif;
  font-weight: 400;
  font-size: clamp(2rem, 4.2vw, 3.2rem);
  line-height: 1;
  letter-spacing: .01em;
  color: #ffd233;
}
.ol-made p { max-width: 40rem; margin: 0; font-size: clamp(1.08rem, 1.6vw, 1.3rem); line-height: 1.5; color: #fff; }
.ol-made .ol-made-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.ol-made-links a {
  padding: 9px 16px;
  font-size: .95rem;
  font-weight: 700;
  color: #0a2540;
  text-decoration: none;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 3px 0 rgba(0, 0, 0, .35);
}
.ol-made-links a:hover { background: #ffd233; }
.ol-made-links a:focus-visible { outline: 3px solid #ffd233; outline-offset: 3px; }

/* ---- phones: the downloads stacked, icon beside the words ------------------------------------- */

@media (max-width: 760px) {
  .ol-stage { min-height: 0; }
  .ol-stage::before {
    background: linear-gradient(180deg, rgba(10, 37, 64, .82) 0%, rgba(10, 37, 64, .7) 45%, rgba(10, 37, 64, .94) 100%);
  }
  .ol-get { grid-template-columns: 1fr; gap: 12px; }
  .ol-tile {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    justify-items: start;
    align-items: center;
    column-gap: 14px;
    padding: 8px 12px 8px 8px;
    text-align: left;
    background: rgba(10, 37, 64, .55);
  }
  .ol-pad { grid-row: span 2; width: 84px; }
  .ol-tile--web .ol-pad { width: 104px; }
  .ol-name { align-self: end; }
  .ol-meta { align-self: start; max-width: none; }
  .ol-yours { top: -9px; right: 10px; }
  .ol-more { grid-template-columns: minmax(0, 1fr); grid-template-areas: "shots" "help" "podium" "foot"; }
  .ol-shots ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 14px; }
  .ol-shots span { margin-top: 8px; font-size: .95rem; }
  .ol-made { grid-template-columns: minmax(0, 1fr); justify-items: start; }
  .ol-podium figcaption { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  .ol-logo { animation: none; }
  .ol-tile, .ol-help summary::after, .ol-shots img { transition: none; }
}
