* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: sans-serif;
  background: #1f3d2b;
  color: #e9f0e4;
  line-height: 1.6;
}

a {
  color: #a9d9b0;
}

/* on a phone held upright, rotate the whole page 90deg so it renders
   like landscape — forces you to turn the phone sideways to view it normally.
   the rotation lives on #stage (fixed to the true viewport) rather than
   html/body: a transformed ancestor becomes the containing block for any
   position:fixed descendant, which would otherwise make the ground/tiger/
   antenna/balls scroll away with the page instead of staying pinned.
   #scroll-area is the one part inside #stage allowed to scroll internally. */
@media (max-width: 768px) and (orientation: portrait) {
  #stage {
    position: fixed;
    top: 0;
    left: 100%;
    width: 100vh;
    height: 100vw;
    overflow: hidden;
    transform-origin: top left;
    transform: rotate(90deg);
  }

  #scroll-area {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.grid-room {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  perspective: 320px;
  perspective-origin: 50% 50%;
}

.grid-face {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 220vmax;
  height: 220vmax;
  margin-top: -110vmax;
  margin-left: -110vmax;
  background-image:
    repeating-linear-gradient(to right, rgba(169, 217, 176, 0.3) 0 1px, transparent 1px 110px),
    repeating-linear-gradient(to bottom, rgba(169, 217, 176, 0.3) 0 1px, transparent 1px 110px);
}

.grid-top {
  transform: rotateX(90deg) translateZ(110vmax);
}

.grid-bottom {
  transform: rotateX(-90deg) translateZ(110vmax);
}

.grid-left {
  transform: rotateY(-90deg) translateZ(110vmax);
}

.grid-right {
  transform: rotateY(90deg) translateZ(110vmax);
}

main {
  max-width: 40rem;
  padding: 3rem 1.5rem;
}

p {
  margin-bottom: 1.25rem;
}

h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

nav a {
  display: inline-block;
  padding: 0.45rem 0.9rem;
  font-family: Tahoma, "MS Sans Serif", Geneva, sans-serif;
  font-weight: bold;
  font-size: 0.8rem;
  text-decoration: none;
  color: #000080;
  background: #c0c0c0;
  border: 3px solid;
  border-color: #ffffff #404040 #404040 #ffffff;
  box-shadow:
    inset 1px 1px 0 #dfdfdf,
    inset -1px -1px 0 #808080;
}

nav a:visited {
  color: #000080;
}

nav a:hover {
  background: #d4d0c8;
}

nav a:active {
  border-color: #404040 #ffffff #ffffff #404040;
  box-shadow: inset 1px 1px 0 #808080;
  padding: 0.5rem 0.85rem 0.4rem 0.95rem;
}

nav a:focus-visible {
  outline: 2px dotted #000080;
  outline-offset: 2px;
}

#stage > a:has(img) {
  position: fixed;
  bottom: 36px;
  right: 1rem;
  width: 190px;
  z-index: 0;
}

@media (max-width: 768px) {
  #stage > a:has(img) {
    right: auto;
    left: 6rem;
  }
}

#stage > a:has(img) img {
  width: 100%;
  display: block;
}

.tiger-center {
  position: fixed;
  bottom: calc(1rem + 25px);
  left: 1rem;
  width: 70px;
  z-index: 0;
}

.firepit-right {
  position: fixed;
  top: 50%;
  right: 2rem;
  transform: translateY(-50%) rotate(-90deg);
  z-index: 1;
}

.floaties {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.floaty {
  position: absolute;
  animation: float ease-in-out infinite;
}

.floaty-ads-link {
  pointer-events: auto;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}

.floaty-bee {
  top: 10%;
  right: 8%;
  width: 220px;
  animation-duration: 4s;
}

.floaty-firepit {
  top: 42%;
  right: 6%;
  width: 90px;
  animation-duration: 5.5s;
  animation-delay: 0.6s;
}

.floaty-tiger {
  bottom: 14%;
  right: 20%;
  width: 100px;
  animation-duration: 6.5s;
  animation-delay: 1.2s;
}

.floaty-ads {
  top: 6%;
  right: 28%;
  width: 110px;
  animation-duration: 3.5s;
  animation-delay: 0.3s;
}

@media (max-width: 600px) {
  .floaty-ads-link {
    display: none;
  }
}

.ground {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background-image: url(imgs/footer.png);
  background-repeat: repeat-x;
  background-position: bottom left;
  background-size: auto 60px;
  image-rendering: pixelated;
  pointer-events: none;
}

.shape {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: Tahoma, "MS Sans Serif", Geneva, sans-serif;
  font-weight: bold;
  font-size: 0.7rem;
  line-height: 1.1;
  text-decoration: none;
  color: #1f3d2b;
  padding: 0.4rem;
  will-change: transform;
  cursor: grab;
  user-select: none;
}

.shape:hover {
  filter: brightness(1.1);
}

.shape-dragging {
  cursor: grabbing;
  filter: brightness(1.2);
}

.shape:focus-visible {
  outline: 2px dotted #e9f0e4;
  outline-offset: 2px;
}

.shape-circle {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: #a9d9b0;
}
