/* ===========================================================
   Quinta do Solposto — Estilo
   Paleta inspirada no logótipo: verde-oliva + dourado
   =========================================================== */

:root {
  --green-dark:  #3d531f;
  --green:       #4f6b27;
  --green-soft:  #7d9b3a;
  --green-light: #8fb13a;
  --gold:        #f2a900;
  --gold-dark:   #d99400;
  --cream:       #faf8f2;
  --sand:        #f0ece0;
  --ink:         #2a2f22;
  --muted:       #5d6452;
  --white:       #ffffff;
  --radius:      16px;
  --shadow:      0 18px 50px rgba(40, 55, 20, .12);
  --shadow-sm:   0 8px 24px rgba(40, 55, 20, .08);
  --maxw:        1160px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
}

h1, h2, h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
  line-height: 1.1;
  color: var(--green-dark);
  margin: 0 0 .4em;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: 1.4rem; }

p { margin: 0 0 1rem; }

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--gold-dark); }

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

code {
  background: var(--sand);
  padding: 2px 7px;
  border-radius: 6px;
  font-size: .85em;
  color: var(--green-dark);
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* ---------- Botões ---------- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .98rem;
  letter-spacing: .02em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-gold {
  background: var(--gold);
  color: #3a2c00;
  box-shadow: 0 10px 24px rgba(242, 169, 0, .35);
}
.btn-gold:hover { background: var(--gold-dark); color: #3a2c00; }
.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,.7);
}
.btn-ghost:hover { background: rgba(255,255,255,.14); color: var(--white); }
.btn-block { width: 100%; text-align: center; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 242, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--sand);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand-logo { height: 46px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a { color: var(--green-dark); font-weight: 600; font-size: .96rem; }
.nav-links a:hover { color: var(--gold-dark); }
.nav-cta {
  background: var(--green);
  color: var(--white) !important;
  padding: 9px 20px;
  border-radius: 999px;
}
.nav-cta:hover { background: var(--green-dark); }

.lang-switch { display: inline-flex; gap: 4px; margin-left: 6px; font-size: .85rem; }
.lang-switch a {
  color: var(--muted);
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  letter-spacing: .04em;
}
.lang-switch a.active { background: var(--gold); color: #3a2c00; }
.lang-switch a:hover { color: var(--green-dark); }
.lang-switch a.active:hover { color: #3a2c00; }

.nav-toggle, .nav-burger { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 88vh;
  display: flex;
  align-items: center;
  color: var(--white);
  text-align: center;
  background:
    radial-gradient(circle at 70% 20%, rgba(242,169,0,.25), transparent 45%),
    linear-gradient(160deg, #2f4019 0%, #4f6b27 55%, #6a8a30 100%);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60'%3E%3Cpath d='M0 59h60M59 0v60' stroke='%23ffffff' stroke-opacity='0.04' stroke-width='1'/%3E%3C/svg%3E");
  opacity: .6;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 30%, rgba(20,30,8,.35) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 860px; }
.hero-kicker {
  text-transform: uppercase;
  letter-spacing: .28em;
  font-size: .82rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 1rem;
}
.hero h1 { color: var(--white); margin-bottom: .3em; }
.hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: rgba(255,255,255,.92);
  max-width: 680px;
  margin: 0 auto 2rem;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-scroll {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  color: var(--white);
  font-size: 1.6rem;
  animation: bob 2s ease-in-out infinite;
}
@keyframes bob { 0%,100%{ transform: translate(-50%,0);} 50%{ transform: translate(-50%,8px);} }

/* Herói com fotografia de fundo (assets/fotos/hero.jpg) */
.hero-photo {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero-photo .hero-overlay {
  background: linear-gradient(160deg, rgba(28,40,12,.78) 0%, rgba(40,55,20,.55) 55%, rgba(20,30,8,.72) 100%);
}

/* ---------- Animação de revelação ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.is-visible { opacity: 1; transform: none; }
.gallery-item.reveal { transform: none; }
.cards .reveal:nth-child(2) { transition-delay: .12s; }
.cards .reveal:nth-child(3) { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Banda de citação ---------- */
.quote-band {
  position: relative;
  padding: clamp(56px, 8vw, 96px) 0;
  text-align: center;
  color: var(--white);
  background: linear-gradient(150deg, var(--green-dark), var(--green) 70%, var(--green-soft));
  overflow: hidden;
}
.quote-band .container { position: relative; z-index: 1; max-width: 820px; }
.quote-mark {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 5rem;
  line-height: .6;
  color: var(--gold);
  opacity: .85;
}
.quote-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.5rem, 3.4vw, 2.4rem);
  font-weight: 600;
  font-style: italic;
  line-height: 1.3;
  margin: .4em 0 .6em;
}
.quote-by {
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .8rem;
  font-weight: 700;
  color: var(--gold);
  margin: 0;
}

/* ---------- Secções ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; }
.section-alt { background: var(--sand); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .78rem;
  font-weight: 700;
  color: var(--gold-dark);
  margin-bottom: .6rem;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 720px; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 3rem; }
.section-head .lead { margin: 0 auto; }
.section-head h2 { position: relative; padding-bottom: 18px; margin-bottom: 18px; }
.section-head h2::after {
  content: "";
  position: absolute; left: 50%; bottom: 0;
  width: 64px; height: 3px;
  transform: translateX(-50%);
  background: var(--gold);
  border-radius: 3px;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}

.feature-list { list-style: none; padding: 0; margin: 1.4rem 0 0; }
.feature-list li {
  position: relative;
  padding: 8px 0 8px 30px;
  color: var(--ink);
  border-bottom: 1px solid var(--sand);
}
.feature-list li::before {
  content: "✦";
  position: absolute; left: 0;
  color: var(--gold);
  font-size: 1rem;
}

/* ---------- Cartões ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.card {
  position: relative;
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(125,155,58,.14);
  transition: transform .2s ease, box-shadow .2s ease;
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--green-soft), var(--gold));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card:hover::before { transform: scaleX(1); }
.card-icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--green-soft), var(--green));
  color: var(--white);
  font-size: 1.5rem;
  margin-bottom: 18px;
}
.card h3 { color: var(--green-dark); }
.card p { color: var(--muted); margin: 0; }

/* ---------- Media / placeholders ---------- */
.media-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--sand);
}
.media-frame img { width: 100%; height: auto; display: block; }
.media-frame .media-placeholder { width: 100%; border-radius: 0; }
.media-placeholder {
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  min-height: 360px;
  background: linear-gradient(135deg, #e9ecdd, #dfe4cf);
  color: var(--green);
  font-weight: 600;
  border: 2px dashed rgba(79,107,39,.35);
  border-radius: var(--radius);
}
.media-placeholder small { font-weight: 400; color: var(--muted); }
.media-placeholder.small { min-height: 220px; font-size: .85rem; }

/* ---------- Galeria (mosaico, mostra a foto inteira) ---------- */
.gallery {
  column-count: 3;
  column-gap: 18px;
}
.gallery-item {
  break-inside: avoid;
  margin-bottom: 18px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--sand);
}
.gallery-item img {
  width: 100%; height: auto;
  display: block;
  transition: transform .4s ease;
}
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item .media-placeholder { border-radius: 0; }

/* ---------- Contacto ---------- */
.contact-grid { align-items: start; }
.contact-info { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.contact-info li { padding: 6px 0; }
.contact-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--gold);
}
.field { margin-bottom: 16px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label {
  display: block;
  font-weight: 600;
  font-size: .9rem;
  margin-bottom: 6px;
  color: var(--green-dark);
}
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #dfe3d2;
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: #fcfbf6;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--green-soft);
  box-shadow: 0 0 0 3px rgba(143,177,58,.18);
}
.field textarea { resize: vertical; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

/* ---------- Alertas ---------- */
.alert {
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 18px;
  font-weight: 500;
}
.alert-success { background: #e9f6ea; color: #1e6b32; border: 1px solid #bfe3c3; }
.alert-error   { background: #fdeceb; color: #a52a25; border: 1px solid #f3c6c2; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,.85);
  text-align: center;
  padding: 56px 0 36px;
}
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.footer-logo { height: 54px; background: #fff; padding: 10px 16px; border-radius: 12px; }
.site-footer p { margin: 4px 0; }
.footer-links a { color: var(--gold); font-weight: 600; }
.footer-links a:hover { color: #fff; }
.copyright { font-size: .85rem; color: rgba(255,255,255,.55); margin-top: 12px; }

/* ---------- Responsivo ---------- */
@media (max-width: 860px) {
  .nav-burger {
    display: flex; flex-direction: column; gap: 5px;
    cursor: pointer; padding: 6px;
  }
  .nav-burger span {
    width: 26px; height: 3px; border-radius: 3px;
    background: var(--green-dark);
    transition: .25s;
  }
  .nav-links {
    position: absolute;
    top: 76px; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--sand);
    padding: 8px 22px 18px;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .nav-links a { width: 100%; padding: 12px 0; border-bottom: 1px solid var(--sand); }
  .nav-cta { margin-top: 10px; width: auto; }
  .nav-toggle:checked ~ .nav-links { max-height: 420px; }

  .grid-2 { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr; }
  .gallery { column-count: 2; }
  .field-row { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .gallery { column-count: 1; }
  .hero { min-height: 92vh; }
}
