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

body {
  background: #f7d992;
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: url('images/content/spoonmouse.png') 0 0, auto;
}


/* ── GOOGLE FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,600;1,400&family=DM+Sans:wght@300;400;500&display=swap');

/* ── HEADER ── */
header {
  text-align: center;
  padding: 3rem 2rem 1.5rem;
}

.eyebrow {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: #C8965A;
  margin-bottom: 0.5rem;
}

h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  color: #3B2A1A;
  line-height: 1.1;
}

h1 em {
  font-style: italic;
  color: #D4817A;
}

.subtitle {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: #7A6858;
  font-weight: 300;
  letter-spacing: 0.05em;
}

/* ── TRAY SECTION ── */
.tray-section {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 2rem 1rem 3rem;
}

.tray-wrapper {
  position: relative;
  width: min(820px, 95vw);
}

.tray-img {
  width: 100%;
  display: block;
  /* if you don't have a tray PNG, remove this and 
     the CSS tray below will draw it instead */
}

/* ── MACAROON GRID overlaid on tray ── */
.macaroon-grid {
  position: absolute;
  /* adjust these values to position macaroons 
     correctly over your tray image */
  top: 28%;
  left: 10%;
  right: 10%;
  bottom: 20%;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
}

/* ── FALLBACK: if no tray image, draws a CSS tray ── */
.tray-wrapper.no-image {
  background: #C8C8C8;
  border-radius: 18px;
  padding: 3rem 2rem;
  box-shadow: inset 0 2px 12px rgba(0,0,0,0.15), 0 4px 20px rgba(0,0,0,0.1);
}

.tray-wrapper.no-image .macaroon-grid {
  position: relative;
  top: auto; left: auto; right: auto; bottom: auto;
}

/* ── MACAROON ITEM ── */
.macaroon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.macaroon-img {
  width: clamp(100px, 15vw, 160px);
  height: clamp(100px, 15vw, 160px);
  object-fit: contain;
  transition: transform 0.15s ease, filter 0.15s ease;
  user-select: none;
  -webkit-user-drag: none;
}

.macaroon-item:hover .macaroon-img {
  transform: scale(1.07) translateY(-4px);
  filter: drop-shadow(0 8px 16px rgba(60,30,10,0.2));
}

.macaroon-item:active .macaroon-img {
  transform: scale(0.95);
}

/* ── PROGRESS DOTS ── */
.progress-dots {
  display: flex;
  gap: 5px;
}

.progress-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: transparent;
  border: 1.5px solid #C8965A;
  transition: background 0.25s;
}

.progress-dots span.filled {
  background: #C8965A;
}

/* ── MACAROON LABEL ── */
.macaroon-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7A6858;
}

/* ── LOGO STAMP ── */
.logo-stamp {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 180px;
  height: 180px;
  object-fit: contain;
  animation: spin 12s linear infinite;
  z-index: 50;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── PAGE TRANSITION VEIL ── */
#transition-veil {
  position: fixed;
  inset: 0;
  background: #3B2A1A;
  opacity: 0;
  pointer-events: none;
  z-index: 9000;
  transition: opacity 0.5s ease;
}

#transition-veil.active {
  opacity: 1;
  pointer-events: all;
}

/* ── INTERACTIVITIES PAGE ── */
.interactivities-page {
  background: #f7d992;
  overflow: hidden;
  height: 100vh;
  width: 100vw;
  margin: 0;
  padding: 0;
}

.home-btn {
  position: fixed;
  top: 1.5rem;
  left: 1.5rem;
  z-index: 1000;
  width: 80px;
  transition: transform 0.2s;
}

.home-btn:hover {
  transform: scale(1.05);
}

.home-btn img {
  width: 100%;
}

/* ── TABLE ── */
.table-bg {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.table-img {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 85%;
  object-fit: cover;
  z-index: 0;
}

.string-img {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30%;
  z-index: 1;
  pointer-events: none;
}

/* ── CARD STACK ── */
.card-stack {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 500px;
  height: 360px;
  z-index: 2;
}

/* ── RECIPE CARD ── */
.recipe-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 500px;
  cursor: grab;
  transform: translate(var(--tx), var(--ty)) rotate(var(--rot));
  transition: box-shadow 0.2s, transform 0.1s;
  border-radius: 6px;
  user-select: none;
}

.recipe-card img {
  width: 100%;
  display: block;
  border-radius: 6px;
  pointer-events: none;
  -webkit-user-drag: none;
}

.recipe-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.recipe-card.dragging {
  cursor: grabbing;
  box-shadow: 0 20px 60px rgba(0,0,0,0.35);
  transition: box-shadow 0.2s;
}

/* ── DRAG HINT ── */
.drag-hint {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #7A6858;
  z-index: 1000;
  pointer-events: none;
}

/* ── EXPERIMENTS PAGE ── */
.experiments-page {
  background: #f7d992;
  min-height: 100vh;
  overflow: hidden;
}

.experiments-wrap {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 0;
}

/* ── TABLE BG ── */
.table-bg-exp {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.table-img-exp {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 80%;
  object-fit: cover;
}

/* ── BOOK AREA ── */
.book-area {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-left: 0;
  height: 100vh;
}

/* ── BOOK PAGE ── */
.book-page {
  position: relative;
  width: clamp(300px, 42vw, 560px);
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.18));
  height: 100vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 0%;
}

.book-page .page-img {
  width: 80%;
  height: 80%;
  object-fit: fill;
}

/* ── NEXT BUTTON ── */
.next-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: clamp(25px, 3vw, 40px);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

.next-btn:hover {
  transform: scale(1.15) translateX(4px);
}

.next-btn:active {
  transform: scale(0.95);
}

.next-btn img {
  width: 100%;
  display: block;
}

/* ── PROCESS PAGE ── */
.process-page {
  background: #f7d992;
  min-height: 100vh;
}

.process-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 3rem 4rem;
  height: 100vh;
  display: flex;
  align-items: center;
}

/* ── CARDS GRID ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  width: 100%;
}

@media (max-width: 768px) {
  .cards-grid {
    grid-template-columns: 1fr;
    max-width: 380px;
    margin: 0 auto;
  }
}

/* ── FLIP CARD ── */
.flip-card {
  perspective: 1200px;
  cursor: pointer;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  padding-bottom: 120%;
  transition: transform 0.65s ease;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 8px;
  overflow: hidden;
}

.flip-card-front img,
.flip-card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.flip-card-back {
  transform: rotateY(180deg);
}

.process-page {
  background: #f7d992;
  min-height: 100vh;
  display: block;
}

.process-page .process-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 3rem 3rem 4rem;
  height: 100vh;
  display: flex;
  align-items: center;
  width: 100%;
}

.process-page .cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  width: 100%;
}

/* ── GLOSSARY PAGE ── */
.glossary-page {
  background: #f7d992;
  min-height: 100vh;
  display: block;
}

.glossary-main {
  padding: 5rem 2.5rem 4rem;
  max-width: 1300px;
  margin: 0 auto;
  width: 100%;
}

/* ── GLOSSARY GRID ── */
.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

/* ── GLOSSARY CARD ── */
.glossary-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: var(--accent);
}

.card-front {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 1.2rem;
  background: var(--accent);
  opacity: 0.85;
  transition: opacity 0.3s ease;
  text-align: center;
}

.card-category {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color:#f7d992;
  opacity: 0.8;
}

.card-title {
  font-family: "Leckerli One", serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.2;
}

/* ── REVEAL ON HOVER ── */
.card-reveal {
  position: absolute;
  inset: 0;
  background: #3B2A1A;
  color: #f7d992;
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.8rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card-reveal p {
  font-size: 0.78rem;
  line-height: 1.6;
  color: #ffffff;
}

.card-reveal a {
  font-size: 0.72rem;
  color: #C8965A;
  text-decoration: none;
  letter-spacing: 0.05em;
}

.card-reveal a:hover {
  text-decoration: underline;
}

.glossary-card:hover .card-front {
  opacity: 0;
}

.glossary-card:hover .card-reveal {
  opacity: 1;
}