/* Site de apresentação - Gestor de Férias. Sem dependências externas. */
:root {
  --bg: #ffffff;
  --bg-alt: #f3f6f9;
  --surface: #ffffff;
  --text: #1b2733;
  --muted: #4d5d6c;
  --border: #d5dee7;
  --primary: #1f5f8b;
  --primary-hover: #174a6d;
  --primary-text: #ffffff;
  --accent: #2e7d32;
  --dark-bg: #12324a;
  --dark-text: #eef4f9;
  --dark-muted: #c3d3e0;
  --shadow: 0 10px 30px rgba(20, 40, 60, 0.12);
  --radius: 12px;
  --focus: #f0a500;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10171e;
    --bg-alt: #16202a;
    --surface: #1b2732;
    --text: #e7eef5;
    --muted: #a9b9c8;
    --border: #2d3c4a;
    --primary: #5aa9e0;
    --primary-hover: #7fbdea;
    --primary-text: #0b1620;
    --accent: #6cc070;
    --dark-bg: #0b2233;
    --dark-text: #eef4f9;
    --dark-muted: #b9cbdb;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

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

a {
  color: var(--primary);
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.5em;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}
.narrow {
  max-width: 780px;
}
.center {
  text-align: center;
}
.nowrap {
  white-space: nowrap;
}
.muted {
  color: var(--muted);
}
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--primary);
  color: var(--primary-text);
  padding: 10px 16px;
  border-radius: 8px;
  z-index: 100;
}
.skip-link:focus {
  top: 12px;
}

/* ---------------------------------------------------------------- Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  padding: 0.7em 1.2em;
  border-radius: 10px;
  border: 2px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.2;
  text-align: center;
}
.btn-primary {
  background: var(--primary);
  color: var(--primary-text);
}
.btn-primary:hover {
  background: var(--primary-hover);
}
.btn-secondary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-secondary:hover {
  background: var(--bg-alt);
}
.btn-ghost {
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover {
  background: var(--bg-alt);
}
.btn-sm {
  padding: 0.5em 0.9em;
  font-size: 0.95rem;
}
.btn-lg {
  padding: 0.85em 1.5em;
  font-size: 1.075rem;
}
.btn-block {
  width: 100%;
}

/* ---------------------------------------------------------------- Cabeçalho */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}
.site-nav a:not(.btn) {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}
.site-nav a:not(.btn):hover {
  color: var(--primary);
  text-decoration: underline;
}
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

@media (max-width: 900px) {
  .menu-toggle {
    display: inline-flex;
    gap: 6px;
    align-items: center;
  }
  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 20px;
    /* telemóvel deitado: o menu nunca fica mais alto que o ecrã */
    max-height: calc(100vh - 64px);
    max-height: calc(100dvh - 64px);
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .site-nav.open {
    display: flex;
  }
  .site-nav a:not(.btn) {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }
  .site-nav .btn {
    margin-top: 14px;
  }
}

/* ---------------------------------------------------------------- Hero */
.hero {
  padding: 64px 0 56px;
  background: linear-gradient(180deg, var(--bg-alt), var(--bg));
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
}
.hero h1 {
  font-size: clamp(2rem, 4.2vw, 3.1rem);
  letter-spacing: -0.01em;
}
.lead {
  font-size: 1.15rem;
  color: var(--muted);
  margin: 0 0 24px;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.hero-shot {
  margin: 0;
}
.hero-shot img,
.gallery img {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

/* ---------------------------------------------------------------- Secções */
.section {
  padding: 72px 0;
}
.section-alt {
  background: var(--bg-alt);
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  text-align: center;
  margin-bottom: 12px;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  margin: 0 auto 32px;
  max-width: 640px;
}
.section-cta {
  text-align: center;
  font-weight: 600;
  margin: 32px 0 0;
}

.cards-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}
.card,
.feature,
.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.card h3,
.feature h3 {
  font-size: 1.15rem;
}
.card p,
.feature p {
  margin: 0;
  color: var(--muted);
}

.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 32px;
}
.feature-icon {
  display: block;
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-top: 32px;
}
.gallery figure {
  margin: 0;
}
.gallery figcaption {
  margin-top: 12px;
  text-align: center;
  color: var(--muted);
}
.gallery .phone img {
  max-height: 420px;
  width: auto;
  margin: 0 auto;
}

/* ---------------------------------------------------------------- Lei */
.section-dark {
  background: var(--dark-bg);
  color: var(--dark-text);
}
.section-dark .lead {
  color: var(--dark-muted);
}
.law {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
  align-items: start;
}
.law .section-title {
  text-align: left;
}
.law-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.law-list li {
  position: relative;
  padding: 12px 140px 12px 16px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
}
.law-list span {
  position: absolute;
  right: 16px;
  top: 12px;
  color: var(--dark-muted);
  white-space: nowrap;
  font-size: 0.95rem;
}
.law-note {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--dark-muted);
  font-size: 0.95rem;
}

/* ---------------------------------------------------------------- Passos */
.steps {
  list-style: none;
  counter-reset: step;
  margin: 32px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 24px 24px 24px 76px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 22px;
  top: 22px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-text);
  font-weight: 700;
}
.steps h3 {
  font-size: 1.15rem;
}
.steps p {
  margin: 0;
  color: var(--muted);
}

/* ---------------------------------------------------------------- Preços */
.billing-toggle {
  display: flex;
  justify-content: center;
  gap: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  width: max-content;
  margin: 0 auto 32px;
  background: var(--surface);
}
.billing-toggle[hidden] {
  display: none;
}
.billing-toggle label {
  padding: 8px 18px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
}
.billing-toggle input {
  position: absolute;
  opacity: 0;
}
.billing-toggle label:has(input:checked) {
  background: var(--primary);
  color: var(--primary-text);
}
.billing-toggle label:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 380px));
  justify-content: center;
  gap: 24px;
}
.plan {
  display: flex;
  flex-direction: column;
  padding: 28px;
}
.plan h3 {
  font-size: 1.3rem;
}
.plan ul {
  margin: 20px 0 24px;
  padding: 0;
  list-style: none;
  flex: 1;
}
.plan li {
  padding: 6px 0 6px 28px;
  position: relative;
}
.plan li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 700;
}
.price {
  margin: 4px 0 0;
  font-size: 2rem;
  line-height: 1.2;
}
.price-sub {
  margin: 4px 0 0;
  color: var(--muted);
}
.plan-featured {
  border: 2px solid var(--primary);
  box-shadow: var(--shadow);
}
.plan-badge {
  align-self: flex-start;
  margin: 0 0 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--primary-text);
  font-size: 0.85rem;
  font-weight: 700;
}
.plan-note {
  margin: 12px 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}
.contact-only {
  margin-top: 28px;
}

/* ---------------------------------------------------------------- FAQ */
details {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  margin-bottom: 12px;
}
summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 600;
  list-style-position: inside;
}
details p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--muted);
}

/* ---------------------------------------------------------------- CTA final e rodapé */
.final-cta {
  background: var(--bg-alt);
}
.final-cta h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}
.site-footer {
  border-top: 1px solid var(--border);
  /* espaço em baixo para o ícone flutuante do banner de cookies não tapar o texto */
  padding: 32px 0 96px;
  font-size: 0.95rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
}
.footer-inner p {
  margin: 0;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--primary);
  text-decoration: underline;
  cursor: pointer;
}
.link-button[hidden] {
  display: none;
}

/* Banner de cookies (Silktide) com as cores do site, também em modo escuro */
#stcm-wrapper {
  --fontFamily: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --primaryColor: var(--primary);
  --backgroundColor: var(--surface);
  --textColor: var(--text);
  --iconColor: var(--primary);
  --iconBackgroundColor: var(--surface);
}

/* Vídeo de demonstração */
.demo-video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border, #d6dee6);
  background: #1f5f8b;
}

.demo-player {
  position: relative;
}
.demo-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 88px;
  height: 88px;
  margin: -44px 0 0 -44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 6px 24px rgba(15, 32, 50, 0.4);
  cursor: pointer;
  transition: transform 0.15s;
}
.demo-play:hover {
  transform: scale(1.08);
}
.demo-play span {
  display: block;
  margin-left: 34px;
  border-style: solid;
  border-width: 16px 0 16px 26px;
  border-color: transparent transparent transparent #fff;
}

.demo-caption {
  margin-top: 10px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Página de texto (privacidade) */
.prose {
  padding: 48px 0 72px;
}
.prose h1 {
  font-size: 2rem;
}
.prose h2 {
  font-size: 1.3rem;
  margin-top: 1.6em;
}

/* ---------------------------------------------------------------- Ecrãs táteis: alvos de 44 px */
@media (pointer: coarse), (max-width: 900px) {
  .btn,
  .menu-toggle,
  .brand {
    min-height: 44px;
  }
  .site-footer nav a,
  .site-footer .link-button,
  .prose-back {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .site-footer nav {
    gap: 4px 20px;
  }
  summary {
    min-height: 44px;
  }
}

/* ---------------------------------------------------------------- Responsivo */
@media (max-width: 1000px) {
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 860px) {
  .hero-inner,
  .law,
  .gallery {
    grid-template-columns: 1fr;
  }
  .cards-3,
  .steps {
    grid-template-columns: 1fr;
  }
  .plans {
    grid-template-columns: minmax(0, 440px);
  }
  .hero {
    padding-top: 40px;
  }
  .section {
    padding: 56px 0;
  }
}
@media (max-width: 560px) {
  .features {
    grid-template-columns: 1fr;
  }
  .hero-cta .btn {
    width: 100%;
  }
  .law-list li {
    padding-right: 16px;
  }
  .law-list span {
    position: static;
    display: block;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}
