/************
** Tail Slap Games presents DamNation (c) 2026;
** Website Development by Connie ‘Sunfire’ Hill;
************/

/** Variables **/
:root {
  --primary: #56310f;
  --accent: #4e420c;
  --bg: #e0be9d;
  --text: #232018;

  --radius: 8px;

  --slide-count: 5;
  --slide-width: 450px;
  --carousel-edge-pos: calc( 0% - ((var(--slide-width) * var(--slide-count)) - 100%) );
}

* {
  box-sizing: border-box;
  margin: 0;
  font-family: system-ui, sans-serif;
}

body {
  background: url(images/background.png) fixed center;
  background-size: cover;
  color: var(--text);
  font-sizze:16px;
}
a { color: var(--accent); }
h1, h2 { margin-bottom:1em; }

.container {
  padding: 1.5rem;
  width:90%;
  max-width: 600px;
  margin: auto;
  background: var(--bg);
  border-radius: var(--radius);
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 0.8s ease forwards;
  animation-timeline: view();
  animation-range: entry 0% cover 30%;
}

header {
  background: rgba(0,0,0,0.7);
  position: sticky;
  top: 0;
  z-index:7;

  .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background:transparent;
    color:white;
  }
}

section { margin-bottom: 20vh; }

.hero {
  text-align: center;
  padding: 3rem 1rem;
  height:75vh;

  img {
    max-width:85%;
    margin: 1em auto;
    border-radius: var(--radius); 
  }
}

.btn {
  display: inline-block;
  margin-top: 1rem;
  background: var(--primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  width: max-content;
  border: none;
  text-decoration:none;
  &:hover, &:focus {
    background: var(--accent);
  }
}


.grid { display: grid; gap: 1.5rem; }
.flex { display: flex; gap: 1.6rem; flex-wrap:wrap; }
.card {
  background: rgba(255,255,255,0.4);
  color: var(--accent);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.carousel-section {
  padding: 0 30px;
  overflow: hidden;
}
.carousel {
  display: flex;
  align-items: stretch;
  gap: 12px;
  -webkit-overflow-scrolling: touch;
  -webkit-animation: scroll 40s linear alternate infinite;
          animation: scroll 40s linear alternate infinite;
  -webkit-animation-play-state: running;
          animation-play-state: running;

  &:hover {
    -webkit-animation-play-state: paused;
            animation-play-state: paused;
  }

  figure {
    margin: 0;
    transition: transform 0.35s ease-in-out, box-shadow 0.35s ease-in-out;

    &:hover {
      transform: scale(1.05);
      box-shadow: 0 3px 11px 6px rgba(0, 0, 0, 0.2);
    }
  }

  img {
    display: inline-block;
    margin: 0;
    padding: 0;
    width: var(--slide-width);
    height: 100%;
  }    
}

#devlog-container .card .meta {padding: 0.8em 0; font-size: 0.8em; font-style:italic;}

.cta {text-align:center;}

footer { color:white; text-align:center; padding-bottom:1em; }



/** Animations **/
@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(var(--carousel-edge-pos));
  }
}


/** Desktop enhancement **/
@media(min-width: 768px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .flex .card { width:100%; }
  .container { max-width: 900px; }
}