/* =============================================================================
   PASTANAUTS SHARED STYLES
   Previously copy-pasted into all five pages; now edited in one place.
   ========================================================================== */

:root {
  --color-yellow: #F4D35E;
  --color-red:    #FC440F;
  --color-blue:   #232ED1;
  --color-aqua:   #68DEDE;
  --color-lilac:  #C179B9;
}

.font-sans  { font-family: 'Montserrat', sans-serif; }
.font-pixel { font-family: 'Press Start 2P', cursive; }

.logo-shadow {
  text-shadow:
    -3px -3px 0 #FC440F,
     3px -3px 0 #FC440F,
    -3px  3px 0 #FC440F,
     3px  3px 0 #FC440F,
     6px  6px 0 #000000;
}

/* order.html inverts the logo shadow colours */
.logo-shadow-alt {
  text-shadow:
    -3px -3px 0 #000000,
     3px -3px 0 #000000,
    -3px  3px 0 #000000,
     3px  3px 0 #000000,
     6px  6px 0 #FC440F;
}

.text-stroke { -webkit-text-stroke: 1px black; }

.card-hover { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card-hover:hover {
  transform: translateY(-5px);
  box-shadow: 8px 8px 0px #000000;
}

/* --- Animations ---------------------------------------------------------- */

@keyframes marquee {
  0%   { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}
.animate-marquee { animation: marquee 20s linear infinite; }

@keyframes twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.8); }
  50%      { opacity: 1;   transform: scale(1.1); }
}

@keyframes blink {
  0%, 100% { opacity: 0.1; }
  50%      { opacity: 0.9; }
}

@keyframes floatDown {
  0%   { transform: translateY(-100px) rotate(0deg); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(110vh) rotate(360deg); opacity: 0; }
}

.falling-pasta {
  position: absolute;
  animation: floatDown linear infinite;
  opacity: 0;
}

@keyframes popIn {
  0%   { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1);   opacity: 1; }
}
.animate-pop-in {
  animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* Respect the OS "reduce motion" setting. The falling pasta and marquee are
   decorative, so they stop entirely rather than just slowing down. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .falling-pasta { display: none; }
  .animate-marquee { transform: none; }
}

/* --- Forms --------------------------------------------------------------- */

.retro-input {
  width: 100%;
  padding: 1rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  color: #000;
  background-color: #fff;
  border: 4px solid #000;
  border-radius: 0.5rem;
  outline: none;
  transition: all 0.2s ease;
  appearance: none;
}

.retro-input:focus {
  box-shadow: 4px 4px 0px #FC440F;
  transform: translate(-2px, -2px);
}

.retro-input::placeholder {
  color: #a0aec0;
  font-weight: 600;
}

select.retro-input {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.2em;
  padding-right: 2.5rem;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type=number] { -moz-appearance: textfield; }

/* --- Accessibility ------------------------------------------------------- */

/* Keyboard focus was invisible against the blue. Yellow reads on every
   background the site uses. */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 4px solid #F4D35E;
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: #F4D35E;
  color: #000;
  padding: 1rem;
  border: 4px solid #000;
  font-weight: 700;
}
.skip-link:focus { left: 0; }
