@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,700;1,9..144,600&family=EB+Garamond:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --leather: #3f4a34;
  --leather-dark: #2a3223;
  --paper: #f7f0e1;
  --paper-dark: #ebe0c8;
  --ink: #33301f;
  --ink-soft: #675f4a;
  --gold: #b3592f;
  --gold-light: #d1793f;
  --shadow: rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background:
    radial-gradient(ellipse at top, #545f42 0%, var(--leather) 55%, var(--leather-dark) 100%);
  color: var(--ink);
  font-family: 'EB Garamond', Georgia, serif;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3vh 4vw;
  animation: pageFadeIn 0.45s ease both;
}

@keyframes pageFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- Scroll reveal (used by about page bento/gallery tiles) ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: calc(var(--reveal-i, 0) * 70ms);
}

.reveal.in-view {
  opacity: 1;
  transform: none;
}

/* ---------- Thin, theme-matching scrollbar ---------- */

* {
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-thumb {
  background: var(--gold);
  border-radius: 999px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

h1, h2, h3, .brand {
  font-family: 'Fraunces', Georgia, serif;
  color: var(--ink);
  letter-spacing: 0.02em;
}

a {
  color: var(--gold);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.brand-logo {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  vertical-align: middle;
}

/* ---------- Image zoom lightbox (shared by order page item photos) ---------- */

.zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(20, 12, 6, 0.85);
  padding: 2rem;
  cursor: zoom-out;
}

.zoom-overlay.open {
  display: flex;
}

.zoom-figure {
  margin: 0;
  max-width: min(90vw, 720px);
  text-align: center;
}

.zoom-img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  cursor: default;
}

.zoom-caption {
  margin-top: 1rem;
  font-family: 'Fraunces', serif;
  color: var(--paper);
  font-size: 1.1rem;
}

.zoom-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  background: none;
  border: none;
  color: var(--paper);
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}

.menu-empty, .menu-error {
  font-style: italic;
  color: var(--ink-soft);
}

.menu-empty {
  animation: menuEmptyPulse 1.5s ease-in-out infinite;
}

@keyframes menuEmptyPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

.menu-error {
  color: #8a3b2b;
}

/* ---------- Admin page (ledger) ---------- */

.ledger {
  width: min(1000px, 96vw);
  background: var(--paper);
  border-radius: 6px;
  box-shadow: 0 30px 60px var(--shadow), inset 0 0 0 1px rgba(179,89,47,0.25);
  padding: 5vh 5vw;
}

.ledger h1 {
  margin-top: 0;
}

.ledger-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ledger-brand .brand-logo {
  width: 30px;
  height: 30px;
}

.ledger-sub {
  color: var(--ink-soft);
  font-style: italic;
  margin-top: -0.5rem;
  margin-bottom: 2rem;
}

.ledger-grid {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 800px) {
  .ledger-grid {
    grid-template-columns: 1fr;
  }
}

.ledger-form {
  background: rgba(179,89,47,0.08);
  border: 1px solid rgba(179,89,47,0.3);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.ledger-form label {
  font-family: 'Fraunces', serif;
  font-size: 0.85rem;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ledger-form input,
.ledger-form select,
.ledger-form textarea {
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  padding: 0.5rem 0.6rem;
  border: 1px solid rgba(179,89,47,0.4);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
}

.ledger-form textarea {
  resize: vertical;
  min-height: 60px;
}

.ledger-form button[type="submit"] {
  font-family: 'Fraunces', serif;
  background: var(--gold);
  color: var(--leather-dark);
  border: none;
  padding: 0.65rem 1.2rem;
  border-radius: 999px;
  cursor: pointer;
  font-size: 1rem;
  margin-top: 0.4rem;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
}

.ledger-form button[type="submit"]:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(179,89,47,0.3);
}

.ledger-form button[type="submit"]:active {
  transform: translateY(0) scale(0.97);
}

.ledger-form input,
.ledger-form select,
.ledger-form textarea {
  transition: border-color 0.15s, box-shadow 0.15s;
}

.ledger-form input:focus,
.ledger-form select:focus,
.ledger-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(179,89,47,0.18);
}

.form-message {
  min-height: 1.2em;
  font-size: 0.9rem;
}

.form-message.ok { color: #2f6b2f; }
.form-message.err { color: #8a3b2b; }

.ledger-table-wrap {
  max-height: 70vh;
  overflow-y: auto;
}

.category-block {
  margin-bottom: 1.6rem;
}

.category-block h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--gold);
  border-bottom: 1px solid rgba(179,89,47,0.3);
  padding-bottom: 0.3rem;
}

.admin-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px dotted rgba(179,89,47,0.3);
}

.admin-item .info strong {
  font-family: 'Fraunces', serif;
}

.admin-item .info span {
  display: block;
  font-size: 0.85rem;
  color: var(--ink-soft);
  font-style: italic;
}

.admin-item .actions {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
}

.admin-item .actions button {
  border: 1px solid rgba(179,89,47,0.5);
  background: none;
  border-radius: 4px;
  padding: 0.25rem 0.6rem;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: 'EB Garamond', serif;
  transition: background 0.15s, transform 0.15s;
}

.admin-item .actions button:hover {
  background: rgba(179,89,47,0.12);
  transform: translateY(-1px);
}

.admin-item .actions button.danger {
  border-color: #8a3b2b;
  color: #8a3b2b;
}

.admin-item .actions button.danger:hover {
  background: rgba(138,59,43,0.12);
}

.admin-item {
  animation: itemRise 0.35s ease both;
}

@keyframes itemRise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.top-links {
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.ledger-divider {
  margin: 3rem 0 2rem;
  border: none;
  border-top: 1px solid rgba(179,89,47,0.3);
}

.admin-item .thumb {
  width: 64px;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.admin-item .info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
