/* ==========================================================================
   Bar Duomo — stylesheet
   Colori e font ricostruiti dal kit Elementor del sito WordPress originale.
   ========================================================================== */

@font-face {
  font-family: "Baskervville";
  font-style: normal;
  font-weight: 100 400;
  font-display: swap;
  src: url("../fonts/baskervville-normal-400.woff2") format("woff2");
}
@font-face {
  font-family: "Baskervville";
  font-style: italic;
  font-weight: 100 400;
  font-display: swap;
  src: url("../fonts/baskervville-italic-400.woff2") format("woff2");
}
@font-face {
  font-family: "Libre Baskerville";
  font-style: normal;
  font-weight: 100 400;
  font-display: swap;
  src: url("../fonts/librebaskerville-normal-400.woff2") format("woff2");
}
@font-face {
  font-family: "Nunito Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/nunitosans-variable.woff2") format("woff2");
}

:root {
  --color-primary: #303d53;      /* blu scuro: testi e titoli */
  --color-secondary: #b88a53;    /* bronzo/oro: dettagli */
  --color-accent: #fefaf2;       /* crema: sfondo bottoni */
  --color-text: #fce7bd;         /* crema chiaro */
  --color-header-bg: rgba(244, 245, 248, 1);
  --color-header-bg-sticky: rgba(244, 245, 248, .8);
  --font-heading: "Baskervville", serif;
  --font-schedule: "Libre Baskerville", serif;
  --font-body: "Nunito Sans", sans-serif;
  --max-width: 1140px;
  --header-height: 100px;
  --header-height-mobile: 70px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-primary);
  background: var(--color-accent);
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 0;
  background: #fff;
  padding: 0.5rem;
  z-index: 1000;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 500;
  background-color: var(--color-header-bg);
  transition: background-color .45s cubic-bezier(.4, 0, .2, 1),
              box-shadow .45s cubic-bezier(.4, 0, .2, 1),
              backdrop-filter .45s cubic-bezier(.4, 0, .2, 1);
}

.site-header.is-sticky {
  background-color: var(--color-header-bg-sticky);
  box-shadow: 0 4px 33px 1px rgba(0, 0, 0, .07);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: var(--header-height);
  transition: min-height .45s cubic-bezier(.4, 0, .2, 1);
}

.header-left {
  display: flex;
  align-items: center;
  justify-self: start;
}

.header-right {
  justify-self: end;
}

.site-header.is-sticky .header-inner {
  min-height: calc(var(--header-height) * .6);
}

@media (max-width: 767px) {
  .header-inner {
    min-height: var(--header-height-mobile);
  }
}

.main-nav {
  display: none;
}

@media (min-width: 768px) {
  .main-nav {
    display: flex;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .main-nav a {
    font-family: var(--font-body);
    font-weight: 500;
    letter-spacing: .3px;
    font-size: 15px;
    position: relative;
  }
  .main-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0;
    height: 1px;
    background: var(--color-primary);
    transition: width .25s ease;
  }
  .main-nav a:hover::after,
  .main-nav a:focus::after {
    width: 100%;
  }
}

.header-logo {
  display: none;
}
@media (min-width: 768px) {
  .header-logo {
    display: block;
  }
}
.header-logo img {
  width: 60px;
  transition: transform .45s cubic-bezier(.4, 0, .2, 1);
}
.site-header.is-sticky .header-logo img {
  transform: scale(.8);
}

.header-cta {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  border-bottom: 1px solid var(--color-primary);
  padding-bottom: 3px;
}

.menu-toggle {
  display: inline-flex;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--color-primary);
  font-size: 22px;
}
@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

/* ---------- Mobile menu popup ---------- */

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 900;
  background: rgba(144, 95, 78, 1);
  color: var(--color-accent);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 18px;
  padding: 48px 32px;
  transform: translateX(-100%);
  transition: transform .4s ease;
}
.mobile-menu.is-open {
  transform: translateX(0);
}
.mobile-menu-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: var(--color-accent);
  font-size: 28px;
  cursor: pointer;
}
.mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mobile-menu a {
  font-family: var(--font-body);
  font-size: 18px;
}
.mobile-menu .mobile-menu-info {
  margin-top: 24px;
  font-size: 15px;
}

/* ---------- Hero ---------- */

.hero {
  padding: 30px 20px 0;
  text-align: center;
}
.hero-logo {
  max-width: 280px;
  margin: 0 auto 30px;
}
.hero-image-desktop {
  display: none;
  height: auto;
}
.hero-image-mobile {
  margin: 0 auto;
  height: auto;
}
@media (min-width: 768px) {
  .hero-image-desktop {
    display: block;
    margin: 30px auto 0;
    max-width: 800px;
  }
  .hero-image-mobile {
    display: none;
    height: auto;
  }
}
.hero h2 {
  font-family: var(--font-heading);
  font-weight: 100;
  font-size: clamp(22px, 4vw, 32px);
  margin: 0;
  padding: 0 16px;
}
.hero h2:first-of-type {
  margin-top: 50px;
}
.hero h2:last-of-type {
  font-size: 18px;
  margin-bottom: 50px;
}

/* ---------- Intro / location ---------- */

.intro {
  position: relative;
  min-height: 60vw;
  display: flex;
  justify-content: center;
  text-align: center;
  padding: 50px 24px 0;
  overflow: hidden;
}
@media (min-width: 640px) {
  .intro {
    min-height: 55vh;
  }
}
@media (min-width: 1024px) {
  .intro {
    min-height: 70vh;
  }
}
.intro::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../img/coffe-ok.webp");
  background-position: top center;
  background-repeat: no-repeat;
  background-size: min(900px, 100%) auto;
  opacity: 0.9;
  margin: auto;
}
.intro-content {
  position: relative;
  z-index: 1;
}
.intro h2 {
  font-family: var(--font-heading);
  font-weight: 100;
  font-size: clamp(24px, 4vw, 34px);
  margin: 0 0 12px;
}
.intro p {
  font-family: var(--font-body);
  margin: 0;
}

/* ---------- Gallery ---------- */

.gallery-mobile {
  display: flex;
  overflow-x: auto;
  gap: 12px;
  padding: 0 16px 16px;
  padding-top: 30px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.gallery-mobile img {
  min-width: 80%;
  scroll-snap-align: start;
  border-radius: 2px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
@media (min-width: 768px) {
  .gallery-mobile {
    display: none;
  }
}

.gallery-desktop {
  display: none;
}
@media (min-width: 768px) {
  .gallery-desktop {
    display: block;
    max-width: 840px;
    margin: 0 auto;
    padding: 0 20px;
  }
  .gallery-desktop .gallery-row {
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
  }
  .gallery-row {
    display: grid;
    gap: 16px;
    margin-bottom: 16px;
  }
  .gallery-row--two {
    grid-template-columns: 1fr 1fr;
  }
  .gallery-row--three {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .gallery-row img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 3 / 4;
  }
}

/* ---------- Take a break / Relax ---------- */

.section-label {
  text-align: center;
  padding: 24px 0 0;
}
.section-label p {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: .9em;
  margin: 0;
}

.relax {
  display: grid;
  gap: 24px;
  align-items: start;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  text-align: left;
}
@media (min-width: 900px) {
  .relax {
    grid-template-columns: 1fr 1fr;
    padding: 40px 0 80px;
  }
}
.relax h2 {
  font-family: var(--font-heading);
  font-weight: 100;
  font-size: clamp(22px, 4vw, 30px);
  margin: 0 0 24px;
  line-height: 1.5;
}
.relax h2:last-of-type {
  font-size: 18px;
  line-height: 1.6;
}
.relax p {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: .9em;
  margin-bottom: 30px;
}
.relax-image {
  max-width: 560px;
  margin-left: auto;
}
.relax-image img {
  width: 100%;
  height: auto;
}
@media (min-width: 900px) {
  .relax-image {
    margin-top: -40px;
  }
}

/* ---------- Opening hours / contacts ---------- */

.contact-section {
  padding: 0 24px 60px;
  text-align: center;
  display: flex;
  justify-content: center;
}
.contact-section .container {
  width: 100%;
  border: 1px solid var(--color-primary);
  border-radius: 600px 600px 0 0;
  padding: 90px 24px 60px;
  max-width: 800px;
}
@media (min-width: 768px) {
  .contact-section .container {
    padding: 160px 50px 80px;
  }
}
.contact-section > .container > h2 {
  font-family: var(--font-heading);
  font-weight: 100;
  letter-spacing: 4px;
  font-size: clamp(20px, 3vw, 26px);
  margin-bottom: 30px;
}

.hours {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 18px;
  font-family: var(--font-schedule);
  font-size: 15px;
  margin-bottom: 20px;
}

.address {
  font-family: var(--font-body);
  font-size: 15px;
  letter-spacing: 2px;
  line-height: 1.4;
  margin-bottom: 50px;
  white-space: nowrap;
}
@media (min-width: 480px) {
  .address {
    font-size: 18px;
    letter-spacing: 4px;
  }
}
@media (min-width: 640px) {
  .address {
    font-size: 24px;
    letter-spacing: 8px;
    line-height: .6em;
    white-space: normal;
  }
}

.contact-grid {
  display: grid;
  gap: 30px;
  max-width: 600px;
  margin: 0 auto 30px;
  text-align: left;
}
@media (min-width: 600px) {
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.contact-grid h3 {
  font-family: var(--font-heading);
  font-weight: 100;
  font-size: 22px;
  margin: 0 0 16px;
}
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-body);
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.contact-list a {
  text-decoration: underline;
}

.social-icons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}
.social-icons a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: background .2s ease, color .2s ease;
}
.social-icons a:hover,
.social-icons a:focus-visible {
  background: var(--color-primary);
  color: #fff;
}

/* ---------- Work with us form ---------- */

.work-section {
  padding: 60px 24px 80px;
  text-align: center;
}
.work-section h3 {
  font-family: var(--font-heading);
  font-weight: 100;
  margin: 0 0 8px;
}
.work-section h2 {
  font-family: var(--font-heading);
  font-weight: 100;
  font-size: clamp(22px, 4vw, 28px);
  margin: 0 0 40px;
}

.work-form {
  max-width: 640px;
  margin: 0 auto;
  text-align: left;
}
.form-field {
  margin-bottom: 20px;
}
.form-field label {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  margin-bottom: 6px;
}
.form-field input,
.form-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 2px;
  font-family: var(--font-body);
  font-size: 15px;
  background: #fff;
  color: var(--color-primary);
}
.form-field input:focus,
.form-field textarea:focus {
  outline: 2px solid var(--color-secondary);
}
.form-field.is-invalid input,
.form-field.is-invalid textarea {
  outline: 2px solid #c0392b;
}
.field-error {
  display: none;
  color: #c0392b;
  font-size: 13px;
  margin-top: 4px;
}
.form-field.is-invalid .field-error {
  display: block;
}

.honeypot-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 10px;
}
.form-privacy-note {
  font-size: 13px;
  flex: 1 1 260px;
}
.form-privacy-note a {
  text-decoration: underline;
}

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  padding: 10px 24px;
  border: 1px solid var(--color-primary);
  background: var(--color-accent);
  color: var(--color-primary);
  cursor: pointer;
  border-radius: 2px;
}
.btn:hover,
.btn:focus-visible {
  background: var(--color-primary);
  color: #fff;
}

.form-status {
  margin-top: 16px;
  font-size: 14px;
}
.form-status[data-state="success"] { color: #1e7a3c; }
.form-status[data-state="error"] { color: #c0392b; }

/* ---------- Footer ---------- */

.site-footer {
  background: rgba(144, 95, 78, 1);
  color: var(--color-accent);
  padding: 50px 24px;
}
.footer-grid {
  display: grid;
  gap: 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}
@media (min-width: 600px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
.site-footer p {
  font-family: var(--font-body);
  margin: 0 0 6px;
  font-size: 14px;
}
.site-footer a {
  text-decoration: underline;
}
.footer-todo {
  color: #e2a0a0;
  font-size: 12px;
}

/* ---------- Privacy policy page ---------- */

.privacy-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 60px 24px 80px;
  font-family: var(--font-body);
  line-height: 1.7;
}
.privacy-content h1 {
  font-family: var(--font-heading);
  font-weight: 100;
  font-size: clamp(26px, 4vw, 36px);
}
.privacy-content h2,
.privacy-content h3 {
  font-family: var(--font-heading);
  font-weight: 100;
  margin-top: 2em;
}
.privacy-content ul,
.privacy-content ol {
  padding-left: 1.2em;
}

/* ---------- Scroll-reveal animations ---------- */

[data-animate] {
  opacity: 0;
}
[data-animate].is-visible {
  opacity: 1;
  animation-duration: .8s;
  animation-fill-mode: both;
  animation-timing-function: ease-out;
}
[data-animate="fadeIn"].is-visible { animation-name: bd-fade-in; }
[data-animate="fadeInUp"].is-visible { animation-name: bd-fade-in-up; }
[data-animate="fadeInDown"].is-visible { animation-name: bd-fade-in-down; }

@keyframes bd-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes bd-fade-in-up {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes bd-fade-in-down {
  from { opacity: 0; transform: translateY(-28px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  [data-animate] {
    opacity: 1;
    animation: none !important;
  }
}

/* ---------- Utility ---------- */

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
