/* ==========================================================================
   Pizzeria Bernina · Denominazione
   A notarized certificate of origin, not a menu template.
   Direction: .impeccable/surfaces/public-index-html.md
   ========================================================================== */

:root {
  --parchment: #F1E7D0;
  --parchment-deep: #E8DAB9;
  --ink: #211A14;
  --ink-soft: #4A3F33;
  --seal: #8C2318;
  --seal-deep: #6E1B12;
  --verdigris: #007A3D;
  --green-bright: #009640;
  --gold: #B8974E;
  --gold-bright: #D2B471;
  --paper-line: rgba(33, 26, 20, 0.14);

  --font-display: 'Bodoni Moda', 'Times New Roman', serif;
  --font-body: 'EB Garamond', Georgia, serif;
  --font-mono: 'Courier Prime', 'Courier New', monospace;
}

/* Form Input & Color Guard Protection: never the browser-default blue */
input[type="radio"],
input[type="checkbox"] {
  accent-color: var(--seal) !important;
}

input:focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: var(--seal) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--seal) 20%, transparent) !important;
}

html {
  background: var(--parchment);
}

body {
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--font-body);
}

::selection {
  background: var(--seal);
  color: var(--parchment);
}

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--parchment-deep); }
::-webkit-scrollbar-thumb {
  background: var(--gold);
  border: 3px solid var(--parchment-deep);
  border-radius: 0;
}
* { scrollbar-color: var(--gold) var(--parchment-deep); scrollbar-width: thin; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--seal);
  outline-offset: 3px;
}

.font-display { font-family: var(--font-display); }
.font-body { font-family: var(--font-body); }
.font-mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Certificate frame — the primary container: intaglio double rule + cartouches
   ========================================================================== */

.certificate-frame {
  position: relative;
  border: 1.5px solid var(--ink);
  box-shadow:
    inset 0 0 0 7px var(--parchment),
    inset 0 0 0 8px var(--gold),
    inset 0 0 0 9px var(--parchment),
    inset 0 0 0 10.5px var(--ink);
  padding: 3rem 1.5rem;
}

@media (min-width: 640px) {
  .certificate-frame { padding: 3.5rem 3rem; }
}

.certificate-frame--dark {
  border-color: var(--gold);
  box-shadow:
    inset 0 0 0 7px var(--ink),
    inset 0 0 0 8px var(--gold),
    inset 0 0 0 9px var(--ink),
    inset 0 0 0 10.5px var(--gold-bright);
}

.cartouche {
  position: absolute;
  width: 34px;
  height: 34px;
  color: var(--gold);
  z-index: 2;
  pointer-events: none;
}
.cartouche--dark { color: var(--gold-bright); }
.cartouche.tl { top: -1px; left: -1px; }
.cartouche.tr { top: -1px; right: -1px; transform: scaleX(-1); }
.cartouche.bl { bottom: -1px; left: -1px; transform: scaleY(-1); }
.cartouche.br { bottom: -1px; right: -1px; transform: scale(-1, -1); }

/* ==========================================================================
   Wax seal
   ========================================================================== */

.wax-seal {
  width: 84px;
  height: 84px;
  filter: drop-shadow(0 6px 10px rgba(33, 26, 20, 0.35));
  flex-shrink: 0;
}
.wax-seal--sm { width: 54px; height: 54px; }

/* ==========================================================================
   Ribbon tag — the "verified" / category ribbon
   ========================================================================== */

.ribbon {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.1rem;
  background: var(--verdigris);
  color: var(--parchment);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  clip-path: polygon(0 0, 100% 0, 96% 50%, 100% 100%, 0 100%, 4% 50%);
}
.ribbon--seal { background: var(--seal); }
.ribbon--gold { background: var(--gold); color: var(--ink); }

/* ==========================================================================
   Stamp button — the primary registrar-stamp CTA
   ========================================================================== */

.stamp-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 2rem;
  border: 1.5px solid currentColor;
  box-shadow: inset 0 0 0 3px var(--parchment);
  clip-path: polygon(
    10px 0, calc(100% - 10px) 0, 100% 10px,
    100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%,
    0 calc(100% - 10px), 0 10px
  );
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--parchment);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.25s ease, color 0.25s ease;
}
.stamp-btn:hover { transform: translateY(-2px) rotate(-0.4deg); }
.stamp-btn--seal {
  color: var(--parchment);
  background: var(--seal);
  box-shadow: inset 0 0 0 3px var(--seal-deep);
}
.stamp-btn--seal:hover { background: var(--seal-deep); }
.stamp-btn--ink {
  color: var(--parchment);
  background: var(--ink);
  box-shadow: inset 0 0 0 3px #35281c;
}
.stamp-btn--ink:hover { background: #150f0a; }
.stamp-btn--ghost {
  background: transparent;
}
.stamp-btn--ghost:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.stamp-btn--ghost-dark {
  color: var(--parchment);
  background: transparent;
  border-color: color-mix(in srgb, var(--parchment) 40%, transparent);
  box-shadow: inset 0 0 0 3px transparent;
}
.stamp-btn--ghost-dark:hover { background: color-mix(in srgb, var(--parchment) 10%, transparent); }

/* ==========================================================================
   Ledger — ruled document rows for the menu and tabular data
   ========================================================================== */

.ledger-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
}

.ledger-leader {
  flex: 1;
  border-bottom: 1px dotted color-mix(in srgb, var(--ink) 35%, transparent);
  margin: 0 0.75rem;
  min-width: 1.5rem;
  transform: translateY(-0.35em);
}

.price {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--seal);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ==========================================================================
   Seal mark — small verified-fact badge
   ========================================================================== */

.seal-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--verdigris);
  border: 1px solid color-mix(in srgb, var(--verdigris) 45%, transparent);
  padding: 0.2rem 0.55rem 0.2rem 0.4rem;
}
.seal-mark svg { width: 12px; height: 12px; }

/* ==========================================================================
   Nav
   ========================================================================== */

.nav-link {
  position: relative;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding-bottom: 0.3rem;
  transition: color 0.2s ease;
}
.nav-link:hover { color: var(--verdigris); }
.nav-link.is-active {
  color: var(--verdigris);
  border-bottom: 1px solid var(--verdigris);
}

/* ==========================================================================
   Photograph treatment — duotone certificate plates from real photography
   ========================================================================== */

.plate {
  position: relative;
  overflow: hidden;
}
.plate img {
  filter: sepia(0.35) saturate(1.05) contrast(1.05) brightness(0.96);
}
.plate::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--seal) 12%, transparent), transparent 40%, color-mix(in srgb, var(--ink) 28%, transparent));
  mix-blend-mode: multiply;
  pointer-events: none;
}
.plate--frame {
  border: 1.5px solid var(--ink);
  box-shadow: inset 0 0 0 5px var(--parchment), inset 0 0 0 6px var(--gold);
  padding: 6px;
}

/* Oven-glow: a real sibling layer (not ::after, which .plate already owns for the duotone)
   painted between the photo and the duotone pass, amplifying firelight already in the shot. */
.oven-glow-layer {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 50% at 16% 30%, rgba(255, 150, 60, 0.75), rgba(230, 90, 30, 0.35) 42%, transparent 72%);
  mix-blend-mode: screen;
  pointer-events: none;
}

/* ==========================================================================
   Motion — one authored moment: certificates settle into place
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
  .stamp-in {
    animation: stampIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) both;
  }
  @keyframes stampIn {
    from { opacity: 0; transform: translateY(14px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }
}

/* Menu category visibility toggle (JS sets .is-hidden rather than inline display) */
.menu-cat.is-hidden { display: none; }

/* Built by CuonzTech credit styling */
.cuonztech-credit a { text-decoration: underline; text-underline-offset: 3px; }
