/* ABOUTME: Visual styles for kylesgpus.com — diner-menu aesthetic, fetched data.
   ABOUTME: Markup lives in index.html, render logic in app.js. */

:root {
  --teal: #4FC0CD;
  --teal-deep: #2A8F9E;
  --paper: #FFFFFF;
  --paper-tint: #FDFBF1;
  --red: #D62A24;
  --red-deep: #A11F1B;
  --mustard: #FFCC4A;
  --mustard-deep: #E8A933;
  --charcoal: #1F1F1F;
  --soft: #4A5260;
  --sell-bg: rgba(214, 42, 36, 0.07);
  --sell-border: rgba(161, 31, 27, 0.55);
  --buy-bg: rgba(79, 192, 205, 0.16);
  --buy-border: rgba(42, 143, 158, 0.6);
  --special-bg: rgba(255, 204, 74, 0.18);
  --special-border: rgba(232, 169, 51, 0.7);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--teal);
  color: var(--charcoal);
  font-family: 'Special Elite', 'Courier New', monospace;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 84px;
  min-height: 100vh;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 6% 10%, rgba(255,255,255,0.5) 2px, transparent 3px),
    radial-gradient(circle at 94% 18%, rgba(255,255,255,0.4) 2px, transparent 3px),
    radial-gradient(circle at 18% 78%, rgba(255,255,255,0.35) 1.5px, transparent 2px),
    radial-gradient(circle at 82% 86%, rgba(255,255,255,0.5) 2px, transparent 3px),
    radial-gradient(circle at 50% 40%, rgba(255,255,255,0.25) 1px, transparent 2px);
  z-index: 0;
}

main { position: relative; z-index: 1; padding: 12px 16px 16px; }

.decor-sundae, .decor-fries {
  position: absolute;
  height: auto;
  pointer-events: none;
  user-select: none;
  z-index: 1;
}
.decor-sundae { width: 240px; top: 100px; left: 4%; transform: rotate(-6deg); }
.decor-fries { width: 220px; top: 540px; right: 4%; transform: rotate(5deg); }

.menu-wrapper {
  position: relative;
  max-width: 1180px;
  margin: 4px auto 24px;
  z-index: 2;
}

.menu-card {
  background: var(--paper);
  border: 10px solid var(--red);
  border-radius: 22px;
  box-shadow: 0 18px 40px rgba(0,0,0,0.22), 12px 12px 0 rgba(0,0,0,0.14);
  position: relative;
}
.checkered-trim {
  height: 28px;
  background-image:
    linear-gradient(45deg, #1F1F1F 25%, transparent 25%),
    linear-gradient(-45deg, #1F1F1F 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #1F1F1F 75%),
    linear-gradient(-45deg, transparent 75%, #1F1F1F 75%);
  background-size: 24px 24px;
  background-position: 0 0, 0 12px, 12px -12px, -12px 0;
  background-color: #FFFFFF;
  border-radius: 12px 12px 0 0;
  border-bottom: 3px solid var(--red);
}

.menu-body { padding: 30px 40px 36px; }

.open-stamp {
  position: absolute;
  top: 30px;
  right: -20px;
  width: 140px;
  transform: rotate(8deg);
  z-index: 5;
  pointer-events: none;
}

.menu-tagline {
  font-family: 'Pacifico', cursive;
  color: var(--red-deep);
  font-size: 28px;
  text-align: center;
  margin: 0 0 6px 0;
  letter-spacing: 0.5px;
}
.menu-tagline-sub {
  font-family: 'Permanent Marker', cursive;
  text-align: center;
  color: var(--charcoal);
  font-size: 16px;
  margin: 0 0 26px 0;
  letter-spacing: 0.3px;
}

.section {
  padding: 22px 24px 22px;
  border-radius: 12px;
  border-left: 6px solid;
  margin-bottom: 20px;
  position: relative;
}
.specials-section {
  background: var(--special-bg);
  border-left-color: var(--mustard-deep);
  border-top: 3px solid var(--mustard-deep);
  border-bottom: 3px solid var(--mustard-deep);
  border-right: 6px solid var(--mustard-deep);
}
.sell-section {
  background: var(--sell-bg);
  border-left-color: var(--sell-border);
}
.buy-section {
  background: var(--buy-bg);
  border-left-color: var(--buy-border);
  margin-top: 24px;
}

.specials-section .mascot {
  float: left;
  width: 295px;
  /* Sit on the section corner: lower portion overlaps the specials box,
     upper-left bleeds out. Vertically tuned so the float clears around the
     end of the first specials item — item #2 onward starts from the left. */
  margin: -175px 30px 14px -90px;
  user-select: none;
  pointer-events: none;
}
.specials-section::after { content: ''; display: block; clear: both; }

.fresh-stamp {
  position: absolute;
  top: -34px;
  right: 80px;
  width: 130px;
  transform: rotate(-12deg);
  z-index: 4;
  pointer-events: none;
}

.section-headline {
  font-family: 'Bevan', 'Georgia', serif;
  font-size: 34px;
  color: var(--red-deep);
  margin: 0 0 12px 0;
  line-height: 1.1;
  letter-spacing: 0.5px;
}
.buy-section .section-headline { color: var(--teal-deep); }
.specials-section .section-headline { color: var(--red-deep); }

.section-tag {
  position: absolute;
  top: -12px;
  right: 14px;
  background: var(--paper);
  padding: 2px 12px;
  font-family: 'Permanent Marker', cursive;
  font-size: 13px;
  letter-spacing: 1.5px;
  border: 2px solid currentColor;
  border-radius: 999px;
  transform: rotate(2deg);
  z-index: 2;
}
.sell-section .section-tag { color: var(--red-deep); }
.buy-section .section-tag { color: var(--teal-deep); }
.specials-section .section-tag { display: none; }

.menu-item {
  display: block;
  text-decoration: none;
  color: var(--charcoal);
  padding: 9px 10px 11px;
  border-bottom: 1px dotted rgba(31,31,31,0.18);
  transition: background 0.14s ease, transform 0.14s ease;
  border-radius: 4px;
  break-inside: avoid;
}
.menu-item:last-child { border-bottom: none; }
.menu-item:hover {
  background: rgba(255, 255, 255, 0.65);
  transform: translateX(2px);
}
.menu-item-name {
  font-family: 'Bevan', 'Georgia', serif;
  font-size: 19px;
  color: var(--charcoal);
  line-height: 1.3;
  margin-bottom: 4px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  /* Hanging indent: #id chip sits inline with the first line of the title;
     when the title wraps, subsequent lines align with the title's start,
     not under the chip. */
  padding-left: 48px;
  text-indent: -48px;
}
.menu-item-sub {
  font-family: 'Special Elite', monospace;
  font-size: 13px;
  color: var(--soft);
  line-height: 1.5;
  letter-spacing: 0.2px;
  /* Align with the title text (past the #id chip), not flush-left. */
  padding-left: 48px;
  text-transform: none;
}
.item-id {
  display: inline-block;
  background: var(--mustard);
  color: var(--charcoal);
  padding: 2px 9px;
  border-radius: 4px;
  font-family: 'Bevan', sans-serif;
  font-size: 13px;
  border: 2px solid var(--charcoal);
  letter-spacing: 0.5px;
  line-height: 1.1;
  vertical-align: middle;
  margin-right: 8px;
  text-indent: 0;
}
.item-title {
  vertical-align: middle;
}
.badge {
  display: inline-block;
  padding: 3px 11px;
  font-family: 'Bevan', sans-serif;
  font-size: 11px;
  letter-spacing: 2px;
  border-radius: 999px;
  border: 2px solid var(--charcoal);
  background: var(--mustard);
  color: var(--charcoal);
  line-height: 1.1;
  text-transform: uppercase;
  vertical-align: middle;
  margin-left: 8px;
  text-indent: 0;
}
.badge-sell { background: var(--red); color: #FFF; }
.badge-buy { background: var(--teal); color: var(--charcoal); }
.specials-section .menu-item { padding: 11px 10px 13px; }
.specials-section .menu-item-name { font-size: 22px; }
.specials-section .menu-item-sub { font-size: 14px; }

.menu-columns {
  columns: 2;
  column-gap: 56px;
  column-fill: balance;
  column-rule: 2px dashed rgba(31,31,31,0.18);
}
.menu-columns .section { break-inside: auto; }
.menu-columns .section-headline { break-after: avoid; }

.specialty-callout {
  margin: 36px auto 12px;
  max-width: 820px;
  padding: 26px 32px 22px;
  border: 3px dashed var(--red-deep);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--charcoal);
  text-align: center;
  transform: rotate(-1deg);
  box-shadow: 5px 5px 0 rgba(31,31,31,0.10);
  position: relative;
  overflow: visible;
}
.callout-sundae {
  position: absolute;
  width: 120px;
  height: auto;
  right: -28px;
  top: -82px;
  transform: rotate(10deg);
  z-index: 6;
  pointer-events: none;
}
.specialty-callout .lead {
  font-family: 'Permanent Marker', cursive;
  font-size: 28px;
  color: var(--red-deep);
  margin: 0 0 14px 0;
  line-height: 1.15;
}
.specialty-callout .body {
  font-family: 'Special Elite', monospace;
  font-size: 16px;
  line-height: 1.55;
  margin: 0 0 10px 0;
  color: var(--charcoal);
}
.specialty-callout .body strong { color: var(--red-deep); font-weight: normal; background: rgba(255, 204, 74, 0.35); padding: 1px 4px; }
.specialty-callout .pitch {
  font-family: 'Permanent Marker', cursive;
  font-size: 18px;
  margin: 14px 0 14px 0;
  color: var(--teal-deep);
}
.specialty-callout .cta {
  display: inline-block;
  margin-top: 4px;
  background: var(--mustard);
  color: var(--charcoal);
  padding: 10px 26px;
  font-family: 'Bevan', sans-serif;
  font-size: 19px;
  letter-spacing: 2px;
  text-decoration: none;
  border: 3px solid var(--charcoal);
  border-radius: 999px;
  text-transform: uppercase;
  transition: transform 0.08s ease;
}
.specialty-callout .cta:hover { transform: translateY(-2px); }

.footer {
  text-align: center;
  padding: 18px 20px 8px;
  color: rgba(255, 255, 255, 0.95);
  font-family: 'Special Elite', monospace;
  font-size: 14px;
  letter-spacing: 0.3px;
  position: relative;
  z-index: 1;
}
.footer a { color: #FFF; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.footer a:hover { color: var(--mustard); }

.sticky-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--red);
  padding: 10px 16px;
  z-index: 100;
  border-top: 4px solid var(--charcoal);
  box-shadow: 0 -10px 24px rgba(0,0,0,0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}
.sticky-seal {
  width: 60px;
  height: 60px;
  object-fit: contain;
  flex-shrink: 0;
  transform: translateY(-4px) rotate(-6deg);
}
.sticky-gpu {
  width: 80px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
  transform: translateY(-2px) rotate(8deg);
}
.sticky-cta {
  display: inline-block;
  background: var(--mustard);
  color: var(--charcoal);
  padding: 11px 28px;
  font-family: 'Bevan', sans-serif;
  font-size: 21px;
  letter-spacing: 3px;
  text-decoration: none;
  border: 3px solid var(--charcoal);
  border-radius: 999px;
  text-transform: uppercase;
  transition: transform 0.08s ease;
}
.sticky-cta:hover { transform: translateY(-2px); }
.sticky-cta-sub {
  color: #FFF7DD;
  font-family: 'Permanent Marker', cursive;
  font-size: 15px;
  letter-spacing: 0.5px;
}

.loading-state, .error-state {
  max-width: 600px;
  margin: 0 auto;
  padding: 30px;
  text-align: center;
  font-family: 'Permanent Marker', cursive;
  font-size: 18px;
  color: var(--charcoal);
}
.error-state { color: var(--red-deep); }

@media (max-width: 1000px) {
  .decor-sundae, .decor-fries { display: none; }
}
@media (max-width: 1100px) {
  .specials-section .mascot {
    float: none;
    display: block;
    /* No bleed on mobile — the mascot sits inline above the section heading
       instead of pulling up into the tagline area. */
    margin: 0 auto 12px;
    width: 240px;
    max-width: 70%;
  }
  .menu-wrapper { margin: 16px 0; }
}
@media (max-width: 900px) {
  .menu-card { border-width: 8px; border-radius: 18px; }
  .menu-body { padding: 22px 16px 28px; }
  .menu-columns { columns: 1; column-rule: none; }
  .specials-section .mascot { width: 240px; }
  /* OPEN 24/7 stamp competes with the mascot's baked-in "Hot Deals Near You"
     speech bubble at narrow widths — hide it instead of cramming. */
  .open-stamp { display: none; }
  .fresh-stamp { width: 76px; top: -22px; right: 8px; }
  .callout-sundae { width: 90px; right: -8px; top: -62px; }
  .section { padding: 18px 16px; }
  .section-headline { font-size: 28px; }
  .specials-section .menu-item-name { font-size: 18px; }
  .menu-item-name { font-size: 16px; padding-left: 40px; text-indent: -40px; }
  .menu-item-sub { font-size: 12px; padding-left: 40px; }
  .item-id { font-size: 11px; padding: 1px 7px; margin-right: 6px; }
  .menu-tagline { font-size: 22px; line-height: 1.2; }
  .menu-tagline-sub { font-size: 14px; }
  .specialty-callout { padding: 20px 18px; transform: rotate(0); }
  .specialty-callout .lead { font-size: 22px; }
  .specialty-callout .body { font-size: 14px; }
  .sticky-bar { gap: 10px; padding: 8px 10px; }
  .sticky-cta { font-size: 16px; padding: 9px 18px; letter-spacing: 2px; }
  .sticky-cta-sub { display: none; }
}
@media (max-width: 480px) {
  .menu-tagline { font-size: 19px; }
  .menu-tagline-sub { font-size: 13px; }
  .fresh-stamp { display: none; }
  .sticky-bar { gap: 8px; }
}
