/* Chili-Style Beef Over Rice: styles for this project page only. The shared guerz.lol styles.css is not loaded here. */
/* Setup: nothing to install. index.html loads this file with <link rel="stylesheet" href="styles.css">. */

* { /* matches every element on the page */
  box-sizing: border-box; /* padding and borders count inside an element's width, so sizes stay predictable */
  margin: 0; /* removes the browser's default outer spacing */
  padding: 0; /* removes the browser's default inner spacing */
} /* end of the reset */

body { /* the whole page */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; /* uses the system's own font, so no download is needed */
  background: #0f0c1a; /* near-black purple page color */
  color: #f1f5f9; /* soft white text */
  min-height: 100vh; /* the page is at least as tall as the window */
  padding: 20px; /* breathing room around the content */
  overflow-x: hidden; /* stops the page from scrolling sideways */
} /* end of body */

/* animated background */
body::before { /* a decorative layer drawn behind the page content */
  content: ""; /* a pseudo-element needs content to show up; it is empty */
  position: fixed; /* stays in place while the page scrolls */
  inset: 0; /* stretches to all four edges of the window */
  background: /* three soft color glows layered together */
    radial-gradient(ellipse at 20% 20%, rgba(220,60,30,0.18) 0%, transparent 60%), /* red glow, upper left */
    radial-gradient(ellipse at 80% 80%, rgba(234,130,0,0.15) 0%, transparent 60%), /* orange glow, lower right */
    radial-gradient(ellipse at 50% 50%, rgba(120,40,200,0.1) 0%, transparent 70%); /* purple glow, center */
  z-index: 0; /* sits at the bottom of the stack */
  pointer-events: none; /* clicks pass straight through it */
} /* end of the background layer */

.wrap { /* the centered column that holds everything (the <main> element) */
  position: relative; /* lets z-index work so the column sits above the glow layer */
  z-index: 1; /* above the background layer */
  max-width: 820px; /* keeps lines readable on wide screens */
  margin: 0 auto; /* centers the column */
} /* end of .wrap */

/* BACK LINK */
.back-link { /* the "Back to Projects" link at the top */
  display: inline-block; /* lets the link have its own spacing */
  margin-bottom: 8px; /* space between the link and the title block */
  color: #fdba74; /* light orange, readable on the dark page */
  font-size: 0.9rem; /* slightly smaller than body text */
  text-decoration: none; /* no underline until hover */
} /* end of .back-link */

.back-link:hover { /* when the mouse is over the link */
  text-decoration: underline; /* shows the underline so it reads as a link */
} /* end of the hover rule */

/* HEADER */
.header { /* the title block (the <header> element) */
  text-align: center; /* centers the text */
  padding: 32px 0 28px; /* 32px above, 28px below, none on the sides */
} /* end of .header */

.header .emoji { /* the big pepper emoji */
  font-size: 3.5rem; /* very large */
  display: block; /* puts the emoji on its own line */
  margin-bottom: 10px; /* space under it */
  animation: float 3s ease-in-out infinite; /* runs the "float" animation forever, 3 seconds per loop */
} /* end of the emoji rule */

@keyframes float { /* defines the float animation */
  0%,100% { /* at the start and end of each loop */
    transform: translateY(0); /* rests at its normal position */
  } /* end of the start/end frame */
  50% { /* halfway through the loop */
    transform: translateY(-8px); /* lifts up 8 pixels */
  } /* end of the middle frame */
} /* end of the float animation */

.header h1 { /* the main page heading */
  font-size: 2rem; /* large heading size */
  font-weight: 800; /* extra bold */
  background: linear-gradient(90deg, #f97316, #ef4444, #a855f7); /* orange to red to purple, left to right */
  -webkit-background-clip: text; /* clips the gradient to the letter shapes (Safari and Chrome) */
  -webkit-text-fill-color: transparent; /* makes the letters see-through so the gradient shows */
  background-clip: text; /* the standard version of the same clip */
  margin-bottom: 8px; /* space under the heading */
} /* end of the h1 rule */

.header p { /* the one-line summary under the title */
  color: #94a3b8; /* muted blue-grey */
  font-size: 0.95rem; /* a little smaller than body text */
} /* end of the summary rule */

.badge-row { /* the row of small labels */
  display: flex; /* lays the labels out in a row */
  flex-wrap: wrap; /* lets them drop to a new line on narrow screens */
  justify-content: center; /* centers the row */
  gap: 8px; /* space between labels */
  margin-top: 14px; /* space above the row */
} /* end of .badge-row */

.badge { /* one small label */
  display: inline-block; /* sits in a row but can have padding */
  padding: 4px 12px; /* space inside the pill */
  border-radius: 999px; /* fully rounded ends */
  font-size: 0.75rem; /* small text */
  font-weight: 600; /* semi-bold */
  text-transform: uppercase; /* shows the text in capital letters */
  letter-spacing: .06em; /* a little extra space between letters */
  background: rgba(255,255,255,0.07); /* a faint white tint */
  border: 1px solid rgba(255,255,255,0.13); /* a faint outline */
  color: #cbd5e1; /* light grey text */
} /* end of .badge */

/* PROGRESS BAR */
.progress-wrap { /* the box around the progress bar */
  background: rgba(255,255,255,0.06); /* a faint white tint */
  border-radius: 14px; /* rounded corners */
  padding: 14px 18px; /* space inside the box */
  margin-bottom: 20px; /* space below the box */
  border: 1px solid rgba(255,255,255,0.1); /* a faint outline */
} /* end of .progress-wrap */

.progress-label { /* the line of text above the bar */
  display: flex; /* puts the two labels side by side */
  justify-content: space-between; /* one at the far left, one at the far right */
  font-size: 0.82rem; /* small text */
  color: #94a3b8; /* muted blue-grey */
  margin-bottom: 8px; /* space above the bar */
} /* end of .progress-label */

.progress-bar-bg { /* the grey track behind the colored fill */
  height: 8px; /* thin bar */
  border-radius: 999px; /* fully rounded ends */
  background: rgba(255,255,255,0.08); /* a faint white tint */
  overflow: hidden; /* keeps the fill inside the rounded track */
} /* end of the track rule */

.progress-bar-fill { /* the colored part that grows as steps are finished */
  height: 100%; /* as tall as the track */
  border-radius: 999px; /* fully rounded ends */
  background: linear-gradient(90deg, #f97316, #ef4444); /* orange to red */
  width: 0%; /* starts empty; script.js changes this */
  transition: width 0.5s ease; /* the bar slides smoothly when the width changes */
} /* end of the fill rule */

/* INGREDIENTS CARD */
.card { /* a dark box (used by the ingredients and the spices) */
  background: rgba(15,12,26,0.85); /* mostly opaque dark purple */
  backdrop-filter: blur(12px); /* blurs whatever shows through from behind */
  border: 1px solid rgba(255,255,255,0.1); /* a faint outline */
  border-radius: 20px; /* rounded corners */
  padding: 20px; /* space inside the box */
  margin-bottom: 14px; /* space below the box */
  box-shadow: 0 20px 40px rgba(0,0,0,0.4); /* a soft shadow under the box */
} /* end of .card */

.card h2 { /* the heading inside a box */
  font-size: 1.05rem; /* a little bigger than body text */
  font-weight: 700; /* bold */
  margin-bottom: 14px; /* space under the heading */
  color: #f1f5f9; /* soft white */
} /* end of the card heading rule */

.ing-grid { /* the grid of ingredients */
  display: grid; /* turns on grid layout */
  grid-template-columns: 1fr 1fr; /* two equal columns */
  gap: 8px; /* space between items */
} /* end of .ing-grid */

@media (max-width: 480px) { /* only on phone-sized screens */
  .ing-grid { /* the same grid, but on a phone */
    grid-template-columns: 1fr; /* one column instead of two */
  } /* end of the phone grid rule */
} /* end of the phone media query */

.ing-item { /* one ingredient; now a <button>, so it needs the resets below */
  display: flex; /* puts the check box and the text in a row */
  align-items: center; /* lines them up vertically */
  gap: 10px; /* space between the check box and the text */
  width: 100%; /* fills its grid cell, like the old div did */
  border: 0; /* removes the button's default border */
  background: none; /* removes the button's default grey background */
  font-family: inherit; /* uses the page font instead of the button default */
  text-align: left; /* aligns the text to the left, like normal text */
  font-size: 0.88rem; /* small text */
  color: #cbd5e1; /* light grey text */
  cursor: pointer; /* shows the hand cursor on hover */
  padding: 6px 8px; /* space inside the item */
  border-radius: 10px; /* rounded corners for the hover tint */
  transition: background 0.2s; /* the hover tint fades in */
  user-select: none; /* stops text from being highlighted when you click quickly */
} /* end of .ing-item */

.ing-item:hover { /* when the mouse is over an ingredient */
  background: rgba(255,255,255,0.05); /* a faint white tint */
} /* end of the hover rule */

.ing-item.checked { /* an ingredient that has been checked off */
  text-decoration: line-through; /* crosses the text out */
  color: #94a3b8; /* dims the text but keeps it readable */
} /* end of the checked rule */

.ing-check { /* the little square check box */
  width: 20px; /* box width */
  height: 20px; /* box height */
  border-radius: 6px; /* rounded corners */
  border: 2px solid #64748b; /* outline; lightened a bit so it is easier to see */
  display: flex; /* centers the check mark inside */
  align-items: center; /* centers it up and down */
  justify-content: center; /* centers it left and right */
  flex-shrink: 0; /* never squashes the box when the text is long */
  font-size: 0.75rem; /* small check mark */
  color: transparent; /* hides the check mark until the item is checked */
  transition: all 0.2s; /* every change fades in */
} /* end of .ing-check */

.ing-item.checked .ing-check { /* the check box of a checked ingredient */
  background: #15803d; /* dark green fill so the white check mark is easy to see */
  border-color: #15803d; /* matching outline */
  color: white; /* shows the check mark */
} /* end of the checked box rule */

/* SPICE CARD */
.spice-grid { /* the row of spice pills */
  display: flex; /* lays the pills out in a row */
  flex-wrap: wrap; /* lets them wrap onto new lines */
  gap: 10px; /* space between pills */
} /* end of .spice-grid */

.spice-pill { /* one spice pill */
  padding: 6px 14px; /* space inside the pill */
  border-radius: 999px; /* fully rounded ends */
  font-size: 0.82rem; /* small text */
  font-weight: 600; /* semi-bold */
  background: linear-gradient(135deg, rgba(239,68,68,0.25), rgba(249,115,22,0.2)); /* a soft red-to-orange tint */
  border: 1px solid rgba(239,68,68,0.35); /* a red outline */
  color: #fca5a5; /* light red text */
} /* end of .spice-pill */

.spice-note { /* the small note under the spice pills (moved here from an inline style) */
  margin-top: 12px; /* space above the note */
  font-size: 0.82rem; /* small text */
  color: #94a3b8; /* muted blue-grey; lightened so it passes the contrast check */
} /* end of .spice-note */

/* STEPS */
.step { /* one recipe step: the header bar plus the part that expands */
  background: rgba(15,12,26,0.85); /* mostly opaque dark purple */
  backdrop-filter: blur(12px); /* blurs whatever shows through from behind */
  border: 1px solid rgba(255,255,255,0.08); /* a faint outline */
  border-radius: 18px; /* rounded corners */
  margin-bottom: 12px; /* space between steps */
  overflow: hidden; /* keeps the expanding part inside the rounded corners */
  box-shadow: 0 8px 24px rgba(0,0,0,0.3); /* a soft shadow */
  transition: box-shadow 0.2s ease, transform 0.2s ease; /* the hover lift animates smoothly */
} /* end of .step */

.step:hover { /* when the mouse is over a step */
  box-shadow: 0 16px 36px rgba(0,0,0,0.5); /* a bigger, darker shadow */
  transform: translateY(-2px); /* lifts the step up 2 pixels */
} /* end of the hover rule */

.step.done { /* a finished step */
  border-color: rgba(34,197,94,0.3); /* a green outline */
} /* end of the done rule */

.step-header { /* the clickable bar at the top of a step; now a <button>, so it needs the resets below */
  display: flex; /* lays the number, text, time and arrow in a row */
  align-items: center; /* lines them up vertically */
  gap: 14px; /* space between them */
  width: 100%; /* fills the whole step width */
  border: 0; /* removes the button's default border */
  background: none; /* removes the button's default grey background */
  color: inherit; /* uses the page's text color instead of the button default */
  font: inherit; /* uses the page font instead of the button default */
  text-align: left; /* aligns the text to the left */
  padding: 16px 18px; /* space inside the bar */
  cursor: pointer; /* shows the hand cursor on hover */
  transition: background 0.2s ease; /* the hover tint fades in */
} /* end of .step-header */

.step-header:hover { /* when the mouse is over the bar */
  background: rgba(255,255,255,0.03); /* a faint white tint */
} /* end of the hover rule */

.step-num { /* the numbered circle */
  width: 38px; /* circle width */
  height: 38px; /* circle height */
  border-radius: 50%; /* makes it a circle */
  display: flex; /* centers the number inside */
  align-items: center; /* centers it up and down */
  justify-content: center; /* centers it left and right */
  font-weight: 800; /* extra bold */
  font-size: 0.9rem; /* number size */
  flex-shrink: 0; /* never squashes the circle */
  background: linear-gradient(135deg, #c2410c, #b91c1c); /* deep orange to deep red; darkened so the white number is readable */
  color: white; /* white number */
  box-shadow: 0 4px 12px rgba(239,68,68,0.4); /* a soft red glow */
  transition: all 0.3s ease; /* color changes fade in */
} /* end of .step-num */

.step.done .step-num { /* the circle of a finished step */
  background: linear-gradient(135deg, #15803d, #166534); /* two greens; dark enough for white text */
  box-shadow: 0 4px 12px rgba(34,197,94,0.4); /* a soft green glow */
} /* end of the done circle rule */

.step-meta { /* the box that holds the title and subtitle */
  flex: 1; /* takes up all the spare room in the row */
} /* end of .step-meta */

.step-title { /* the step's name */
  display: block; /* its own line (it is a <span> inside a button) */
  font-weight: 700; /* bold */
  font-size: 0.98rem; /* a little bigger than body text */
  color: #f1f5f9; /* soft white */
} /* end of .step-title */

.step-sub { /* the small line under the step's name */
  display: block; /* its own line */
  font-size: 0.78rem; /* small text */
  color: #94a3b8; /* muted blue-grey; lightened so it passes the contrast check */
  margin-top: 2px; /* a sliver of space above */
} /* end of .step-sub */

.step-time { /* how long the step takes */
  font-size: 0.78rem; /* small text */
  color: #f97316; /* orange */
  font-weight: 600; /* semi-bold */
  white-space: nowrap; /* never wraps onto two lines */
} /* end of .step-time */

.step-chevron { /* the little arrow */
  font-size: 0.8rem; /* small arrow */
  color: #94a3b8; /* muted blue-grey */
  transition: transform 0.25s ease; /* flips smoothly */
} /* end of .step-chevron */

.step.open .step-chevron { /* the arrow of an open step */
  transform: rotate(180deg); /* flips upside down */
} /* end of the open arrow rule */

.step-body { /* the part that expands and collapses */
  max-height: 0; /* collapsed by default */
  overflow: hidden; /* hides anything past the height */
  transition: max-height 0.35s ease; /* slides open and closed */
} /* end of .step-body */

.step.open .step-body { /* the body of an open step */
  max-height: 600px; /* tall enough for the longest step on a small phone (was 400px, which could clip) */
} /* end of the open body rule */

.step-inner { /* the padded content inside the body */
  padding: 0 18px 16px 70px; /* indents the text so it lines up under the title */
} /* end of .step-inner */

@media (max-width: 480px) { /* only on phone-sized screens */
  .step-inner { /* the same box, but on a phone */
    padding: 0 16px 16px 16px; /* even padding; the big left indent would waste space */
  } /* end of the phone padding rule */
} /* end of the phone media query */

.step-inner ul { /* the list of actions */
  list-style: none; /* removes the default bullets; arrows are added below */
  padding: 0; /* removes the default indent */
} /* end of the list rule */

.step-inner li { /* one action in the list */
  position: relative; /* lets the arrow be placed inside it */
  padding-left: 18px; /* room for the arrow */
  margin-bottom: 7px; /* space between actions */
  font-size: 0.9rem; /* slightly small text */
  color: #cbd5e1; /* light grey */
  line-height: 1.4; /* comfortable line spacing */
} /* end of the list item rule */

.step-inner li::before { /* the arrow drawn before each action */
  content: "→"; /* the arrow character */
  position: absolute; /* placed at an exact spot inside the item */
  left: 0; /* at the far left */
  color: #f97316; /* orange */
  font-size: 0.8rem; /* small arrow */
} /* end of the arrow rule */

.step-tip { /* the highlighted tip box */
  margin-top: 10px; /* space above the box */
  padding: 8px 12px; /* space inside the box */
  border-radius: 10px; /* rounded corners */
  background: rgba(249,115,22,0.1); /* a faint orange tint */
  border-left: 3px solid #f97316; /* an orange stripe on the left */
  font-size: 0.82rem; /* small text */
  color: #fdba74; /* light orange */
} /* end of .step-tip */

.step-done-btn { /* the "Mark Done" button */
  margin-top: 12px; /* space above the button */
  padding: 8px 18px; /* space inside the button */
  border-radius: 999px; /* fully rounded ends */
  border: none; /* no border */
  background: linear-gradient(90deg,#15803d,#166534); /* two greens; dark enough for white text */
  color: white; /* white text */
  font-weight: 600; /* semi-bold */
  font-size: 0.85rem; /* small text */
  cursor: pointer; /* shows the hand cursor on hover */
  transition: opacity 0.2s, transform 0.1s; /* hover changes animate */
} /* end of .step-done-btn */

.step-done-btn:hover { /* when the mouse is over the button */
  opacity: 0.85; /* slightly see-through */
  transform: scale(1.03); /* grows 3 percent */
} /* end of the hover rule */

.step.done .step-done-btn { /* the button of a finished step (it now says Undo) */
  background: linear-gradient(90deg,#475569,#334155); /* grey, so Undo looks calmer than Mark Done */
} /* end of the undo look rule */

/* KEYBOARD FOCUS: a clear outline for people who use the Tab key */
.back-link:focus-visible, /* the back link */
.ing-item:focus-visible, /* an ingredient button */
.step-header:focus-visible, /* a step header button */
.step-done-btn:focus-visible { /* a Mark Done button */
  outline: 3px solid #f97316; /* a thick orange outline, visible against the dark page */
  outline-offset: 3px; /* a small gap between the element and the outline */
} /* end of the focus rule */

/* WIN CARD */
.win-card { /* the card shown when every step is done */
  display: none; /* hidden until script.js shows it (this replaces an inline style in the HTML) */
  background: linear-gradient(135deg, rgba(34,197,94,0.15), rgba(16,185,129,0.1)); /* a faint green tint */
  border: 1px solid rgba(34,197,94,0.3); /* a green outline */
  border-radius: 20px; /* rounded corners */
  padding: 20px; /* space inside the card */
  text-align: center; /* centers the text */
  margin-top: 6px; /* space above the card */
} /* end of .win-card */

.win-card .win-icon { /* the trophy emoji */
  font-size: 2.5rem; /* large */
  display: block; /* its own line */
  margin-bottom: 8px; /* space under it */
} /* end of the trophy rule */

.win-card h3 { /* the win heading */
  font-size: 1.1rem; /* a little bigger than body text */
  color: #4ade80; /* bright green */
  margin-bottom: 6px; /* space under the heading */
} /* end of the win heading rule */

.win-card p { /* the win message */
  font-size: 0.88rem; /* slightly small text */
  color: #86efac; /* light green */
  line-height: 1.5; /* comfortable line spacing */
} /* end of the win message rule */

/* REDUCED MOTION: for people whose device is set to limit animation */
@media (prefers-reduced-motion: reduce) { /* only when the visitor asked for less motion */
  .header .emoji { /* the floating pepper */
    animation: none; /* stops it floating */
  } /* end of the pepper rule */
  .step, /* a step box */
  .step-body, /* the expanding part */
  .step-chevron, /* the arrow */
  .progress-bar-fill { /* the progress fill */
    transition: none; /* removes the sliding and fading */
  } /* end of the transition rule */
  .step:hover { /* the hover lift */
    transform: none; /* stops the lift */
  } /* end of the hover rule */
} /* end of the reduced-motion media query */
