@import "@kvyk/design/families/zilla-slab.css";
@import "@kvyk/design/families/fira-sans.css";

/* kvyk's part: what every website needs, whatever its look. */
[data-kvyk-placeholder] {
  padding: 0 0.25em;
  border: 1px dashed currentColor;
  border-radius: 0.25rem;
  background: #fff3b0;
  color: #1d1d1b;
}
h1, h2, h3 { overflow-wrap: break-word; }
img { max-width: 100%; height: auto; }
.form { display: grid; gap: 1rem; max-width: 44rem; }
.form label { display: grid; gap: 0.25rem; font-weight: 600; }
.form input, .form textarea, .form select {
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--line, currentColor);
  border-radius: 0.375rem;
  background: var(--surface, transparent);
  color: var(--ink, inherit);
  font: inherit;
  font-weight: 400;
}
.form [aria-invalid="true"] { border-color: var(--action, currentColor); }
.form button { justify-self: start; cursor: pointer; font: inherit; font-weight: 600; }
.form [data-kvyk-status]:empty { display: none; }
.form [data-kvyk-status]:not([data-state="sent"], [data-state="sending"]) { color: var(--action, inherit); }

/* The design agreed in the design step: build the website's pages with these classes and custom properties. */
:root {
  --ground: #FFDE00;
  --surface: #FFEF5C;
  --ink: #3D0705;
  --ink-soft: #3D1206;
  --line: #D19B00;
  --action: #6B1410;
  --on-action: #FFF4E2;
  --accent: #6B1410;
  --font-heading: "Zilla Slab", Georgia, serif;
  --font-text: "Fira Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font-text);
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
  position: relative;
  isolation: isolate;
}
.board-frame {
  width: 100%;
  max-width: none;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  padding: 0 6%;
}

.brand-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 10px;
  border-bottom: 1px solid var(--line);
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  margin: 0;
}

.brand-tag {
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0;
}

main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  z-index: 0;
}

/* The screen itself: the picture behind it starts at the page's own corners. */
.menu-screen {
  flex: 1 1 auto;
  padding: 4vh 6% 6vh;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

/* The header and the footer stand over the picture, on the board's own yellow. */
.site-header, .site-footer, .cycle-dots {
  position: relative;
  z-index: 2;
}

/* The picture covers the whole page, behind the header and the footer too. */
.page-photo {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.page-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Each page starts from its own corner, fully clear there, gone by halfway across the page.
   The picture covers the whole background; the gradient spans the whole page too. */
.page-photo.corner-tr img { object-position: 100% 0; }
.page-photo.corner-tr {
  -webkit-mask-image: linear-gradient(to bottom left, #000 0%, #000 14%, rgba(0, 0, 0, 0.72) 34%, rgba(0, 0, 0, 0.28) 46%, transparent 52%);
  mask-image: linear-gradient(to bottom left, #000 0%, #000 14%, rgba(0, 0, 0, 0.72) 34%, rgba(0, 0, 0, 0.28) 46%, transparent 52%);
}

.page-photo.corner-bl img { object-position: 0 100%; }
.page-photo.corner-bl {
  -webkit-mask-image: linear-gradient(to top right, #000 0%, #000 14%, rgba(0, 0, 0, 0.72) 34%, rgba(0, 0, 0, 0.28) 46%, transparent 52%);
  mask-image: linear-gradient(to top right, #000 0%, #000 14%, rgba(0, 0, 0, 0.72) 34%, rgba(0, 0, 0, 0.28) 46%, transparent 52%);
}

.page-photo.corner-br img { object-position: 100% 100%; }
.page-photo.corner-br {
  -webkit-mask-image: linear-gradient(to top left, #000 0%, #000 14%, rgba(0, 0, 0, 0.72) 34%, rgba(0, 0, 0, 0.28) 46%, transparent 52%);
  mask-image: linear-gradient(to top left, #000 0%, #000 14%, rgba(0, 0, 0, 0.72) 34%, rgba(0, 0, 0, 0.28) 46%, transparent 52%);
}

.page-photo.corner-tl img { object-position: 0 0; }
.page-photo.corner-tl {
  -webkit-mask-image: linear-gradient(to bottom right, #000 0%, #000 14%, rgba(0, 0, 0, 0.72) 34%, rgba(0, 0, 0, 0.28) 46%, transparent 52%);
  mask-image: linear-gradient(to bottom right, #000 0%, #000 14%, rgba(0, 0, 0, 0.72) 34%, rgba(0, 0, 0, 0.28) 46%, transparent 52%);
}

.page-photo.corner-mr img { object-position: 100% 0; }
.page-photo.corner-mr {
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 12%, rgba(0, 0, 0, 0.7) 34%, rgba(0, 0, 0, 0.25) 46%, transparent 52%), linear-gradient(to left, #000 0%, #000 12%, rgba(0, 0, 0, 0.7) 34%, rgba(0, 0, 0, 0.25) 46%, transparent 52%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 12%, rgba(0, 0, 0, 0.7) 34%, rgba(0, 0, 0, 0.25) 46%, transparent 52%), linear-gradient(to left, #000 0%, #000 12%, rgba(0, 0, 0, 0.7) 34%, rgba(0, 0, 0, 0.25) 46%, transparent 52%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

/* Hero */
.hero-photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 62vh;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 60% at 50% 42%, color-mix(in srgb, var(--action) 55%, var(--ground)) 0%, color-mix(in srgb, var(--action) 20%, var(--surface)) 45%, var(--surface) 100%);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
  display: block;
}

.photo-caption {
  position: relative;
  z-index: 2;
  align-self: flex-end;
  margin: 0 0 4% 0;
  padding: 8px 18px;
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: color-mix(in srgb, var(--action) 78%, transparent);
  color: var(--on-action);
  border-radius: 3px;
}

.hero-band {
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: none;
  border-radius: 0 0 4px 4px;
  padding: 22px 28px 26px;
}

.hero-band h2 {
  font-family: var(--font-heading);
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: 0.01em;
  line-height: 1.05;
}

.hero-rule {
  width: 84px;
  height: 4px;
  background: var(--action);
  border-radius: 2px;
  margin: 14px 0 10px;
}

.hero-sub {
  margin: 0;
  font-size: 15px;
  color: var(--ink-soft);
  letter-spacing: 0.03em;
}

/* Price pages */.page-band {
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(115%);
  backdrop-filter: blur(10px) saturate(115%);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 20px 28px;
  margin-bottom: 10px;
}

.section-band {
  margin-top: 18px;
}

.section-band h2 {
  font-family: var(--font-heading);
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}

.page-band h1 {
  font-family: var(--font-heading);
  font-size: clamp(34px, 4.6vw, 58px);
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: 0.01em;
}

.page-band .band-rule {
  width: 84px;
  height: 4px;
  background: var(--action);
  border-radius: 2px;
  margin-top: 12px;
}

.price-board {
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  -webkit-backdrop-filter: blur(10px) saturate(115%);
  backdrop-filter: blur(10px) saturate(115%);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 6px 28px 14px;
}

.price-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  min-height: 60px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.price-row:last-child {
  border-bottom: none;
}

.price-row .item-name {
  font-size: clamp(20px, 2.4vw, 34px);
  color: var(--ink);
  font-weight: 400;
  line-height: 1.15;
}

.price-row .item-note {
  display: block;
  font-size: 13px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  margin-top: 2px;
}

.price-row .item-price {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(22px, 2.6vw, 38px);
  color: var(--action);
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.price-row.rule-soft {
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, var(--surface));
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 48px;
}

.empty-state {
  margin: 34px 0 20px;
  padding-top: 16px;
  border-top: 3px solid var(--action);
  color: var(--ink-soft);
  font-size: 15px;
}

.site-footer {
  margin: 0;
  padding: 18px 6% 14px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  justify-content: space-between;
  font-size: 13px;
  color: var(--ink-soft);
}

.site-footer span {
  letter-spacing: 0.04em;
}

.cycle-dots {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  padding: 14px 6% 0;
}

.cycle-dot {
  width: 28px;
  height: 5px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--line) 70%, var(--surface));
}

.cycle-dot.current {
  background: var(--action);
}

/* Play/pause: stops the cycle on the page it is on, and starts it again. */
.playpause {
  position: fixed;
  right: 10px;
  bottom: 10px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 2px solid var(--action);
  border-radius: 50%;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--action);
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 160ms ease, transform 160ms ease;
}

.playpause:hover,
.playpause:focus-visible {
  opacity: 1;
  transform: scale(1.06);
}

.playpause:focus-visible {
  outline: 3px solid var(--action);
  outline-offset: 3px;
}

.playpause.is-paused {
  opacity: 1;
}

.playpause .pp-icon {
  display: block;
}

.playpause .pp-play {
  display: none;
  margin-left: 2px;
}

.playpause.is-paused .pp-pause {
  display: none;
}

.playpause.is-paused .pp-play {
  display: block;
}

@media (max-width: 640px) {
  .playpause {
    width: 30px;
    height: 30px;
    right: 8px;
    bottom: 8px;
  }
}

@media (max-width: 640px) {
  body { padding: 0; }
  .board-frame { margin: 0; min-height: 100vh; }
  .site-header, .menu-screen, .site-footer, .cycle-dots { padding-left: 16px; padding-right: 16px; }
  .site-footer { margin: 0 16px; }
  .price-board, .page-band, .hero-band { padding-left: 16px; padding-right: 16px; }
  .two-col { grid-template-columns: 1fr; gap: 0; }
  .price-row { gap: 12px; min-height: 52px; }
  .price-row .item-name { font-size: 19px; }
  .price-row .item-price { font-size: 22px; }
  .hero-photo { aspect-ratio: 4 / 3; max-height: none; }
  .brand-line { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* The kiosk: each page fades in, waits, then fades out before the next one opens. */
.board-frame {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 8vh);
  animation: board-in 900ms ease both;
  transition: opacity 700ms ease;
}

.board-frame main {
  flex: 1 1 auto;
}

@keyframes board-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.board-frame.is-leaving {
  opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
  .board-frame { animation: none; transition: none; }
}
