/* 
   DESIGN SYSTEM - QUINTA DA MAGARENHA (Noir Elegance Pivot)
   Colors:
   --bg: #050505 (Obsidian Black)
   --text: #ffffff
   --accent: #e2b13c (Vibrant Gold)
   --muted: #1a1a1a
 */

:root {
    --bg: #050505;
    --text: #ffffff;
    --accent: #e2b13c;
    --muted: #1a1a1a;
    --gray: #888;
    --white: #ffffff;
    --transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,600;1,400&family=Inter:wght@300;400;600&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
.logo-main {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 4rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
}

/* PAGE CONTENT FIX (Header Overlap) */
.page-content {
    padding-top: 100px;
}

/* HEADER PIVOT */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 0;
    z-index: 1000;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    text-decoration: none;
}

.logo-main {
    font-size: 2.5rem;
    letter-spacing: -2px;
    text-transform: lowercase;
    color: var(--white);
    transition: var(--transition);
}

.logo:hover .logo-main {
    color: var(--accent);
}

/* MOBILE NAV */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1100;
}

.mobile-toggle span {
    width: 30px;
    height: 1px;
    background: var(--white);
    transition: var(--transition);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 3rem;
}

@media (max-width: 1024px) {
    .mobile-toggle {
        display: flex;
    }

    .header-actions {
        display: flex;
        align-items: center;
        gap: 1.5rem;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1050;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        font-size: 1.5rem;
        margin-bottom: 2rem;
    }

    .nav-res-link {
        color: var(--accent) !important;
        font-weight: 600 !important;
    }
}

.nav-links a {
    text-decoration: none;
    color: var(--white);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 400;
    transition: var(--transition);
    opacity: 0.7;
}

.nav-links a:hover {
    opacity: 1;
    letter-spacing: 5px;
}

.mobile-only {
    display: none;
}

.desktop-only {
    display: inline-block;
}

.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 2rem;
}

.lang-switch a {
    font-size: 0.7rem !important;
    letter-spacing: 1px !important;
    opacity: 0.4 !important;
}

.lang-switch a.active {
    opacity: 1 !important;
    color: var(--accent) !important;
}

.lang-switch .sep {
    font-size: 0.7rem;
    opacity: 0.2;
}

/* HERO PIVOT */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    transform: scale(1.1);
}

.hero h1 {
    font-size: clamp(3rem, 10vw, 8rem);
    line-height: 0.9;
    letter-spacing: -4px;
    margin-bottom: 3rem;
}

.hero h1 span {
    display: block;
    font-style: italic;
    padding-left: 20%;
}

.hero-content {
    width: 100%;
}

.hero-footer {
    position: absolute;
    bottom: 3rem;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

/* SECTIONS */
.section {
    padding: 12rem 0;
}

.subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.5rem;
    color: var(--accent);
    margin-bottom: 1rem;
    display: block;
}

h2 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1;
    margin-bottom: 3rem;
    letter-spacing: -2px;
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 1.5rem 4rem;
    border: none;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 4px;
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background: var(--white);
    color: var(--bg);
}

.btn-primary:hover {
    background: var(--accent);
}

.btn-outline {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: var(--white);
}

.btn-outline:hover {
    border-color: var(--white);
}

/* GRID ASYMMETRY */
.grid {
    display: grid;
    gap: 6rem;
}

@media (max-width: 1024px) {
    .grid {
        gap: 3rem;
    }
}

@media (min-width: 1024px) {
    .grid-2 {
        grid-template-columns: 1fr 1fr;
    }

    .grid-3 {
        grid-template-columns: 1.5fr 1fr;
    }
}

.reveal-img {
    position: relative;
    overflow: hidden;
    background: var(--muted);
}

.reveal-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    filter: grayscale(100%);
    transition: var(--transition);
}

.reveal-img:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* EVENTS PAGE */
.page-hero {
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover !important;
    background-position: center !important;
    position: relative;
}

.event-types .grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.event-types .grid.reverse {
    direction: rtl;
}

.event-types .grid.reverse>* {
    direction: ltr;
}

.event-image {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    border-radius: 0;
}

.img-responsive {
    width: 100%;
    height: 100%;
    max-height: 500px;
    object-fit: cover;
    filter: grayscale(20%);
    opacity: 0.85;
    transition: var(--transition);
}

.img-responsive:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.02);
}

@media (max-width: 1024px) {

    .event-types .grid,
    .event-types .grid.reverse {
        grid-template-columns: 1fr;
        direction: ltr;
    }

    .event-image {
        max-height: 400px;
    }

    .img-responsive {
        max-height: 400px;
    }
}

/* MENU CARDS */
.menu-item {
    margin-bottom: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
}

.menu-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.menu-item h3 {
    font-size: 2rem;
}

.menu-item .price {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    color: var(--accent);
}

/* 3D BOOK FLIP SYSTEM */
.book-view {
    background: #0a0a0a;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 120px 0;
}

.book-controls {
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 2rem;
    z-index: 100;
}

.btn-nav {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    cursor: pointer;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: var(--transition);
}

.btn-nav:hover {
    background: var(--white);
    color: #000;
}

.book-hint {
    font-size: 0.8rem;
    color: var(--accent);
    letter-spacing: 1px;
}

.book-wrapper {
    perspective: 2000px;
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
}

.book {
    position: relative;
    width: 100%;
    aspect-ratio: 3/4;
    max-height: 600px;
    transform-style: preserve-3d;
    transition: transform 0.5s;
}

.page {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    transform-origin: left;
    transform-style: preserve-3d;
    transition: transform 1.2s cubic-bezier(0.645, 0.045, 0.355, 1), z-index 0s 0.6s;
    z-index: 1;
}

.page-front,
.page-back {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    padding: 2.5rem;
    backface-visibility: hidden;
    background: #fdfdfb;
    color: #222;
    box-shadow: inset 3px 0 10px rgba(0, 0, 0, 0.1);
}

.page-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://www.transparenttextures.com/patterns/cream-paper.png');
    opacity: 0.3;
}

.page-back {
    background: #f4f4f2;
    transform: rotateY(180deg);
}

.page.flipped {
    transform: rotateY(-180deg);
}

.page.cover {
    background: #050505;
    z-index: 10;
}

.page.cover .page-front {
    background: #050505;
    color: var(--white);
    display: flex;
    align-items: center;
    text-align: center;
    border-right: 1px solid var(--accent);
}

.page.cover h1 {
    font-size: clamp(2rem, 8vw, 3.5rem);
    line-height: 1;
    margin: 2rem 0;
}

.click-to-open {
    margin-top: 3rem;
    font-size: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--accent);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.4;
    }
}

/* CONTENT STYLING */
.book-section-title {
    font-size: clamp(1.5rem, 5vw, 2.2rem);
    margin-bottom: 2rem;
    color: #000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 0.5rem;
}

.menu-item-simple {
    margin-bottom: 1.5rem;
}

.menu-item-simple h3 {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
}

.menu-item-simple .price {
    color: #a67c00;
    font-family: serif;
    font-size: 1.1rem;
}

.menu-item-simple p {
    color: #777;
    font-size: 0.8rem;
}

.signature-item {
    border-left: 2px solid var(--accent);
    padding-left: 1rem;
}

/* SHADOWS */
.shadow-right {
    box-shadow: 10px 0 20px rgba(0, 0, 0, 0.2);
}

.shadow-left {
    box-shadow: -10px 0 20px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {

    .page-front,
    .page-back {
        padding: 1.5rem;
    }
}

/* FOOTER PIVOT */
.main-footer {
    padding: 10rem 0 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: #000;
}

.footer-top {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4rem;
    margin-bottom: 8rem;
}

.footer-brand {
    max-width: 300px;
}

.footer-brand .logo-main {
    font-size: clamp(2rem, 5vw, 3rem);
    display: block;
    margin-bottom: 1.5rem;
}

.footer-tagline {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.1rem;
    opacity: 0.6;
}

.footer-nav-groups {
    display: flex;
    gap: 6rem;
}

@media (max-width: 1024px) {
    .footer-nav-groups {
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .footer-nav-groups {
        flex-direction: column;
        gap: 3rem;
    }
}

.footer-group h5 {
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.7rem;
    margin-bottom: 1.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
}

.footer-group ul {
    list-style: none;
}

.footer-group ul li {
    margin-bottom: 0.8rem;
}

.footer-group ul li a {
    text-decoration: none;
    color: var(--white);
    opacity: 0.5;
    font-size: 0.85rem;
    transition: var(--transition);
    font-weight: 300;
}

.footer-group ul li a:hover {
    opacity: 1;
    color: var(--accent);
    padding-left: 5px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 3rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gray);
}

.footer-legal a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.footer-legal a:hover {
    color: var(--white);
}

.footer-legal .sep {
    margin: 0 0.8rem;
    opacity: 0.3;
}

@media (max-width: 768px) {
    .main-footer {
        padding: 6rem 0 3rem;
    }

    .footer-top {
        margin-bottom: 4rem;
        text-align: center;
        justify-content: center;
    }

    .footer-brand {
        max-width: 100%;
        margin-bottom: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}

/* CONTACT PAGE NOIR */
.contact-view {
    background: var(--bg);
}

.contact-hero {
    height: 50vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.contact-hero .hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: scale(1.05);
    z-index: 1;
}

.contact-hero .container {
    position: relative;
    z-index: 2;
}

.contact-hero h1 {
    font-size: clamp(2.5rem, 8vw, 6rem);
    letter-spacing: -2px;
}

.contact-info-panel .info-group {
    margin-bottom: 4rem;
}

.contact-info-panel .label {
    display: block;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: var(--accent);
    margin-bottom: 1rem;
}

.contact-info-panel h3 {
    font-size: clamp(1.5rem, 5vw, 2rem);
    margin-bottom: 0.5rem;
}

.contact-info-panel h3 a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.contact-info-panel h3 a:hover {
    color: var(--accent);
}

.map-link {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--white);
    text-decoration: none;
    opacity: 0.6;
    transition: var(--transition);
}

.map-link:hover {
    opacity: 1;
    color: var(--accent);
}

.social-links-minimal {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 5rem;
}

.social-links-minimal a {
    color: var(--white);
    text-decoration: none;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.5;
    transition: var(--transition);
}

.social-links-minimal a:hover {
    opacity: 1;
    color: var(--accent);
}

.social-links-minimal .dot {
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.3;
}

/* NOIR FORM */
.contact-form-panel {
    z-index: 5;
}

.form-card {
    background: #0a0a0a;
    padding: clamp(2rem, 5vw, 5rem);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
}

.form-card h2 {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1rem;
}

.form-card p {
    color: var(--gray);
    margin-bottom: 3rem;
    font-size: 0.95rem;
    line-height: 1.8;
}

.noir-form .form-field {
    margin-bottom: 2.5rem;
}

.noir-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.noir-form label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--gray);
    margin-bottom: 0.8rem;
}

.noir-form input,
.noir-form select,
.noir-form textarea {
    width: 100%;
    background: transparent !important;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white) !important;
    padding: 1rem 0;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    border-radius: 0;
}

.noir-form input:focus,
.noir-form select:focus,
.noir-form textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.noir-form select {
    appearance: none;
    cursor: pointer;
}

.noir-form select option {
    background: #0a0a0a;
    color: var(--white);
}

@media (max-width: 1024px) {
    .noir-form .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

@media (max-width: 768px) {
    .social-links-minimal {
        justify-content: center;
    }
}

/* MAP SECTION */
.map-interactive {
    padding: 8rem 0;
}

.map-placeholder {
    position: relative;
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    border-radius: 0;
}

.map-img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    filter: grayscale(30%);
    opacity: 0.7;
}

.map-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    text-align: center;
    background: rgba(5, 5, 5, 0.85);
    padding: 3rem 4rem;
    backdrop-filter: blur(10px);
}

.map-overlay h2 {
    margin-bottom: 1rem;
}

.map-overlay p {
    opacity: 0.8;
    max-width: 400px;
}

@media (max-width: 768px) {
    .map-img {
        height: 400px;
    }

    .map-overlay {
        padding: 2rem;
        width: 90%;
    }
}

/* ANIMATIONS */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}