/* ============================================================================
   CDC - Digital Projects
   Folha de estilo única e partilhada.
   ----------------------------------------------------------------------------
   ÍNDICE
   1. Variáveis (cores, tipografia, espaçamentos)
   2. Reset / base
   3. Layout (container, secções, grelhas)
   4. Componentes (botões, cards, badges, header, footer)
   5. Blocos específicos (hero, problema, pilares, método, sobre, CTA, form)
   6. Responsivo (mobile-first → ajustes para ecrãs maiores)
   ========================================================================== */

/* ============================ 1. VARIÁVEIS ============================ */
:root {
  /* Cores de marca — EDITÁVEL */
  --navy:        #0E2A47;   /* cor primária — confiança/seriedade */
  --navy-deep:   #0A1F36;   /* navy mais escuro (footer, hero overlay) */
  --accent:      #2E7CF6;   /* azul elétrico — CTAs */
  --accent-2:    #17B0A0;   /* teal — acentos secundários */
  --ink:         #1A1D23;   /* texto principal */
  --ink-soft:    #4A5163;   /* texto secundário */
  --line:        #E4E8EF;   /* linhas/bordas */
  --bg:          #FFFFFF;   /* fundo */
  --bg-soft:     #F7F8FA;   /* fundo alternado */
  --white:       #FFFFFF;

  /* Tipografia */
  --font-head: "Sora", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;

  /* Forma / sombra */
  --radius:    16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(14,42,71,.06), 0 2px 8px rgba(14,42,71,.05);
  --shadow-md: 0 8px 30px rgba(14,42,71,.10);
  --shadow-lg: 0 20px 50px rgba(14,42,71,.16);

  /* Espaçamento de secção */
  --section-y: 88px;
  --container:  1160px;
}

/* ============================ 2. RESET / BASE ============================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.nav-open { overflow: hidden; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 .5em;
  font-weight: 700;
  letter-spacing: -.02em;
}
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1rem; }
a  { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Acessibilidade: anel de foco visível para quem navega por teclado */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.btn, .nav-toggle, .lang-switch button, summary { touch-action: manipulation; }
.hero :focus-visible, .page-hero :focus-visible, .cta-band :focus-visible, .section--navy :focus-visible { outline-color: #fff; }
img, video { max-width: 100%; display: block; }
ul { margin: 0; padding: 0; list-style: none; }

/* ============================ 3. LAYOUT ============================ */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 22px;
}
.section { padding: var(--section-y) 0; }
.section--soft { background: var(--bg-soft); }
.section--navy { background: var(--navy); color: #DCE6F2; }
.section--navy h2, .section--navy h3 { color: #fff; }

.section-head { max-width: 720px; margin: 0 auto 48px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }

.kicker {
  display: inline-block;
  font-family: var(--font-head);
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.section--navy .kicker { color: var(--accent-2); }

.lead { font-size: 1.18rem; color: var(--ink-soft); }
.section--navy .lead { color: #AEC2DA; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

/* ============================ 4. COMPONENTES ============================ */
/* --- Botões --- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-head); font-weight: 600; font-size: .98rem;
  padding: 14px 26px; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  text-decoration: none; white-space: nowrap; line-height: 1;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(46,124,246,.32); }
.btn-primary:hover { background: #1f6cf0; box-shadow: 0 12px 26px rgba(46,124,246,.4); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--navy); background: var(--bg-soft); }
.btn-light { background: #fff; color: var(--navy); }
.btn-light:hover { background: #eef2f8; }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-outline-light:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn-block { width: 100%; justify-content: center; }

/* --- Card --- */
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: #D2DAE6; }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }

.card-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(135deg, var(--navy), var(--accent));
  color: #fff;
}
.card-icon svg { width: 26px; height: 26px; stroke: #fff; }

/* --- Badge / pill --- */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .85rem; font-weight: 600; font-family: var(--font-head);
  padding: 7px 14px; border-radius: 999px;
  background: rgba(46,124,246,.1); color: var(--navy);
}
.badge svg { width: 15px; height: 15px; stroke: var(--accent-2); }

/* --- Header --- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.86); backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent; transition: box-shadow .2s, border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 20px rgba(14,42,71,.06); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }

.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: 30px; width: auto; }
/* O logo é claro/prateado → numa barra branca precisa de fundo escuro para ler bem */
.brand-badge {
  display: inline-grid; place-items: center; height: 46px; padding: 0 16px;
  background: var(--navy); border-radius: 12px;
}
.brand-name { font-family: var(--font-head); font-weight: 700; color: var(--navy); font-size: 1.05rem; letter-spacing: -.02em; }
.brand-name span { color: var(--accent); }

.site-nav { display: flex; align-items: center; gap: 6px; }
.site-nav a.nav-link {
  font-family: var(--font-head); font-weight: 500; font-size: .96rem; color: var(--ink);
  padding: 9px 14px; border-radius: 8px; transition: background .15s, color .15s;
}
.site-nav a.nav-link:hover { background: var(--bg-soft); color: var(--navy); text-decoration: none; }

.header-actions { display: flex; align-items: center; gap: 14px; }

/* Seletor de língua */
.lang-switch { display: inline-flex; gap: 2px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang-switch button {
  font-family: var(--font-head); font-size: .78rem; font-weight: 600; color: var(--ink-soft);
  background: transparent; border: 0; padding: 5px 10px; border-radius: 999px; cursor: pointer; transition: all .15s;
}
.lang-switch button:hover { color: var(--navy); }
.lang-switch button.is-active { background: var(--navy); color: #fff; }

/* Botão hambúrguer (mobile) */
.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; cursor: pointer; padding: 0; position: relative;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 20px; height: 2px;
  background: var(--navy); transform: translate(-50%, -50%); transition: .25s;
}
.nav-toggle span::before { transform: translate(-50%, -8px); }
.nav-toggle span::after  { transform: translate(-50%, 6px); }
body.nav-open .nav-toggle span { background: transparent; }
body.nav-open .nav-toggle span::before { transform: translate(-50%, -50%) rotate(45deg); }
body.nav-open .nav-toggle span::after  { transform: translate(-50%, -50%) rotate(-45deg); }

/* --- Footer --- */
.site-footer { background: var(--navy-deep); color: #9FB3CC; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 36px; margin-bottom: 40px; }
.footer-brand .brand-name { color: #fff; }
.footer-brand p { margin-top: 14px; max-width: 320px; color: #8AA0BC; }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; }
.site-footer a { color: #B9C9DD; }
.site-footer a:hover { color: #fff; }
.footer-links li { margin-bottom: 10px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: 22px; font-size: .85rem; color: #7C92AE; display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: space-between; }

/* ============================ 5. BLOCOS ============================ */
/* --- HERO --- */
.hero { position: relative; overflow: hidden; background: var(--navy-deep); color: #fff; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
/* Gradiente animado (sempre presente, leve — é o fundo no telemóvel) */
.hero-gradient {
  position: absolute; inset: -20%;
  background:
    radial-gradient(60% 60% at 20% 20%, rgba(46,124,246,.35), transparent 60%),
    radial-gradient(50% 50% at 85% 30%, rgba(23,176,160,.28), transparent 60%),
    radial-gradient(60% 60% at 60% 90%, rgba(14,42,71,.6), transparent 60%),
    var(--navy-deep);
  animation: heroFloat 16s ease-in-out infinite alternate;
}
@keyframes heroFloat {
  0%   { transform: scale(1) translate(0,0); }
  100% { transform: scale(1.12) translate(-2%, -2%); }
}
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,31,54,.55), rgba(10,31,54,.82)); z-index: 1; }

.hero-inner { position: relative; z-index: 2; padding: clamp(72px, 13vw, 140px) 0 clamp(72px, 13vw, 130px); max-width: 880px; }
.hero h1 { color: #fff; }
.hero .hero-sub { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: #C7D6EA; max-width: 680px; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-eyebrow {
  display: inline-block; margin-bottom: 18px;
  font-family: var(--font-head); font-size: .82rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent-2);
}
.hero-reassure { margin: 18px 0 0; font-size: .92rem; color: #9FB6D2; }

/* --- Bloco problema --- */
.problem-grid { grid-template-columns: 1fr; gap: 18px; }
.problem-card {
  background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: 22px 24px; box-shadow: var(--shadow-sm);
  font-size: 1.05rem; color: var(--ink); font-family: var(--font-head); font-weight: 500;
}

/* --- Pilares --- */
.pillar-note {
  margin-top: 34px; text-align: center; font-size: 1rem; color: var(--ink-soft);
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
}
.pillar-note .badge { background: rgba(23,176,160,.12); }

/* --- Método (passos) --- */
.steps { counter-reset: step; }
.step {
  position: relative; padding: 28px; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.step-num {
  font-family: var(--font-head); font-weight: 800; font-size: 2.2rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  line-height: 1; margin-bottom: 10px; display: block;
}
.step h3 { margin-bottom: 6px; }
.step p { margin: 0; color: var(--ink-soft); font-size: .98rem; }

/* Timeline da página método */
.timeline { display: grid; gap: 22px; }
.timeline .step { padding-left: 30px; }

/* --- Sobre --- */
.about-grid { display: grid; grid-template-columns: 1fr; gap: 36px; align-items: center; }
.about-photo { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-lg); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/5; }
.about-badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* --- Pilares detalhados (serviços) --- */
.feature { display: grid; grid-template-columns: 1fr; gap: 30px; align-items: center; padding: 44px 0; border-bottom: 1px solid var(--line); }
.feature:last-of-type { border-bottom: 0; }
.feature-visual {
  border-radius: var(--radius); min-height: 240px;
  background: linear-gradient(135deg, var(--navy), var(--accent)); position: relative; overflow: hidden;
  display: grid; place-items: center; box-shadow: var(--shadow-md);
}
.feature-visual--2 { background: linear-gradient(135deg, var(--navy), var(--accent-2)); }
.feature-visual--3 { background: linear-gradient(135deg, #20324d, var(--accent)); }
.feature-visual svg { width: 88px; height: 88px; stroke: rgba(255,255,255,.92); }
.feature-lead { font-size: 1.2rem; font-family: var(--font-head); font-weight: 600; color: var(--navy); }
.feature ul.checklist { margin: 16px 0 0; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 30px; color: var(--ink); }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/12px no-repeat;
}
.feature-for { margin-top: 14px; font-size: .95rem; color: var(--ink-soft); }
.feature-for strong { color: var(--navy); font-family: var(--font-head); }

/* --- Preços / modelos --- */
.price-grid { grid-template-columns: 1fr; gap: 24px; }
.price-card { display: flex; flex-direction: column; }
.price-card.is-featured { border-color: var(--accent); box-shadow: var(--shadow-md); position: relative; }
.price-card .price-name { font-family: var(--font-head); font-weight: 700; color: var(--navy); font-size: 1.15rem; }
.price-card .price-range { font-family: var(--font-head); font-weight: 800; font-size: 1.7rem; color: var(--ink); margin: 14px 0 4px; letter-spacing: -.02em; }
.price-card .price-foot { font-size: .88rem; color: var(--ink-soft); margin-top: auto; padding-top: 14px; }
.price-disclaimer { margin-top: 30px; text-align: center; font-size: .95rem; color: var(--ink-soft); max-width: 720px; margin-left: auto; margin-right: auto; }

/* --- Faixa CTA --- */
.cta-band {
  background: linear-gradient(120deg, var(--navy), #143a63);
  border-radius: 24px; padding: clamp(40px, 6vw, 64px); text-align: center; color: #fff;
  box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.cta-band::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 280px; height: 280px;
  background: radial-gradient(circle, rgba(46,124,246,.5), transparent 70%); pointer-events: none;
}
.cta-band h2 { color: #fff; position: relative; }
.cta-band p { color: #C7D6EA; max-width: 560px; margin: 0 auto 26px; position: relative; }

/* --- Formulário --- */
.form-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow-md); }
.cdc-form .field { margin-bottom: 18px; }
.cdc-form label { display: block; font-family: var(--font-head); font-weight: 600; font-size: .9rem; margin-bottom: 7px; color: var(--ink); }
.cdc-form label .req { color: var(--accent); }
.cdc-form input, .cdc-form textarea {
  width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 1rem; color: var(--ink); background: var(--bg-soft); transition: border-color .15s, background .15s;
}
.cdc-form input:focus, .cdc-form textarea:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(46,124,246,.12); }
.cdc-form textarea { resize: vertical; min-height: 130px; }
.cdc-form .hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form-status { margin-top: 14px; font-size: .95rem; font-weight: 500; min-height: 1.2em; }
.form-status.is-success { color: #0f9d76; }
.form-status.is-error { color: #d64545; }
.form-status.is-info { color: var(--ink-soft); }

/* --- Página interna: hero pequeno --- */
.page-hero { background: var(--navy); color: #fff; padding: clamp(56px, 9vw, 96px) 0 clamp(48px, 7vw, 72px); position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(70% 100% at 100% 0, rgba(46,124,246,.28), transparent 60%); }
.page-hero .container { position: relative; }
.page-hero h1 { color: #fff; max-width: 760px; }
.page-hero p { color: #C7D6EA; font-size: 1.15rem; max-width: 620px; margin-bottom: 0; }

/* --- Contacto layout --- */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 36px; align-items: start; }
.contact-info .info-item { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 22px; }
.contact-info .info-item svg { width: 22px; height: 22px; stroke: var(--accent); flex-shrink: 0; margin-top: 3px; }
.contact-info .info-item .label { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-soft); font-family: var(--font-head); }
.contact-info .info-item a, .contact-info .info-item span { font-size: 1.08rem; color: var(--ink); font-weight: 500; }
.calendly-embed { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); min-height: 680px; background: var(--bg-soft); }
.calendly-embed iframe { width: 100%; min-height: 680px; border: 0; display: block; }

.closing-quote { text-align: center; max-width: 760px; margin: 0 auto; font-family: var(--font-head); font-weight: 600; font-size: clamp(1.4rem, 3vw, 2rem); line-height: 1.3; color: var(--navy); }
.section--navy .closing-quote { color: #fff; }

/* --- FAQ (acordeão) --- */
.faq-list { max-width: 760px; margin: 0 auto; display: grid; gap: 14px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.faq-item[open] { box-shadow: var(--shadow-md); border-color: #D2DAE6; }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 20px 24px; gap: 16px;
  font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; color: var(--navy);
  display: flex; align-items: center; justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--accent); transition: transform .2s ease; flex-shrink: 0; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-a { margin: 0; padding: 0 24px 22px; color: var(--ink-soft); }

/* Utilidades */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.stack-btns { display: flex; flex-wrap: wrap; gap: 14px; }
.center-btns { justify-content: center; }

/* ============================ 6. RESPONSIVO ============================ */
@media (min-width: 600px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .problem-grid { grid-template-columns: 1fr 1fr; }
  .price-grid { grid-template-columns: 1fr; }
}
@media (min-width: 860px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .price-grid { grid-template-columns: repeat(3, 1fr); }
  .about-grid { grid-template-columns: 0.9fr 1.1fr; }
  .feature { grid-template-columns: 1fr 1fr; }
  .feature.reverse .feature-visual { order: 2; }
  .contact-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

/* Navegação mobile */
@media (max-width: 859px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; inset: 72px 0 0 0; background: #fff; flex-direction: column;
    align-items: stretch; gap: 4px; padding: 24px 22px; transform: translateX(100%);
    transition: transform .28s ease; overflow-y: auto; z-index: 49; border-top: 1px solid var(--line);
  }
  .site-nav.is-open { transform: translateX(0); }
  .site-nav a.nav-link { font-size: 1.1rem; padding: 14px 12px; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav .btn { margin-top: 16px; }
  /* O CTA e o seletor de língua que estão fora do nav continuam visíveis no header */
  .header-actions .desktop-cta { display: none; }
}
@media (min-width: 860px) {
  .site-nav .btn { display: none; } /* o CTA aparece no header-actions no desktop */
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .hero-gradient { animation: none; }
}
