/* Pizzaria Roma — plain CSS, mobile-first. Breakpoints: 600px, 768px, 900px, 1024px. */

/* Fraunces (SIL OFL, see fonts/OFL.txt), self-hosted Latin subset. The upright file is variable (wght 100–900). */
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/fraunces-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/fraunces-italic-latin.woff2") format("woff2");
}

:root {
  --bg: #faf6ef;
  --surface: #fffdf8;
  --text: #2b211c;
  --muted: #74645a;
  --accent: #b5482b;
  --accent-dark: #933a22;
  --accent-contrast: #fff;
  --line: #ece3d5;
  --line-strong: #d9cbb7;
  --open: #4c7a3d;
  --closed: #b5482b;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 0 var(--line), 0 10px 30px -18px rgba(80, 40, 20, .25);
  --max: 1120px;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
}
main { flex: 1; }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; text-wrap: balance; }
p { margin: 0 0 .75em; }
.icon { flex: none; vertical-align: -0.2em; }
.icon-link { display: inline-flex; align-items: center; gap: 6px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 20px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 20; padding: 8px 14px; background: var(--accent); color: var(--accent-contrast); border-radius: var(--radius-sm); }
.skip-link:focus { top: 12px; }

/* Header + nav: a single markup for every screen size */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(250, 246, 239, .92); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 24px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-head); font-weight: 600; font-size: 1.15rem; }
.brand img { width: 44px; height: auto; }
.site-nav { display: flex; flex-wrap: wrap; gap: 2px; width: 100%; }
.site-nav a { position: relative; padding: 8px 10px; text-decoration: none; white-space: nowrap; color: var(--text); font-weight: 600; font-size: 1.02rem; border-radius: var(--radius-sm); }
.site-nav a::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 2px; height: 2px; background: var(--accent); transform: scaleX(0); transition: transform .2s; }
.site-nav a:hover::after, .site-nav a:focus-visible::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 999px; text-decoration: none; font: inherit; font-weight: 600; border: 1.5px solid transparent; cursor: pointer; transition: transform .15s ease, background-color .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--accent-contrast); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--text); }

/* Page headings (menu pages, contact, login) */
.page-head { padding-block: 40px 8px; text-align: center; }
.page-head h1 { font-size: clamp(2.2rem, 7vw, 4rem); font-weight: 400; margin-bottom: .2em; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; color: var(--muted); margin-bottom: 8px; }
.page-head .lead { margin-inline: auto; }

/* Home: hero. The image and the message are set from the admin panel, so the layout
   must work with any image ratio and any message length (or none at all). */
.hero { padding-block: 32px 24px; }
.hero-grid { display: grid; gap: 28px; align-items: center; }
.hero h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); font-weight: 400; }
.hero h1 .accent { display: block; font-style: italic; color: var(--accent); }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 46ch; }
.notice { margin: 20px 0 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--accent); font-size: 1.1rem; max-width: 46ch; white-space: pre-line; overflow-wrap: anywhere; }
.hero-media { margin: 0; display: flex; justify-content: center; }
.hero-media img { width: auto; max-height: min(70vh, 560px); object-fit: contain; border-radius: var(--radius); box-shadow: 0 30px 60px -30px rgba(80, 40, 20, .35); }

/* Home: info cards */
.info { display: grid; gap: 16px; padding-block: 16px 32px; }
.card { background: var(--surface); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); }
.card h2 { display: flex; align-items: center; gap: 8px; font-size: 1.05rem; color: var(--accent); }
.card p { margin-bottom: 4px; }
.card .tel { font-size: 1.15rem; font-weight: 600; text-decoration: none; }
.card .row { display: flex; justify-content: space-between; gap: 12px; }
.status { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; letter-spacing: .04em; margin: 0; }
.timer { color: var(--muted); font-variant-numeric: tabular-nums; min-height: 1.5em; min-height: 1lh; }

/* Home: featured pizzas + hours */
.hours-section { display: grid; gap: 40px; padding-block: 16px 56px; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 1.5rem; font-weight: 400; }
.hours-list { margin: 0; }
.hours-list > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding-block: 10px; border-bottom: 1px solid var(--line); }
.hours-list dt { font-weight: 500; }
.hours-list dd { margin: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.featured { min-width: 0; }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.feat { display: flex; flex-direction: column; align-items: center; text-align: center; text-decoration: none; color: var(--text); background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px 8px 14px; transition: transform .2s; }
.feat:hover { transform: translateY(-3px); }
.feat img { width: 85%; height: auto; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 10px 12px rgba(80, 40, 20, .25)); }
.feat-name { font-family: var(--font-head); font-weight: 600; margin-top: 6px; font-size: 1rem; line-height: 1.2; }
.feat-price { font-size: .85rem; color: var(--accent); }

/* Pizza menu */
.sizes-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 18px; color: var(--muted); font-size: .9rem; }
.pizza-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 32px 20px; padding-block: 24px 56px; }
.pizza { display: flex; flex-direction: column; text-align: center; }
.pizza img { width: 78%; margin: 12px auto 0; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 18px 20px rgba(80, 40, 20, .25)); transition: transform .4s ease; }
.pizza:hover img { transform: rotate(8deg) scale(1.03); }
.pizza-body { display: flex; flex-direction: column; flex: 1; padding: 16px 20px 0; }
.pizza h2 { font-size: 1.3rem; margin-bottom: .3em; }
.pizza h2 small { font-size: .7em; font-weight: 400; color: var(--muted); }
.ingredients { color: var(--muted); font-size: .92rem; flex: 1; }
.prices { list-style: none; margin: 12px 0 0; padding: 12px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px dashed var(--line-strong); }
.prices span { display: block; font-size: .75rem; color: var(--muted); letter-spacing: .1em; }
.prices strong { color: var(--accent); font-family: var(--font-head); font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.fade-in { animation: fade-in .6s ease both; animation-delay: calc(var(--i, 0) * 30ms); }
@keyframes fade-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Pratos / Outras: tabs + dish list */
.menu-section { max-width: 760px; padding-block: 16px 56px; }
.tabs { display: flex; gap: 6px; padding: 6px; margin: 0 auto 28px; width: fit-content; max-width: 100%; overflow-x: auto; background: var(--surface); border-radius: 999px; box-shadow: var(--shadow); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 8px 18px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-weight: 500; white-space: nowrap; cursor: pointer; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { background: var(--accent); color: var(--accent-contrast); }
.dish-panel h2 { font-size: 1.4rem; font-weight: 400; }
.js .dish-panel h2 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dish-panel + .dish-panel { margin-top: 32px; }
.js .dish-panel + .dish-panel { margin-top: 0; }
.dishes { list-style: none; margin: 0; padding: 0; }
.dish { padding-block: 14px; border-bottom: 1px solid var(--line); }
.dish-line { display: flex; align-items: baseline; gap: 10px; }
.dish-name { font-family: var(--font-head); font-size: 1.15rem; font-weight: 600; margin: 0; }
.dish-line::after { content: ""; order: 1; flex: 1; border-bottom: 1px dotted var(--line-strong); transform: translateY(-4px); min-width: 16px; }
.dish-price { order: 2; color: var(--accent); font-family: var(--font-head); font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dish-desc { margin: 4px 0 0; color: var(--muted); font-size: .95rem; }
.empty { color: var(--muted); text-align: center; padding-block: 24px; }

/* Contactos */
.contact-grid { display: grid; gap: 40px; padding-block: 16px 56px; }
.contact-col { min-width: 0; display: grid; gap: 16px; align-content: start; }
.contact-col .section-title:not(:first-child) { margin-top: 16px; }
.contact-col address { font-style: normal; }
.phone-cards { display: grid; gap: 12px; }
.phone-card { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--text); transition: transform .15s ease; }
.phone-card:hover { transform: translateY(-2px); }
.phone-card > .icon { color: var(--accent); flex: none; }
.phone-label { display: block; font-size: .85rem; color: var(--muted); }
.phone-number { display: block; font-family: var(--font-head); font-size: 1.4rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.muted { color: var(--muted); margin: 0; }

/* Forms (login) */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: .9rem; font-weight: 500; }
.field input { width: 100%; padding: 12px 14px; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius-sm); }
.field input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.form .btn { justify-self: start; }
.map { aspect-ratio: 4 / 3; width: 100%; border: 0; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--surface); }
.login { max-width: 420px; padding-block: 8px 72px; }
.login .card { padding: 28px; }
.login .btn { width: 100%; }
.form-error { color: var(--closed); margin: 4px 0 0; }

/* Footer */
.site-footer { background: #f3ece0; border-top: 1px solid var(--line); padding-top: 40px; }
.footer-inner { display: grid; gap: 24px; }
.footer-brand img { width: 110px; }
.site-footer h3 { font-family: var(--font-body); font-size: .8rem; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-col p, .footer-col p a { display: flex; align-items: flex-start; gap: 6px; }
.footer-col .icon { margin-top: .3em; }
.copyright { padding-block: 20px 28px; margin: 24px auto 0; font-size: .85rem; color: var(--muted); border-top: 1px solid var(--line); }

/* Tablet */
@media (min-width: 600px) {
  .info { grid-template-columns: repeat(2, 1fr); }
  .status-card { grid-column: 1 / -1; }
  .footer-inner { grid-template-columns: repeat(2, 1fr); }
  .phone-cards { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
  .site-nav { width: auto; justify-content: flex-end; }
  .site-nav a { padding: 8px 12px; }
  .site-nav a::after { left: 12px; right: 12px; }
}
@media (min-width: 900px) {
  .hero { padding-block: 64px 40px; }
  .hero-grid { grid-template-columns: 1.1fr 1fr; gap: 56px; }
  .hero-media { justify-content: flex-end; }
  .contact-grid { grid-template-columns: 1fr 1.2fr; gap: 56px; }
  .phone-cards { grid-template-columns: 1fr; }
}
/* Desktop */
@media (min-width: 1024px) {
  .info { grid-template-columns: repeat(3, 1fr); }
  .status-card { grid-column: auto; }
  .hours-section { grid-template-columns: 1fr 1fr; gap: 64px; }
  .footer-inner { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* The schedule scripts set inline colours (red/green/black); map them to the theme. */
[style*="color: green"] { color: var(--open) !important; }
[style*="color: red"] { color: var(--closed) !important; }
[style*="color: black"] { color: inherit !important; }
