:root {
  --milk: #f7f4ee;       /* the white sign */
  --ink: #2a2826;        /* charcoal letters & stone */
  --ink-soft: #6b665f;
  --stone: #4a4744;      /* facade tiles */
  --stone-soft: #e8e4dd;
  --gold: #e0a43a;       /* backlit lettering */
  --oak: #c8a273;        /* door frame & counter */
  --oak-soft: #f0e6d5;
  --wheat: #e8c992;
  --mustard: #f2c12e;    /* the umbrella & chairs */
  --blush: #f2a5b5;      /* chalk-wall pink */
  --sign: var(--ink);
  --line: #2a282622;

  --display: "Bagel Fat One", "Arial Rounded MT Bold", sans-serif;
  --logo: "Arvo", Rockwell, Georgia, serif;
  --hand: "Gaegu", "Comic Sans MS", cursive;
  --body: "IBM Plex Sans KR", system-ui, sans-serif;

  --radius: 22px;
  --border: 3px solid var(--ink);
  --shadow: 5px 5px 0 var(--ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--milk);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.02; margin: 0 0 .35em; letter-spacing: -.01em; }
h2 { font-size: clamp(2.4rem, 6vw, 3.8rem); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.wrap { max-width: 1140px; margin: 0 auto; }
.hand { font-family: var(--hand); font-weight: 700; }
.fine { font-size: .82rem; color: var(--ink-soft); }
.muted { color: var(--ink-soft); }

/* buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border: var(--border); border-radius: 999px;
  background: #fff; color: var(--ink); text-decoration: none; font-weight: 700;
  box-shadow: 3px 3px 0 var(--ink);
  transition: transform .15s, box-shadow .15s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-ink { background: var(--ink); color: var(--milk); box-shadow: 3px 3px 0 var(--gold); }
.btn-gold { background: var(--gold); }
.btn-ink:hover { box-shadow: 5px 5px 0 var(--gold); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 12px clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--milk) 90%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--line);
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img { height: 40px; width: auto; }

/* the cafe's real logo, with the sign's gold backlight */
.logo { display: grid; justify-items: end; justify-self: start; margin: 0 0 24px; }
.logo-img {
  width: clamp(260px, 38vw, 440px); height: auto;
  filter: drop-shadow(-2px 3px 0 #e0a43a88) drop-shadow(0 0 14px #e0a43a33);
}
.logo-sub { font: 700 clamp(.95rem, 1.8vw, 1.2rem) var(--logo); letter-spacing: .02em; color: var(--ink); margin-top: 8px; }
.sign-logo { filter: drop-shadow(-1px 1.5px 0 #e0a43a99); }
.nav nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 28px); font-weight: 700; }
.nav nav a { text-decoration: none; }
.nav nav a:hover { color: var(--gold); }
.nav-ig { display: inline-grid; place-items: center; }
.nav-ig svg { width: 24px; height: 24px; }
.ig-btn { margin-top: 30px; }
.ig-btn svg, .footer-ig svg { width: 20px; height: 20px; }
.footer-ig { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; color: var(--mustard); }
.footer-ig:hover { text-decoration: underline; }
.nav-cta { background: var(--mustard); border: var(--border); border-radius: 999px; padding: 4px 16px; }
.nav-cta:hover { color: var(--ink) !important; background: #f7d462; }

/* hero */
.hero {
  max-width: 1140px; margin: 0 auto;
  display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center;
  padding: clamp(40px, 7vw, 88px) clamp(16px, 4vw, 48px) clamp(24px, 4vw, 40px);
}
.hello {
  display: inline-block; margin: 0 0 20px; padding: 4px 14px;
  background: var(--oak-soft); border-radius: 999px; font-weight: 700; font-size: .9rem; color: var(--ink);
}
h1 { font-size: clamp(2.7rem, 6.6vw, 5.1rem); }
.lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 33em; margin: 0 0 28px; }

.shop { margin: 0; position: relative; justify-self: center; width: min(100%, 500px); }
.shop::before {
  content: ""; position: absolute; inset: 6% -4% 4% -4%; z-index: -1;
  background: var(--oak-soft);
  border-radius: 46% 54% 42% 58% / 52% 44% 56% 48%;
}
.shop svg { width: 100%; height: auto; overflow: visible; }
.svg-hand { font: 700 22px var(--hand); fill: var(--ink); }
.svg-hand-sm { font: 700 15px var(--hand); }
.svg-logo { font: 700 38px var(--logo); fill: var(--ink); }
.svg-logo-glow { fill: var(--gold); }
.svg-sub { font: 700 8.5px var(--logo); fill: var(--ink); letter-spacing: .02em; }
/* the cup in the window */
.wisp { opacity: 0; transform-box: fill-box; transform-origin: bottom center; animation: steam 3s ease-in-out infinite; }
.w2 { animation-delay: -1s; }
.w3 { animation-delay: -2s; }
@keyframes steam {
  0%   { opacity: 0; transform: translateY(8px) scaleY(.6); }
  30%  { opacity: .95; }
  70%  { opacity: .6; transform: translateY(-6px) translateX(2px) scaleY(1); }
  100% { opacity: 0; transform: translateY(-14px) translateX(-2px) scaleY(1.1); }
}
.eyes circle { transform-box: fill-box; transform-origin: center; animation: blink 4s infinite; }
@keyframes blink { 0%, 44%, 50%, 100% { transform: scaleY(1); } 47% { transform: scaleY(.1); } }
.cheek { transform-box: fill-box; transform-origin: center; animation: blush 4s ease-in-out infinite; }
@keyframes blush { 0%, 40%, 90%, 100% { transform: scale(1); opacity: .8; } 50%, 80% { transform: scale(1.3); opacity: 1; } }
.mug { transform-box: fill-box; transform-origin: bottom center; animation: wiggle 4s ease-in-out infinite; }
@keyframes wiggle { 0%, 40%, 90%, 100% { transform: rotate(0); } 55% { transform: rotate(-4deg); } 70% { transform: rotate(4deg); } }
/* the owner */
.owner { animation: bob 2.8s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-3px); } }
.owner-eyes circle { transform-box: fill-box; transform-origin: center; animation: blink 3.6s infinite .8s; }
.lights circle { animation: twinkle 2.4s ease-in-out infinite; }
.lights circle:nth-child(2n) { animation-delay: -1.2s; }
@keyframes twinkle { 50% { fill: #fff3cf; } }

/* lid strip: the signature */
.lids {
  background: var(--ink); color: var(--milk);
  padding: 28px clamp(16px, 4vw, 48px) 36px;
  overflow: hidden;
}
.lids { text-align: center; padding-top: clamp(48px, 7vw, 80px); padding-bottom: clamp(48px, 7vw, 80px); }
.lids h2 { color: var(--milk); }
.lids .hand { font-size: 1.5rem; margin: 0 0 28px; color: var(--mustard); }
.lid-row { display: flex; justify-content: center; gap: clamp(14px, 3vw, 36px); flex-wrap: wrap; }
.lid {
  width: clamp(92px, 12vw, 132px); aspect-ratio: 1;
  display: grid; place-items: center;
  background: #fff; color: var(--ink);
  border-radius: 50%;
  box-shadow: inset 0 0 0 7px #f1ede6, inset 0 0 0 9px #ddd6ca, 0 6px 0 #0006;
  transform: rotate(var(--r));
  transition: transform .25s;
}
.lid svg { width: 66%; height: 66%; overflow: visible; }
.lid:hover { transform: rotate(0) scale(1.08); }

/* blocks */
.block { padding: clamp(64px, 9vw, 112px) clamp(16px, 4vw, 48px); }
.block-head { max-width: 40em; margin-bottom: 32px; }
.block-head p { margin: 0; color: var(--ink-soft); font-size: 1.08rem; }

/* menu */
.menu { background: var(--oak-soft); }
.favs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 40px; }
.fav {
  position: relative; background: #fff; border: var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px 22px 20px;
}
.fav:nth-child(2) { transform: rotate(1deg); }
.fav:nth-child(3) { transform: rotate(-1deg); }
.fav-rank {
  position: absolute; top: -16px; right: 16px;
  font: 700 1.2rem var(--hand); background: var(--mustard); border: var(--border);
  border-radius: 999px; padding: 0 12px; transform: rotate(4deg);
}
.fav h3 { font: 1.45rem/1.1 var(--display); font-weight: 400; margin: 0 0 6px; }
.fav p { margin: 0 0 12px; color: var(--ink-soft); font-size: .95rem; }
.fav .price { font-weight: 700; font-size: 1.1rem; }

.tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.tab {
  display: inline-flex; align-items: center; gap: 7px;
  font: 700 .95rem var(--body); padding: 7px 16px 7px 10px; cursor: pointer;
  border: var(--border); border-radius: 999px; background: #fff; color: var(--ink);
  transition: transform .2s cubic-bezier(.3, 1.6, .5, 1), box-shadow .2s, background .2s;
}
.tab-icon { width: 24px; height: 24px; flex: none; overflow: visible; transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.tab:hover { transform: translateY(-3px) rotate(-1.5deg); box-shadow: 3px 3px 0 var(--ink); }
.tab:hover .tab-icon { animation: icon-wiggle .5s ease-in-out; }
.tab:active { transform: translateY(1px) scale(.96); box-shadow: none; }
.tab[aria-selected="true"] { background: var(--tab, var(--ink)); box-shadow: 3px 3px 0 var(--ink); animation: tab-pop .35s cubic-bezier(.3, 1.6, .5, 1); }
.tab[aria-selected="true"] .tab-icon { animation: icon-bounce 1.6s ease-in-out infinite; }
.tab[aria-selected="true"] .i-steam { animation: icon-steam 1.6s ease-in-out infinite; }
@keyframes tab-pop { 0% { transform: scale(.9); } 100% { transform: scale(1); } }
@keyframes icon-wiggle { 25% { transform: rotate(-14deg) scale(1.15); } 75% { transform: rotate(10deg) scale(1.15); } }
@keyframes icon-bounce { 0%, 100% { transform: translateY(0); } 30% { transform: translateY(-4px) rotate(-6deg); } 55% { transform: translateY(0) rotate(4deg); } }
@keyframes icon-steam { 50% { transform: translateY(-2px); opacity: .5; } }

/* menu board entrance when switching categories */
.board.swap .board-title { animation: rise .35s ease-out both; }
.board.swap .item { display: flex; flex-direction: column; gap: 4px; padding: 0 0 6px; }
.item-photo {
  display: block; width: 100%; aspect-ratio: 1; padding: 0; margin: 0 0 8px; overflow: hidden; cursor: zoom-in;
  border: var(--border); border-radius: 16px; background: var(--oak-soft); box-shadow: 3px 3px 0 var(--ink);
  transition: transform .25s cubic-bezier(.3, 1.6, .5, 1), box-shadow .2s;
}
.item-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.item-photo:hover { transform: translateY(-3px) rotate(-1deg); box-shadow: 5px 5px 0 var(--ink); }
.item-photo:hover img { transform: scale(1.06); }
.no-photo { display: grid; place-items: center; cursor: default; background: color-mix(in srgb, var(--tab, var(--oak)) 35%, #fff); }
.no-photo:hover { transform: none; box-shadow: 3px 3px 0 var(--ink); }
.no-photo svg { width: 42%; height: 42%; color: var(--ink); opacity: .85; }
.fav-photo { display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; margin: 0 0 14px; overflow: hidden; cursor: zoom-in; border: var(--border); border-radius: 14px; background: none; }
.fav-photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.fav-photo:hover img { transform: scale(1.06); }

/* photo lightbox */
.lightbox { padding: 0; border: var(--border); border-radius: var(--radius); background: var(--milk); max-width: min(92vw, 720px); box-shadow: var(--shadow); }
.lightbox::backdrop { background: #2a2826cc; }
.lightbox figure { margin: 0; }
.lightbox img { display: block; width: 100%; max-height: 78vh; object-fit: contain; background: #fff; }
.lightbox figcaption { font: 700 1.3rem var(--hand); text-align: center; padding: 10px 16px 14px; }
.lightbox-close {
  position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border-radius: 50%;
  border: var(--border); background: var(--mustard); font: 700 1.1rem var(--body); cursor: pointer;
}
.board.swap .item:nth-child(1) { animation-delay: 0.000s; }
.board.swap .item:nth-child(2) { animation-delay: 0.035s; }
.board.swap .item:nth-child(3) { animation-delay: 0.070s; }
.board.swap .item:nth-child(4) { animation-delay: 0.105s; }
.board.swap .item:nth-child(5) { animation-delay: 0.140s; }
.board.swap .item:nth-child(6) { animation-delay: 0.175s; }
.board.swap .item:nth-child(7) { animation-delay: 0.210s; }
.board.swap .item:nth-child(8) { animation-delay: 0.245s; }
.board.swap .item:nth-child(9) { animation-delay: 0.280s; }
.board.swap .item:nth-child(10) { animation-delay: 0.315s; }
.board.swap .item:nth-child(11) { animation-delay: 0.350s; }
.board.swap .item:nth-child(12) { animation-delay: 0.385s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.board {
  background: #fff; border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(20px, 3vw, 36px);
}
.board-title { display: flex; align-items: baseline; gap: 12px; margin: 0 0 6px; }
.board-title h3 { font: 2rem var(--display); font-weight: 400; margin: 0; }
.board-title span { font-family: var(--hand); font-weight: 700; font-size: 1.4rem; color: var(--ink-soft); }
.board .note { color: var(--ink-soft); margin: 0 0 8px; font-size: .95rem; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 22px 22px; }
.item { padding: 14px 0; border-bottom: 2px dashed var(--line); }
.item-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.item-name { font-weight: 700; }
.item-price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.item-dots { flex: 1; border-bottom: 2px dotted #2a282633; transform: translateY(-5px); }
.item-price { font-weight: 700; font-variant-numeric: tabular-nums; }
.item-desc { margin: 2px 0 0; color: var(--ink-soft); font-size: .92rem; }
.tag {
  display: inline-block; font: 700 .95rem/1.2 var(--hand); padding: 0 8px; margin-left: 8px;
  border-radius: 6px; background: #f6e7c8; color: #85580f; vertical-align: 1px;
}
.tag.iced { background: var(--stone-soft); color: #57524b; }
.menu-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; margin: 22px 0 0; }

/* gallery: polaroids */
.gallery { columns: 3 250px; column-gap: 26px; }
.polaroid {
  margin: 0 0 26px; break-inside: avoid;
  background: #fff; padding: 12px 12px 4px; border: var(--border); border-radius: 6px;
  box-shadow: var(--shadow); transform: rotate(var(--r, 0deg));
  transition: transform .2s;
}
.polaroid:hover { transform: rotate(0) scale(1.03); }
.polaroid img { width: 100%; height: auto; border-radius: 2px; }
.polaroid figcaption { font: 700 1.35rem var(--hand); text-align: center; padding: 6px 0 4px; }
.polaroid .credit { font: .75rem var(--body); color: var(--ink-soft); }
.polaroid .credit a { text-decoration: none; }

/* menu intro photo */
.menu-intro { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(24px, 4vw, 56px); align-items: center; margin-bottom: 48px; }
.menu-intro .block-head { margin: 0; }
.spread {
  width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover;
  border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  transform: rotate(1.5deg);
}

/* shop sign on the visit card */
.ticket { position: relative; }
.sign-photo {
  position: absolute; top: -26px; right: -14px; width: clamp(110px, 14vw, 150px); margin: 0;
  background: #fff; padding: 8px 8px 2px; border: var(--border); border-radius: 6px;
  box-shadow: 3px 3px 0 var(--ink); transform: rotate(6deg);
}
.ticket > h2, .ticket > .addr, .ticket > .muted { padding-right: clamp(110px, 14vw, 150px); }
.sign-photo figcaption { font: 700 1rem var(--hand); text-align: center; }

/* reviews */
.reviews-block { background: var(--stone-soft); }
.stamp-sub { color: var(--milk); }
.reviews-wrap { display: grid; grid-template-columns: auto 1fr; gap: clamp(28px, 6vw, 80px); align-items: center; }
.stamp {
  width: clamp(200px, 26vw, 260px); aspect-ratio: 1;
  display: grid; place-content: center; text-align: center; gap: 2px;
  background: var(--ink); color: var(--gold); border: var(--border); border-radius: 50%;
  box-shadow: var(--shadow); transform: rotate(-8deg);
  outline: 3px dashed var(--gold); outline-offset: -18px;
}
.stamp-num { font: clamp(4rem, 8vw, 5.4rem)/1 var(--display); }
.stamp-stars { color: var(--mustard); letter-spacing: 3px; font-size: 1.1rem; }
.stamp-sub { font-weight: 700; font-size: .9rem; }
.reviews-copy p { color: var(--ink-soft); font-size: 1.1rem; max-width: 32em; margin: 0 0 24px; }
.reviews { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 12px; }
.review { background: #fff; border: var(--border); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.review header { display: flex; align-items: center; gap: 10px; }
.review img { width: 40px; height: 40px; border-radius: 50%; }
.review .who { font-weight: 700; text-decoration: none; }
.review .when { font-size: .82rem; color: var(--ink-soft); }
.review .stars { color: var(--gold); letter-spacing: 1px; }
.review { box-shadow: var(--shadow); }
.review:nth-child(odd) { transform: rotate(-.6deg); }
.review:nth-child(even) { transform: rotate(.6deg); }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--mustard); border: var(--border); font: 1.1rem var(--display);
}
.review:nth-child(2n) .avatar { background: var(--oak); }
.review:nth-child(3n) .avatar { background: var(--blush); }
.review-wide { grid-column: span 2; }
.scores { font-size: .85rem; font-weight: 700; color: var(--ink-soft); }
@media (max-width: 960px) { .reviews { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .reviews { grid-template-columns: 1fr; } .review-wide { grid-column: auto; } }
.ordered { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0; }
.ordered li { font: 700 .95rem/1.3 var(--hand); background: var(--oak-soft); border-radius: 6px; padding: 1px 8px; }
.review p { margin: 0; }
.review .src { font-size: .78rem; color: var(--ink-soft); margin-top: auto; }

/* visit */
.visit { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(24px, 4vw, 48px); align-items: stretch; }
.ticket {
  background: var(--mustard); border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 40px);
}
.addr { font: 1.6rem/1.2 var(--display); margin: 0 0 8px; }
.hours { list-style: none; padding: 0; margin: 20px 0; background: #fff; border: var(--border); border-radius: 14px; overflow: hidden; }
.hours li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 16px; border-bottom: 2px dashed var(--line); }
.hours li:last-child { border-bottom: 0; }
.hours li.today { background: var(--ink); color: var(--milk); font-weight: 700; }
.contact { display: flex; flex-wrap: wrap; gap: 6px 20px; font-weight: 700; margin: 0 0 20px; }
.map { width: 100%; min-height: 460px; height: 100%; border: var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }

/* footer */
.footer { background: var(--ink); color: var(--milk); text-align: center; padding: 44px 16px; }
.footer .brand img { height: 56px; }
.footer p { margin: 6px 0 0; }
.footer .fine { color: #b9b3aa; }

@media (max-width: 860px) {
  .hero, .visit, .reviews-wrap { grid-template-columns: 1fr; }
  .shop { width: min(80%, 320px); order: -1; }
  .favs { grid-template-columns: 1fr; }
  .menu-intro { grid-template-columns: 1fr; }
  .sign-photo { width: 100px; right: 8px; top: -30px; }
  .ticket > h2, .ticket > .addr, .ticket > .muted { padding-right: 100px; }
  .fav:nth-child(n) { transform: none; }
  .stamp { justify-self: center; }
  .map { min-height: 320px; }
}
@media (max-width: 520px) {
  .nav nav a:not(.nav-cta):not(.nav-ig) { display: none; }
  .lid { width: 84px; }
  .menu-grid { grid-template-columns: repeat(2, 1fr); gap: 16px 12px; }
  .item-desc { font-size: .85rem; }
  .item-top { flex-direction: column; gap: 0; }
  .item-price { color: var(--ink-soft); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lights circle, .wisp, .eyes circle, .cheek, .mug, .owner, .owner-eyes circle { animation: none; }
  .wisp { opacity: .9; }
  .btn, .lid, .tab, .polaroid, .tab-icon, .item-photo, .item-photo img, .fav-photo img { transition: none; }
  .tab, .tab-icon, .i-steam, .board.swap .item, .board.swap .board-title { animation: none !important; }
}
