/* Asun Bakes · demo. Colours taken from the shop: the red of the sign,
   the pink of plates and shelves, cocoa of the cookies. */
:root {
  --field: #f1cbc4;      /* pink ground */
  --paper: #fcfaf9;      /* the card */
  --ink: #3a2119;        /* cocoa */
  --muted: #6e4d40;
  --accent: #b5343b;     /* sign red */
  --accent-ink: #fcfaf9;
  --cocoa: #3a2119;
  --cocoa-2: #4c2d22;
  --cocoa-ink: #fbe9e3;
  --margin: clamp(16px, 3vw, 32px);
  --gutter: max(var(--margin), calc((100% - 1120px) / 2));
  --step-small: 0.875rem;
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2.25rem, 1.4rem + 3.4vw, 4.25rem);
  --step-hero: clamp(3.5rem, 12vw, 8.5rem);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cocoa);
  color: var(--ink);
  font-family: "Nunito", system-ui, sans-serif;
  font-size: var(--step-body);
  line-height: 1.5;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 900; letter-spacing: -0.03em; line-height: 0.98; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.page { position: relative; background: var(--field); overflow-x: clip; }

/* Bar */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px var(--gutter);
}
.mark {
  font-weight: 900; color: var(--accent); text-decoration: none;
  font-size: 1.75rem; letter-spacing: -0.04em; line-height: 1;
}
.bar nav { display: flex; gap: 28px; }
.bar nav a { text-decoration: none; font-weight: 700; }
.bar nav a:hover { color: var(--accent); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 800; text-decoration: none; border: 0; cursor: pointer;
  transition: transform .2s var(--ease), background-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-block { display: flex; width: 100%; min-height: 56px; }

/* Card: paper shape with scalloped top corners */
.card {
  position: relative; background: var(--paper);
  border-radius: 0 0 28px 28px;
}
.card::before, .card::after {
  content: ""; position: absolute; top: -16px; width: 32px; height: 32px;
  border-radius: 50%; background: var(--field);
}
.card::before { left: -16px; }
.card::after { right: -16px; }

/* Hero */
.hero { padding: clamp(40px, 8vw, 96px) var(--margin) 0; }
.hero-card {
  max-width: 1120px; margin: 0 auto;
  padding: clamp(48px, 7vw, 88px) clamp(20px, 5vw, 64px) clamp(28px, 4vw, 48px);
  text-align: center; border-radius: 0;
}
.hero-card h1 { font-size: var(--step-hero); color: var(--accent); }
.lead { font-size: var(--step-lead); max-width: 30ch; margin: 28px auto 0; font-weight: 600; }
.status {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 24px; font-weight: 800;
}
.status::before {
  content: ""; width: 10px; height: 10px; transform: rotate(45deg);
  background: var(--muted);
}
.status.is-open::before { background: #3d7a3a; }
.plate { margin: clamp(32px, 5vw, 56px) 0 0; overflow: hidden; }
.plate img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; animation: drift 18s var(--ease) both alternate infinite; }
@keyframes drift { from { transform: scale(1); } to { transform: scale(1.06); } }

/* Menu sheet: continues the hero card */
.menu { padding: 0 var(--margin) clamp(80px, 9vw, 128px); }
.sheet {
  max-width: 1120px; margin: 0 auto;
  padding: clamp(32px, 5vw, 64px) clamp(20px, 5vw, 64px) clamp(32px, 5vw, 64px);
  border-top: 6px dotted var(--field);
}
.sheet::before, .sheet::after { display: none; }
.sheet-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sheet-head h2 { font-size: var(--step-head); }
.week { font-size: var(--step-lead); font-weight: 800; color: var(--accent); }
.groups {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px;
  margin-top: clamp(32px, 4vw, 56px);
}
.group h3 { font-size: var(--step-lead); letter-spacing: -0.02em; color: var(--accent); }
.group ul { list-style: none; padding: 0; margin: 14px 0 0; }
.group li { padding: 8px 0; font-weight: 700; }
.group li span { font-weight: 400; color: var(--muted); }
.plates {
  display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 16px;
  margin-top: clamp(40px, 5vw, 64px);
}
.plates figure { margin: 0; }
.plates img { width: 100%; height: clamp(220px, 26vw, 360px); object-fit: cover; border-radius: 6px; }

/* Order */
.order {
  background: var(--cocoa); color: var(--cocoa-ink);
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px);
  padding: clamp(80px, 10vw, 140px) var(--gutter);
  min-height: 88svh; align-items: stretch;
}
.order-chat {
  background: var(--field); color: var(--ink); border-radius: 8px;
  min-height: min(520px, 72svh); padding: clamp(20px, 3vw, 36px);
  display: flex; flex-direction: column; justify-content: space-between;
}
.chat-head { display: flex; align-items: center; gap: 12px; font-size: var(--step-small); line-height: 1.3; }
.chat-head strong { font-size: 1rem; }
.chat-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--paper); font-weight: 900; font-size: 1.4rem;
}
.bubble {
  align-self: flex-end; max-width: 88%;
  background: #dcf5c8; color: #1f2b17; padding: 16px 18px;
  border-radius: 14px 14px 4px 14px; font-size: var(--step-lead); line-height: 1.35; font-weight: 600;
  white-space: pre-line;
}
.bubble.swap { animation: pop .35s var(--ease); }
@keyframes pop { from { transform: translateY(10px); opacity: .3; } to { transform: none; opacity: 1; } }
.order-text { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.tabs { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.tabs button {
  background: none; border: 0; padding: 6px 0; cursor: pointer;
  font: inherit; font-weight: 700; color: #c9ab9f; font-size: 1.125rem;
  transition: color .2s;
}
.tabs button:hover { color: var(--cocoa-ink); }
.tabs button[aria-selected="true"] { color: var(--cocoa-ink); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 8px; text-decoration-color: var(--accent); }
.order-copy h2 { font-size: var(--step-head); color: var(--paper); }
.order-copy p { margin-top: 32px; max-width: 36ch; }
.cells { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cell {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 72px; padding: 0 12px; border-radius: 8px; font-weight: 800; text-decoration: none;
  transition: transform .2s var(--ease);
}
.cell:hover { transform: translateY(-2px); }
.cell:active { transform: scale(.98); }
.cell-accent { background: var(--accent); color: var(--accent-ink); }
.cell-tone { background: var(--cocoa-2); color: var(--cocoa-ink); }

/* Visit */
.visit { position: relative; min-height: 100svh; display: flex; align-items: flex-end; justify-content: flex-end; padding: 60px var(--gutter); }
.visit-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 20% 50%; }
.visit-card {
  position: relative; width: 400px; padding: 32px 32px 0; overflow: hidden;
  border-radius: 8px; margin-top: 0;
}
.visit-card::before, .visit-card::after { display: none; }
.visit-card h2 { font-size: 2.25rem; margin-bottom: 16px; }
.visit-card p { margin-top: 12px; }
.hours { list-style: none; padding: 0; margin: 20px 0 8px; }
.hours li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px; margin: 0 -10px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.hours li.today { background: var(--field); font-weight: 800; }
.visit-card .btn-block { margin: 24px -32px 0; width: calc(100% + 64px); border-radius: 0; }

/* Footer: the back of the card, revealed under the page */
.back { background: var(--cocoa); padding: 64px var(--gutter) 40px; }
.back-card {
  position: relative; margin: 0 auto; background: var(--paper);
  padding: 56px clamp(20px, 5vw, 56px) 28px; border-radius: 0 0 8px 8px;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px;
  border-top: 8px dotted var(--cocoa);
}
.back .mark-big { font-size: clamp(3rem, 12vw, 6rem); }
.back-msg p { margin-top: 20px; max-width: 30ch; }
.back-addr { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; font-size: 1.125rem; position: relative; padding-top: 4px; }
.back-addr a { font-weight: 700; text-decoration-color: var(--accent); text-underline-offset: 4px; }
.back-addr a:hover { color: var(--accent); }
.stamp { position: absolute; top: -20px; right: 0; width: 88px; aspect-ratio: 3/4; object-fit: cover; border: 6px solid var(--field); }
.imprint { grid-column: 1 / -1; text-align: center; font-size: var(--step-small); color: var(--muted); margin-top: 24px; }

/* Entrances */
.js .rise { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .rise.in { opacity: 1; transform: none; }

@media (max-width: 860px) {
  .bar nav { display: none; }
  .groups { grid-template-columns: 1fr 1fr; gap: 24px 20px; }
  .order { grid-template-columns: 1fr; min-height: 0; }
  .order-chat { aspect-ratio: auto; min-height: 300px; gap: 40px; }
  .cells { grid-template-columns: 1fr; }
  .cell { min-height: 60px; }
  .visit { min-height: 0; display: block; padding: 0 0 48px; }
  .back { padding-inline: var(--margin); }
  .visit-photo { position: relative; height: auto; aspect-ratio: 4 / 3; object-position: 50% 50%; }
  .visit-card { width: auto; margin: -80px 16px 0; }
  .back-card { grid-template-columns: 1fr; }
  .stamp { position: static; width: 64px; order: -1; }
}
@media (max-width: 520px) {
  .bar .btn { padding: 0 16px; min-height: 44px; font-size: .95rem; }
  .mark { font-size: 1.5rem; }
  .plates { grid-template-columns: 1fr 1fr; }
  .plates figure:nth-child(2) { grid-column: 1 / -1; order: -1; }
  .plates figure { margin: 0; }
.plates img { height: 200px; }
  .plate img { aspect-ratio: 4 / 3; }
  .order-copy h2 { font-size: 2.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .plate img, .bubble.swap { animation: none; }
  .js .rise { transform: none; transition: opacity .3s; }
  .btn, .cell { transition: none; }
}
