/* ===================================================================
   Casa das Fontelas — folha de estilos
   Paleta baseada no logótipo: malva #A27CA5 e dourado #BCA330
   =================================================================== */

:root {
  --ardosia: #241f27;      /* charcoal-ameixa escuro, neutro de fundo */
  --ardosia-2: #322a35;
  --mauve: #A27CA5;        /* cor de marca — logótipo */
  --mauve-claro: #c2a8c4;
  --mauve-escuro: #5d4560;  /* usado nos botões, boa legibilidade */
  --dourado: #BCA330;      /* cor de marca — logótipo */
  --papel: #f6f2ea;        /* papel cru */
  --papel-2: #ece3ea;      /* creme com nota malva, para secções alternadas */

  --serif: "Fraunces", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 1180px;
  --radius: 2px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ardosia);
  background: var(--papel);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 0.5em;
  color: var(--ardosia);
  letter-spacing: -0.01em;
}

h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.25rem; font-weight: 500; }

p { margin: 0 0 1em; }
a { color: inherit; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.eyebrow {
  font-family: var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--mauve-escuro);
  margin: 0 0 0.8em;
}
.eyebrow.center, h2.center, .quartos-intro.center { text-align: center; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--papel); color: var(--ardosia);
  padding: 0.8em 1.2em; z-index: 200;
}
.skip-link:focus { left: 1rem; top: 1rem; }

:focus-visible {
  outline: 2.5px solid var(--dourado);
  outline-offset: 2px;
}

/* ---------- Fallback backgrounds for real photos ----------
   Sections marked .img-fallback show a real photo (via inline
   background-image) once you drop the file into /images with the
   expected name — see README. Until then, this gradient shows. */
.img-fallback {
  background-color: var(--mauve);
  background-image:
    linear-gradient(135deg, rgba(36,31,39,0.15) 0%, transparent 60%),
    repeating-linear-gradient(135deg, rgba(246,242,234,0.10) 0 10px, transparent 10px 22px);
  background-size: cover;
  background-position: center;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.7em 1.3em;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-solid { background: var(--mauve-escuro); color: var(--papel); }
.btn-solid:hover { background: #4a3750; }
.btn-outline { background: transparent; color: var(--papel); border-color: var(--papel); }
.btn-outline:hover { background: rgba(246,242,234,0.12); }
.btn-ghost { background: transparent; color: var(--ardosia); border-color: transparent; font-weight: 500; }
.btn-lg { padding: 0.9em 1.7em; font-size: 0.95rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246,242,234,0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(36,31,39,0.08);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.6rem 1.5rem;
  gap: 1rem;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand-logo { display: block; height: 46px; width: auto; }

.main-nav { display: flex; gap: 1.6rem; }
.main-nav a {
  text-decoration: none; font-size: 0.9rem; font-weight: 500;
  color: var(--ardosia); position: relative; padding: 0.2em 0;
  white-space: nowrap;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 0; height: 1.5px; background: var(--dourado);
  transition: width 0.2s ease;
}
.main-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 0.7rem; }
.header-phone { font-size: 0.85rem; }
.lang-toggle {
  background: transparent; border: 1.5px solid var(--ardosia);
  color: var(--ardosia); font-family: var(--sans); font-weight: 700;
  font-size: 0.75rem; padding: 0.35em 0.6em; border-radius: var(--radius);
  cursor: pointer;
}

.menu-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 4px;
  width: 34px; height: 34px; background: none; border: none; cursor: pointer;
}
.menu-toggle span { display: block; height: 2px; width: 100%; background: var(--ardosia); }

@media (max-width: 980px) {
  .main-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--papel);
    flex-direction: column; gap: 0;
    max-height: 0; overflow: hidden;
    border-bottom: 1px solid rgba(36,31,39,0.08);
    transition: max-height 0.25s ease;
  }
  .main-nav.open { max-height: 360px; }
  .main-nav a { padding: 0.9em 1.5rem; border-top: 1px solid rgba(36,31,39,0.06); }
  .header-phone, .header-actions .btn-solid { display: none; }
  .menu-toggle { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background-color: var(--ardosia);
  background-size: cover;
  background-position: var(--hero-focus, center);
  color: var(--papel);
  overflow: hidden;
  padding: 7rem 0 6rem;
  min-height: 82vh;
  display: flex;
  align-items: center;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(36,31,39,0.55) 0%, rgba(36,31,39,0.8) 100%);
  z-index: 0;
}
.hero-topo {
  position: absolute; inset: 0; z-index: 0;
}
.hero-topo svg { width: 100%; height: 100%; }
.topo-line {
  fill: none;
  stroke: var(--dourado);
  stroke-width: 2;
  opacity: 0.5;
}
.topo-line.faint { stroke: var(--mauve-claro); opacity: 0.3; }

.hero-inner { position: relative; z-index: 1; max-width: 680px; }
.hero .eyebrow { color: var(--dourado); }
.hero h1 {
  color: var(--papel);
  font-size: clamp(2.4rem, 5.6vw, 3.8rem);
  font-weight: 600;
  display: flex;
  flex-direction: column;
  gap: 0.25em;
}
.hero-sub {
  font-family: var(--sans);
  font-size: clamp(0.95rem, 1.6vw, 1.2rem);
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--dourado);
  text-transform: uppercase;
}
.hero-lede {
  font-size: 1.1rem;
  color: var(--papel-2);
  max-width: 46ch;
}
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 1.8rem; }

/* ---------- Strip ---------- */
.strip { background: var(--dourado); color: var(--ardosia); padding: 0.9rem 0; }
.strip-inner p { margin: 0; text-align: center; font-size: 0.95rem; }

/* ---------- Sobre ---------- */
.sobre { padding: 6rem 0; }
.sobre-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 3.5rem; align-items: center; }
.sobre-visual { border-radius: var(--radius); overflow: hidden; aspect-ratio: 3/3.4; box-shadow: 0 20px 40px -20px rgba(36,31,39,0.35); }
.sobre-lista { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.6rem; }
.sobre-lista li { padding-left: 1.4em; position: relative; font-size: 0.95rem; }
.sobre-lista li::before {
  content: ""; position: absolute; left: 0; top: 0.55em;
  width: 7px; height: 7px; background: var(--dourado); border-radius: 50%;
}

@media (max-width: 880px) {
  .sobre-grid { grid-template-columns: 1fr; }
  .sobre-visual { max-width: 340px; }
}

/* ---------- Espaços exteriores ---------- */
.espacos { padding: 5rem 0; }
.espacos-grid {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 1.5rem; margin-top: 2.2rem;
}
.espacos-item {
  position: relative; margin: 0; overflow: hidden;
  border-radius: var(--radius);
  flex: 1 1 300px; max-width: 340px; aspect-ratio: 4/3;
}


/* ---------- Comodidades ---------- */
.comodidades { padding: 4.5rem 0; background: var(--papel-2); }
.comod-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.8rem; margin-top: 2.4rem;
}
.comod-item {
  display: flex; flex-direction: column; align-items: center; gap: 0.7rem;
  text-align: center; font-size: 0.86rem; color: var(--ardosia); font-weight: 500;
}

/* ---------- Quartos ---------- */
.quartos { padding: 6rem 0; background: var(--papel-2); }
.quartos-intro { max-width: 46ch; margin: 0 auto; color: var(--mauve-escuro); font-size: 0.92rem; }
.quartos-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.8rem;
  margin-top: 2.2rem;
}
.quarto-card {
  background: var(--papel);
  border: 1px solid rgba(36,31,39,0.08);
  display: flex; flex-direction: column;
  position: relative;
}
.quarto-card.destaque { border-color: var(--dourado); }
.quarto-visual { aspect-ratio: 4/3; position: relative; overflow: hidden; }

/* Mini photo carousel for room cards — see js/main.js buildCarousels() */
.carousel-el { background-color: var(--mauve); }
.carousel-track { position: absolute; inset: 0; }
.carousel-slide {
  position: absolute; inset: 0; opacity: 0;
  background-color: var(--mauve);
  background-size: cover; background-position: center;
  transition: opacity 0.45s ease;
}
.carousel-slide.active { opacity: 1; }
.carousel-dots {
  position: absolute; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px; z-index: 2;
}
.carousel-dot {
  width: 7px; height: 7px; border-radius: 50%; padding: 0;
  background: rgba(246,242,234,0.55); border: none; cursor: pointer;
}
.carousel-dot.active { background: var(--dourado); }
.carousel-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(36,31,39,0.4); color: var(--papel);
  border: none; width: 26px; height: 26px; border-radius: 50%;
  font-size: 16px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 2; opacity: 0; transition: opacity 0.2s ease;
}
.carousel-el:hover .carousel-nav,
.carousel-nav:focus-visible { opacity: 1; }
.carousel-nav.prev { left: 8px; }
.carousel-nav.next { right: 8px; }
.quarto-body { padding: 1.4rem 1.6rem 1.6rem; flex: 1; display: flex; flex-direction: column; }
.quarto-body h3 { margin-bottom: 0.7rem; }
.quarto-tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.quarto-tags li {
  font-size: 0.78rem; font-weight: 600; color: var(--mauve-escuro);
  background: var(--papel-2); border: 1px solid rgba(93,69,96,0.25);
  padding: 0.3em 0.7em; border-radius: 999px;
}
.quarto-tags li.tag-cap {
  display: flex; align-items: center; gap: 0.35em;
  background: var(--mauve-escuro); color: var(--papel); border-color: var(--mauve-escuro);
}
.quartos-nota { text-align: center; margin-top: 2.5rem; font-size: 0.88rem; color: var(--mauve-escuro); }

@media (max-width: 620px) {
  .quartos-grid { grid-template-columns: 1fr; }
}

/* ---------- Vinha ---------- */
.vinha { padding: 6rem 0; }
.vinha-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 3.5rem; align-items: center; }
.vinha-visual { aspect-ratio: 1/1; border-radius: var(--radius); overflow: hidden; box-shadow: 0 20px 40px -20px rgba(36,31,39,0.35); }

@media (max-width: 880px) {
  .vinha-grid { grid-template-columns: 1fr; }
  .vinha-visual { max-width: 320px; margin: 0 auto; order: -1; }
}

/* ---------- Zona ---------- */
.zona { padding: 6rem 0; background: var(--papel-2); }
.zona-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.2rem;
  margin-top: 2.8rem;
}
.zona-card { text-align: center; }
.zona-img {
  width: 64px; height: 64px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.1rem;
  background-color: var(--ardosia);
}
.zona-card p { font-size: 0.9rem; color: #45403f; }

@media (max-width: 940px) {
  .zona-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .zona-grid { grid-template-columns: 1fr; }
}

/* ---------- Direto ---------- */
.direto { background: var(--ardosia); color: var(--papel); padding: 6rem 0; }
.direto .eyebrow { color: var(--dourado); }
.direto h2 { color: var(--papel); }
.direto-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 3.5rem; align-items: center; }
.direto-lista { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 0.9rem; }
.direto-lista li {
  padding-left: 1.6em; position: relative; font-size: 0.95rem; color: var(--papel-2);
}
.direto-lista li::before {
  content: "—"; position: absolute; left: 0; color: var(--dourado);
}
.direto-lista strong { color: var(--papel); }
.direto-visual { max-width: 320px; margin: 0 auto; }

@media (max-width: 880px) {
  .direto-grid { grid-template-columns: 1fr; }
  .direto-visual { order: -1; max-width: 220px; }
}

/* ---------- Contacto ---------- */
.contacto { padding: 6rem 0; }
.contacto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3.5rem; }
.contacto-lista { list-style: none; padding: 0; margin: 1.6rem 0 2rem; display: grid; gap: 1rem; }
.contacto-lista li { display: flex; flex-direction: column; gap: 0.15rem; }
.contacto-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--mauve-escuro); font-weight: 600; }
.contacto-lista a { text-decoration: none; font-size: 1.02rem; border-bottom: 1px solid transparent; }
.contacto-lista a:hover { border-color: var(--dourado); }
.mapa { border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(36,31,39,0.12); }
.mapa iframe { width: 100%; height: 260px; border: 0; display: block; filter: grayscale(0.1); }

.contacto-form {
  background: var(--papel-2);
  padding: 2.2rem;
  border: 1px solid rgba(36,31,39,0.08);
  display: flex; flex-direction: column;
}
.form-row { margin-bottom: 1.1rem; display: flex; flex-direction: column; gap: 0.35rem; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-row-2 > div { display: flex; flex-direction: column; gap: 0.35rem; }
label { font-size: 0.82rem; font-weight: 600; color: var(--ardosia); }
input, textarea {
  font-family: var(--sans); font-size: 0.95rem;
  padding: 0.65em 0.8em; border: 1.5px solid rgba(36,31,39,0.2);
  border-radius: var(--radius); background: var(--papel);
  color: var(--ardosia);
}
input:focus, textarea:focus { border-color: var(--dourado); outline: none; }
.form-nota { font-size: 0.78rem; color: var(--mauve-escuro); margin-top: 0.8rem; }

@media (max-width: 880px) {
  .contacto-grid { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ardosia); color: var(--papel-2); padding: 2.4rem 0 1.8rem; }
.footer-inner {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 1.2rem; font-size: 0.88rem;
}
.footer-logo { height: 38px; width: auto; display: block; margin-bottom: 0.4rem; filter: brightness(1.15); }
.footer-links { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--dourado); }
.footer-social { display: flex; gap: 1rem; }
.footer-social a { color: var(--papel-2); display: flex; }
.footer-social a:hover { color: var(--dourado); }

.footer-bottom {
  width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between;
  align-items: center; gap: 0.8rem;
  margin-top: 1rem; padding-top: 0.9rem;
  border-top: 1px solid rgba(246,242,234,0.12);
}
.footer-copy {
  margin: 0; color: var(--mauve-claro); font-size: 0.74rem; line-height: 1.5;
  max-width: 640px;
}
.footer-copy .nowrap { white-space: nowrap; }
.footer-bottom-right {
  display: flex; align-items: center; gap: 1rem; flex-shrink: 0;
}
.footer-bottom-right a:not(.livro-badge) {
  color: var(--mauve-claro); font-size: 0.78rem;
  text-decoration: underline; text-underline-offset: 2px;
}
.footer-bottom-right a:not(.livro-badge):hover { color: var(--dourado); }

.livro-badge { display: inline-flex; opacity: 0.92; transition: opacity 0.2s ease; }
.livro-badge:hover { opacity: 1; }
.livro-badge img { display: block; }
