/* ==========================================================================
   Whip It Up — a kitchen from about 1994

   The palette is lifted straight off the appliances: harvest gold, avocado,
   burnt orange, and cream tile with beige grout. The card is a real index
   card — blue rules, one red line at the top, and Mom's note in pen.
   ========================================================================== */

:root {
  --ink:        #34241A;
  --ink-soft:   #6B5442;

  --tile:       #F0E6D2;
  --grout:      #DCCCB0;

  --counter:    #C7AF87;
  --counter-2:  #B99E74;
  --edge:       #8E6039;

  --gold:       #E0A32E;
  --gold-dark:  #B87F1C;
  --gold-light: #F0BE55;

  --avocado:    #7C9350;
  --orange:     #C4643A;
  --aqua:       #5FA9A0;
  --pink:       #D98F8B;

  --card:       #FBF3E2;
  --card-edge:  #E4D8BC;
  --rule:       #BFD3DE;
  --rule-red:   #D8776C;

  /* sticker colours — script.js overwrites these per category */
  --st1: var(--gold);
  --st2: var(--orange);

  --radius: 10px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--ink);
  background-color: var(--tile);
  background-image:
    linear-gradient(var(--grout) 2px, transparent 2px),
    linear-gradient(90deg, var(--grout) 2px, transparent 2px);
  background-size: 58px 58px;
  background-position: -1px -1px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 16px 48px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------- the wall plaque */
.plaque {
  margin: 40px 0 30px;
  text-align: center;
  background: var(--card);
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  padding: 18px 30px 16px;
  box-shadow: 6px 6px 0 rgba(52, 36, 26, .22);
  max-width: 560px;
}

.plaque h1 {
  font-family: "Lilita One", "Nunito", sans-serif;
  font-size: clamp(2.4rem, 9vw, 3.6rem);
  line-height: .95;
  margin: 0;
  color: var(--orange);
  letter-spacing: .02em;
  text-shadow: 3px 3px 0 var(--ink);
}

.plaque-sub {
  margin: 12px 0 0;
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink-soft);
}

/* ------------------------------------------------------------ the counter */
.kitchen {
  width: 100%;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.counter {
  width: 100%;
  padding: 44px 20px 26px;
  border-radius: 8px 8px 4px 4px;
  background:
    radial-gradient(circle at 12% 30%, rgba(255,255,255,.5) 0 2px, transparent 3px),
    radial-gradient(circle at 68% 62%, rgba(255,255,255,.45) 0 2px, transparent 3px),
    radial-gradient(circle at 38% 78%, rgba(142,96,57,.28) 0 2px, transparent 3px),
    radial-gradient(circle at 86% 22%, rgba(142,96,57,.24) 0 2px, transparent 3px),
    linear-gradient(var(--counter), var(--counter-2));
  background-size: 90px 90px, 130px 130px, 110px 110px, 150px 150px, 100% 100%;
  border-bottom: 12px solid var(--edge);
  box-shadow: 0 10px 0 rgba(52,36,26,.18);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --------------------------------------------------------- the recipe tin
   Signature element. A chunky harvest-gold box with two cards poking out of
   the top — the whole page is really just a button dressed as furniture. */
.tin {
  position: relative;
  width: 190px;
  height: 150px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
  filter: drop-shadow(5px 6px 0 rgba(52,36,26,.3));
  transition: transform .15s ease;
}

.tin-card {
  position: absolute;
  top: 4px;
  width: 108px;
  height: 40px;
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 4px 4px 0 0;
  transition: transform .28s ease;
}
.tin-card-a { left: 30px; transform: rotate(-3deg); }
.tin-card-b { left: 52px; transform: rotate(4deg); }

.tin-lid {
  position: absolute;
  top: 22px; left: 0;
  width: 190px;
  height: 26px;
  background: var(--gold-light);
  border: 4px solid var(--ink);
  border-radius: 6px;
  transform-origin: left bottom;
  transition: transform .28s ease;
  z-index: 2;
}

.tin-body {
  position: absolute;
  bottom: 0; left: 8px;
  width: 174px;
  height: 104px;
  background:
    repeating-linear-gradient(
      90deg,
      var(--gold) 0 14px,
      var(--gold-dark) 14px 18px
    );
  border: 4px solid var(--ink);
  border-radius: 6px;
  display: grid;
  place-items: center;
  z-index: 3;
}

.tin-label {
  font-family: "Lilita One", sans-serif;
  font-size: 1.15rem;
  line-height: 1.05;
  text-align: center;
  color: var(--ink);
  background: var(--card);
  border: 3px solid var(--ink);
  border-radius: 5px;
  padding: 8px 16px;
  letter-spacing: .04em;
}

.tin:hover  { transform: translateY(-3px); }
.tin:active { transform: translateY(2px); }

.tin:focus-visible {
  outline: 4px solid var(--aqua);
  outline-offset: 6px;
  border-radius: 8px;
}

/* mid-pull: lid tips back, the loose cards lift */
.tin.is-open .tin-lid    { transform: rotate(-16deg) translateY(-6px); }
.tin.is-open .tin-card-a { transform: rotate(-8deg) translateY(-14px); }
.tin.is-open .tin-card-b { transform: rotate(9deg) translateY(-20px); }

.cue {
  margin: 20px 0 0;
  font-family: "Caveat", cursive;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--edge);
}

/* ---------------------------------------------------------------- the card
   Index card: cream stock, blue rules, one red line under the header. */
.card {
  width: 100%;
  max-width: 560px;
  margin: 34px 0 0;
  padding: 0 0 22px;
  background-color: var(--card);
  background-image: repeating-linear-gradient(
    var(--card) 0 29px,
    var(--rule) 29px 30px
  );
  border: 4px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: 7px 8px 0 rgba(52,36,26,.28);
  transform: rotate(-.6deg);
  animation: cardIn .32s ease-out;
}

@keyframes cardIn {
  from { opacity: 0; transform: rotate(-.6deg) translateY(18px) scale(.97); }
  to   { opacity: 1; transform: rotate(-.6deg) translateY(0) scale(1); }
}

.card-top {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px 14px;
  border-bottom: 3px solid var(--rule-red);
}

.sticker {
  flex: 0 0 auto;
  width: 66px;
  height: 66px;
}
.sticker .sf1 { fill: var(--st1); stroke: var(--ink); stroke-width: 3.2; stroke-linejoin: round; }
.sticker .sf2 { fill: var(--st2); stroke: var(--ink); stroke-width: 3.2; stroke-linejoin: round; }
.sticker .sl  { fill: none;       stroke: var(--ink); stroke-width: 3.2; stroke-linecap: round; }

.card-kind {
  margin: 0 0 2px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.card-name {
  font-family: "Lilita One", sans-serif;
  font-size: clamp(1.5rem, 5.5vw, 2.1rem);
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
}

.card-block { padding: 16px 22px 0; }

.card-label {
  margin: 0 0 8px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--orange);
}

.ings {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ings li {
  background: var(--tile);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 4px 13px;
  font-size: .93rem;
  font-weight: 700;
}

.pantry {
  margin: 10px 0 0;
  font-size: .8rem;
  font-style: italic;
  color: var(--ink-soft);
}

.how, .feel {
  margin: 0;
  font-size: 1rem;
  line-height: 30px;   /* sits the text on the ruled lines */
}

.feel { color: var(--ink-soft); }

/* Mom's note — taped to the card, in pen */
.card-note {
  margin: 22px 22px 0;
  padding: 14px 18px 16px;
  background: #FDF6E6;
  border: 3px dashed var(--avocado);
  border-radius: 8px;
}

.card-label-note { color: var(--avocado); }

.note {
  margin: 0;
  font-family: "Caveat", cursive;
  font-size: 1.45rem;
  font-weight: 500;
  line-height: 1.35;
  color: #2F4A22;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 22px 22px 0;
}

.btn {
  font-family: "Lilita One", sans-serif;
  font-size: 1rem;
  letter-spacing: .03em;
  padding: 11px 20px;
  border: 3px solid var(--ink);
  border-radius: 8px;
  background: var(--gold);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 3px 4px 0 var(--ink);
  transition: transform .1s ease, box-shadow .1s ease;
}

.btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 5px 0 var(--ink); }
.btn:active { transform: translate(2px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn:focus-visible { outline: 4px solid var(--aqua); outline-offset: 3px; }

.btn-quiet { background: var(--tile); }

/* ------------------------------------------------------------------ foot */
.foot {
  margin-top: 42px;
  text-align: center;
  font-size: .88rem;
  color: var(--ink-soft);
}

.foot-count {
  margin: 0 0 10px;
  font-family: "Caveat", cursive;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--edge);
}

.foot-links {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.foot-links a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--orange);
  padding-bottom: 1px;
}
.foot-links a:hover { color: var(--orange); }
.foot-links a:focus-visible { outline: 3px solid var(--aqua); outline-offset: 3px; }

.foot-fine { margin: 0; font-size: .78rem; max-width: 480px; }

/* ----------------------------------------------------------------- small */
@media (max-width: 480px) {
  .counter { padding: 34px 12px 20px; }
  .tin { width: 158px; height: 128px; }
  .tin-lid { width: 158px; height: 22px; top: 20px; }
  .tin-body { width: 144px; height: 88px; left: 7px; }
  .tin-label { font-size: 1rem; padding: 6px 12px; }
  .tin-card { width: 90px; height: 34px; }
  .tin-card-a { left: 24px; }
  .tin-card-b { left: 44px; }
  .card { transform: none; }
  .card-top { gap: 12px; padding: 14px 16px 12px; }
  .sticker { width: 54px; height: 54px; }
  .card-block { padding: 14px 16px 0; }
  .card-note { margin: 18px 16px 0; }
  .card-actions { padding: 18px 16px 0; }
  @keyframes cardIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* --------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
