:root {
  --roast: #2a1c15;
  --oat: #fceeda;
  --honey: #e8b86a;
  --sage: #9bb08f;
  --ink: #3b2a20;
  --hero-img: url("../images/friends.jpeg");
  --card-a: url("../images/cover_smile-boat-boys.jpg");
  --card-b: url("../images/cover_cans.jpg");
  --card-c: url("../images/cover_smile.jpeg");
  --overlay: url("../images/background-light.jpg");
}

@font-face {
  font-family: "LuckiestGuy";
  src: url("../fonts/LuckiestGuy-Regular.woff");
}

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

:root {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--roast);
  color: var(--oat);
  font-family: "Karla", system-ui, sans-serif;
  line-height: 1.6;
}

/* ---------- Keyframes ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}

@keyframes chIn {
  from { opacity: 0; transform: translateY(.5em) scale(.9); filter: blur(8px); }
  to   { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes chFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-.045em); }
}

@keyframes chGlow {
  0%, 100% { text-shadow: 0 4px 30px rgba(0, 0, 0, .35); }
  50%      { text-shadow: 0 4px 30px rgba(0, 0, 0, .25), 0 0 .35em rgba(232, 184, 106, .7); }
}

@keyframes slideIn {
  to { transform: none; opacity: 1; }
} 

/* ---------- Background photo + gradient ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: var(--hero-img) center / cover no-repeat;
}

.tint {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(42, 28, 21, .8) 0%, rgba(42, 28, 21, .25) 40%, rgba(42, 28, 21, .6) 100%),
    radial-gradient(ellipse at 50% 45%, rgba(232, 184, 106, .18), transparent 60%);
}

/* ---------- Top bar with the two buttons ---------- */
.bar {
  position: fixed;
  top: env(safe-area-inset-top, 0px);
  right: 0;
  padding: 18px clamp(16px, 4vw, 40px);
  display: flex;
  gap: 10px;
  z-index: 5;
}

.btn {
  font: 700 .95rem "Karla", sans-serif;
  padding: 10px 22px;
  border-radius: 999px;
  text-decoration: none;
  transition: background .25s, transform .25s, color .25s;
  border: 1.5px solid var(--oat);
  color: var(--oat);
}

.btn:hover {
  background: rgba(246, 236, 221, .15);
}

.btn.primary {
  background: var(--honey);
  border-color: var(--honey);
  color: var(--roast);
}

.btn.secondary {
  background: var(--roast);
  border-color: var(--roast);
  color: var(--honey);
}

.btn.primary:hover, .btn.secondary:hover {
  /* background: #f0c985; */
  transform: translateY(-2px);
}

.btn:focus-visible,
.rules a:focus-visible,
.rules button:focus-visible {
  outline: 3px solid var(--sage);
  outline-offset: 3px;
}

/* ---------- Hero: logo + slogan ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-content: center;
  align-content: end;
  text-align: center;
  padding: 24px;
  padding-bottom: 13em;
}

.hero {
  transition: opacity .7s ease;
}

.hero.faded {
  opacity: 0;
}

.logo {
  font-family: "LuckiestGuy", "Arial Black", Arial, sans-serif;
  font-size: clamp(2.8rem, 9vw, 6.5rem);
  letter-spacing: 0.05em;
  line-height: 1;
  text-shadow: 0 4px 30px rgba(0, 0, 0, .35);
  -webkit-text-stroke: 0.1em rgba(42, 28, 21, .45);
  paint-order: stroke fill;
  color: var(--oat);
}

.slogan {
  font-weight: 500;
  font-size: clamp(1.1rem, 2.8vw, 1.7rem);
  color: #f3dcb4;
  animation: rise 1.2s 1s cubic-bezier(.2, .7, .2, 1) both;
}

/* Scroll indicator: arrow in a circle */
.scroll-hint {
  display: grid;
  place-items: center;
  justify-self: center;
  width: 44px;
  height: 44px;
  margin-top: 60px;
  border-radius: 50%;
  border: 1.5px solid rgba(246, 236, 221, .55);
  background: rgba(42, 28, 21, .2);
  color: var(--oat);
  text-decoration: none;
  animation:
    hintIn 1s 2.2s ease both,
    hintBob 2.6s ease-in-out 3.2s infinite;
  transition: background .25s, border-color .25s;
}

.scroll-hint:hover {
  background: rgba(246, 236, 221, .15);
  border-color: var(--oat);
}

.scroll-hint:focus-visible {
  outline: 3px solid var(--sage);
  outline-offset: 4px;
}

@keyframes hintIn {
  from { opacity: 0; }
  to   { opacity: .85; }
}

@keyframes hintBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(6px); }
}

/* ---------- Boxes ---------- */
.about {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12vh clamp(16px, 4vw, 40px) 14vh;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.box {
  background: var(--oat);
  color: var(--ink);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(20, 10, 5, .4);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1), box-shadow .3s;
}

.box.in {
  opacity: 1;
  transform: none;
}

.box:nth-child(2) { transition-delay: .15s; }
.box:nth-child(3) { transition-delay: .3s; }

.box:hover {
  box-shadow: 0 24px 60px rgba(20, 10, 5, .5);
}

/* Box images: faded film look + vignette */
.box .pic {
  position: relative;
  aspect-ratio: 400 / 260;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: sepia(.2) contrast(.92) brightness(1.04);
}

.box .pic::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0) 55%, rgba(42, 28, 21, .5) 100%),
    rgba(190, 140, 90, .15);
}

.box:nth-child(1) .pic { background-image: var(--card-a); }
.box:nth-child(2) .pic { background-image: var(--card-b); }
.box:nth-child(3) .pic { background-image: var(--card-c); }

.box .txt {
  padding: 26px 26px 32px;
  hyphens: auto;
}

.box h2 {
  font-family: "LuckiestGuy", "Arial Black", Arial, sans-serif;
  font-size: 1.5rem;
  line-height: 1.2;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}

.box p {
  font-size: 1.02rem;
}

/* Wide box: spans all columns, image beside the text */
.box.wide {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: stretch;
  transition-delay: 0s;
  text-align: center;
}

.box.wide .pic {
  flex: 0 0 40%;
  aspect-ratio: auto;
  min-height: 240px;
  background-image: url("your-photo.jpg");
}

.box.wide .txt {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 32px 36px;
  text-align: center;
}

.box.wide p {
  max-width: 100%;
}

@media (max-width: 700px) {
  .box.wide {
    flex-direction: column;
  }

  .box.wide .pic {
    flex: none;
    aspect-ratio: 400 / 260;
    min-height: 0;
  }
}

/* ---------- Footer ---------- */
footer {
  text-align: center;
  padding: 0 20px 48px;
  font-size: .9rem;
  color: #e6d3b6;
}

.margin-top {
  margin-top: 1em;
}

.link {
  color: var(--roast);
}

.link-no-color {
  color: rgb(230, 211, 182);
  text-decoration: none;
}

@media (max-width: 908px) {
  .about {
    grid-template-columns: 1fr;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .bg,
  .slogan,
  .logo .ch,
  .scroll-hint {
    animation: none;
  }

  .box {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .rules {
    animation: none;
    transform: none;
    opacity: 1;
  }

  html {
    scroll-behavior: auto;
  }
}