@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap');

:root {
  --color-sky-blue: #4DB8E8;
  --color-saddle-brown: #8B4513;
  --color-gold: #FFD700;
  --color-overlay-blue: rgba(135, 206, 235, 0.3);
  --color-overlay-green: rgba(46, 139, 87, 0.2);
  --color-text: #FFFFFF;
  --color-text-shadow: rgba(0, 0, 0, 0.8);

  --font-heading: 'Press Start 2P', cursive;
  --font-body: 'VT323', monospace;
}

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

body {
  background-color: var(--color-sky-blue);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 20px;
  overflow-x: hidden;
  image-rendering: pixelated;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  text-transform: uppercase;
  text-shadow: 4px 4px 0px var(--color-text-shadow);
  line-height: 1.5;
  margin-bottom: 20px;
}

h1 {
  font-size: 3.5rem;
  color: white;
  text-decoration: underline;
  text-decoration-color: var(--color-gold);
  text-decoration-thickness: 6px;
  text-underline-offset: 10px;
  animation: pulse 3s infinite ease-in-out;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.02);
  }
}

p {
  text-shadow: 2px 2px 0px var(--color-text-shadow);
  margin-bottom: 15px;
}

/* Utilities */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-block;
  background: url('assets/button_rectangle_depth_gradient.png') no-repeat center center;
  background-size: 100% 100%;
  color: var(--color-saddle-brown);
  font-family: var(--font-heading);
  text-decoration: none;
  padding: 25px 50px;
  font-size: 1.5rem;
  text-shadow: none;
  cursor: pointer;
  transition: all 0.1s;
  border: none;
  text-align: center;
  position: relative;
  top: 0;
}

.btn:hover {
  filter: brightness(1.1);
  transform: scale(1.05);
}

.btn:active {
  top: 4px;
  /* Press effect */
  transform: scale(1);
}

/* Legal Pages Styling */
.back-link {
  display: inline-block;
  margin: 40px 0 20px;
  /* More space from top */
  color: var(--color-gold);
  font-family: var(--font-heading);
  text-decoration: none;
  font-size: 1rem;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
}

.back-link:hover {
  color: white;
  text-decoration: underline;
}

.legal-content {
  background: rgba(0, 0, 0, 0.2);
  /* Slight background for readability */
  padding: 40px;
  border-radius: 15px;
  margin-bottom: 60px;
  border: 4px solid rgba(255, 255, 255, 0.1);
}

.legal-content h1 {
  font-size: 2.5rem;
  margin-bottom: 40px;
  text-align: center;
  border-bottom: 4px dashed var(--color-gold);
  padding-bottom: 20px;
}

.legal-content h2 {
  font-size: 1.8rem;
  color: var(--color-gold);
  margin-top: 40px;
  margin-bottom: 20px;
}

.legal-content h3 {
  font-size: 1.4rem;
  margin-top: 30px;
  margin-bottom: 15px;
}

.legal-content p {
  line-height: 1.6;
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.legal-content ul {
  margin-left: 40px;
  margin-bottom: 20px;
}

.legal-content li {
  margin-bottom: 10px;
}

.legal-content a {
  color: inherit;
  text-decoration: none;
  font-family: var(--font-body);
  font-weight: normal;
}

.legal-content a:hover,
.legal-content a:focus {
  text-decoration: underline;
}

/* Hero Section - The Open Ocean */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 20px;
  overflow: hidden;

  /* Animated Water Background */
  background-image: url('assets/water_tile.png');
  background-repeat: repeat;
  animation: waterScroll 60s linear infinite;
}

@keyframes waterScroll {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 100% 100%;
  }
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-overlay-blue);
  z-index: 0;
  pointer-events: none;
}

/* Floating Clouds */
.cloud {
  position: absolute;
  background-image: url('assets/cloud.png');
  background-size: contain;
  background-repeat: no-repeat;
  opacity: 0.9;
  z-index: 1;
  pointer-events: none;
}

.cloud.one {
  width: 200px;
  height: 100px;
  top: 10%;
  left: -200px;
  animation: floatCloud 40s linear infinite;
}

.cloud.two {
  width: 150px;
  height: 75px;
  top: 25%;
  left: -150px;
  animation: floatCloud 55s linear infinite 10s;
}

.cloud.three {
  width: 250px;
  height: 125px;
  top: 5%;
  left: -250px;
  animation: floatCloud 70s linear infinite 5s;
}

@keyframes floatCloud {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(120vw);
  }
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  width: 100%;
}

.hero-subtitle {
  font-size: 1.5rem;
  color: var(--color-gold);
  margin-bottom: 40px;
  letter-spacing: 2px;
}

/* Bobbing Raft */
.raft-display {
  position: relative;
  width: 400px;
  height: 200px;
  margin: 20px auto 60px;
  animation: bobbing 3s ease-in-out infinite;
  max-width: 100%;
}

@keyframes bobbing {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-15px) rotate(1deg);
  }
}

.raft-base {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 20px 0 rgba(0, 0, 0, 0.3));
  /* Shadow on water */
}

.raft-animal {
  position: absolute;
  width: 70px;
  height: 70px;
  top: -30px;
  transform-origin: bottom center;
}

.raft-animal:nth-child(2) {
  left: 10%;
  animation: animalIdle 2s infinite;
}

.raft-animal:nth-child(3) {
  left: 50%;
  transform: translateX(-50%);
  animation: animalIdle 2.5s infinite 0.5s;
}

.raft-animal:nth-child(4) {
  right: 10%;
  animation: animalIdle 2.2s infinite 1s;
}

@keyframes animalIdle {

  0%,
  100% {
    transform: scaleY(1);
  }

  50% {
    transform: scaleY(0.95) translateY(2px);
  }
}

/* Shoreline Transition */
.shore-divider {
  width: 100%;
  height: 64px;
  background-image: url('assets/shore1.png');
  background-repeat: repeat-x;
  background-size: auto 100%;
  position: relative;
  z-index: 5;
  margin-top: -32px;
  /* Overlap with hero */
}

/* Features Section - The Land */
.features {
  padding: 60px 0 100px;
  background-image: url('assets/grass_tile.png');
  background-repeat: repeat;
  background-color: #7CFC00;
  position: relative;
  overflow: hidden;
}

/* Flowing Grass Animation */
.features::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('assets/grass_tile_2.png');
  background-repeat: repeat;
  opacity: 0.3;
  animation: grassFlow 20s linear infinite;
  pointer-events: none;
}

@keyframes grassFlow {
  from {
    background-position: 0 0;
  }

  to {
    background-position: 100px 100px;
  }
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 40px;
  margin-top: 50px;
  position: relative;
  z-index: 2;
}

.feature-card {
  background: url('assets/button_rectangle_line.png');
  /* Wood texture feel */
  background-size: 100% 100%;
  padding: 40px 30px;
  text-align: center;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
}

.feature-card:hover {
  transform: translateY(-15px) scale(1.02);
}

.feature-card h3 {
  color: var(--color-saddle-brown);
  text-shadow: none;
  font-size: 1.4rem;
  margin-top: 20px;
  margin-bottom: 15px;
}

.feature-card p {
  color: #5d2e0c;
  text-shadow: none;
  font-family: var(--font-body);
  font-size: 1.3rem;
  line-height: 1.4;
  font-weight: bold;
}

.feature-icon {
  width: 100px;
  height: 100px;
  object-fit: contain;
  filter: drop-shadow(5px 5px 0 rgba(0, 0, 0, 0.2));
  transition: transform 0.3s;
}

.feature-card:hover .feature-icon {
  transform: scale(1.2) rotate(5deg);
}

/* Footer Redesign */
footer {
  background-color: #3e2723;
  /* Darker ground color */
  padding: 80px 0 40px;
  text-align: center;
  position: relative;
  border-top: none;
}

/* Footer Top Border (Ground/Shore) */
footer::before {
  content: '';
  position: absolute;
  top: -32px;
  left: 0;
  right: 0;
  height: 32px;
  background-image: url('assets/shore2.png');
  /* Or ground_grey tinted */
  background-repeat: repeat-x;
  background-size: auto 100%;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.footer-links {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer-links a {
  color: var(--color-gold);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 1rem;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
  padding: 10px 20px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border: 2px solid #5d4037;
  transition: all 0.2s;
}

.footer-links a:hover {
  color: white;
  background: rgba(0, 0, 0, 0.5);
  transform: translateY(-3px);
  border-color: var(--color-gold);
}

.copyright {
  color: #a1887f;
  font-size: 0.9rem;
  margin-top: 20px;
}

/* Responsive Mobile Fixes */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
    text-decoration-thickness: 4px;
    text-underline-offset: 5px;
  }

  .hero {
    padding: 80px 20px;
    min-height: auto;
    /* Allow content to dictate height on mobile */
  }

  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 30px;
  }

  .raft-display {
    width: 280px;
    height: 140px;
    margin-bottom: 40px;
  }

  .raft-animal {
    width: 50px;
    height: 50px;
    top: -20px;
  }

  .btn {
    padding: 20px 40px;
    font-size: 1.2rem;
  }

  .cloud {
    display: none;
    /* Hide clouds on mobile for performance/clutter */
  }

  .features-grid {
    grid-template-columns: 1fr;
    /* Stack cards */
    gap: 30px;
  }

  .feature-card {
    padding: 30px 20px;
  }

  .footer-links {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  .footer-links a {
    width: 100%;
    display: block;
  }

  .legal-content {
    padding: 20px;
  }

  .legal-content h1 {
    font-size: 1.8rem;
  }
}
