/* =========================================================
   ATELIER MODELISTA: stylesheet
   Paleta: branco + roxo claro · moderno · elegante
   ========================================================= */

/* Fontes servidas pelo próprio site (OFL, ver fonts/): nenhum pedido a terceiros.
   Só latim e latim estendido, que cobrem PT, EN, FR, ES e IT. */
/* latin-ext */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/cormorant-garamond-italic-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/cormorant-garamond-italic-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/cormorant-garamond-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/cormorant-garamond-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/cormorant-garamond-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/cormorant-garamond-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/inter-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/inter-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/inter-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(fonts/inter-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* latin-ext */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/inter-normal-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* latin */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/inter-normal-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    /* Cores */
    --c-bg:          #FFFFFF;
    --c-bg-soft:     #FAF7FE;
    --c-bg-alt:      #F4EEFB;
    --c-line:        #EBE2F7;
    --c-purple-50:   #F4EEFB;
    --c-purple-100:  #E8DDF7;
    --c-purple-200:  #C9B8E8;
    --c-purple-300:  #B8A0E0;
    --c-purple-400:  #9D7BCF;
    --c-purple-500:  #7E5DAE;
    --c-purple-700:  #4A3B6B;
    --c-purple-900:  #2D2342;
    --c-text:        #1A1625;
    --c-text-muted:  #6B6480;
    --c-text-soft:   #7A7290;

    /* Botão principal (contraste AA com o texto) */
    --c-btn-bg:       #7E5DAE;
    --c-btn-bg-hover: #6E4FA0;
    --c-btn-text:     #FFFFFF;
    --c-btn-glow:     rgba(126, 93, 174, 0.28);

    /* Manchas de cor do hero */
    --c-blob-1: #C9B8E8;
    --c-blob-2: #E8DDF7;

    /* Tipografia: serifa para títulos e números, Inter para texto.
       Itálico só como destaque dentro de títulos e citações. */
    --f-serif: 'Cormorant Garamond', Georgia, serif;
    --f-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --fs-display: clamp(2.5rem, 5.4vw, 4.6rem);
    --fs-h2:      clamp(2.1rem, 4vw, 3.3rem);
    --fs-h3:      1.5rem;
    --fs-lead:    1.125rem;
    --fs-body:    1rem;
    --fs-small:   0.9375rem;
    --fs-xs:      0.875rem;
    --fs-eyebrow: 0.75rem;

    /* Espaçamento */
    --container: 1200px;
    --gutter: clamp(1.25rem, 4vw, 2.5rem);
    --section-y: clamp(4rem, 10vw, 7.5rem);
    --radius: 14px;
    --radius-lg: 24px;

    /* Sombras */
    --shadow-sm: 0 2px 8px rgba(74, 59, 107, 0.06);
    --shadow-md: 0 10px 30px rgba(74, 59, 107, 0.08);
    --shadow-lg: 0 20px 60px rgba(74, 59, 107, 0.12);

    /* Específicos do tema (para inverter no dark) */
    --c-nav-bg:        rgba(255, 255, 255, 0.7);
    --c-nav-bg-solid:  rgba(255, 255, 255, 0.92);
    --c-form-bg:       #FFFFFF;
    --c-input-bg:      var(--c-bg-soft);
    --c-cta-bg:        linear-gradient(135deg, #4A3B6B 0%, #2D2342 100%);
    --c-cta-title:     #FFFFFF;
    --c-cta-text:      rgba(255, 255, 255, 0.78);
    --c-pattern-dot:   #B8A0E0;

    /* Ilustrações SVG (mudam com o tema) */
    --svg-bg:          #F4EEFB;
    --svg-bg-2:        #EFE6F9;
    --svg-surface:     #FFFFFF;
    --svg-line:        #4A3B6B;
    --svg-line-soft:   #9D7BCF;
    --svg-accent:      #C9B8E8;
    --svg-grid:        rgba(157, 123, 207, 0.32);
    --svg-grad-1:      #FAF7FE;
    --svg-grad-2:      #F0E8FB;
    --svg-grad-3:      #E8DDF7;
    --svg-grad-4:      #B8A0E0;
    --svg-text:        #4A3B6B;
    --svg-text-muted:  #6B6480;
    --svg-label-bg:    #FFFFFF;

    /* Transições */
    --ease: cubic-bezier(.22,.61,.36,1);
    --t-fast: 180ms ease;
    --t: 280ms var(--ease);
    --t-slow: 600ms var(--ease);
}

/* ============== DARK MODE ============== */
[data-theme="dark"] {
    --c-bg:          #14101F;
    --c-bg-soft:     #1C1729;
    --c-bg-alt:      #221C33;
    --c-line:        #2E2640;
    --c-purple-50:   #221C33;
    --c-purple-100:  #2A2240;
    --c-purple-200:  #443566;
    --c-purple-300:  #9D7BCF;
    --c-purple-400:  #B8A0E0;
    --c-purple-500:  #C9B8E8;
    --c-purple-700:  #E8DDF7;
    --c-purple-900:  #F4EEFB;
    --c-text:        #F0EBFA;
    --c-text-muted:  #A39DB8;
    --c-text-soft:   #8A83A0;

    --c-btn-bg:       #B8A0E0;
    --c-btn-bg-hover: #C9B8E8;
    --c-btn-text:     #14101F;
    --c-btn-glow:     rgba(184, 160, 224, 0.22);

    --c-blob-1: #443566;
    --c-blob-2: #2A2240;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.55);

    --c-nav-bg:        rgba(20, 16, 31, 0.7);
    --c-nav-bg-solid:  rgba(20, 16, 31, 0.92);
    --c-form-bg:       #1C1729;
    --c-input-bg:      #14101F;
    --c-cta-bg:        linear-gradient(135deg, #2A2240 0%, #14101F 100%);
    --c-cta-title:     #F4EEFB;
    --c-cta-text:      rgba(240, 235, 250, 0.78);
    --c-pattern-dot:   #443566;

    /* Ilustrações SVG no dark: efeito "blueprint" */
    --svg-bg:          #1C1729;
    --svg-bg-2:        #221C33;
    --svg-surface:     #2A2240;
    --svg-line:        #E8DDF7;
    --svg-line-soft:   #B8A0E0;
    --svg-accent:      #8B6FBA;
    --svg-grid:        rgba(184, 160, 224, 0.22);
    --svg-grad-1:      #221C33;
    --svg-grad-2:      #14101F;
    --svg-grad-3:      #443566;
    --svg-grad-4:      #9D7BCF;
    --svg-text:        #F0EBFA;
    --svg-text-muted:  #A39DB8;
    --svg-label-bg:    #14101F;
}

/* Suaviza a troca de tema */
html { color-scheme: light dark; }
body, .nav, .section, .service-card, .quote, .gallery__item,
.form, .form__field input, .form__field select, .form__field textarea,
.footer, .card-frame, .step__num, .btn--ghost {
    transition: background-color var(--t), border-color var(--t),
                color var(--t), box-shadow var(--t);
}

/* ============== SVG (ilustrações), themable ==============
   Ordem importa: classes de stroke vêm PRIMEIRO; classes de fill
   depois; quando combinadas (ex.: class="svg-surface svg-line"),
   o fill da segunda classe sobrepõe-se ao fill:none da primeira.
   Para gradientes em url(#...), usar style="fill: url(#id)" inline
   (CSS class wins over presentation attribute). */

/* Stroke-only */
.svg-line        { stroke: var(--svg-line); fill: none; transition: stroke var(--t); }
.svg-line-soft   { stroke: var(--svg-line-soft); fill: none; transition: stroke var(--t); }
.svg-accent      { stroke: var(--svg-accent); fill: none; transition: stroke var(--t); }
.svg-grid        { stroke: var(--svg-grid); transition: stroke var(--t); }
.svg-tape-tick   { stroke: var(--svg-grad-1); transition: stroke var(--t); }

/* Fill-only (definidos DEPOIS para vencer o fill:none quando combinados) */
.svg-bg          { fill: var(--svg-bg); transition: fill var(--t); }
.svg-bg-2        { fill: var(--svg-bg-2); transition: fill var(--t); }
.svg-surface     { fill: var(--svg-surface); transition: fill var(--t); }
.svg-label       { fill: var(--svg-label-bg); transition: fill var(--t); }
.svg-line-fill   { fill: var(--svg-line); transition: fill var(--t); }
.svg-line-soft-fill { fill: var(--svg-line-soft); transition: fill var(--t); }
.svg-text        { fill: var(--svg-text); transition: fill var(--t); }
.svg-text-muted  { fill: var(--svg-text-muted); transition: fill var(--t); }
.svg-dot         { fill: var(--c-pattern-dot); opacity: 0.35; transition: fill var(--t); }

/* Gradient stops */
.svg-grad-1 { stop-color: var(--svg-grad-1); transition: stop-color var(--t); }
.svg-grad-2 { stop-color: var(--svg-grad-2); transition: stop-color var(--t); }
.svg-grad-3 { stop-color: var(--svg-grad-3); transition: stop-color var(--t); }
.svg-grad-4 { stop-color: var(--svg-grad-4); transition: stop-color var(--t); }

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--f-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--c-purple-400); }

button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

input, select, textarea {
    font: inherit;
    color: inherit;
    background: transparent;
    border: 0;
}

::selection { background: var(--c-purple-200); color: var(--c-purple-900); }

/* Títulos com linhas equilibradas, parágrafos sem palavra órfã */
h1, h2, h3, h4 { text-wrap: balance; }
p, li, blockquote { text-wrap: pretty; }

/* Destaque em itálico: mesmo peso do título, só muda o estilo e a cor */
:where(h1, h2, h3, h4) em {
    font-style: italic;
    font-weight: inherit;
    color: var(--c-purple-400);
}

:focus-visible {
    outline: 2px solid var(--c-purple-400);
    outline-offset: 3px;
}

/* Crossfade na troca de tema e entre páginas (cada idioma é uma página) */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: 420ms;
    animation-timing-function: var(--ease);
}

/* =========================================================
   LAYOUT HELPERS
   ========================================================= */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.section { padding: var(--section-y) 0; position: relative; }
.section--alt { background: var(--c-bg-soft); }

.section__header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 4rem;
}
.section__lead {
    color: var(--c-text-muted);
    font-size: var(--fs-lead);
    margin-top: 1.25rem;
}

.eyebrow {
    display: inline-block;
    font-size: var(--fs-eyebrow);
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--c-purple-500);
    margin-bottom: 1.25rem;
    position: relative;
    padding-left: 36px;
}
.eyebrow::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    width: 28px; height: 1px;
    background: var(--c-purple-300);
}
.eyebrow--light { color: var(--c-purple-200); }
.eyebrow--light::before { background: var(--c-purple-200); }

.section__title {
    font-family: var(--f-serif);
    font-weight: 500;
    font-size: var(--fs-h2);
    line-height: 1.08;
    letter-spacing: -0.015em;
    margin: 0;
    color: var(--c-text);
}

/* =========================================================
   NAVIGATION
   ========================================================= */
.nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 1.25rem 0;
    background: var(--c-nav-bg);
    backdrop-filter: blur(14px) saturate(180%);
    -webkit-backdrop-filter: blur(14px) saturate(180%);
    border-bottom: 1px solid transparent;
    transition: padding var(--t), background var(--t), border-color var(--t), box-shadow var(--t);
}
.nav.is-scrolled {
    padding: 0.75rem 0;
    background: var(--c-nav-bg-solid);
    border-bottom-color: var(--c-line);
    box-shadow: var(--shadow-sm);
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* Marca: tudo em serifa, "A" direito e "Modelista" em itálico */
.nav__logo,
.footer__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--c-purple-700);
    font-family: var(--f-serif);
    font-weight: 600;
    font-size: 1.45rem;
    line-height: 1;
}
.nav__logo em,
.footer__brand em {
    font-style: italic;
    font-weight: 500;
    color: var(--c-purple-400);
    margin-left: 0.1em;
}
.nav__logo:hover { color: var(--c-purple-700); }
.nav__logo-mark { color: var(--c-purple-400); flex-shrink: 0; }

.nav__menu {
    display: flex;
    align-items: center;
    gap: clamp(1.1rem, 1.9vw, 2rem);
}
.nav__menu > a {
    font-size: var(--fs-small);
    font-weight: 500;
    color: var(--c-text);
    position: relative;
}
.nav__menu > a:not(.nav__cta)::after {
    content: '';
    position: absolute;
    left: 0; bottom: -6px;
    width: 0; height: 1.5px;
    background: var(--c-purple-400);
    transition: width var(--t);
}
.nav__menu > a:not(.nav__cta):hover::after { width: 100%; }

.nav__cta {
    background: var(--c-btn-bg);
    color: var(--c-btn-text) !important;
    padding: 0.6rem 1.4rem;
    border-radius: 100px;
    transition: all var(--t);
    font-size: var(--fs-xs) !important;
}
.nav__cta:hover {
    background: var(--c-btn-bg-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--c-btn-glow);
}

.nav__toggle {
    display: none;
    width: 44px; height: 44px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 0;
    margin-right: -10px;
}
.nav__toggle span {
    display: block;
    width: 24px; height: 2px;
    background: var(--c-purple-700);
    border-radius: 2px;
    transition: transform var(--t), opacity var(--t);
}
.nav__toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Theme toggle */
.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    color: var(--c-purple-700);
    background: transparent;
    border: 1.5px solid var(--c-line);
    transition: all var(--t);
    position: relative;
}
.theme-toggle:hover {
    color: var(--c-purple-400);
    border-color: var(--c-purple-300);
    background: var(--c-purple-50);
}
.theme-toggle svg {
    position: absolute;
    transition: transform var(--t), opacity var(--t);
}
.theme-toggle__sun { opacity: 0; transform: rotate(-90deg) scale(0.6); }
.theme-toggle__moon { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="dark"] .theme-toggle__sun { opacity: 1; transform: rotate(0) scale(1); }
[data-theme="dark"] .theme-toggle__moon { opacity: 0; transform: rotate(90deg) scale(0.6); }

/* Seletor de idioma */
.lang {
    position: relative;
}
.lang__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.8rem;
    border-radius: 100px;
    border: 1.5px solid var(--c-line);
    color: var(--c-purple-700);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    transition: all var(--t);
    background: transparent;
}
.lang__btn:hover {
    border-color: var(--c-purple-300);
    background: var(--c-purple-50);
    color: var(--c-purple-400);
}
.lang__btn[aria-expanded="true"] {
    border-color: var(--c-purple-300);
    background: var(--c-purple-50);
}
.lang__btn svg {
    transition: transform var(--t);
}
.lang__btn[aria-expanded="true"] svg {
    transform: rotate(180deg);
}
.lang__menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    background: var(--c-bg);
    border: 1px solid var(--c-line);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    padding: 0.5rem;
    list-style: none;
    margin: 0;
    z-index: 110;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity var(--t), visibility var(--t), transform var(--t);
}
.lang__menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.lang__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    color: var(--c-text);
    font-size: 0.92rem;
    font-weight: 500;
    text-align: left;
    transition: background var(--t-fast), color var(--t-fast);
    cursor: pointer;
}
.lang__item:hover {
    background: var(--c-purple-50);
    color: var(--c-purple-700);
}
.lang__item.is-active {
    background: var(--c-purple-100);
    color: var(--c-purple-700);
}
.lang__item-name {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}
.lang__flag {
    font-size: 1.05rem;
    line-height: 1;
}
.lang__badge {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--c-purple-400);
    background: var(--c-purple-50);
    padding: 0.18rem 0.5rem;
    border-radius: 100px;
    border: 1px solid var(--c-purple-100);
}
.lang__item.is-active .lang__badge {
    background: var(--c-bg);
}
.lang__divider {
    height: 1px;
    background: var(--c-line);
    margin: 0.4rem 0.5rem;
    list-style: none;
}

/* Partilha social */
.share {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1.5rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--c-line);
    position: relative;
}
.share__label {
    font-size: var(--fs-eyebrow);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-purple-500);
}
.share__buttons {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--c-purple-50);
    color: var(--c-purple-500);
    border: 1px solid transparent;
    transition: all var(--t);
    cursor: pointer;
}
.share__btn:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}
.share__btn--wa:hover    { background: #25D366; color: white; }
.share__btn--fb:hover    { background: #1877F2; color: white; }
.share__btn--x:hover     { background: #0F1419; color: white; }
.share__btn--li:hover    { background: #0A66C2; color: white; }
.share__btn--pi:hover    { background: #E60023; color: white; }
.share__btn--mail:hover  { background: var(--c-purple-400); color: white; }
.share__btn--copy:hover  { background: var(--c-purple-400); color: white; }
.share__btn--native:hover { background: var(--c-purple-400); color: white; }
.share__feedback {
    position: absolute;
    bottom: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.78rem;
    color: var(--c-purple-400);
    opacity: 0;
    transition: opacity var(--t);
    pointer-events: none;
    white-space: nowrap;
}
.share__feedback.is-visible {
    opacity: 1;
}

/* Nota do footer com línguas oficiais */
.footer__languages {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 1.5rem;
    margin-top: 0.5rem;
    border-top: 1px solid var(--c-line);
    color: var(--c-text-soft);
    font-size: var(--fs-xs);
    letter-spacing: 0.03em;
}
.footer__languages strong {
    color: var(--c-purple-400);
    font-weight: 600;
}

/* Botão flutuante de WhatsApp: cores do botão principal, para contraste e coerência */
.wa-float {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 80;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--c-btn-bg);
    color: var(--c-btn-text);
    box-shadow: 0 10px 28px var(--c-btn-glow), var(--shadow-sm);
    transition: transform var(--t), background-color var(--t), opacity var(--t);
}
.wa-float:hover {
    background: var(--c-btn-bg-hover);
    color: var(--c-btn-text);
    transform: translateY(-2px);
}
body.nav-open .wa-float,
.preview-mode .wa-float { opacity: 0; pointer-events: none; }
/* Recolhido enquanto os botões do topo estão no ecrã, para não os tapar */
.js .wa-float.is-tucked {
    opacity: 0;
    transform: translateY(16px) scale(0.9);
    pointer-events: none;
}

/* Links legais do rodapé */
.footer__legal {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--c-line);
}
.footer__legal a {
    display: inline-block;
    padding: 0.4rem 0;
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
}

/* =========================================================
   PÁGINAS LEGAIS
   ========================================================= */
.legal { padding-top: calc(var(--section-y) + 3rem); }
.legal__inner { max-width: 760px; }
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem;
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
}
.breadcrumb li + li::before { content: '/'; margin-right: 0.5rem; color: var(--c-text-soft); }
.breadcrumb a { color: var(--c-purple-500); }
.legal__meta {
    margin: 1rem 0 2.5rem;
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
}
.legal__body h2 {
    font-family: var(--f-serif);
    font-weight: 600;
    font-size: var(--fs-h3);
    line-height: 1.2;
    color: var(--c-purple-900);
    margin: 2.5rem 0 0.75rem;
}
.legal__body p,
.legal__body li {
    color: var(--c-text-muted);
    line-height: 1.7;
}
.legal__body p { margin: 0 0 1rem; }
.legal__body ul { padding-left: 1.25rem; margin: 0 0 1rem; }
.legal__body li { margin-bottom: 0.4rem; }
.legal__body strong { color: var(--c-text); font-weight: 600; }
.legal__body code {
    font-size: 0.9em;
    padding: 0.1em 0.35em;
    border-radius: 4px;
    background: var(--c-purple-50);
    color: var(--c-purple-700);
}
.legal__body a {
    color: var(--c-purple-500);
    text-decoration: underline;
    text-underline-offset: 3px;
}
/* Dado ainda por preencher: bem visível para não ir assim para o ar */
.legal__todo {
    background: #FFF3C4;
    color: #5C4400;
    padding: 0 0.3em;
    border-radius: 4px;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.95rem 1.8rem;
    font-size: var(--fs-small);
    font-weight: 500;
    border-radius: 100px;
    transition: all var(--t);
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: 0.01em;
}
.btn svg { transition: transform var(--t); }
.btn:hover svg { transform: translateX(3px); }

.btn--primary {
    background: var(--c-btn-bg);
    color: var(--c-btn-text);
    box-shadow: 0 8px 22px var(--c-btn-glow);
}
.btn--primary:hover {
    background: var(--c-btn-bg-hover);
    color: var(--c-btn-text);
    transform: translateY(-2px);
    box-shadow: 0 12px 30px var(--c-btn-glow);
}

.btn--ghost {
    background: transparent;
    color: var(--c-purple-700);
    border: 1.5px solid var(--c-purple-200);
}
.btn--ghost:hover {
    background: var(--c-purple-50);
    border-color: var(--c-purple-400);
    color: var(--c-purple-700);
}

.btn--full { width: 100%; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 9rem 0 5rem;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
}
.hero__pattern {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
}
.hero__blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.55;
    animation: float 14s ease-in-out infinite;
}
.hero__blob--1 {
    top: -10%; right: -8%;
    width: 520px; height: 520px;
    background: radial-gradient(circle at center, var(--c-blob-1), transparent 70%);
}
.hero__blob--2 {
    bottom: -15%; left: -10%;
    width: 480px; height: 480px;
    background: radial-gradient(circle at center, var(--c-blob-2), transparent 70%);
    animation-delay: -7s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -20px) scale(1.05); }
}

.hero__inner {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero__title {
    font-family: var(--f-serif);
    font-weight: 500;
    font-size: var(--fs-display);
    line-height: 1.02;
    letter-spacing: -0.02em;
    margin: 0 0 1.5rem;
    color: var(--c-purple-900);
}

.hero__lead {
    font-size: var(--fs-lead);
    color: var(--c-text-muted);
    max-width: 520px;
    margin: 0 0 2.5rem;
    line-height: 1.65;
}

/* Entrada do hero: os elementos sobem um a um */
.js .hero__content.reveal { opacity: 1; transform: none; }
.js .hero__content > * {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 800ms var(--ease), transform 800ms var(--ease);
}
.js .hero__content.is-visible > * { opacity: 1; transform: none; }
.js .hero__content.is-visible > :nth-child(2) { transition-delay: 90ms; }
.js .hero__content.is-visible > :nth-child(3) { transition-delay: 180ms; }
.js .hero__content.is-visible > :nth-child(4) { transition-delay: 270ms; }
.js .hero__visual.reveal { transition-delay: 150ms; }

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero__visual {
    display: flex;
    justify-content: center;
    align-items: center;
}
.hero__art {
    width: 100%;
    max-width: 460px;
    height: auto;
    animation: gentle-rise 8s ease-in-out infinite;
}
@keyframes gentle-rise {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.hero__scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--c-purple-500);
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}
.hero__scroll span {
    display: block;
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, var(--c-purple-400));
    animation: scroll-line 2s ease-in-out infinite;
}
@keyframes scroll-line {
    0% { transform: scaleY(0); transform-origin: top; }
    50% { transform: scaleY(1); transform-origin: top; }
    51% { transform: scaleY(1); transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; }
}

/* =========================================================
   STATS
   ========================================================= */
.stats {
    padding: 3rem 0;
    border-top: 1px solid var(--c-line);
    border-bottom: 1px solid var(--c-line);
    background: var(--c-bg);
}
.stats__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: center;
}
.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
}
/* Número e "+" na mesma linha; algarismos alinhados para a contagem não tremer */
.stat__value {
    display: inline-flex;
    align-items: flex-start;
    font-family: var(--f-serif);
    font-weight: 500;
    font-size: clamp(2.5rem, 5vw, 3.6rem);
    color: var(--c-purple-400);
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: lining-nums tabular-nums;
    white-space: nowrap;
}
.stat__plus {
    font-size: 0.55em;
    margin: 0.06em 0 0 0.06em;
}
.stat__label {
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
    letter-spacing: 0.04em;
    margin-top: 0.4rem;
}

/* =========================================================
   TWO COLUMN (SOBRE)
   ========================================================= */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: clamp(2rem, 6vw, 5rem);
    align-items: center;
}
.two-col__text p {
    color: var(--c-text-muted);
    line-height: 1.7;
    margin: 1rem 0 0;
}
.two-col__text .section__title {
    margin-top: 0.5rem;
}
.two-col__text .section__title + p { margin-top: 1.5rem; }

.card-frame {
    position: relative;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--c-purple-50), var(--c-bg));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.card-frame::before {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid var(--c-purple-100);
    border-radius: var(--radius-lg);
    pointer-events: none;
}
.pattern-illustration {
    width: 100%;
    height: auto;
}

.check-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
}
.check-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--c-text);
    font-size: var(--fs-body);
}
.check-list li svg { flex-shrink: 0; }

/* =========================================================
   GRID
   ========================================================= */
.grid { display: grid; gap: 1.75rem; }
/* Flex em vez de grid: uma última linha incompleta fica centrada */
.grid--3 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.grid--3 > * {
    flex: 0 1 calc((100% - 2 * 1.75rem) / 3);
    min-width: 0;
}

/* =========================================================
   SERVICE CARDS
   ========================================================= */
.service-card {
    padding: 2.25rem 2rem;
    background: var(--c-bg);
    border: 1px solid var(--c-line);
    border-radius: var(--radius-lg);
    transition: transform var(--t), box-shadow var(--t), border-color var(--t), background-color var(--t);
    position: relative;
    overflow: hidden;
}
[data-theme="dark"] .service-card { background: var(--c-bg-soft); }
[data-theme="dark"] .gallery__item { background: var(--c-bg-soft); }
.service-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--c-purple-300), var(--c-purple-400));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--t);
}
.service-card:hover {
    transform: translateY(-6px);
    border-color: var(--c-purple-200);
    box-shadow: var(--shadow-md);
}
.service-card:hover::after { transform: scaleX(1); }

.service-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px; height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--c-purple-50), var(--c-purple-100));
    color: var(--c-purple-500);
    margin-bottom: 1.5rem;
    transition: transform var(--t);
}
.service-card:hover .service-card__icon {
    transform: rotate(-6deg) scale(1.05);
}
/* Títulos de cartão: um só estilo para serviços, passos e trabalhos */
.service-card h3,
.step h3,
.gallery__item h3 {
    font-family: var(--f-serif);
    font-weight: 600;
    font-size: var(--fs-h3);
    line-height: 1.2;
    color: var(--c-purple-900);
}
.service-card h3 { margin: 0 0 0.6rem; }
.service-card p {
    color: var(--c-text-muted);
    margin: 0;
    font-size: var(--fs-small);
    line-height: 1.65;
}

/* =========================================================
   STEPS (PROCESSO)
   ========================================================= */
.steps {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    counter-reset: step;
}
.step {
    position: relative;
    padding-top: 1rem;
}
.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 30px;
    left: calc(60px + 1rem);
    right: -1rem;
    height: 1px;
    background: linear-gradient(90deg, var(--c-purple-300), transparent);
}
.step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px; height: 60px;
    border-radius: 50%;
    background: var(--c-bg);
    border: 1.5px solid var(--c-purple-200);
    color: var(--c-purple-400);
    font-family: var(--f-serif);
    font-size: 1.4rem;
    font-weight: 500;
    font-variant-numeric: lining-nums;
    margin-bottom: 1.25rem;
}
.step h3 { margin: 0 0 0.5rem; }
.step p {
    color: var(--c-text-muted);
    margin: 0;
    font-size: var(--fs-small);
    line-height: 1.65;
}

/* =========================================================
   GALERIA
   ========================================================= */
.gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}
.gallery__item {
    background: var(--c-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--c-line);
    transition: all var(--t);
    cursor: pointer;
}
.gallery__item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--c-purple-200);
}
.gallery__visual {
    aspect-ratio: 5 / 6;
    overflow: hidden;
    background: var(--svg-bg);
}
.gallery__visual svg,
.gallery__visual img {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--t-slow);
}
.gallery__visual--photo {
    background: transparent;
}
.gallery__item:hover .gallery__visual svg {
    transform: scale(1.05);
}
.gallery__item h3 { margin: 1.25rem 1.5rem 0.3rem; }
.gallery__item p {
    color: var(--c-text-muted);
    font-size: var(--fs-small);
    margin: 0 1.5rem 1.5rem;
}

/* =========================================================
   TESTEMUNHOS
   ========================================================= */
/* Coluna flex: o autor fica alinhado em baixo em todos os cartões */
.quote {
    margin: 0;
    padding: 2.25rem 2rem;
    background: var(--c-bg-soft);
    border-radius: var(--radius-lg);
    border: 1px solid var(--c-line);
    position: relative;
    display: flex;
    flex-direction: column;
}
.quote__mark {
    color: var(--c-purple-300);
    margin-bottom: 0.75rem;
}
/* A Cormorant tem olho pequeno: em texto corrido precisa de corpo maior */
.quote p {
    flex: 1;
    font-family: var(--f-serif);
    font-size: 1.35rem;
    font-style: italic;
    font-weight: 500;
    line-height: 1.5;
    color: var(--c-purple-900);
    margin: 0 0 1.5rem;
}
.quote footer {
    border-top: 1px solid var(--c-line);
    padding-top: 1rem;
}
.quote footer strong {
    display: block;
    color: var(--c-text);
    font-weight: 600;
    font-size: var(--fs-small);
}
.quote footer span {
    color: var(--c-text-muted);
    font-size: var(--fs-xs);
}

/* =========================================================
   CTA / CONTACTO
   ========================================================= */
.cta {
    background: var(--c-cta-bg);
    color: var(--c-cta-title);
    position: relative;
    overflow: hidden;
}
.cta::before {
    content: '';
    position: absolute;
    top: -50%; right: -20%;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(184, 160, 224, 0.3), transparent 70%);
    pointer-events: none;
}
.cta::after {
    content: '';
    position: absolute;
    bottom: -30%; left: -10%;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(201, 184, 232, 0.2), transparent 70%);
    pointer-events: none;
}

.cta__inner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.cta__text .section__title { color: var(--c-cta-title); }
.cta__text .section__title em { color: var(--c-purple-200); }
.cta__text p {
    color: var(--c-cta-text);
    font-size: var(--fs-lead);
    line-height: 1.65;
    margin: 1rem 0 2rem;
    max-width: 480px;
}

.contact-info {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.contact-info li {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--c-cta-text);
    font-size: var(--fs-small);
}
.contact-info li svg { color: var(--c-purple-200); flex-shrink: 0; }
.contact-info a { color: var(--c-cta-title); display: inline-block; padding: 0.4rem 0; }
.contact-info a:hover { color: var(--c-purple-200); }

/* Form */
.form {
    background: var(--c-form-bg);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}
.form__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.form__field {
    display: block;
    margin-bottom: 1rem;
}
.form__field span {
    display: block;
    font-size: var(--fs-xs);
    font-weight: 600;
    color: var(--c-purple-700);
    margin-bottom: 0.4rem;
    letter-spacing: 0.04em;
}
.form__field input,
.form__field select,
.form__field textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--c-line);
    border-radius: 10px;
    font-size: var(--fs-body);
    background: var(--c-input-bg);
    color: var(--c-text);
    transition: all var(--t-fast);
    font-family: inherit;
}
.form__field input:focus,
.form__field select:focus,
.form__field textarea:focus {
    outline: none;
    border-color: var(--c-purple-400);
    background: var(--c-bg);
    box-shadow: 0 0 0 4px rgba(184, 160, 224, 0.22);
}
.form__field textarea { resize: vertical; min-height: 120px; }
.form__field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239D7BCF' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

.form__note {
    margin: 1rem 0 0;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    text-align: center;
}
.form__note.is-success {
    background: #EAFBEF;
    color: #1F7A3D;
    border: 1px solid #C8EAD3;
}
.form__note.is-error {
    background: #FDECEC;
    color: #A02525;
    border: 1px solid #F5C8C8;
}
[data-theme="dark"] .form__note.is-success {
    background: rgba(54, 165, 88, 0.15);
    color: #7DD89A;
    border-color: rgba(54, 165, 88, 0.35);
}
[data-theme="dark"] .form__note.is-error {
    background: rgba(220, 70, 70, 0.15);
    color: #F0A5A5;
    border-color: rgba(220, 70, 70, 0.35);
}

/* =========================================================
   FOOTER
   ========================================================= */
.footer {
    background: var(--c-bg);
    border-top: 1px solid var(--c-line);
    padding: 3rem 0 2rem;
}
.footer__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 2rem;
    align-items: center;
}
.footer__brand svg { color: var(--c-purple-400); }
.footer__nav {
    display: flex;
    justify-content: center;
    column-gap: 1.75rem;
}
.footer__nav a {
    display: inline-block;
    padding: 0.5rem 0;
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
    font-weight: 500;
}
.footer__meta {
    color: var(--c-text-soft);
    font-size: var(--fs-xs);
    text-align: right;
}
.footer__meta small { font-size: inherit; }

/* =========================================================
   REVEAL ANIMATION
   ========================================================= */
.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms cubic-bezier(.22,.61,.36,1),
                transform 700ms cubic-bezier(.22,.61,.36,1);
}
.js .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger reveals in grids */
.grid--3 .reveal:nth-child(2) { transition-delay: 80ms; }
.grid--3 .reveal:nth-child(3) { transition-delay: 160ms; }
.grid--3 .reveal:nth-child(4) { transition-delay: 240ms; }
.grid--3 .reveal:nth-child(5) { transition-delay: 320ms; }
.grid--3 .reveal:nth-child(6) { transition-delay: 400ms; }

.steps .reveal:nth-child(2) { transition-delay: 80ms; }
.steps .reveal:nth-child(3) { transition-delay: 160ms; }
.steps .reveal:nth-child(4) { transition-delay: 240ms; }

.gallery .reveal:nth-child(2) { transition-delay: 80ms; }
.gallery .reveal:nth-child(3) { transition-delay: 160ms; }
.gallery .reveal:nth-child(4) { transition-delay: 240ms; }
.gallery .reveal:nth-child(5) { transition-delay: 320ms; }
.gallery .reveal:nth-child(6) { transition-delay: 400ms; }

.stats__grid .reveal:nth-child(2) { transition-delay: 100ms; }
.stats__grid .reveal:nth-child(3) { transition-delay: 200ms; }
.stats__grid .reveal:nth-child(4) { transition-delay: 300ms; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
    .hero { padding-top: 7rem; }
    .hero__inner { grid-template-columns: 1fr; gap: 2.5rem; }
    .hero__visual { order: -1; }
    .hero__art { max-width: 320px; }

    .two-col { grid-template-columns: 1fr; gap: 3rem; }

    .grid--3 > * { flex-basis: calc((100% - 1.75rem) / 2); }

    .steps { grid-template-columns: repeat(2, 1fr); }
    .step:not(:last-child)::after { display: none; }

    .gallery { grid-template-columns: repeat(2, 1fr); }

    .cta__inner { grid-template-columns: 1fr; gap: 3rem; }

    .footer__inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
    .footer__brand { justify-content: center; }
    .footer__nav { flex-wrap: wrap; }
    .footer__meta { text-align: center; }
}

/* Menu em gaveta: o menu completo só cabe numa linha acima de ~1000px */
@media (max-width: 1024px) {
    .nav__menu {
        position: fixed;
        top: 0; right: 0;
        height: 100vh;
        height: 100dvh;
        width: min(320px, 85%);
        background: var(--c-bg);
        flex-direction: column;
        justify-content: center;
        align-items: flex-start;
        padding: 4rem 2.5rem;
        gap: 1.75rem;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 380ms var(--ease), visibility 0s linear 380ms, box-shadow 380ms var(--ease);
    }
    .nav__menu.is-open {
        transform: translateX(0);
        visibility: visible;
        box-shadow: -20px 0 60px rgba(0, 0, 0, 0.18);
        transition: transform 380ms var(--ease), visibility 0s, box-shadow 380ms var(--ease);
    }
    .nav__menu > a { font-size: 1.1rem; }
    .nav__cta { width: 100%; text-align: center; padding: 1rem 1.4rem !important; margin-top: 0.5rem; }
    .nav__toggle { display: flex; }
    .theme-toggle, .lang { align-self: flex-start; }
    .lang__menu { right: auto; left: 0; min-width: 200px; max-width: 220px; }
    .lang__item { padding: 0.55rem 0.7rem; gap: 0.5rem; }

    /* Fundo escurecido atrás da gaveta */
    body::after {
        content: '';
        position: fixed;
        inset: 0;
        z-index: 90;
        background: rgba(20, 16, 31, 0.38);
        opacity: 0;
        pointer-events: none;
        transition: opacity 380ms var(--ease);
    }
    body.nav-open::after { opacity: 1; pointer-events: auto; }
}

@media (max-width: 720px) {
    .hero { min-height: auto; padding: 6.5rem 0 4rem; }
    .hero__art { max-width: 240px; }
    .hero__scroll { display: none; }

    .grid--3 > * { flex-basis: 100%; }
    .gallery { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
    .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 2.5rem 1.5rem; }
    /* Número ímpar de estatísticas: a última ocupa a linha toda, centrada */
    .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }

    .form { padding: 1.75rem; }
    .form__row { grid-template-columns: 1fr; }

    .wa-float { right: 16px; bottom: 16px; width: 52px; height: 52px; }
    /* O fim do rodapé fica acima do botão flutuante */
    .footer { padding-bottom: 5.5rem; }

    .hero__actions { flex-direction: column; align-items: stretch; }
    .hero__actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    .js .reveal,
    .js .hero__content > * { opacity: 1; transform: none; }
    ::view-transition-old(root),
    ::view-transition-new(root) { animation: none !important; }
}

/* =========================================================
   ATOMOS (Secção livre)
   ========================================================= */
.section--custom .eyebrow--custom { display: block; margin-bottom: 1.5rem; }
.section--custom__empty {
    padding: 3rem 2rem;
    border: 2px dashed var(--c-line);
    border-radius: 16px;
    text-align: center;
    color: var(--c-text-soft);
    font-size: 0.92rem;
}

/* Heading atom */
.atom-heading {
    font-family: var(--f-serif);
    font-weight: 500;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--c-purple-900);
    margin: 1.5rem 0 1rem;
}
.atom-heading--left   { text-align: left; }
.atom-heading--center { text-align: center; }
.atom-heading--right  { text-align: right; }
h1.atom-heading { font-size: clamp(2.25rem, 4.5vw, 3.6rem); }
h2.atom-heading { font-size: clamp(1.75rem, 3.5vw, 2.6rem); }
h3.atom-heading { font-size: clamp(1.35rem, 2.5vw, 1.8rem); }
h4.atom-heading { font-size: 1.2rem; font-weight: 600; }

/* Paragraph atom */
.atom-paragraph {
    color: var(--c-text);
    line-height: 1.7;
    font-size: 1.02rem;
    margin: 0 0 1.1rem;
    max-width: 75ch;
}
.atom-paragraph em { font-style: italic; color: var(--c-purple-400); }

/* Image atom */
.atom-image {
    margin: 1.5rem auto;
    display: block;
}
.atom-image--small  { max-width: 360px; }
.atom-image--medium { max-width: 640px; }
.atom-image--large  { max-width: 960px; }
.atom-image--full   { max-width: 100%; }
.atom-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}
.atom-image figcaption {
    margin-top: 0.6rem;
    text-align: center;
    color: var(--c-text-muted);
    font-size: 0.88rem;
    font-style: italic;
}
.atom-image--empty {
    background: var(--c-bg-soft);
    border: 2px dashed var(--c-line);
    border-radius: 12px;
    padding: 2.5rem 1rem;
    color: var(--c-text-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.88rem;
    aspect-ratio: 16 / 9;
    justify-content: center;
}
.atom-image--empty.atom-image--small  { max-width: 360px; aspect-ratio: 4 / 3; }

/* Button atom */
.atom-button {
    margin: 1.25rem 0;
    display: flex;
}
.atom-button--left   { justify-content: flex-start; }
.atom-button--center { justify-content: center; }
.atom-button--right  { justify-content: flex-end; }

/* Divider atom */
.atom-divider {
    border: 0;
    border-top: 1px solid var(--c-line);
    margin: 2.5rem 0;
}
.atom-divider--dotted { border-top-style: dotted; }
.atom-divider--dashed { border-top-style: dashed; }

/* Spacer atom */
.atom-spacer--xs { height: 16px; }
.atom-spacer--sm { height: 32px; }
.atom-spacer--md { height: 64px; }
.atom-spacer--lg { height: 96px; }
.atom-spacer--xl { height: 160px; }

/* Columns atom */
.atom-columns {
    display: grid;
    margin: 1.5rem 0;
    align-items: start;
}
.atom-columns--1-1 { grid-template-columns: 1fr 1fr; }
.atom-columns--2-1 { grid-template-columns: 2fr 1fr; }
.atom-columns--1-2 { grid-template-columns: 1fr 2fr; }
.atom-columns--gap-sm { gap: 1rem; }
.atom-columns--gap-md { gap: 2.5rem; }
.atom-columns--gap-lg { gap: 4rem; }
.atom-columns__col > *:first-child { margin-top: 0; }
.atom-columns__col > *:last-child { margin-bottom: 0; }
.atom-columns__empty {
    padding: 1.5rem;
    border: 1px dashed var(--c-line);
    border-radius: 10px;
    text-align: center;
    color: var(--c-text-soft);
    font-size: 0.85rem;
    font-style: italic;
}

@media (max-width: 720px) {
    .atom-columns,
    .atom-columns--1-1,
    .atom-columns--2-1,
    .atom-columns--1-2 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* =========================================================
   PREVIEW MODE (quando dentro do iframe do admin)
   ========================================================= */
body.preview-mode {
    /* Empurra conteúdo para baixo do label flutuante do nav */
}
.preview-mode .preview-block {
    position: relative;
    cursor: pointer;
    transition: outline-color 120ms ease;
    outline: 2px dashed transparent;
    outline-offset: -2px;
}
.preview-mode .preview-block:hover {
    outline-color: rgba(157, 123, 207, 0.55);
}
.preview-mode .preview-block.is-selected {
    outline: 2px solid #9D7BCF;
    outline-offset: -2px;
}
.preview-mode .preview-block.is-disabled {
    opacity: 0.45;
    filter: grayscale(0.4);
}
.preview-mode .preview-block__label {
    position: absolute;
    top: 0;
    left: 0;
    background: #9D7BCF;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.25rem 0.55rem;
    border-radius: 0 0 6px 0;
    z-index: 50;
    opacity: 0;
    transition: opacity 140ms ease;
    pointer-events: none;
}
.preview-mode .preview-block:hover .preview-block__label,
.preview-mode .preview-block.is-selected .preview-block__label {
    opacity: 1;
}

.preview-mode .preview-atom {
    position: relative;
    cursor: pointer;
    outline: 1.5px dashed transparent;
    outline-offset: 2px;
    transition: outline-color 120ms ease;
    border-radius: 4px;
}
.preview-mode .preview-atom:hover {
    outline-color: rgba(184, 160, 224, 0.7);
}
.preview-mode .preview-atom.is-selected {
    outline: 1.5px solid #B8A0E0;
    outline-offset: 2px;
}
.preview-mode .preview-atom__label {
    position: absolute;
    top: -1.5rem;
    left: 0;
    background: #B8A0E0;
    color: white;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    z-index: 49;
    opacity: 0;
    transition: opacity 140ms ease;
    pointer-events: none;
    white-space: nowrap;
}
.preview-mode .preview-atom:hover > .preview-atom__label,
.preview-mode .preview-atom.is-selected > .preview-atom__label {
    opacity: 1;
}

/* Esconder partilha + footer nav em preview (menos relevante para edição) */
.preview-mode .share { display: none; }
