/* ==========================================================================
   Arte Mental — site.css (frontend público completo)
   ========================================================================== */

/* ---- Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: var(--am-font-body);
    background: var(--am-bg);
    color: var(--am-ink);
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
img, picture, svg, video { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
a { color: inherit; text-decoration: none; transition: color var(--am-dur-fast) var(--am-ease); }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 {
    font-family: var(--am-font-display);
    color: var(--am-brand);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.01em;
}
:focus-visible { outline: 3px solid var(--am-brand-tint); outline-offset: 3px; border-radius: 4px; }

/* ---- Utilities ----------------------------------------------------------- */
.am-vh {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.am-skiplink {
    position: absolute; left: -9999px; top: 0;
    background: var(--am-brand); color: #fff; padding: .6rem 1rem;
    z-index: 100; border-radius: 0 0 8px 0; font-weight: 600;
}
.am-skiplink:focus { left: 0; }

.am-container { max-width: 1240px; margin: 0 auto; padding: 0 clamp(1.2rem, 4vw, 2.4rem); }
.am-eyebrow {
    color: var(--am-muted);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.74rem;
    font-weight: 600;
}

/* ---- Buttons ------------------------------------------------------------- */
.am-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--am-radius-pill);
    transition: background var(--am-dur-fast) var(--am-ease),
                color var(--am-dur-fast) var(--am-ease),
                transform var(--am-dur-fast) var(--am-ease),
                box-shadow var(--am-dur-fast) var(--am-ease);
}
.am-btn--pill { border-radius: var(--am-radius-pill); }
.am-btn--brand { background: var(--am-brand); color: #fff; }
.am-btn--brand:hover { background: var(--am-brand-soft); color: #fff; transform: translateY(-1px); box-shadow: var(--am-shadow-md); }
.am-btn--outline {
    background: transparent;
    color: var(--am-brand);
    border: 1.5px solid var(--am-brand);
}
.am-btn--outline:hover { background: var(--am-brand-light); color: var(--am-brand); }
.am-btn--ghost {
    background: transparent;
    color: var(--am-brand);
}
.am-btn--ghost:hover { color: var(--am-brand-soft); }
.am-btn--sm { padding: 0.6rem 1.1rem; font-size: 0.85rem; }
.am-btn__arrow { font-size: 1.1em; line-height: 1; transition: transform var(--am-dur-fast) var(--am-ease); }
.am-btn:hover .am-btn__arrow { transform: translateX(3px); }

/* ---- Header -------------------------------------------------------------- */
.am-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(248, 242, 236, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--am-dur) var(--am-ease), box-shadow var(--am-dur) var(--am-ease);
}
.am-header.is-scrolled {
    border-bottom-color: var(--am-line);
    box-shadow: var(--am-shadow-sm);
}
.am-header__inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0.9rem clamp(1.2rem, 3vw, 2rem);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
}

/* Logo */
.am-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--am-font-display);
    color: var(--am-brand);
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.02em;
}
.am-logo__img { display:block; height: 26px; width: auto; max-width: 160px; }
.am-logo--small .am-logo__img { height: 22px; max-width: 140px; }
@media (max-width: 768px) { .am-logo__img { height: 22px; max-width: 130px; } }
.am-logo__art   { font-size: 1.55rem; }
.am-logo__mental{
    font-size: 1.55rem;
    color: var(--am-brand);
    margin-left: -0.25rem;
}
.am-logo__tag {
    margin-left: 0.5rem;
    font-size: 0.55rem;
    letter-spacing: 0.18em;
    color: var(--am-muted);
    font-weight: 500;
    line-height: 1.1;
    padding-left: 0.6rem;
    border-left: 1px solid var(--am-line);
}
.am-logo--small .am-logo__art, .am-logo--small .am-logo__mental { font-size: 1.3rem; }

/* Nav */
.am-nav__list {
    display: flex;
    justify-content: center;
    gap: clamp(0.4rem, 2vw, 1.6rem);
}
.am-nav__link {
    display: inline-block;
    padding: 0.45rem 0.2rem;
    color: var(--am-ink-soft);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}
.am-nav__link:hover { color: var(--am-brand); }
.am-nav__link.is-active { color: var(--am-brand); }
.am-nav__link.is-active::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px;
    height: 1.5px; background: var(--am-brand); border-radius: 1px;
}

/* Header actions */
.am-header__actions { display: flex; align-items: center; gap: 0.8rem; }

/* Lang switcher */
.am-langswitch { position: relative; }
.am-langswitch__toggle {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: 0.5rem 0.7rem;
    border: 1px solid var(--am-line);
    border-radius: var(--am-radius-sm);
    color: var(--am-ink-soft);
    font-weight: 600;
    font-size: 0.82rem;
    transition: border-color var(--am-dur-fast) var(--am-ease), color var(--am-dur-fast) var(--am-ease);
}
.am-flag {
    display: inline-block;
    width: 22px; height: 15px;
    border-radius: 2px;
    object-fit: cover;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.08);
    flex-shrink: 0;
    vertical-align: middle;
}
.am-langswitch__toggle:hover { border-color: var(--am-brand); color: var(--am-brand); }
.am-langswitch__menu {
    position: absolute; right: 0; top: calc(100% + 0.4rem);
    min-width: 180px;
    background: var(--am-bg-elev);
    border: 1px solid var(--am-line);
    border-radius: var(--am-radius-md);
    box-shadow: var(--am-shadow-md);
    padding: 0.4rem;
    z-index: 5;
}
.am-langswitch__item {
    display: flex; align-items: center; gap: 0.6rem;
    padding: 0.5rem 0.7rem;
    border-radius: var(--am-radius-sm);
    color: var(--am-ink);
    font-size: 0.92rem;
}
.am-langswitch__item:hover { background: var(--am-brand-light); }
.am-langswitch__item.is-active { color: var(--am-brand); font-weight: 600; }

/* Burger (mobile) */
.am-burger {
    display: none;
    width: 40px; height: 40px;
    padding: 8px;
    border-radius: var(--am-radius-sm);
}
.am-burger span {
    display: block;
    height: 2px;
    background: var(--am-brand);
    margin: 4px 0;
    border-radius: 2px;
    transition: transform var(--am-dur) var(--am-ease), opacity var(--am-dur) var(--am-ease);
}
.am-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.am-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.am-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile drawer */
.am-mobile-nav {
    position: fixed; inset: 64px 0 0 0;
    background: var(--am-bg);
    z-index: 49;
    padding: 2rem 1.6rem;
    overflow-y: auto;
}
.am-mobile-nav__list { display: flex; flex-direction: column; gap: 1rem; }
.am-mobile-nav__list a { font-size: 1.2rem; color: var(--am-ink); }
.am-mobile-nav__list a.am-btn { color: #fff; }

/* ---- Hero ---------------------------------------------------------------- */
.am-hero {
    position: relative;
    padding: clamp(3rem, 7vw, 6rem) 0 clamp(2rem, 5vw, 4rem);
    overflow: hidden;
}
.am-hero__container {
    position: relative;
    z-index: 1;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 clamp(1.2rem, 4vw, 2.4rem);
    padding-left: clamp(1.2rem, 30vw, 22rem);
}
.am-hero__title {
    font-size: clamp(2.4rem, 5.5vw, 4.5rem);
    color: var(--am-brand);
    margin-bottom: 0.6rem;
}
.am-hero__tagline {
    color: var(--am-brand-tint);
    letter-spacing: 0.35em;
    font-weight: 500;
    font-style: italic;
    font-size: 0.95rem;
    margin-bottom: 1.4rem;
}
.am-hero__lede {
    color: var(--am-ink-soft);
    font-family: var(--am-font-serif);
    font-size: 1.1rem;
    line-height: 1.5;
    max-width: 42ch;
    margin-bottom: 2rem;
}
.am-hero__ctas { display: flex; flex-wrap: wrap; gap: 1rem; }

/* Ink decoração lateral */
.am-ink-decor {
    position: absolute;
    left: -8%;
    top: -5%;
    width: clamp(28rem, 45vw, 38rem);
    pointer-events: none;
    z-index: 0;
    opacity: 0.95;
}
.am-ink-decor__bloom {
    width: 100%;
    height: auto;
}
.am-ink-decor__lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Variante: ink decor menos invasivo (páginas internas) */
.am-page-thin .am-ink-decor { width: clamp(22rem, 32vw, 28rem); }

/* ---- Sections ----------------------------------------------------------- */
.am-section { padding: clamp(2rem, 6vw, 5rem) 0; }
.am-section__title { margin-bottom: 2rem; }

/* Card grid */
.am-card-grid {
    display: grid;
    gap: clamp(1rem, 2vw, 1.4rem);
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.am-card-grid--2 { grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.am-card-grid--3 { grid-template-columns: repeat(3, 1fr); }
.am-card-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) {
    .am-card-grid--3 { grid-template-columns: repeat(2, 1fr); }
    .am-card-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .am-card-grid--3, .am-card-grid--4 { grid-template-columns: 1fr; }
}

/* ---- Cards --------------------------------------------------------------- */
.am-card {
    background: var(--am-bg-elev);
    border: 1px solid rgba(184, 154, 161, 0.15);
    border-radius: var(--am-radius-lg);
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    transition: transform var(--am-dur) var(--am-ease),
                box-shadow var(--am-dur) var(--am-ease),
                border-color var(--am-dur) var(--am-ease);
}
.am-card--service { gap: 1.1rem; }
.am-card--link:hover {
    transform: translateY(-3px);
    box-shadow: var(--am-shadow-md);
    border-color: var(--am-brand-tint);
}
.am-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px; height: 64px;
    border-radius: 50%;
    color: var(--am-brand);
    flex-shrink: 0;
}
.am-card__icon .am-icon { width: 28px; height: 28px; }
.am-card__body { flex: 1; }
.am-card__title {
    color: var(--am-brand);
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
    font-weight: 700;
}
.am-card__desc {
    color: var(--am-ink-soft);
    font-size: 0.95rem;
    line-height: 1.45;
}
.am-card__divider {
    border: 0;
    border-top: 1px solid var(--am-line);
    margin: 0.8rem 0 0.6rem;
}
.am-card__bullets {
    color: var(--am-muted);
    font-size: 0.84rem;
    line-height: 1.4;
}

/* Tons pastel para os ícones (acentos por categoria, fiel às imagens) */
.am-tone-rose  { background: var(--am-accent-rose); }
.am-tone-lilac { background: var(--am-accent-lilac); }
.am-tone-peach { background: var(--am-accent-peach); }
.am-tone-green { background: var(--am-accent-green); color: #5C7D45; }

/* ---- Quote (frase âncora) ----------------------------------------------- */
.am-quote {
    text-align: center;
    padding: clamp(2rem, 5vw, 4rem) 0 clamp(2.5rem, 5vw, 4rem);
    font-family: var(--am-font-serif);
    color: var(--am-brand);
    font-style: italic;
}
.am-quote p { max-width: 920px; margin: 0 auto; line-height: 1.4; }
.am-quote strong { font-style: normal; font-weight: 700; color: var(--am-brand); }
.am-quote--sm p { font-size: clamp(1.1rem, 2vw, 1.4rem); }
.am-quote--md p { font-size: clamp(1.3rem, 2.6vw, 1.8rem); }
.am-quote--lg p { font-size: clamp(1.5rem, 3vw, 2.2rem); }

/* ---- Page composition --------------------------------------------------- */
.am-text-block {
    max-width: 760px;
    color: var(--am-ink-soft);
    font-size: 1.02rem;
    line-height: 1.65;
    padding: 0 clamp(1.2rem, 4vw, 2.4rem);
    margin: 0 auto;
}
.am-text-block p + p { margin-top: 1rem; }
.am-text-block strong { color: var(--am-ink); }

/* About-style "pontos com ícone" (Sobre/Abordagem) */
.am-bullets { display: flex; flex-direction: column; gap: 1.4rem; }
.am-bullet {
    display: flex; gap: 1rem; align-items: flex-start;
    max-width: 720px;
}
.am-bullet__icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--am-brand-light);
    color: var(--am-brand);
    display: inline-flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.am-bullet__icon .am-icon { width: 22px; height: 22px; }
.am-bullet__text {
    color: var(--am-ink-soft);
    font-size: 1rem;
    line-height: 1.55;
}

/* ---- Forms (contacto, empresas, newsletter) ----------------------------- */
.am-form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr 1fr;
    max-width: 720px;
}
.am-form-grid .am-field--full { grid-column: 1 / -1; }
.am-field { display: flex; flex-direction: column; gap: 0.4rem; }
.am-field label, .am-field__label {
    font-size: 0.84rem; font-weight: 600; color: var(--am-ink-soft);
}
.am-field input, .am-field textarea, .am-field select {
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--am-line);
    border-radius: var(--am-radius-sm);
    font: inherit;
    background: var(--am-bg-elev);
    color: var(--am-ink);
    transition: border-color var(--am-dur-fast) var(--am-ease), box-shadow var(--am-dur-fast) var(--am-ease);
}
.am-field input:focus, .am-field textarea:focus, .am-field select:focus {
    outline: none; border-color: var(--am-brand); box-shadow: 0 0 0 3px var(--am-brand-light);
}
.am-field textarea { min-height: 130px; resize: vertical; }

.am-form-feedback {
    padding: 0.85rem 1rem;
    border-radius: var(--am-radius-sm);
    margin-top: 1rem;
    font-size: 0.94rem;
    display: none;
}
.am-form-feedback.is-ok { display: block; background: #E8F1E6; color: #2E5C20; border: 1px solid #BDD5B2; }
.am-form-feedback.is-erro { display: block; background: #FDEBEE; color: #8B1226; border: 1px solid #F1B7C0; }

/* ---- Newsletter (footer) ------------------------------------------------- */
.am-newsletter { display: grid; gap: 0.6rem; max-width: 280px; }
.am-newsletter input {
    padding: 0.6rem 0.8rem;
    border: 1px solid var(--am-line);
    border-radius: var(--am-radius-sm);
    background: var(--am-bg-elev);
    color: var(--am-ink);
    font: inherit;
}
.am-newsletter input:focus { outline: none; border-color: var(--am-brand); }
.am-newsletter__nota { font-size: 0.74rem; color: var(--am-muted); }

/* ---- Footer ------------------------------------------------------------- */
.am-footer {
    background: var(--am-bg-elev);
    border-top: 1px solid var(--am-line);
    color: var(--am-ink-soft);
    margin-top: clamp(3rem, 6vw, 5rem);
}
.am-footer__inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 3.5rem clamp(1.2rem, 4vw, 2.4rem) 2rem;
    display: grid;
    gap: 2rem;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
}
.am-footer h3 {
    color: var(--am-brand);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    font-weight: 700;
}
.am-footer ul { display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.92rem; }
.am-footer a { color: var(--am-ink-soft); }
.am-footer a:hover { color: var(--am-brand); }
.am-footer__lede {
    margin-top: 1rem;
    font-size: 0.88rem;
    color: var(--am-muted);
    line-height: 1.55;
}
.am-footer__social { flex-direction: row !important; gap: 0.8rem !important; }
.am-footer__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border: 1px solid var(--am-line);
    border-radius: 50%;
    font-size: 0.78rem;
    font-weight: 700;
}
.am-footer__social a:hover { background: var(--am-brand-light); color: var(--am-brand); border-color: var(--am-brand-light); }
.am-footer__newsletter-h { margin-top: 1.5rem; }
.am-footer__bar {
    border-top: 1px solid var(--am-line);
    padding: 1rem clamp(1.2rem, 4vw, 2.4rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
    font-size: 0.8rem;
    color: var(--am-muted);
}
.am-footer__bar nav { display: flex; gap: 0.4rem; }
.am-footer__bar a:hover { color: var(--am-brand); }

@media (max-width: 960px) {
    .am-footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .am-footer__inner { grid-template-columns: 1fr; }
    .am-footer__bar { flex-direction: column; text-align: center; }
}

/* ---- Mobile breakpoint --------------------------------------------------- */
@media (max-width: 960px) {
    .am-nav { display: none; }
    .am-burger { display: inline-flex; }
    .am-header__inner { grid-template-columns: auto 1fr; }
    .am-header__actions .am-btn--brand { display: none; }
    .am-hero__container { padding-left: clamp(1.2rem, 4vw, 2.4rem); }
    .am-ink-decor { width: 24rem; top: -10%; opacity: 0.7; }
}
@media (max-width: 480px) {
    .am-logo__tag { display: none; }
    .am-hero__title { font-size: clamp(2rem, 9vw, 2.8rem); }
}

/* ---- 404 ---------------------------------------------------------------- */
.page-404 .am-hero__title { font-size: clamp(4rem, 12vw, 7rem); }

/* ---- Mapa de localização (Contactos) ----------------------------------- */
.am-map {
    position: relative;
    border-radius: var(--am-radius-lg);
    overflow: hidden;
    border: 1px solid var(--am-line);
    box-shadow: var(--am-shadow-lg);
    background: var(--am-bg-elev);
}
.am-map__frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 7;
    min-height: 360px;
}
.am-map__embed {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.am-map__card {
    position: absolute;
    left: clamp(1rem, 3vw, 2rem);
    bottom: clamp(1rem, 3vw, 2rem);
    max-width: min(340px, calc(100% - 2 * clamp(1rem, 3vw, 2rem)));
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.2rem 1.35rem;
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid var(--am-line);
    border-radius: var(--am-radius-md);
    box-shadow: var(--am-shadow-md);
}
.am-map__pin {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--am-radius-pill);
    background: var(--am-accent-rose);
    color: var(--am-brand);
}
.am-map__info { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.am-map__name {
    font-family: var(--am-font-display);
    font-weight: 700;
    font-size: 1.04rem;
    color: var(--am-ink);
}
.am-map__addr {
    margin: 0;
    color: var(--am-muted);
    font-size: 0.9rem;
    line-height: 1.45;
}
.am-map__dir { margin-top: 0.55rem; align-self: flex-start; }

@media (max-width: 600px) {
    .am-map { border-radius: var(--am-radius-md); }
    .am-map__frame { aspect-ratio: 3 / 4; min-height: 0; }
    .am-map__card {
        position: static;
        max-width: none;
        border: 0;
        border-top: 1px solid var(--am-line);
        border-radius: 0;
        background: var(--am-bg-elev);
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        box-shadow: none;
    }
}

/* ---- Reduced motion ---------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    html { scroll-behavior: auto; }
}
