/* La Famiglia Arosa — black & white, condensed display type matching the logo */
:root {
  --header-h: 72px;
  --black: #000000;
  --near-black: #161616;
  --white: #ffffff;
  --off: #f5f5f3;
  --grey: #8d8d8d;
  --grey-dark: #4a4a4a;
  --line: #e3e3e0;
  --line-dark: #3a3a3a;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 300;
  color: var(--black);
  background: var(--white);
  line-height: 1.65;
}
h1, h2 { font-family: 'Anton', 'Oswald', 'Arial Narrow', sans-serif; font-weight: 400; text-transform: uppercase; letter-spacing: .04em; }
h3, h4, .brand, nav { font-family: 'Oswald', 'Arial Narrow', sans-serif; text-transform: uppercase; }
a { color: var(--black); text-decoration: none; }

/* header */
.site-header {
  display: flex; justify-content: space-between; align-items: center;
  height: var(--header-h);
  padding: 0 clamp(1rem, 5vw, 3rem);
  background: var(--black); color: var(--white);
  position: sticky; top: 0; z-index: 10;
}
.brand { font-family: 'Anton', 'Oswald', sans-serif; font-size: 1.4rem; color: var(--white); letter-spacing: .06em; display: flex; align-items: center; }
.brand span { color: var(--grey); margin-left: .45rem; font-size: 1rem; letter-spacing: .3em; }
.brand img.logo { height: 42px; width: auto; display: block; }
.site-header nav { display: flex; gap: clamp(.8rem, 2.5vw, 1.8rem); align-items: center; flex-wrap: wrap; }
.site-header nav a { color: #a9a9a9; font-size: .92rem; font-weight: 400; letter-spacing: .14em; }
.site-header nav a.active, .site-header nav a:hover { color: var(--white); }
.lang-toggle {
  display: inline-flex; border: 1px solid #4a4a4a; border-radius: 2px;
  overflow: hidden;
}
.lang-toggle a {
  width: 1.9rem; height: 1.7rem; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1; font-size: .82rem;
  /* text-indent offsets the trailing letter-spacing gap for true centering */
  letter-spacing: .1em; text-indent: .1em;
  color: #a9a9a9;
}
.lang-toggle a + a { border-left: 1px solid #4a4a4a; }
.lang-toggle a.on { background: var(--white); color: var(--black); }
.lang-toggle a.on:hover { color: var(--black); }
.nav-toggle { display: none; background: none; border: none; color: var(--white); cursor: pointer; padding: 6px; }
.nav-toggle svg { width: 26px; height: 26px; display: block; }

/* buttons */
.btn {
  display: inline-block; padding: .6rem 1.5rem;
  border: 1px solid currentColor; border-radius: 0;
  font-family: 'Oswald', sans-serif; font-weight: 400; font-size: .9rem;
  letter-spacing: .16em; text-transform: uppercase;
  background: transparent; color: inherit; cursor: pointer; transition: all .2s;
}
.hero .btn { color: var(--white); }
.hero .btn:hover { background: var(--white); color: var(--black); }
.btn.primary { background: var(--white); color: var(--black) !important; border-color: var(--white); }
.hero .btn.primary:hover { background: transparent; color: var(--white) !important; }
main > .card-page .btn, .text-page .btn, .admin-page .btn { color: var(--black); }
.card-page .btn:hover, .admin-page .btn:hover { background: var(--black); color: var(--white); }
.btn.small { padding: .25rem .7rem; font-size: .75rem; letter-spacing: .08em; }
.btn.danger { border-color: #999; color: #666; }
.btn.danger:hover { background: var(--black); border-color: var(--black); color: #fff; }
.admin .btn.primary { background: var(--black); color: var(--white) !important; border-color: var(--black); }

/* hero — full-bleed photo/video with dark overlay */
.hero {
  position: relative; min-height: calc(100vh - var(--header-h));
  display: flex; align-items: center; justify-content: center;
  background: var(--black); color: var(--white);
  overflow: hidden; text-align: center;
}
.hero-media {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: .85;
}
.hero-overlay {
  position: absolute; inset: 0;
  /* soft top fade: the uploaded photo is already dark at the top */
  background: linear-gradient(to bottom, rgba(0,0,0,.55) 0, rgba(0,0,0,.38) 12%, rgba(0,0,0,.32) 40%, rgba(0,0,0,.6) 100%);
}
.hero-inner {
  position: relative; z-index: 1; padding: 3rem 1.5rem 2rem; max-width: 52rem;
  /* nudge the block down so the logo arc sits concentric in the oven arch */
  transform: translateY(min(8.5vh, 78px));
}
.hero-logo { width: min(380px, 60vw); margin-bottom: 2rem; }
/* medium heights: slightly smaller logo + shift so buttons stay above the fold */
@media (min-height: 831px) and (max-height: 960px) {
  .hero-logo { width: min(340px, 60vw); }
  .hero-inner { transform: translateY(min(5vh, 46px)); }
}
/* shorter screens: smaller logo + gentler shift so buttons stay above the fold */
@media (max-height: 830px) {
  .hero-logo { width: min(280px, 60vw); }
  .hero-inner { transform: translateY(min(2vh, 18px)); padding: 1.5rem 1.5rem 1.5rem; }
}
.kicker {
  font-family: 'Oswald', sans-serif; text-transform: uppercase;
  letter-spacing: .45em; font-size: .8rem; color: #d9d9d9; margin-bottom: 1rem;
}
.hero h1 { font-size: clamp(2.8rem, 8vw, 5.5rem); line-height: 1.05; margin-bottom: 1.2rem; }
.lede { max-width: 34rem; margin: 0 auto 2.4rem; color: #b9b9b9; font-size: 1.08rem; }
.hero-actions { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; }

/* about band: video | text | image, one third each, one viewport tall */
.about-flex {
  /* video column is sized to the video's true 9:16 shape at band height;
     text and image flex to absorb the remaining width */
  display: grid; grid-template-columns: auto 1fr 1fr; gap: 0;
  align-items: stretch;
  background: #1c1c1c; color: var(--white);
  padding: 0;
  /* exactly one screen: viewport minus the sticky header */
  min-height: calc(100vh - var(--header-h));
}
.about-img { min-width: 0; position: relative; }
.about-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.about-text { padding: clamp(2.8rem, 5vw, 6rem); align-self: stretch; background: var(--black); }
.about-text h2 { font-size: calc(1.9rem * var(--ts, 1)); margin-bottom: .6em; color: var(--white); }
.about-text p { margin-bottom: .95em; color: #a9a9a9; font-size: calc(1rem * var(--ts, 1)); line-height: 1.62; }
.about-text a { color: var(--white); font-weight: 400; text-decoration: none; }
.about-text a:hover { color: #9a9a9a; }
.about-video { position: relative; width: min(calc((100vh - var(--header-h)) * 9 / 16), 38vw); }
.about-video video {
  /* panel matches the video's 9:16 ratio, so cover = exact fit, no crop */
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; display: block;
}
@media (max-width: 820px) {
  .about-flex { grid-template-columns: 1fr; padding: 0; gap: 0; min-height: 0; }
  .about-img { position: static; }
  /* landscape photo shown as a square panel on phones */
  .about-img img { position: static; width: 100%; height: auto; aspect-ratio: 1 / 1; max-height: none; object-fit: cover; }
  .about-video { position: relative; width: 100%; }
  /* stacked full-width video at its natural 9:16 ratio — no crop, no distortion */
  .about-video video { position: static; height: auto; }
  .about-text { padding: 2.5rem 1.5rem 3rem; }
}

/* menu / wine card pages */
.card-page { max-width: 1150px; margin: 0 auto; padding: 3.5rem clamp(1rem, 4vw, 3rem) 4rem; }
.card-head { text-align: center; margin-bottom: 3.2rem; }
.card-head h1 { font-size: clamp(2.6rem, 6vw, 4rem); }
.card-sub { color: var(--grey-dark); margin-top: .5rem; font-size: .98rem; }
.print-btn { margin-top: 1.4rem; }
.pdf-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem; margin-top: 3rem; }
.pdf-buttons .print-btn { margin-top: 0; }
.menu-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2.6rem 3.2rem; }
/* packed: newspaper columns for cards with many small categories */
.menu-grid.packed { display: block; columns: 280px; column-gap: 2.6rem; }
.menu-grid.packed .menu-cat { break-inside: auto; margin-bottom: 2.4rem; }
.menu-grid.packed .menu-cat h2 { break-after: avoid; break-inside: avoid; }
.menu-grid.packed li { break-inside: avoid; }
.menu-cat h2 {
  font-size: 1.45rem; letter-spacing: .12em;
  border-bottom: 3px solid var(--black); padding-bottom: .35rem; margin-bottom: 1.1rem;
}
.cat-note { color: var(--grey-dark); font-size: .9rem; margin-bottom: .8rem; }
.menu-cat ul { list-style: none; }
.menu-cat li { margin-bottom: 1.05rem; }
.item-line { display: flex; align-items: baseline; gap: .5rem; }
.item-name { font-weight: 400; font-size: 1rem; }
.item-name strong { font-family: 'Oswald', sans-serif; font-weight: 500; font-size: .95rem; letter-spacing: .04em; }
.region { color: var(--grey); font-size: .87rem; }
.dots { flex: 1; border-bottom: 1px dotted #b5b5b0; min-width: 1.5rem; transform: translateY(-4px); }
.item-price { font-weight: 400; white-space: nowrap; font-variant-numeric: tabular-nums; }
.item-price em { font-size: .8rem; color: var(--grey); font-style: normal; }
.item-desc { color: var(--grey-dark); font-size: .88rem; margin-top: .1rem; max-width: 90%; }
.card-foot { margin-top: 3rem; text-align: center; color: var(--grey-dark); font-size: .9rem; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.card-foot .fine { font-size: .8rem; margin-top: .5rem; color: var(--grey); }

/* text pages */
.text-page { max-width: 46rem; margin: 0 auto; padding: 3.5rem 1.5rem; }
.text-page h1 { margin-bottom: 1.2rem; }
.text-page h2 { font-size: 1.25rem; letter-spacing: .08em; margin: 2.2rem 0 .8rem; }
.text-page p { margin-bottom: 1rem; color: var(--grey-dark); }
.text-page ul { margin: 0 0 1rem 1.3rem; color: var(--grey-dark); }
.text-page li { margin-bottom: .6rem; }
.text-page .fine { font-size: .85rem; color: var(--grey); margin-top: 2rem; }

/* legal pages + menu/wine cards: dark band like the about section */
body.legal main { background: var(--black); }
body.legal .site-header { box-shadow: 0 1px 0 var(--line-dark); }
body.legal .card-page, body.legal .card-head h1 { color: var(--white); }
body.legal .card-sub, body.legal .cat-note, body.legal .item-desc { color: #9a9a9a; }
body.legal .menu-cat h2 { color: var(--white); border-bottom-color: var(--white); }
body.legal .item-name, body.legal .item-price { color: var(--white); }
body.legal .region { color: #8d8d8d; }
body.legal .dots { border-bottom-color: #4a4a4a; }
body.legal .card-foot { color: #9a9a9a; border-top-color: #3a3a3a; }
body.legal .card-foot .fine { color: #7a7a7a; }
body.legal .card-page .btn { color: var(--white); }
body.legal .card-page .btn:hover { background: var(--white); color: var(--black); }
body.legal .text-page h1, body.legal .text-page h2 { color: var(--white); }
body.legal .text-page p, body.legal .text-page ul, body.legal .text-page li { color: #a9a9a9; }
body.legal .text-page a { color: var(--white); text-decoration: none; }
body.legal .text-page a:hover { color: #9a9a9a; }
body.legal .text-page .fine { color: #8d8d8d; }

/* footer */
.site-footer { background: #1c1c1c; color: #a9a9a9; padding: 3rem clamp(1.5rem, 6vw, 4rem) 0; }
.footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem 3rem; margin: 0 0 2rem; }
/* edge-anchored: contact left, hours block centered, social right — text left-aligned in each */
.footer-grid > div { justify-self: start; text-align: left; }
.footer-grid > div:nth-child(2) { justify-self: center; }
.footer-grid > div:last-child { justify-self: end; }
.footer-grid p + p { margin-top: .9rem; }
.footer-grid .social { justify-content: flex-start; }
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .footer-grid > div,
  .footer-grid > div:nth-child(2),
  .footer-grid > div:last-child { justify-self: start; width: auto; }
  .site-footer { padding: 2.2rem 1.5rem 0; }
}
@media (max-width: 640px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { letter-spacing: .22em; font-size: .76rem; font-weight: 500; color: var(--white); margin-bottom: .5rem; }
.footer-grid p { font-size: .93rem; }
.footer-grid a { color: var(--white); text-decoration: none; }
.footer-grid a:hover { color: #9a9a9a; }
.footer-legal {
  text-align: center; font-size: .82rem; color: var(--grey);
  border-top: 1px solid var(--line-dark);
  margin: 0 calc(-1 * clamp(1.5rem, 6vw, 4rem));
  padding: 1.2rem clamp(1.5rem, 6vw, 4rem) 1.4rem;
}
.footer-legal a { color: var(--white); }
.footer-legal a:hover { color: #9a9a9a; }
.footer-legal .sep { margin: 0 .3rem; }

/* admin */
.admin-page { max-width: 1150px; margin: 0 auto; padding: 2.5rem clamp(1rem, 4vw, 3rem) 4rem; }
.admin-nav { display: flex; gap: 1.2rem; margin-bottom: 2rem; border-bottom: 1px solid var(--line); padding-bottom: .8rem; flex-wrap: wrap; }
.admin-nav a { font-family: 'Oswald'; letter-spacing: .1em; font-size: .88rem; color: var(--grey-dark); }
.admin-nav a.active { color: var(--black); border-bottom: 2px solid var(--black); }
.admin-nav .logout { margin-left: auto; }
.admin-page h1 { margin-bottom: .4rem; }
.hint { color: var(--grey-dark); font-size: .9rem; margin-bottom: 1.8rem; }
.admin-cat { background: var(--off); border: 1px solid var(--line); margin-bottom: 1.2rem; padding: .8rem 1rem; }
.admin-cat summary { cursor: pointer; font-size: 1.05rem; padding: .3rem 0; }
.admin-cat .count { color: var(--grey); font-size: .85rem; }
.row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: .6rem 0; }
.row input, .settings-form input, .settings-form textarea {
  padding: .4rem .6rem; border: 1px solid var(--line); border-radius: 0;
  font-family: inherit; font-size: .9rem; background: #fff; flex: 1; min-width: 8rem;
}
.row .chk { font-size: .82rem; color: var(--grey-dark); white-space: nowrap; display: flex; align-items: center; gap: .3rem; }
.admin-page h2 { margin-top: 2rem; }
.admin-login { text-align: center; }
.login-form { display: flex; gap: .8rem; justify-content: center; margin-top: 1.5rem; }
.login-form input { padding: .6rem 1rem; border: 1px solid var(--line); font-size: 1rem; }
.error { color: #a33; }
.error.banner { background: #fdeaea; border: 1px solid #d99; padding: .6rem 1rem; margin-bottom: 1rem; }
.xlsx-box { background: var(--off); border: 1px solid var(--line); padding: 1rem; margin-bottom: 1.4rem; display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
/* fixed label column so the upload controls line up across all boxes */
.xlsx-box > strong { flex: 0 0 20rem; }
@media (max-width: 900px) { .xlsx-box > strong { flex-basis: 100%; } }
.xlsx-box .hint { flex-basis: 100%; margin: 0; }
.social { display: flex; gap: .9rem; margin-bottom: .5rem; }
.social a { color: var(--white); }
.social a:hover { color: #9a9a9a; }
.social svg { display: block; }
.settings-form { display: flex; flex-direction: column; gap: 1rem; max-width: 40rem; }
.settings-form label { display: flex; flex-direction: column; gap: .3rem; font-size: .88rem; color: var(--grey-dark); }

/* admin media */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.2rem; }
.media-slot { border: 1px solid var(--line); padding: 1rem; background: var(--off); }
.media-slot h3 { font-size: .85rem; letter-spacing: .08em; margin-bottom: .7rem; }
.media-slot img, .media-slot video { max-width: 100%; max-height: 180px; display: block; margin-bottom: .6rem; background: #111; }
.media-slot .empty { color: var(--grey); font-size: .85rem; margin-bottom: .6rem; }
.media-slot input[type=file] { font-size: .8rem; }

/* scroll-reveal (Apple-style rise from below) */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .8s cubic-bezier(.22, .61, .36, 1),
              transform .8s cubic-bezier(.22, .61, .36, 1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }
@media print { .reveal { opacity: 1 !important; transform: none !important; } }

/* print — the menu becomes the PDF (always black on white) */
@media print {
  .site-header, .site-footer, .print-btn { display: none !important; }
  body, body.legal main { background: #fff !important; }
  body.legal .card-page, body.legal .card-page * { color: #000 !important; border-color: #000 !important; }
  body.legal .dots { border-bottom-color: #999 !important; }
  .card-page { padding: 0; max-width: none; }
  .menu-grid { grid-template-columns: repeat(2, 1fr); gap: 1.2rem 2rem; }
  .menu-cat { break-inside: avoid; }
  .item-desc { max-width: none; }
}

@media (max-width: 640px) {
  :root { --header-h: 54px; }
  .site-header { justify-content: flex-end; padding: 0 1rem; }
  .site-header .brand { display: none; }
  .nav-toggle { display: block; }
  .site-header nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--black); border-bottom: 1px solid var(--line-dark);
    padding: .4rem 0 .8rem;
  }
  .site-header nav a { padding: .75rem 1.5rem; }
  .lang-toggle { margin: .6rem auto .3rem; align-self: center; }
  .site-header nav .lang-toggle a { padding: 0; }
  .site-header.nav-open nav { display: flex; }

  .menu-grid { grid-template-columns: 1fr; }

}
.preview-table { width: 100%; border-collapse: collapse; margin: .5rem 0; font-size: .9rem; }
.preview-table td { border-bottom: 1px dashed var(--line); padding: .3rem .5rem; }
.preview-table .desc { color: var(--grey-dark); }
.preview-table .num { text-align: right; white-space: nowrap; }
.en-sub { color: var(--grey); font-size: .82rem; }
.secret-link { text-align: center; margin-top: 2.5rem; }

/* legal pages: collapsible sections */
.legal-acc { border-bottom: 1px solid #3a3a3a; }
.legal-acc:first-of-type { border-top: 1px solid #3a3a3a; margin-top: 2rem; }
.legal-acc summary {
  cursor: pointer; list-style: none; position: relative;
  font-family: 'Oswald', 'Arial Narrow', sans-serif; text-transform: uppercase;
  letter-spacing: .08em; font-size: 1.05rem; color: var(--white);
  padding: 1.1rem 2.2rem 1.1rem 0;
}
.legal-acc summary::-webkit-details-marker { display: none; }
.legal-acc summary::after {
  content: '+'; position: absolute; right: .2rem; top: 50%;
  transform: translateY(-50%); font-size: 1.4rem; color: #8d8d8d;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-weight: 300;
}
.legal-acc[open] summary::after { content: '–'; }
.legal-acc .acc-body { padding: .2rem 0 1.2rem; }

.notfound { min-height: calc(100vh - var(--header-h)); }
.notfound .nf-text { color: var(--text-dim, #cfcfcf); text-align: center; }
.notfound .nf-text a { color: var(--white); }
