/* xmas.css — shared look for nadalsfg.cat (index, menu, seating, venue, faq) */

:root {
  --green: #146b3a;
  --green-dark: #0b3d20;
  --red: #d42426;
  --red-dark: #9e1a1c;
  --ink: #111;
  --gold: #f8c73e;
  --cream: #fff8e7;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--green); }
body {
  font-family: "Fredoka", "Trebuchet MS", system-ui, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* 10% green border all round (percentage padding is relative to width,
   so it's the same thickness on every side), 80% red centre panel. */
.frame {
  position: relative;
  padding: 10%;
  min-height: 100vh;
}
.lights {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.panel {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 20vw);
  background: var(--red);
  border-radius: clamp(10px, 2vw, 24px);
  box-shadow: 0 0 0 4px var(--red-dark), 0 12px 40px rgba(0,0,0,.35);
  padding: clamp(1.25rem, 4vw, 3rem) clamp(1rem, 4vw, 3rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 3vw, 2rem);
  text-align: center;
}
/* Inner pages start at the top rather than centring */
.panel.page { justify-content: flex-start; }

.holly { width: clamp(90px, 22vw, 180px); height: auto; }
.holly.small { width: clamp(70px, 14vw, 120px); }

.greeting { display: grid; gap: clamp(.9rem, 2.5vw, 1.6rem); }
.greeting .lang { display: grid; gap: .25rem; }
.greeting .title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.35rem, 4.6vw, 2.7rem);
  line-height: 1.15;
}
.greeting .sub {
  margin: 0;
  font-weight: 500;
  font-size: clamp(1rem, 2.8vw, 1.5rem);
}
.divider {
  width: 3.5rem;
  height: 4px;
  margin: 0 auto;
  border-radius: 2px;
  background: var(--gold);
  opacity: .9;
}

/* Page headings on the inner pages */
.page-title {
  margin: 0;
  font-weight: 700;
  font-size: clamp(1.6rem, 5vw, 2.8rem);
  line-height: 1.1;
}
.page-sub {
  margin: .3rem 0 0;
  font-weight: 500;
  font-size: clamp(.95rem, 2.4vw, 1.25rem);
}

/* Back-home button */
.back {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--gold);
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(.9rem, 2.2vw, 1.05rem);
  padding: .5rem 1rem;
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--red-dark);
  transition: transform .12s;
}
.back:hover { transform: translateY(-2px); }
.back:focus-visible { outline: 3px solid var(--cream); outline-offset: 3px; }

/* Presents */
.presents {
  display: flex;
  gap: clamp(1.25rem, 6vw, 3.5rem);
  align-items: flex-end;
  justify-content: center;
  flex-wrap: wrap;
}
.present { width: clamp(70px, 16vw, 130px); height: auto; transform-origin: 50% 100%; }
.present.one { animation: wiggle 3.2s ease-in-out infinite; }
.present.two { width: clamp(56px, 12vw, 100px); animation: wiggle 3.2s ease-in-out 1.1s infinite; }
.present.three { width: clamp(90px, 21vw, 165px); animation: wiggle 3.2s ease-in-out .55s infinite; }
/* Bubbles rising out of the bottle */
.bub { animation: fizz 2.4s ease-in infinite; transform-box: fill-box; }
.bub.b2 { animation-delay: .8s; }
.bub.b3 { animation-delay: 1.6s; }
@keyframes fizz {
  0%   { transform: translateY(10px); opacity: 0; }
  30%  { opacity: 1; }
  100% { transform: translateY(-8px); opacity: 0; }
}
.present.four { width: clamp(56px, 12vw, 100px); animation: wiggle 3.2s ease-in-out 1.65s infinite; }
/* Four presents: neat 2 x 2 on phones */
@media (max-width: 600px) {
  .presents { display: grid; grid-template-columns: repeat(2, 1fr); align-items: end; }
}
@keyframes wiggle {
  0%, 70%, 100% { transform: rotate(0); }
  76% { transform: rotate(-5deg); }
  82% { transform: rotate(4deg); }
  88% { transform: rotate(-2deg); }
}

/* Presents as links: a gold tag underneath, and a faster wiggle on hover */
.gift {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  color: var(--ink);
  border-radius: 14px;
}
.gift .tag {
  background: var(--gold);
  border-radius: 12px;
  padding: .3rem .9rem .35rem;
  line-height: 1.2;
  box-shadow: 0 3px 0 var(--red-dark);
  font-weight: 700;
  font-size: clamp(.85rem, 2.2vw, 1.1rem);
}
.gift .tag small {
  display: block;
  font-weight: 500;
  font-size: .78em;
}
.gift:hover .present,
.gift:focus-visible .present { animation: shake .55s ease-in-out infinite; }
.gift:hover .tag { transform: translateY(-2px); }
.gift:focus-visible { outline: 3px solid var(--gold); outline-offset: 8px; }
@keyframes shake {
  0%, 100% { transform: rotate(0); }
  25% { transform: rotate(-7deg); }
  75% { transform: rotate(7deg); }
}

/* Fairy lights */
.wire { fill: none; stroke: var(--green-dark); stroke-linecap: round; }
.bulb .glow  { animation: glow 1.6s ease-in-out infinite; }
.bulb .glass { animation: glass 1.6s ease-in-out infinite; }
.bulb.c1 .glow, .bulb.c1 .glass { animation-delay: .4s; }
.bulb.c2 .glow, .bulb.c2 .glass { animation-delay: .8s; }
.bulb.c3 .glow, .bulb.c3 .glass { animation-delay: 1.2s; }
@keyframes glow  { 0%, 100% { opacity: .9; } 50% { opacity: 0; } }
@keyframes glass { 0%, 100% { opacity: 1; }  50% { opacity: .45; } }

@media (prefers-reduced-motion: reduce) {
  .bulb .glow, .bulb .glass { animation-duration: 6s; }
  .present.one, .present.two, .present.three, .present.four, .bub,
  .gift:hover .present, .gift:focus-visible .present { animation: none; }
}

/* Credit line at the foot of every page */
.credit {
  margin-top: auto;
  padding-top: 1rem;
  font-weight: 500;
  font-size: clamp(.75rem, 1.8vw, .9rem);
  color: var(--cream);
  opacity: .9;
  line-height: 1.4;
}
.credit a { color: var(--gold); font-weight: 700; text-decoration: none; }
.credit a:hover, .credit a:focus-visible { text-decoration: underline; }

/* Cream info card used by venue.php and faq.php */
.card {
  width: min(100%, 44rem);
  background: var(--cream);
  border-radius: clamp(10px, 2vw, 18px);
  box-shadow: 0 0 0 4px var(--gold), 0 8px 24px rgba(0,0,0,.25);
  padding: clamp(1rem, 3.5vw, 2rem);
  text-align: left;
}
.card .tri { margin: 0; line-height: 1.3; }
.card .tri .es, .card .tri .en { display: block; font-weight: 500; font-size: .85em; opacity: .8; }

/* Venue details */
.facts { display: grid; gap: 1rem; margin: 0; }
.facts > div {
  display: grid;
  gap: .3rem;
  padding-bottom: 1rem;
  border-bottom: 2px dashed rgba(20,107,58,.25);
}
.facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts dt { font-weight: 700; color: var(--green); font-size: clamp(.85rem, 2vw, 1rem); }
.facts dd { margin: 0; grid-column: 1 / -1; font-weight: 700; font-size: clamp(1.15rem, 3.4vw, 1.6rem); }
.facts dd small { display: block; font-weight: 500; font-size: .6em; opacity: .8; }
.facts .pill { justify-self: start; }
.facts dd.directions { display: grid; gap: .4rem; font-weight: 500; font-size: clamp(.95rem, 2.4vw, 1.1rem); line-height: 1.4; }
.facts dd.directions p { margin: 0; }
.facts dd.directions p + p { opacity: .8; }

.map-btn {
  display: inline-block;
  margin-top: .5rem;
  background: var(--green);
  color: var(--cream);
  text-decoration: none;
  font-weight: 700;
  font-size: clamp(.85rem, 2vw, 1rem);
  padding: .45rem .9rem;
  border-radius: 999px;
}
.map-btn:hover, .map-btn:focus-visible { background: var(--green-dark); }

/* Status pills */
.pill {
  align-self: start;
  justify-self: end;
  white-space: normal;
  font-weight: 700;
  font-size: clamp(.68rem, 1.6vw, .8rem);
  padding: .2rem .6rem;
  border-radius: 999px;
}
.pill.pending { background: #ffe9a8; color: #6b4a00; }
.pill.ok { background: #cdebd6; color: var(--green-dark); }

/* FAQ */
.faq { display: grid; gap: .75rem; }
.faq details {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 0 0 2px rgba(20,107,58,.2);
  padding: .8rem 1rem;
}
.faq summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .5rem;
  font-weight: 700;
  font-size: clamp(1rem, 2.6vw, 1.2rem);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .tri::before { content: "+ "; color: var(--red); }
.faq details[open] summary .tri::before { content: "– "; }
.faq .answer {
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 2px dashed rgba(20,107,58,.25);
  display: grid;
  gap: .5rem;
  font-size: clamp(.95rem, 2.3vw, 1.05rem);
  line-height: 1.4;
}
.faq .answer p { margin: 0; }
.faq .answer .es, .faq .answer .en { opacity: .85; }
.faq .answer a, .facts a:not(.map-btn) { color: var(--red-dark); font-weight: 700; }
.faq .waiting { font-style: italic; opacity: .75; }
