@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Cinzel:wght@400;500&display=swap');

:root {
  --bg: #111010;
  --bg-secondary: #191818;
  --text: #e8e0d4;
  --text-muted: #9a9080;
  --accent: #c8a96e;
  --accent-dim: #8a6f3e;
  --border: #2a2825;
  --nav-height: 64px;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 17px;
  font-weight: 300;
  line-height: 1.7;
  min-height: 100vh;
}

/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: rgba(17, 16, 16, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 0.25s ease;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Hamburger for mobile */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  position: absolute;
  right: 20px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text-muted);
  transition: all 0.3s;
}

/* ── LOGO HEADER ── */
.page-header {
  padding-top: calc(var(--nav-height) + 60px);
  padding-bottom: 20px;
  text-align: center;
}

.logo-wrap {
  display: inline-block;
  margin-bottom: 12px;
}

.logo-wrap img {
  width: 90px;
  height: auto;
  opacity: 0.92;
  filter: brightness(1.05);
  transition: opacity 0.25s, transform 0.25s;
}

a.logo-wrap {
  display: inline-block;
  text-decoration: none;
}

a.logo-wrap:hover img {
  opacity: 1;
  transform: scale(1.06);
}

/* ── MAIN CONTENT ── */
main {
  max-width: 620px;
  margin: 0 auto;
  padding: 0 24px 80px;
}

/* ── SECTION TITLES ── */
.page-title {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
  margin-bottom: 48px;
  padding-bottom: 16px;
  position: relative;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 1px;
  background: var(--accent-dim);
}

/* ── MENU CATEGORY ── */
.menu-category {
  margin-bottom: 44px;
}

.category-title {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent-dim);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ── MENU ITEMS ── */
.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: background 0.2s;
}

.menu-item:last-child {
  border-bottom: none;
}

.item-name {
  color: var(--text);
  font-size: 20px;
  font-weight: 300;
  letter-spacing: 0.015em;
  flex: 1;
}

.item-name .item-note {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 1px;
}

.item-price {
  color: var(--accent);
  font-size: 18px;
  font-weight: 400;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

/* ── LEGAL NOTICE ── */
.legal-notice {
  font-size: 18px;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.5;
  margin-bottom: 40px;
  padding: 14px 16px;
  border-left: 2px solid var(--border);
  background: rgba(255, 255, 255, 0.015);
}

/* ── GRUPOS ── */
.menu-plan {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  padding: 32px 28px;
  margin-bottom: 32px;
  position: relative;
}

.plan-title {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.plan-price {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0;
  font-family: 'Cormorant Garamond', serif;
}

.plan-section {
  margin-bottom: 20px;
}

.plan-section-title {
  font-family: 'Cinzel', serif;
  font-size: 8.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.plan-section ul {
  list-style: none;
  padding: 0;
}

.plan-section ul li {
  font-size: 15px;
  color: var(--text);
  padding: 4px 0;
  padding-left: 14px;
  position: relative;
}

.plan-section ul li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--accent-dim);
}

/* ── PHOTO PLACEHOLDERS ── */

/* Shared frame */
.photo-block {
  margin: 48px 0;
  position: relative;
}

/* Corner decoration */
.photo-frame {
  position: relative;
  background: var(--bg-secondary);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.photo-frame::before,
.photo-frame::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--accent-dim);
  border-style: solid;
  opacity: 0.7;
  transition: opacity 0.3s, width 0.3s, height 0.3s;
}

.photo-frame::before {
  top: 10px;
  left: 10px;
  border-width: 1px 0 0 1px;
}

.photo-frame::after {
  bottom: 10px;
  right: 10px;
  border-width: 0 1px 1px 0;
}

.photo-frame:hover::before,
.photo-frame:hover::after {
  width: 24px;
  height: 24px;
  opacity: 1;
}

/* Extra corners via inner span */
.photo-frame .corner-tr,
.photo-frame .corner-bl {
  position: absolute;
  width: 18px;
  height: 18px;
  border-color: var(--accent-dim);
  border-style: solid;
  opacity: 0.7;
  pointer-events: none;
  transition: opacity 0.3s, width 0.3s, height 0.3s;
}

.photo-frame .corner-tr {
  top: 10px;
  right: 10px;
  border-width: 1px 1px 0 0;
}

.photo-frame .corner-bl {
  bottom: 10px;
  left: 10px;
  border-width: 0 0 1px 1px;
}

.photo-frame:hover .corner-tr,
.photo-frame:hover .corner-bl {
  width: 24px;
  height: 24px;
  opacity: 1;
}

/* Crosshair icon */
.photo-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0.35;
  transition: opacity 0.3s;
  pointer-events: none;
  user-select: none;
}

.photo-frame:hover .photo-icon {
  opacity: 0.55;
}

.photo-icon svg {
  width: 28px;
  height: 28px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1;
}

.photo-icon span {
  font-family: 'Cinzel', serif;
  font-size: 8px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Aspect ratios
   Imagem individual → 5:4
   Imagens em linha (duo/offset) → 4:4 (quadrado)
*/
.photo-frame--landscape,
.photo-frame--portrait,
.photo-frame--panorama {
  aspect-ratio: 5 / 4;
}

.photo-frame--square {
  aspect-ratio: 1 / 1;
}

/* Imagem real dentro do placeholder */
.photo-frame>img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* Duo: two side by side */
.photo-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* Offset: portrait pushed right */
.photo-offset {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 12px;
}

.photo-offset .photo-frame {
  height: 100%;
}

/* Caption */
.photo-caption {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.photo-caption::before {
  content: '';
  flex-shrink: 0;
  width: 20px;
  height: 1px;
  background: var(--accent-dim);
}

.photo-caption input,
.photo-caption textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-family: 'Cormorant Garamond', serif;
  font-size: 12px;
  font-style: italic;
  letter-spacing: 0.04em;
  width: 100%;
  padding: 2px 0 4px;
  outline: none;
  transition: border-color 0.2s, color 0.2s;
  resize: none;
  line-height: 1.4;
}

.photo-caption input::placeholder,
.photo-caption textarea::placeholder {
  color: rgba(154, 144, 128, 0.45);
}

.photo-caption input:focus,
.photo-caption textarea:focus {
  border-bottom-color: var(--accent-dim);
  color: var(--text);
}

/* Caption pair for duo */
.photo-duo-captions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 10px;
}

.photo-duo-captions .photo-caption {
  margin-top: 0;
}

/* ── FOOTER ── */
footer {
  text-align: center;
  padding: 24px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11.5px;
  letter-spacing: 0.08em;
}

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

footer a:hover {
  color: var(--accent);
}

/* ── GALERIA DE PRATOS ──
   A grelha usa três colunas em ecrãs largos e adapta-se nos breakpoints abaixo. */
.food-gallery {
  width: min(100% - 48px, 1080px);
  margin: 0 auto 80px;
}

.gallery-title {
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
  margin-bottom: 24px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

/* Cada item mantém 5:4; a imagem preenche-o sem deformar. */
.gallery-item {
  aspect-ratio: 5 / 4;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg-secondary);
}

.gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

/* ── FADE IN ── */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-header {
  animation: fadeIn 0.6s ease both;
}

main {
  animation: fadeIn 0.6s ease 0.1s both;
}

/* Tablets: duas imagens por linha. */
@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ── MOBILE ── */
@media (max-width: 700px) {
  .nav-links {
    display: none;
    flex-direction: column;
    gap: 0;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: #111010;
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    padding: 12px 24px;
    display: block;
    font-size: 14px;
  }

  .nav-toggle {
    display: flex;
  }

  main {
    padding: 0 18px 60px;
  }

  /* Tipografia otimizada para leitura em ecrãs pequenos. */
  body {
    font-size: 18px;
  }

  .page-title {
    font-size: 17px;
  }

  .category-title,
  .gallery-title {
    font-size: 15px;
  }

  .item-name {
    font-size: 21px;
  }

  .item-name .item-note {
    font-size: 16px;
  }

  .item-price {
    font-size: 19px;
  }

  .plan-title {
    font-size: 15px;
  }

  .plan-section-title {
    font-size: 13px;
  }

  .plan-section ul li {
    font-size: 17px;
  }

  .photo-caption input,
  .photo-caption textarea {
    font-size: 16px;
  }

  footer {
    font-size: 16px;
  }

  .photo-duo,
  .photo-offset,
  .photo-duo-captions {
    grid-template-columns: 1fr;
  }

  .food-gallery {
    width: min(100% - 36px, 540px);
    margin-bottom: 60px;
  }

  /* Em smartphone alterna linhas com uma imagem e com duas imagens. */
  .gallery-item:nth-child(3n + 1) {
    grid-column: span 2;
  }
}
