/* ==========================================================================
   Cafeteria's Open — styles
   Warm, homemade, photo-forward. Comfort-food palette with folk-art touches.
   ========================================================================== */

:root {
  --paper: #f6efe1;
  --paper-2: #efe6d3;
  --card: #fffdf8;
  --ink: #2b2420;
  --ink-soft: #5f5546;
  --tomato: #c1432a;
  --tomato-dark: #9d3420;
  --teal: #2f7d78;
  --gold: #e0a63c;
  --line: #e6dcc7;
  --shadow: 0 10px 30px rgba(70, 50, 25, 0.12);
  --shadow-sm: 0 4px 14px rgba(70, 50, 25, 0.10);

  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Nunito Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-sign: "Rye", Georgia, serif;

  --wrap: 1080px;
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Kill the default number-input spin buttons everywhere. */
input[type="number"] { -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

img { max-width: 100%; display: block; }

a { color: var(--tomato-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--tomato); }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; color: var(--ink); font-weight: 600; }

.wrap { width: min(var(--wrap), 92vw); margin-inline: auto; }

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

/* --------------------------------------------------------------------------
   Header + navigation
   -------------------------------------------------------------------------- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.7rem 0; min-height: 64px;
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand-mark { display: inline-flex; }
.brand-text {
  font-family: var(--font-sign);
  font-size: 1.5rem;
  color: var(--tomato-dark);
  letter-spacing: 0.5px;
}
.site-nav ul { list-style: none; display: flex; gap: 0.3rem; margin: 0; padding: 0; }
.site-nav a {
  display: inline-block; padding: 0.5rem 0.85rem; border-radius: 999px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.98rem;
}
.site-nav a:hover { background: var(--paper-2); color: var(--tomato-dark); }
.site-nav a[aria-current="page"] { background: var(--tomato); color: #fff; }

.nav-toggle {
  display: none; width: 44px; height: 40px; border: 1px solid var(--line);
  background: var(--card); border-radius: 10px; cursor: pointer; position: relative;
}
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after {
  content: ""; position: absolute; left: 50%; width: 20px; height: 2px;
  background: var(--ink); transform: translateX(-50%); transition: 0.2s;
}
.nav-toggle-bar { top: 50%; }
.nav-toggle-bar::before { top: -6px; }
.nav-toggle-bar::after { top: 6px; }

@media (max-width: 720px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    position: absolute; top: 64px; left: 0; right: 0; background: var(--card);
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm);
    max-height: 0; overflow: hidden; transition: max-height 0.25s ease;
  }
  .site-nav.open { max-height: 380px; }
  .site-nav ul { flex-direction: column; padding: 0.5rem 4vw 1rem; gap: 0.15rem; }
  .site-nav a { display: block; }
}

/* --------------------------------------------------------------------------
   Buttons + badges
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block; background: var(--tomato); color: #fff; text-decoration: none;
  padding: 0.7rem 1.25rem; border-radius: 999px; font-weight: 700; border: 0; cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--tomato-dark); color: #fff; }
.btn-ghost { background: transparent; color: var(--tomato-dark); border: 1.5px solid var(--tomato); box-shadow: none; }
.btn-ghost:hover { background: var(--tomato); color: #fff; }

.badge {
  display: inline-block; font-family: var(--font-body); font-weight: 700;
  font-size: 0.72rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.25rem 0.6rem; border-radius: 999px;
}
.badge-recipe { background: #f3e2cf; color: var(--tomato-dark); }
.badge-question { background: #d9ece9; color: var(--teal); }
.badge-discussion { background: #f6e6bf; color: #8a6410; }

/* --------------------------------------------------------------------------
   Home: hero
   -------------------------------------------------------------------------- */
.hero {
  background:
    radial-gradient(1200px 400px at 80% -10%, rgba(224,166,60,0.18), transparent 60%),
    var(--paper);
  padding: 3.2rem 0 2.4rem;
  border-bottom: 1px solid var(--line);
}
.hero-inner { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 2.5rem; align-items: center; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 0 0 0.6rem; }
.hero .lede { font-size: 1.2rem; color: var(--ink-soft); margin: 0 0 1.4rem; max-width: 34ch; }
.hero-cta { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.hero-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.5rem; box-shadow: var(--shadow); transform: rotate(-1.2deg);
}
.hero-card h2 { font-size: 1.1rem; margin: 0 0 0.5rem; color: var(--teal); }
.hero-card p { margin: 0 0 0.9rem; color: var(--ink-soft); font-size: 0.98rem; }
.hero-card .btn { width: 100%; text-align: center; }

@media (max-width: 780px) {
  .hero-inner { grid-template-columns: 1fr; gap: 1.6rem; }
  .hero-card { transform: none; }
}

/* --------------------------------------------------------------------------
   Section headers
   -------------------------------------------------------------------------- */
.section { padding: 2.6rem 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.section-head h2 { font-size: 1.8rem; margin: 0; }
.section-head .kicker { color: var(--ink-soft); font-size: 0.98rem; }
.section-head a { font-weight: 700; white-space: nowrap; }
.page-intro { max-width: 60ch; color: var(--ink-soft); margin: 0.4rem 0 2rem; font-size: 1.08rem; }

/* --------------------------------------------------------------------------
   Post cards / grid
   -------------------------------------------------------------------------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card-media { aspect-ratio: 4 / 3; background: var(--paper-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media.placeholder {
  display: grid; place-items: center;
  background: repeating-linear-gradient(45deg, #efe6d3, #efe6d3 12px, #eaddc4 12px, #eaddc4 24px);
  color: var(--ink-soft); font-family: var(--font-sign); font-size: 1.3rem;
}
.card-body { padding: 1.05rem 1.15rem 1.25rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.card-body h3 { font-size: 1.22rem; margin: 0.2rem 0 0; }
.card-body h3 a { color: var(--ink); text-decoration: none; }
.card-body h3 a:hover { color: var(--tomato-dark); }
.card-meta { font-size: 0.85rem; color: var(--ink-soft); }
.card-excerpt { color: var(--ink-soft); font-size: 0.96rem; margin: 0; }
.card-body .card-foot { margin-top: auto; padding-top: 0.4rem; font-weight: 700; font-size: 0.92rem; }

/* --------------------------------------------------------------------------
   Single post
   -------------------------------------------------------------------------- */
.post { padding: 2.4rem 0 3rem; }
.post-head { width: min(760px, 92vw); margin-inline: auto; text-align: center; margin-bottom: 1.6rem; }
.post-head .badge { margin-bottom: 0.9rem; }
.post-head h1 { font-size: clamp(2rem, 4.5vw, 3rem); margin: 0.3rem 0 0.6rem; }
.post-head .post-meta { color: var(--ink-soft); font-size: 0.98rem; }
.post-hero { width: min(900px, 96vw); margin: 0 auto 2rem; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.post-hero.placeholder { aspect-ratio: 16 / 8; }
.post-body { width: min(680px, 92vw); margin-inline: auto; font-size: 1.1rem; }
.post-body h2 { font-size: 1.5rem; margin: 2rem 0 0.6rem; }
.post-body h3 { font-size: 1.2rem; margin: 1.5rem 0 0.4rem; }
.post-body p, .post-body ul, .post-body ol { margin: 0 0 1.1rem; }
.post-body img { border-radius: var(--radius); box-shadow: var(--shadow-sm); margin: 1.4rem 0; }
.post-body ul, .post-body ol { padding-left: 1.3rem; }
.post-body li { margin-bottom: 0.4rem; }
.post-body blockquote {
  margin: 1.4rem 0; padding: 0.6rem 1.2rem; border-left: 4px solid var(--gold);
  background: var(--paper-2); border-radius: 0 10px 10px 0; color: var(--ink-soft); font-style: italic;
}

/* Recipe meta strip */
.recipe-meta {
  width: min(680px, 92vw); margin: 0 auto 1.8rem; display: flex; flex-wrap: wrap; gap: 1rem;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.2rem;
  box-shadow: var(--shadow-sm);
}
.recipe-meta div { flex: 1; min-width: 90px; }
.recipe-meta .label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-soft); }
.recipe-meta .value { font-family: var(--font-head); font-size: 1.15rem; }

/* Question / discussion call-to-respond box */
.respond-box {
  width: min(680px, 92vw); margin: 2.2rem auto 0; background: #d9ece9; border: 1px solid #b9d8d3;
  border-radius: var(--radius); padding: 1.4rem 1.5rem; text-align: center;
}
.respond-box.talk { background: #f6e6bf; border-color: #e6cf94; }
.respond-box h3 { margin: 0 0 0.4rem; color: var(--teal); }
.respond-box.talk h3 { color: #8a6410; }
.respond-box p { margin: 0 0 1rem; color: var(--ink-soft); }

/* Comments placeholder */
.comments { width: min(680px, 92vw); margin: 2.4rem auto 0; padding-top: 1.6rem; border-top: 1px dashed var(--line); }
.comments h2 { font-size: 1.3rem; }
.comments-placeholder {
  background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius);
  padding: 1.4rem; color: var(--ink-soft); text-align: center;
}

.post-nav { width: min(680px, 92vw); margin: 2.5rem auto 0; display: flex; justify-content: space-between; gap: 1rem; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer { background: var(--ink); color: #efe6d3; margin-top: 3rem; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; padding: 2.6rem 0 1.4rem; }
@media (max-width: 640px) { .footer-inner { grid-template-columns: 1fr; gap: 1.4rem; } }
.footer-name { font-family: var(--font-sign); font-size: 1.6rem; color: var(--gold); }
.footer-tag { color: #cbbfa8; margin: 0.4rem 0 0; max-width: 40ch; }
.footer-heading { font-family: var(--font-head); font-size: 1.1rem; margin: 0 0 0.3rem; color: #fff; }
.footer-follow p { color: #cbbfa8; }
.footer-follow a, .footer-fine a { color: var(--gold); }
.footer-fine { border-top: 1px solid rgba(255,255,255,0.12); padding: 0.9rem 0 1.6rem; }
.footer-fine p { margin: 0; font-size: 0.85rem; color: #9c917d; }

/* ==========================================================================
   SPLASH — curtains part to reveal a hand-painted "CAFETERIA IS OPEN" shade
   ========================================================================== */
.splash {
  position: fixed; inset: 0; z-index: 999; display: none;
  background: #20343b;
  overflow: hidden;
}
.splash.active { display: block; }
body.splash-open { overflow: hidden; }

.splash-stage { position: absolute; inset: 0; }

/* Teal-blue wall + a soft "sky" glow behind the sign, echoing Mom's photo */
.splash-stage::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(760px 520px at 50% 46%, #d3e2e7 0%, #86a9b2 34%, #446a76 70%, #2b4a54 100%);
}

/* Window shade sign — centered on screen */
.shade {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(560px, 88vw); z-index: 2;
  display: flex; flex-direction: column; align-items: stretch;
}
.shade-cloth {
  background: linear-gradient(180deg, #efe3c8, #e7d7b4);
  border: 3px solid #cdb98c; border-bottom: 0;
  border-radius: 8px 8px 0 0;
  padding: 1.6rem 1rem 1.2rem; text-align: center; position: relative;
  box-shadow: inset 0 -20px 30px rgba(120,90,40,0.12);
}
.shade-brace {
  position: absolute; top: -16px; left: 50%; transform: translateX(-50%);
  width: 70%; height: 14px; background: #6f4a2a; border-radius: 6px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.4);
}
.shade-word { font-family: var(--font-sign); color: var(--tomato-dark); margin: 0; line-height: 1; }
.shade-word-1 { font-size: clamp(2.1rem, 8vw, 3.5rem); letter-spacing: 1px; }
.shade-word-2 { font-size: clamp(2.6rem, 10vw, 4.4rem); color: var(--teal); margin-top: 0.2rem; }
.folk-bird { width: 68%; margin: 0.85rem auto 0; }
.shade-hem {
  height: 20px; background: linear-gradient(180deg, #e7d7b4, #d8c496);
  border: 3px solid #cdb98c; border-radius: 0 0 10px 10px; position: relative;
}
.shade-ring {
  position: absolute; bottom: -14px; left: 50%; transform: translateX(-50%);
  width: 16px; height: 16px; border: 3px solid #b79a63; border-radius: 50%; background: transparent;
}

/* Disco ball homage */
.disco-ball {
  position: absolute; top: 20%; left: 9%; z-index: 3;
  width: clamp(58px, 12vw, 92px); height: clamp(58px, 12vw, 92px);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #fff, #cfd7de 40%, #8b97a2 70%, #5b6670);
  background-size: 100% 100%;
  box-shadow: 0 0 26px rgba(200, 220, 255, 0.5);
}
.disco-ball::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background:
    /* bright sparkle glints catching the light */
    radial-gradient(circle at 32% 26%, rgba(255,255,255,.95) 0 1.6px, transparent 2.6px),
    radial-gradient(circle at 66% 38%, rgba(255,255,255,.9) 0 1.6px, transparent 2.6px),
    radial-gradient(circle at 50% 60%, rgba(255,255,255,.85) 0 1.4px, transparent 2.4px),
    radial-gradient(circle at 24% 56%, rgba(255,255,255,.75) 0 1.2px, transparent 2.2px),
    radial-gradient(circle at 78% 68%, rgba(255,255,255,.8) 0 1.4px, transparent 2.4px),
    radial-gradient(circle at 44% 40%, rgba(255,255,255,.7) 0 1.2px, transparent 2.2px),
    /* each little mirror tile catches a diagonal shine */
    linear-gradient(135deg, rgba(255,255,255,.5) 0 34%, rgba(255,255,255,0) 62%),
    /* facet grid lines */
    repeating-linear-gradient(0deg, rgba(30,50,70,.28) 0 11px, transparent 11px 12px),
    repeating-linear-gradient(90deg, rgba(30,50,70,.24) 0 11px, transparent 11px 12px);
  background-repeat:
    no-repeat, no-repeat, no-repeat, no-repeat, no-repeat, no-repeat,
    repeat, repeat, repeat;
  background-size:
    auto, auto, auto, auto, auto, auto,
    12px 12px, auto, auto;
  animation: discoShimmer 2.6s ease-in-out infinite;
}
@keyframes discoShimmer {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.3); }
}
.disco-ball::after {
  content: ""; position: absolute; bottom: 100%; left: 50%; width: 3px; height: 40vh;
  background: linear-gradient(180deg, rgba(60,52,44,0.2), #4a4038); transform: translateX(-50%);
}

/* Curtains */
.valance {
  position: absolute; top: 0; left: 0; right: 0; height: 80px; z-index: 6;
  background: linear-gradient(180deg, #58757f, #3c5763);
  border-bottom: 4px solid #294049;
  box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}
.valance::after {
  content: ""; position: absolute; bottom: -22px; left: 0; right: 0; height: 24px;
  background:
    radial-gradient(24px 24px at 24px 0, #3c5763 60%, transparent 62%) repeat-x;
  background-size: 48px 24px;
}
.curtain {
  position: absolute; top: 0; bottom: 0; width: 54%; z-index: 5;
  background:
    repeating-linear-gradient(90deg, #37505b 0 22px, #567480 22px 33px, #a7bdc5 33px 39px, #2f4750 39px 60px);
  box-shadow: inset -34px 0 48px rgba(0,0,0,0.42);
  transition: transform 2.4s cubic-bezier(0.62, 0, 0.2, 1);
}
.curtain-left { left: 0; border-right: 3px solid #26383f; transform: translateX(0); }
.curtain-right {
  right: 0; border-left: 3px solid #26383f; transform: translateX(0);
  background:
    repeating-linear-gradient(90deg, #2f4750 0 21px, #a7bdc5 21px 27px, #567480 27px 38px, #37505b 38px 60px);
  box-shadow: inset 34px 0 48px rgba(0,0,0,0.42);
}
.splash.parting .curtain-left { transform: translateX(-104%); }
.splash.parting .curtain-right { transform: translateX(104%); }

.splash-enter {
  position: absolute; bottom: 7%; left: 50%; transform: translateX(-50%);
  z-index: 7; background: transparent; color: #eef4f5; border: 0;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem;
  padding: 0.4rem 0.6rem; cursor: pointer; letter-spacing: 0.05em;
  text-shadow: 0 2px 10px rgba(0,0,0,0.55);
  animation: nudge 2.4s ease-in-out infinite;
}
.splash-enter:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.splash.parting .splash-enter { opacity: 0; pointer-events: none; transition: opacity 0.4s; }

@keyframes nudge { 0%,100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-5px); } }

.splash.done { opacity: 0; pointer-events: none; transition: opacity 0.5s ease; }

@media (prefers-reduced-motion: reduce) {
  .curtain { transition: none; }
  .splash-enter { animation: none; }
  .disco-ball::before { animation: none; }
}
