:root {
    --bg: #0b0b0b;
    --bg-soft: #121212;
    --white: #ffffff;
    --muted: #d7d7d7;
    --gold: #C6A661;
    --gold-strong: #A8893D;
    --max: 1120px;
}

/* ===========================
   Base
=========================== */

html,
body {
    height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--white);
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
    line-height: 1.5;
}

body.hidden {
    visibility: hidden;
    opacity: 0;
}

body.visible {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.2s ease;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 20px;
}

[hidden],
.mobile[hidden] {
    display: none !important;
}

/* Transições globais subtis */
.btn,
.btn-primary,
.btn-ghost,
.card,
nav a,
.footer-line a,
.servico {
    transition: all 0.3s ease-in-out;
}

/* Acessibilidade */
.skip-link {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.skip-link:focus {
    left: 16px;
    top: 16px;
    width: auto;
    height: auto;
    padding: 8px 12px;
    background: #fff;
    color: #000;
    z-index: 10000;
}

/* ===========================
   Header / Navegação
=========================== */

header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(11, 11, 11, .82);
    backdrop-filter: saturate(150%) blur(6px);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

header .nav {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    gap: 18px;
}

header .brand {
    position: relative;
    z-index: 30;
    display: inline-flex;
    align-items: flex-start;
    text-decoration: none;
}

header .brand-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px 18px 20px;
    background: rgba(17, 17, 17, .95);
    border: 1px solid rgba(198, 166, 97, .28);
    border-radius: 0 0 10px 10px;
    box-shadow:
        0 18px 40px rgba(0, 0, 0, .55),
        0 4px 12px rgba(0, 0, 0, .35);
    transform: translateY(14px);
    backdrop-filter: blur(6px);
}

header .brand-badge img {
    width: 200px;
    height: auto;
    display: block;
}

header .logoname {
    font-weight: 600;
    letter-spacing: .04em;
}

header nav ul {
    display: flex;
    gap: 18px;
    list-style: none;
    margin: 0;
    padding: 0;
}

header nav a {
    color: var(--muted);
    padding: 10px 12px;
    font-weight: 500;
}

header nav a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, .06);
    border-radius: 4px;
}

header nav a.active {
    color: var(--white);
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 4px;
}

header .cta-area {
    display: flex;
    align-items: center;
    gap: 10px;
}

.burger {
    display: none;
    background: none;
    border: 0;
    color: var(--white);
    font-size: 26px;
    cursor: pointer;
    z-index: 40;
}

.mobile {
    display: none;
}

/* ===========================
   Botões
=========================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 7px 30px;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    border-radius: 30px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(180deg, var(--gold), var(--gold-strong));
    color: var(--bg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border-color: var(--gold-strong);
}

.btn-primary:hover {
    background: linear-gradient(180deg, var(--gold-strong), var(--gold));
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.btn-ghost {
    color: var(--muted);
    border-color: rgba(255, 255, 255, .14);
    background: none;
}

.btn-ghost:hover {
    color: var(--white);
    border-color: rgba(255, 255, 255, .35);
    background: rgba(255, 255, 255, .05);
}

/* ===========================
   Hero Slider
=========================== */

.hero {
  position: relative;
  min-height: 86vh;
  height: 86vh;
  overflow: hidden;
  background: var(--bg);
}

.hero-slider {
    display: block;
}

.hero-slide {
    position: absolute;
    inset: 0;
    display: grid;
    align-items: end;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.75s ease, visibility 0.75s ease;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
}

.hero-slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-image);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    transform: scale(1.04);
    transition: transform 5s ease;
}

.hero-slide.active::before {
    transform: scale(1);
}

.hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            rgba(11, 11, 11, .92) 0%,
            rgba(11, 11, 11, .84) 34%,
            rgba(11, 11, 11, .50) 58%,
            rgba(11, 11, 11, .14) 78%,
            rgba(11, 11, 11, 0) 100%
        ),
        radial-gradient(
            70% 60% at 20% 52%,
            rgba(198, 166, 97, .20),
            transparent 62%
        );
}

.hero .wrap {
    position: relative;
    z-index: 3;
    padding: 100px 20px;
    max-width: var(--max);
    margin: 0 auto;
}

.hero-content {
    max-width: 60%;
}

.hero-slide .eyebrow,
.hero-slide h1,
.hero-slide .lead,
.hero-slide .actions {
    transform: translateY(18px);
    opacity: 0;
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.hero-slide.active .eyebrow {
    transition-delay: 0.12s;
}

.hero-slide.active h1 {
    transition-delay: 0.22s;
}

.hero-slide.active .lead {
    transition-delay: 0.32s;
}

.hero-slide.active .actions {
    transition-delay: 0.42s;
}

.hero-slide.active .eyebrow,
.hero-slide.active h1,
.hero-slide.active .lead,
.hero-slide.active .actions {
    transform: translateY(0);
    opacity: 1;
}

.eyebrow {
    color: var(--gold);
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-size: .82rem;
}

h1 {
    font-size: clamp(28px, 4vw, 44px);
    margin: .5rem 0 1rem;
    line-height: 1.15;
}

.lead {
    color: var(--muted);
    font-size: clamp(16px, 2.2vw, 19px);
}

.actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    flex-wrap: wrap;
}

/* Setas do hero */
.hero-arrow {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 46px;
    height: 46px;
    transform: translateY(-50%);
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(11, 11, 11, .42);
    color: var(--white);
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
    display: grid;
    place-items: center;
    backdrop-filter: blur(6px);
    transition: all .25s ease;
}

.hero-arrow:hover {
    background: rgba(198, 166, 97, .92);
    color: var(--bg);
    border-color: var(--gold);
}

.hero-prev {
    left: 28px;
}

.hero-next {
    right: 28px;
}

/* Dots do hero */
.hero-dots {
    position: absolute;
    left: 50%;
    bottom: 34px;
    z-index: 6;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
}

.hero-dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .38);
    cursor: pointer;
    transition: width .25s ease, background .25s ease;
}

.hero-dots button.active {
    width: 32px;
    background: var(--gold);
}

.hero-arrow:focus,
.hero-dots button:focus {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

/* ===========================
   Value Props / Cards
=========================== */

.strip {
    background: var(--bg-soft);
    border-top: 1px solid rgba(255, 255, 255, .06);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.strip .items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding: 26px 0;
}

.card {
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .06);
    padding: 18px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card:hover {
    background: rgba(255, 255, 255, .04);
    border-color: rgba(255, 255, 255, .1);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.card strong {
    color: var(--white);
}

.card p {
    color: var(--muted);
    margin: .35rem 0 0;
}

@media (max-width: 860px) {
    .strip .items {
        grid-template-columns: 1fr;
    }
}

/* ===========================
   Footer
=========================== */

footer {
    background: var(--bg-soft);
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding: 15px;
}

.footer-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 12px;
    color: var(--muted);
}

.footer-line a {
    color: var(--muted);
    text-decoration: none;
    margin: 0 4px;
}

.footer-line a:hover {
    color: var(--white);
}

.footer-line a:focus {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
    color: var(--white);
}

.footer-left {
    flex: 1;
    text-align: left;
}

.footer-center {
    flex: 1;
    text-align: center;
}

.footer-right {
    flex: 1;
    text-align: right;
}

.footer-right a {
    font-size: 1.1rem;
    margin-left: 10px;
}

.footer-right a:hover {
    color: var(--white);
}

/* ===========================
   Modal Contacto
=========================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    z-index: -1;
    opacity: 0;
    transition: opacity .2s ease;
    pointer-events: none;
}

.modal-overlay.active {
    z-index: 120;
    opacity: 1;
    pointer-events: all;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    width: calc(100vw - 48px);
    max-width: 720px;
    max-height: calc(100vh - 120px);
    overflow: auto;
    box-sizing: border-box;
    background: var(--bg-soft);
    border: 1px solid rgba(255, 255, 255, .12);
    padding: 50px;
    color: var(--white);
    box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
    z-index: 130;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(.98);
    transition: opacity .25s ease, transform .25s ease;
    border-radius: 8px;
}

.modal.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: all;
}

.modal-title {
    margin: 0 32px 18px 0;
    color: var(--gold);
    font-size: clamp(20px, 3vw, 26px);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: transparent;
    border: 0;
    color: var(--muted);
    font-size: 28px;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--white);
}

.modal .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.modal .form-group {
    display: flex;
    flex-direction: column;
}

.modal label {
    color: var(--muted);
    margin-bottom: 6px;
    font-size: .95rem;
}

.modal input,
.modal textarea {
    background: rgba(255, 255, 255, .03);
    border: 1px solid rgba(255, 255, 255, .1);
    color: var(--white);
    padding: 10px 12px;
    font-size: 1rem;
    outline: none;
    border-radius: 4px;
    min-width: 0;
    max-width: 100%;
}

.modal input:focus,
.modal textarea:focus {
    border-color: var(--gold);
}

.modal textarea {
    resize: none;
}

.modal .btn.btn-primary {
    margin-top: 16px;
    border: none;
}

.form-feedback {
    margin-top: 12px;
    font-size: .95rem;
    color: var(--muted);
}

.form-feedback.success {
    color: #79d29d;
}

.form-feedback.error {
    color: #ff8b8b;
}

@media (max-width: 768px) {
    .modal {
        width: calc(100vw - 32px);
        padding: 24px;
        max-height: calc(100vh - 96px);
    }

    .modal .form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
}

@media (max-width: 420px) {
    .modal {
        width: calc(100vw - 20px);
        padding: 18px;
    }

    .modal-title {
        font-size: 1.05rem;
        margin-right: 28px;
    }

    .modal-close {
        top: 8px;
        right: 10px;
        font-size: 24px;
    }
}

@supports (padding: max(0px)) {
    .modal {
        padding-left: max(18px, env(safe-area-inset-left));
        padding-right: max(18px, env(safe-area-inset-right));
        padding-top: max(18px, env(safe-area-inset-top));
        padding-bottom: max(18px, env(safe-area-inset-bottom));
    }
}

@media (max-width: 480px) {
    .modal .btn.btn-primary {
        width: 100%;
        justify-content: center;
    }
}

/* ===========================
   Popup Newsletter
=========================== */

.newsletter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .75);
    z-index: 90;
    opacity: 0;
    transition: opacity .35s ease-out;
    pointer-events: none;
}

.newsletter-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.newsletter-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    max-width: 440px;
    width: calc(100% - 40px);
    background: none;
    border: none;
    border-radius: 8px;
    overflow: hidden;
    padding: 50px;
    transform: translate(-50%, -50%) scale(.95);
    opacity: 0;
    z-index: 91;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .6);
    transition: opacity .3s ease-in-out, transform .3s ease-in-out;
}

.newsletter-modal::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(to bottom, rgba(0, 0, 0, 0.7) 0%, var(--bg-soft) 100%),
        url('/images/20524789.jpg');
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
    background-blend-mode: multiply;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 8px;
}

.newsletter-modal.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.newsletter-modal h2 {
    margin: 0 0 10px;
    font-size: clamp(1.4rem, 4vw, 1.7rem);
    color: var(--gold);
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.newsletter-text {
    margin: 0 0 20px;
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.6;
}

.newsletter-close {
    position: absolute;
    top: 10px;
    right: 12px;
    background: none;
    border: 0;
    color: var(--gold);
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 10;
}

.newsletter-close:hover {
    color: var(--gold);
}

.newsletter-modal .form-group {
    margin-bottom: 16px;
}

.newsletter-modal label {
    display: block;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}

.newsletter-modal input[type="email"],
.newsletter-modal input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    background: #0b0b0b;
    border: 1px solid rgba(255, 255, 255, .20);
    padding: 10px 11px;
    color: var(--white);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.newsletter-modal input::placeholder {
    color: rgba(215, 215, 215, .45);
}

.newsletter-modal input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 1px rgba(198, 166, 97, .6);
    background: #101010;
}

.newsletter-modal input:invalid:focus {
    border-color: #ff8b8b;
}

.newsletter-modal .btn.btn-primary {
    width: 100%;
    justify-content: center;
    margin-top: 4px;
}

[data-news-feedback].success {
    color: #79d29d;
    margin-top: 14px;
    font-size: .95rem;
    font-weight: 500;
}

[data-news-feedback].error {
    color: #ff8b8b;
    margin-top: 14px;
    font-size: .95rem;
    font-weight: 500;
}

@media (max-width: 480px) {
    .newsletter-modal {
        width: calc(100% - 32px);
        padding: 24px 20px 20px;
    }
}

/* ===========================
   Área Reservada / Badges
=========================== */

.area-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.book-badge-wrap {
    margin: 10px 0 20px;
}

.badge-book {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
}

.badge-book--yes {
    background: rgba(121, 210, 157, 0.12);
    color: #79d29d;
    border: 1px solid rgba(121, 210, 157, 0.6);
}

.badge-book--pending {
    background: rgba(198, 166, 97, 0.12);
    color: var(--gold);
    border: 1px solid rgba(198, 166, 97, 0.7);
}

.badge-book--no {
    background: #3a1515;
    color: #ffb3b3;
    border: 1px solid #802020;
}

.badge-book a {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
}

.badge-book-register {
    background: none;
    border: 0;
    color: inherit;
    font: inherit;
    padding: 0;
    cursor: pointer;
    text-decoration: underline;
}

.badge-book-register:hover {
    text-decoration-thickness: 2px;
}

/* Modal de registo de livro */
.book-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .7);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}

.book-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.book-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    max-width: 420px;
    width: calc(100% - 40px);
    background: var(--bg-soft, #111);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .6);
    padding: 26px 24px 22px;
    transform: translate(-50%, -50%) scale(.94);
    opacity: 0;
    z-index: 91;
    transition: opacity .25s ease, transform .25s ease;
}

.book-modal.active {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.book-modal-title {
    margin: 0 0 8px;
    font-size: 1.4rem;
    color: var(--gold);
}

.book-modal-text {
    margin: 0 0 14px;
    color: var(--muted, #ccc);
    font-size: .95rem;
    line-height: 1.5;
}

.book-modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    background: none;
    border: 0;
    color: var(--muted, #aaa);
    font-size: 22px;
    cursor: pointer;
}

[data-book-feedback].success {
    color: #79d29d;
    margin-top: 10px;
}

[data-book-feedback].error {
    color: #ff8b8b;
    margin-top: 10px;
}

@media (max-width: 480px) {
    .book-modal {
        width: calc(100% - 28px);
        padding: 22px 18px 18px;
    }
}

/* ===========================
   Form Disclaimer
=========================== */

.form-disclaimer {
    margin-top: 12px;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--muted);
    opacity: 0.85;
}

/* ===========================
   Mobile Header
=========================== */

@media (max-width: 980px) {
    header nav ul {
        display: none;
    }

    .burger {
        display: block;
    }

    header .cta-area {
        display: none;
    }

    header .brand {
        margin: 0 auto;
    }

    header .brand-badge {
        transform: translateY(8px);
    }

    header .brand-badge img {
        width: 170px;
    }

    #mobileMenu {
        position: relative;
        z-index: 20;
        display: block;
        background: rgba(11, 11, 11, .96);
        border-top: 1px solid rgba(255, 255, 255, .08);
        padding-top: 32px;
    }

    #mobileMenu[hidden] {
        display: none !important;
    }

    #mobileMenu a {
        display: block;
        padding: 14px 20px;
        color: var(--muted);
    }

    #mobileMenu a:hover {
        background: rgba(255, 255, 255, .06);
        color: var(--white);
    }

    #mobileMenu .btn {
        margin: 12px 20px;
        justify-content: center;
    }

    #mobileMenu .btn-primary {
        margin-top: 6px;
    }
}

@media (max-width: 480px) {
    header .brand-badge {
        padding: 14px 12px 14px;
    }

    header .brand-badge img {
        width: 150px;
    }
}