/* ----------------------------------------------------------------------
   Tokens
   Verde-sálvia para a marca, azul suave para os apoios, tons de areia
   para o fundo e um âmbar -- o nome do consultório -- só como acento.
   O âmbar claro não tem contraste para texto: em texto usa-se o escuro.
   ---------------------------------------------------------------------- */
:root {
  --ink: #1e2b28;
  --ink-soft: #4a5854;
  --muted: #66736f;

  --sage-900: #1f3329;
  --sage-800: #2b4538;
  --sage-700: #3f5e4c;
  --sage-600: #4f735d;
  --sage-300: #a9c2b1;
  --sage-100: #e4eee7;
  --sage-50: #f1f6f2;

  --blue-700: #355f7a;
  --blue-100: #e1ecf2;

  --sand-50: #fbf8f3;
  --sand-100: #f5efe6;
  --sand-200: #ebe1d2;

  --amber-400: #e0ad6a;
  --amber-500: #d39a4f;
  --amber-700: #9a6424;

  --white: #ffffff;
  --line: rgba(30, 43, 40, 0.1);

  /* WhatsApp: o verde de marca (#25D366) não tem contraste com texto
     branco; os botões usam o verde-escuro, e o cabeçalho o clássico. */
  --wa-700: #0e7a6d;
  --wa-header: #075e54;
  --wa-wallpaper: #efe9e0;
  --wa-out: #dcf8c6;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;

  --shadow-sm: 0 1px 2px rgba(30, 43, 40, 0.06), 0 2px 8px rgba(30, 43, 40, 0.05);
  --shadow: 0 14px 34px -14px rgba(30, 43, 40, 0.22);
  --shadow-lg: 0 30px 70px -24px rgba(30, 43, 40, 0.38);

  --font-sans: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-serif: 'Fraunces', Georgia, 'Times New Roman', serif;

  --header-h: 72px;
  --gutter: 20px;
}

/* ---------------------------------------------------------------------- Base */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand-50);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0;
  color: var(--ink);
}
h1 { font-size: clamp(2.5rem, 6.4vw, 4.4rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0; }

:focus-visible {
  outline: 3px solid var(--amber-500);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--sage-800); color: var(--white); padding: 10px 16px;
  border-radius: var(--radius-sm); text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section[id] { scroll-margin-top: calc(var(--header-h) + 8px); }

.section { padding-block: clamp(72px, 10vw, 120px); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--sage-700);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: ''; width: 22px; height: 2px; border-radius: 2px;
  background: var(--amber-500);
}

.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-soft); }

.section-head { max-width: 680px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head .lead { margin-top: 18px; }

[data-lucide], .lucide { width: 20px; height: 20px; flex-shrink: 0; stroke-width: 1.9; }

/* ---------------------------------------------------------------------- Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px;
  border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; font-size: 1rem; text-decoration: none; cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--sage-700); color: var(--white); box-shadow: 0 10px 24px -10px rgba(63, 94, 76, 0.7); }
.btn-primary:hover { background: var(--sage-800); box-shadow: 0 16px 30px -12px rgba(63, 94, 76, 0.75); }

.btn-ghost { background: var(--white); color: var(--sage-800); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--sage-300); }

.btn-amber { background: var(--amber-400); color: var(--sage-900); }
.btn-amber:hover { background: var(--amber-500); }

.btn-wa { background: var(--wa-700); color: var(--white); }
.btn-wa:hover { background: var(--wa-header); }

.btn-outline-light { color: var(--white); border-color: rgba(255, 255, 255, 0.35); background: transparent; }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 255, 255, 0.6); }

/* ---------------------------------------------------------------------- Cabeçalho */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(251, 248, 243, 0.94);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px -18px rgba(30, 43, 40, 0.4); }

.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 40px; height: 40px; }
.brand-name { font-family: var(--font-serif); font-size: 1.28rem; font-weight: 600; line-height: 1; letter-spacing: -0.01em; }
.brand-sub { display: block; font-family: var(--font-sans); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--sage-700); margin-top: 4px; }

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a:not(.btn) {
  text-decoration: none; font-weight: 600; font-size: 0.95rem; color: var(--ink-soft);
  padding: 8px 14px; border-radius: 999px; transition: color 0.2s, background-color 0.2s;
}
.site-nav a:not(.btn):hover { color: var(--sage-800); background: var(--sage-100); }
.site-nav .btn { min-height: 44px; padding: 0 20px; margin-left: 10px; font-size: 0.95rem; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--white); color: var(--ink);
  align-items: center; justify-content: center; cursor: pointer;
}

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed; left: 0; right: 0; top: var(--header-h);
    flex-direction: column; align-items: stretch; gap: 4px;
    padding: 16px var(--gutter) 24px;
    background: var(--white); border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px -24px rgba(30, 43, 40, 0.35);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  /* O resto da página escurece por trás do menu: uma sombra do tamanho do ecrã,
       cortada em cima para não tapar o cabeçalho. */
    .site-nav.is-open {
      transform: none; opacity: 1; visibility: visible;
      box-shadow: 0 0 0 100vmax rgba(30, 43, 40, 0.38);
      clip-path: inset(0 0 -100vmax 0);
    }
  .site-nav a:not(.btn) { padding: 14px 12px; font-size: 1.05rem; }
  .site-nav .btn { margin: 10px 0 0; min-height: 52px; }
}

/* ---------------------------------------------------------------------- Hero */
.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(48px, 8vw, 96px) clamp(72px, 10vw, 120px);
}
.hero::before {
  content: ''; position: absolute; inset: -20% -10% auto auto; width: 70vw; height: 70vw; max-width: 900px; max-height: 900px;
  background: radial-gradient(closest-side, rgba(225, 236, 242, 0.95), rgba(225, 236, 242, 0));
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; inset: auto auto -30% -15%; width: 60vw; height: 60vw; max-width: 760px; max-height: 760px;
  background: radial-gradient(closest-side, rgba(228, 238, 231, 0.95), rgba(228, 238, 231, 0));
  pointer-events: none;
}

.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(40px, 6vw, 80px); align-items: center; }

.hero h1 em { font-style: italic; color: var(--sage-700); }
.hero .lead { margin-top: 24px; max-width: 560px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; align-items: flex-start; }
.call-note { display: block; font-size: 0.74rem; color: var(--muted); margin-top: 6px; text-align: center; }

.trust { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 44px 0 0; padding: 0; list-style: none; }
.trust li { display: flex; align-items: center; gap: 10px; font-size: 0.92rem; font-weight: 600; color: var(--ink-soft); }
.trust .icon-bubble { width: 36px; height: 36px; }

.icon-bubble {
  display: inline-grid; place-items: center; border-radius: 12px;
  background: var(--sage-100); color: var(--sage-700);
}
.icon-bubble .lucide, .icon-bubble [data-lucide] { width: 18px; height: 18px; }

.hero-visual { position: relative; min-height: 520px; }

.spine-card {
  position: absolute; inset: 0 0 0 12%;
  border-radius: 36px; overflow: hidden;
  background: linear-gradient(160deg, var(--sage-600) 0%, var(--sage-800) 62%, var(--sage-900) 100%);
  box-shadow: var(--shadow-lg);
}
.spine-card::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 78% 18%, rgba(224, 173, 106, 0.38), transparent 42%),
    radial-gradient(circle at 12% 88%, rgba(225, 236, 242, 0.22), transparent 46%);
}
.spine { position: absolute; inset: 6% 8% 6% 18%; width: auto; height: 88%; margin: auto; }
.spine .vertebra { fill: rgba(245, 239, 230, 0.92); }
.spine .cord { fill: none; stroke: var(--amber-400); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0.75; }
.spine .halo { fill: rgba(224, 173, 106, 0.18); }

@media (prefers-reduced-motion: no-preference) {
  .spine { animation: breathe 7s ease-in-out infinite; transform-origin: 50% 50%; }
  .float-a { animation: float 6s ease-in-out infinite; }
  .float-b { animation: float 7s ease-in-out -2s infinite; }
}
@keyframes breathe { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.018); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

.quote-badge {
  position: absolute; top: 28px; right: 24px; z-index: 2;
  padding: 14px 20px; border-radius: 18px;
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.24);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: var(--sand-100); font-family: var(--font-serif); font-style: italic; font-size: 1.35rem;
}

.chat-preview {
  position: absolute; left: 0; bottom: 36px; z-index: 2;
  width: min(310px, 78%);
  border-radius: 22px; overflow: hidden;
  background: var(--wa-wallpaper); box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.chat-preview-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--wa-header); color: var(--white); }
.chat-preview-head strong { display: block; font-size: 0.88rem; line-height: 1.2; }
.chat-preview-head span { font-size: 0.72rem; opacity: 0.85; }
.chat-preview-body { display: grid; gap: 8px; padding: 14px; }
.chat-preview .bubble { max-width: 88%; padding: 8px 12px; border-radius: 12px; font-size: 0.84rem; line-height: 1.4; box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.12); }
.chat-preview .bubble.in { background: var(--white); border-top-left-radius: 4px; }
.chat-preview .bubble.out { background: var(--wa-out); border-top-right-radius: 4px; justify-self: end; }

.avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--sand-100); color: var(--sage-700);
}
.avatar .lucide, .avatar [data-lucide] { width: 18px; height: 18px; }

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 440px; max-width: 560px; width: 100%; margin-inline: auto; }
}
@media (max-width: 480px) {
  .hero-actions .btn { width: 100%; }
  .hero-actions > div { width: 100%; }
  .hero-visual { min-height: 400px; }
  .spine-card { inset: 0; }
  .chat-preview { left: 12px; bottom: 16px; }
  .quote-badge { top: 18px; right: 16px; font-size: 1.1rem; }
}

/* ---------------------------------------------------------------------- Sobre */
.about { background: var(--white); }

.about-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: clamp(40px, 7vw, 96px); align-items: start; }

.about-copy p + p { margin-top: 18px; }
.about-copy .lead { margin-top: 22px; }

.credential {
  display: flex; gap: 16px; align-items: flex-start;
  margin-top: 36px; padding: 22px 24px;
  border-radius: var(--radius); background: var(--sand-50); border: 1px solid var(--sand-200);
}
.credential .icon-bubble { width: 48px; height: 48px; border-radius: 14px; background: var(--white); color: var(--amber-700); }
.credential .icon-bubble .lucide, .credential .icon-bubble [data-lucide] { width: 22px; height: 22px; }
.credential small { display: block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.credential strong { display: block; font-size: 1.05rem; margin-top: 4px; }
.credential span { color: var(--ink-soft); font-size: 0.95rem; }

.philosophy {
  position: relative; padding: clamp(28px, 4vw, 44px);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, var(--sage-50), var(--white));
  border: 1px solid var(--sage-100);
}
.philosophy h3 { font-size: 1.6rem; }
.philosophy blockquote {
  margin: 20px 0 0; padding-left: 20px; border-left: 3px solid var(--amber-500);
  font-family: var(--font-serif); font-size: clamp(1.15rem, 2vw, 1.35rem); line-height: 1.5; color: var(--sage-800);
}

.principles { display: grid; gap: 14px; margin: 32px 0 0; padding: 0; list-style: none; }
.principles li {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start;
  padding: 18px; border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-sm);
}
.principles .icon-bubble { width: 44px; height: 44px; }
.principles strong { display: block; font-size: 1rem; margin-bottom: 2px; }
.principles p { font-size: 0.94rem; color: var(--ink-soft); }

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

/* ---------------------------------------------------------------------- Tratamentos */
.treatments { background: var(--sage-50); position: relative; }

.areas { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 40px; padding: 0; list-style: none; }
.areas li {
  padding: 8px 16px; border-radius: 999px;
  background: var(--white); border: 1px solid var(--sage-100);
  font-weight: 600; font-size: 0.9rem; color: var(--sage-800);
}

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card {
  position: relative; padding: 26px 24px 28px;
  border-radius: var(--radius); background: var(--white);
  border: 1px solid rgba(63, 94, 76, 0.08); box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--sage-300); }
.card .icon-bubble { width: 50px; height: 50px; border-radius: 15px; margin-bottom: 20px; }
.card .icon-bubble .lucide, .card .icon-bubble [data-lucide] { width: 22px; height: 22px; }
.card:nth-child(3n + 2) .icon-bubble { background: var(--blue-100); color: var(--blue-700); }
.card:nth-child(3n + 3) .icon-bubble { background: var(--sand-100); color: var(--amber-700); }
.card h3 { font-size: 1.22rem; }
.card p { margin-top: 8px; font-size: 0.94rem; color: var(--ink-soft); }

.treatments-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px;
  margin-top: 40px; padding: 22px 26px; border-radius: var(--radius);
  background: var(--white); border: 1px dashed var(--sage-300);
}
.treatments-foot p { color: var(--ink-soft); max-width: 640px; }
.treatments-foot strong { color: var(--ink); }

@media (max-width: 1040px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } .treatments-foot .btn { width: 100%; } }

/* ---------------------------------------------------------------------- Marcação */
/* `clip`, não só `hidden`: o brilho de fundo sai pela direita, e com
   `hidden` a secção é um contentor de scroll -- pôr o foco num campo do
   formulário deslocava-a para o lado. `hidden` fica para browsers antigos. */
.booking {
  position: relative; overflow: hidden; overflow: clip;
  background: var(--sage-800); color: var(--sand-100);
}
.booking::before {
  content: ''; position: absolute; inset: auto -10% -40% auto; width: 60vw; height: 60vw; max-width: 780px; max-height: 780px;
  background: radial-gradient(closest-side, rgba(224, 173, 106, 0.22), transparent);
  pointer-events: none;
}
.booking h2 { color: var(--white); }
.booking .eyebrow { color: var(--amber-400); }
.booking .lead { color: rgba(245, 239, 230, 0.82); }

.booking-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 80px); align-items: start; }
.booking-grid .good-to-know { grid-column: 1 / -1; }
.booking-grid .good-to-know ul { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px 28px; }
.booking-alt { margin-top: 36px; color: rgba(245, 239, 230, 0.82); }
.booking-alt + .booking-actions { margin-top: 14px; }

/* O formulário: um cartão claro, como o "Bom saber". */
.booking-card {
  padding: clamp(24px, 4vw, 36px); border-radius: var(--radius-lg);
  background: var(--sand-50); color: var(--ink); box-shadow: var(--shadow-lg);
}
.booking-card h3 { font-size: 1.5rem; }
.form-note { margin-top: 6px; font-size: 0.88rem; color: var(--muted); }
.form-note a { color: var(--sage-700); }

.booking-form .field { margin: 22px 0 0; padding: 0; border: 0; min-width: 0; }
.booking-form fieldset[disabled] { opacity: 0.55; }
.booking-form legend, .booking-form label { display: block; margin-bottom: 8px; padding: 0; font-weight: 700; font-size: 0.95rem; }

.booking-form input[type='text'], .booking-form input[type='tel'] {
  width: 100%; min-height: 50px; padding: 0 16px;
  font: inherit; color: var(--ink);
  background: var(--white); border: 1.5px solid var(--sand-200); border-radius: var(--radius-sm);
  transition: border-color 0.15s ease;
}
.booking-form input[type='text']:focus, .booking-form input[type='tel']:focus { outline: none; border-color: var(--sage-600); box-shadow: 0 0 0 3px rgba(79, 115, 93, 0.18); }
.booking-form input[aria-invalid='true'] { border-color: #b3261e; }

/* Escolhas (tipo, dia, hora): rádios de verdade, para o teclado e para os
   leitores de ecrã, com o aspeto das fichas do assistente. */
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.choice span {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 44px; padding: 8px 14px; border-radius: var(--radius-sm);
  background: var(--white); border: 1.5px solid var(--sand-200);
  font-weight: 600; font-size: 0.93rem; line-height: 1.25; text-align: center;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.choice span small { font-weight: 500; font-size: 0.78rem; color: var(--muted); }
.choice input:hover + span { border-color: var(--sage-300); }
.choice input:checked + span { background: var(--sage-700); border-color: var(--sage-700); color: var(--white); }
.choice input:checked + span small { color: rgba(255, 255, 255, 0.8); }
.choice input:focus-visible + span { outline: 3px solid var(--amber-500); outline-offset: 2px; }
.choice input:disabled { cursor: not-allowed; }

/* Os dias numa faixa que desliza; as horas numa grelha. */
.choices-days { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.choices-days .choice { flex: 0 0 auto; scroll-snap-align: start; }
.choices-days .choice span { min-width: 74px; }
.choices-times { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); }

.field-status { margin-top: 6px; font-size: 0.88rem; color: var(--muted); }
.field-status:empty { display: none; }
.field-hint { margin-top: 6px; font-size: 0.85rem; color: var(--muted); }
.field-error { margin-top: 6px; font-size: 0.88rem; font-weight: 600; color: #b3261e; }

.form-alert {
  margin-top: 20px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: #fdecea; color: #7a1c15; font-size: 0.93rem;
}
.form-alert .choices { margin-top: 10px; }
.form-alert button.link { padding: 0; border: 0; background: none; color: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }

.btn-block { width: 100%; margin-top: 22px; }
.btn[disabled] { opacity: 0.7; cursor: progress; transform: none; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.4); border-top-color: var(--white);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

.booking-success { text-align: center; }
.booking-success h3:focus { outline: none; }
.success-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; background: var(--sage-100); color: var(--sage-700); }
.success-icon [data-lucide], .success-icon .lucide { width: 28px; height: 28px; }
.success-details { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 22px 0 0; padding: 18px; text-align: left; border-radius: var(--radius-sm); background: var(--white); border: 1px solid var(--sand-200); }
.success-details dt { color: var(--muted); font-size: 0.9rem; }
.success-details dd { margin: 0; font-weight: 600; }

.steps { display: grid; gap: 14px; margin: 36px 0 0; padding: 0; list-style: none; counter-reset: step; }
.steps li {
  display: grid; grid-template-columns: 44px 1fr; gap: 16px; align-items: center;
  padding: 14px 18px 14px 14px; border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1);
  counter-increment: step;
}
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
  background: var(--amber-400); color: var(--sage-900); font-family: var(--font-serif); font-size: 1.2rem; font-weight: 600;
}
.steps strong { display: block; color: var(--white); }
.steps span { font-size: 0.92rem; color: rgba(245, 239, 230, 0.75); }

.booking-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }

.good-to-know {
  padding: clamp(26px, 4vw, 38px); border-radius: var(--radius-lg);
  background: var(--sand-50); color: var(--ink); box-shadow: var(--shadow-lg);
}
.good-to-know h3 { font-size: 1.5rem; }
.good-to-know ul { display: grid; gap: 18px; margin: 24px 0 0; padding: 0; list-style: none; }
.good-to-know li { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; }
.good-to-know .icon-bubble { width: 42px; height: 42px; }
.good-to-know strong { display: block; }
.good-to-know p { font-size: 0.93rem; color: var(--ink-soft); }

@media (max-width: 900px) { .booking-grid { grid-template-columns: minmax(0, 1fr); } .booking-grid .good-to-know { grid-column: auto; } }
@media (max-width: 480px) { .booking-actions .btn { width: 100%; } }

/* ---------------------------------------------------------------------- Contactos */
.contact { background: var(--white); }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: stretch; }

.contact-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.contact-item {
  display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start;
  padding: 20px 22px; border-radius: var(--radius);
  background: var(--sand-50); border: 1px solid var(--sand-200);
}
.contact-item .icon-bubble { width: 46px; height: 46px; background: var(--white); }
.contact-item small { display: block; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.contact-item a, .contact-item address { display: inline-block; margin-top: 2px; font-style: normal; font-weight: 600; font-size: 1.05rem; text-decoration: none; }
.contact-item a:hover { color: var(--sage-700); text-decoration: underline; text-underline-offset: 3px; }
.contact-item .note { display: block; font-size: 0.8rem; color: var(--muted); margin-top: 2px; }
.contact-item .inline-link { font-size: 0.9rem; margin-top: 8px; color: var(--sage-700); display: inline-flex; align-items: center; gap: 6px; }
.contact-item .inline-link .lucide { width: 16px; height: 16px; }

.hours {
  margin-top: 14px; padding: 22px; border-radius: var(--radius);
  background: var(--sage-50); border: 1px solid var(--sage-100);
}
.hours-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.hours-head h3 { font-family: var(--font-sans); font-size: 1rem; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px; border-radius: 999px; font-size: 0.8rem; font-weight: 700;
  background: var(--white); color: var(--muted); border: 1px solid var(--line);
}
.status-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-pill.is-open { color: var(--wa-700); }
.status-pill.is-closed { color: var(--amber-700); }
.status-pill:empty { display: none; }

.hours table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
.hours th, .hours td { padding: 10px 12px; text-align: left; border-top: 1px solid rgba(63, 94, 76, 0.1); }
.hours td { text-align: right; font-variant-numeric: tabular-nums; }
.hours th { font-weight: 500; color: var(--ink-soft); }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 700; color: var(--sage-800); background: rgba(255, 255, 255, 0.7); }
.hours tr.is-today th { border-radius: 10px 0 0 10px; }
.hours tr.is-today td { border-radius: 0 10px 10px 0; }

/* Mapa: por agora um marcador de posição. Um <iframe> do Google Maps
   grava cookies de terceiros, e isso exige consentimento prévio. */
.map {
  position: relative; min-height: 460px; border-radius: var(--radius-lg); overflow: hidden;
  background:
    linear-gradient(0deg, rgba(241, 246, 242, 0.1), rgba(241, 246, 242, 0.1)),
    repeating-linear-gradient(0deg, transparent 0 46px, rgba(63, 94, 76, 0.07) 46px 47px),
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(63, 94, 76, 0.07) 46px 47px),
    linear-gradient(135deg, var(--sage-100), var(--blue-100));
  border: 1px solid var(--sage-100);
  display: grid; place-items: center; text-align: center; padding: 32px;
}
.map::before, .map::after {
  content: ''; position: absolute; border-radius: 999px; background: rgba(255, 255, 255, 0.75);
}
.map::before { width: 140%; height: 18px; transform: rotate(-18deg); top: 38%; left: -20%; }
.map::after { width: 14px; height: 140%; transform: rotate(12deg); left: 58%; top: -20%; }

.map-card {
  position: relative; z-index: 1; max-width: 340px;
  padding: 28px 26px; border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow);
}
.map-pin {
  width: 60px; height: 60px; margin: -58px auto 14px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  display: grid; place-items: center; background: var(--sage-700); color: var(--white); box-shadow: var(--shadow);
}
.map-pin .lucide, .map-pin [data-lucide] { transform: rotate(45deg); width: 24px; height: 24px; }
.map-card strong { display: block; font-family: var(--font-serif); font-size: 1.25rem; font-weight: 500; }
.map-card p { color: var(--ink-soft); margin-top: 6px; font-size: 0.95rem; }
.map-card .btn { margin-top: 18px; min-height: 46px; font-size: 0.95rem; }

@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } .map { min-height: 360px; } }

/* ---------------------------------------------------------------------- Política de Privacidade */
.header-back { min-height: 44px; padding: 0 18px; font-size: 0.95rem; white-space: nowrap; }
/* No telemóvel, só a seta: o texto fica para os leitores de ecrã. */
@media (max-width: 480px) {
  .header-back { width: 44px; padding: 0; }
  .header-back-label {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
  }
}

.legal-content { max-width: 760px; }
.legal-content h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 8px; }
.legal-content h2 { font-size: clamp(1.35rem, 2.4vw, 1.65rem); margin: 44px 0 14px; }
.legal-content p, .legal-content li { color: var(--ink-soft); }
.legal-content p + p, .legal-content p + ul, .legal-content ul + p { margin-top: 14px; }
.legal-content ul { margin: 0; padding-left: 1.2em; display: grid; gap: 8px; }
.legal-content strong { color: var(--ink); }
.legal-content a { color: var(--sage-700); font-weight: 600; text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal-content a:hover { color: var(--sage-800); }
.legal-updated { margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.92rem; }

/* ---------------------------------------------------------------------- Rodapé */
.site-footer { background: var(--sage-900); color: rgba(245, 239, 230, 0.78); padding-block: 56px 36px; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.site-footer .brand-name { color: var(--white); }
.site-footer .brand-sub { color: var(--amber-400); }
.site-footer p { margin-top: 14px; font-size: 0.92rem; max-width: 340px; }
.footer-links { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; font-size: 0.94rem; }
.footer-links a { text-decoration: none; }
.footer-links a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.82rem; }

/* ---------------------------------------------------------------------- Aparecer ao entrar no ecrã
   Só com JavaScript: sem ele, nada fica escondido. */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
  .js .reveal.is-visible { opacity: 1; transform: none; }
  .js .cards .reveal:nth-child(2) { transition-delay: 60ms; }
  .js .cards .reveal:nth-child(3) { transition-delay: 120ms; }
  .js .cards .reveal:nth-child(4) { transition-delay: 180ms; }
}

/* ---------------------------------------------------------------------- Botão flutuante */
.fab {
  position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 55;
  display: inline-flex; align-items: center; gap: 10px;
  height: 58px; padding: 0 22px 0 18px; border: 0; border-radius: 999px;
  background: var(--wa-700); color: var(--white); font-weight: 700; cursor: pointer;
  box-shadow: 0 16px 34px -12px rgba(7, 94, 84, 0.65);
  transition: transform 0.25s ease, opacity 0.25s ease, background-color 0.2s;
}
.fab:hover { background: var(--wa-header); transform: translateY(-2px); }
.fab .lucide, .fab [data-lucide] { width: 24px; height: 24px; }
.fab::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit; border: 2px solid var(--wa-700);
  opacity: 0; pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .fab::after { animation: ring 2.4s ease-out 1.5s 3; }
}
@keyframes ring { 0% { opacity: 0.7; transform: scale(1); } 100% { opacity: 0; transform: scale(1.35); } }
body.chat-open .fab { opacity: 0; pointer-events: none; transform: translateY(12px); }

@media (max-width: 480px) {
  .fab { width: 60px; height: 60px; padding: 0; justify-content: center; }
  .fab-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  body.booking-in-view .fab { opacity: 0; pointer-events: none; transform: translateY(12px); }
}

/* ---------------------------------------------------------------------- Assistente (ao estilo do WhatsApp) */
.chat {
  position: fixed; z-index: 70;
  right: 20px; bottom: calc(20px + env(safe-area-inset-bottom));
  width: min(400px, calc(100vw - 32px));
  height: min(660px, calc(100dvh - 40px));
  display: flex; flex-direction: column;
  border-radius: 24px; overflow: hidden;
  background: var(--wa-wallpaper);
  box-shadow: var(--shadow-lg), 0 0 0 1px rgba(30, 43, 40, 0.06);
  transform-origin: bottom right;
}
.chat[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .chat.is-open { animation: pop 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
}
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(0.96); } to { opacity: 1; transform: none; } }

@media (max-width: 560px) {
  .chat { inset: 0; width: 100%; height: 100%; border-radius: 0; }
  body.chat-open { overflow: hidden; }
}

.chat-header {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 8px 12px 14px; padding-top: calc(12px + env(safe-area-inset-top));
  background: var(--wa-header); color: var(--white);
}
.chat-header .avatar { width: 42px; height: 42px; }
.chat-title { flex: 1; min-width: 0; }
.chat-title h2 { font-family: var(--font-sans); font-size: 1rem; font-weight: 700; color: var(--white); letter-spacing: 0; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-title p { font-size: 0.78rem; opacity: 0.85; }
.chat-icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; color: var(--white);
  display: grid; place-items: center; cursor: pointer;
}
.chat-icon-btn:hover { background: rgba(255, 255, 255, 0.12); }

.chat-log {
  flex: 1; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px 12px 10px;
  background-image:
    radial-gradient(rgba(63, 94, 76, 0.07) 1.2px, transparent 1.2px),
    radial-gradient(rgba(154, 100, 36, 0.05) 1.2px, transparent 1.2px);
  background-size: 22px 22px, 22px 22px;
  background-position: 0 0, 11px 11px;
}

.chat-day, .chat-system {
  align-self: center; text-align: center; font-size: 0.76rem; line-height: 1.45;
  padding: 5px 12px; border-radius: 8px; box-shadow: 0 1px 0.5px rgba(0, 0, 0, 0.1);
}
.chat-day { background: #e1f2fb; color: #3b4a54; text-transform: uppercase; font-weight: 600; letter-spacing: 0.04em; }
.chat-system { background: #fdf4c5; color: #54482a; max-width: 92%; margin: 4px 0 8px; }

.msg {
  position: relative; max-width: 86%;
  padding: 7px 10px 20px 11px; border-radius: 12px;
  font-size: 0.95rem; line-height: 1.45; color: #111b21;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.13);
  overflow-wrap: anywhere; white-space: pre-line;
}
@media (prefers-reduced-motion: no-preference) {
  .msg { animation: msg-in 0.22s ease-out; }
}
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.msg-bot { align-self: flex-start; background: var(--white); border-top-left-radius: 3px; }
.msg-user { align-self: flex-end; background: var(--wa-out); border-top-right-radius: 3px; }
.msg a:not(.btn) { color: #027eb5; }
.msg time { position: absolute; right: 9px; bottom: 3px; font-size: 0.68rem; color: #667781; white-space: nowrap; }
.msg-user time::after { content: ' ✓✓'; color: #53bdeb; letter-spacing: -2px; }

.typing { display: inline-flex; gap: 4px; align-items: center; padding: 12px 14px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: #8696a0; }
@media (prefers-reduced-motion: no-preference) {
  .typing span { animation: typing 1.2s infinite ease-in-out; }
  .typing span:nth-child(2) { animation-delay: 0.15s; }
  .typing span:nth-child(3) { animation-delay: 0.3s; }
}
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-4px); opacity: 1; } }

.summary { display: block; margin: 2px 0 0; white-space: normal; min-width: 230px; }
.summary-title { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 6px; color: var(--wa-header); }
.summary-title .lucide { width: 18px; height: 18px; }
.summary dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 0; font-size: 0.9rem; }
.summary dt { color: #667781; }
.summary dd { margin: 0; font-weight: 600; }
.summary dd.empty { font-weight: 400; color: #8696a0; font-style: italic; }

.wa-card { display: grid; gap: 10px; white-space: normal; }
.wa-card .btn { min-height: 46px; font-size: 0.95rem; width: 100%; }

.chat-replies {
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px;
  max-height: 38%; overflow-y: auto;
  padding: 8px 12px 6px;
}
.chat-replies[hidden] { display: none; }
.chip {
  min-height: 40px; padding: 8px 15px; border-radius: 999px;
  border: 1.5px solid var(--wa-700); background: var(--white); color: var(--wa-700);
  font-weight: 700; font-size: 0.88rem; cursor: pointer;
  transition: background-color 0.15s, color 0.15s, transform 0.15s;
}
.chip:hover { background: #e7f5f2; }
.chip:active { transform: scale(0.97); }
.chip-primary { background: var(--wa-700); color: var(--white); }
.chip-primary:hover { background: var(--wa-header); }

.chat-composer {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  background: #f0f2f5;
}
.chat-composer input {
  flex: 1; min-width: 0; height: 46px; padding: 0 18px;
  border: 0; border-radius: 999px; background: var(--white);
  font-family: var(--font-sans); font-size: 16px; color: #111b21;
  box-shadow: 0 1px 0.5px rgba(11, 20, 26, 0.1);
}
.chat-composer input:disabled { background: #e9edef; color: #8696a0; }
.chat-composer input::placeholder { color: #8696a0; }
.chat-send {
  width: 46px; height: 46px; border-radius: 50%; border: 0; flex-shrink: 0;
  display: grid; place-items: center; cursor: pointer;
  background: var(--wa-700); color: var(--white);
  transition: background-color 0.15s, opacity 0.15s;
}
.chat-send:hover { background: var(--wa-header); }
.chat-send:disabled { opacity: 0.45; cursor: default; }
