@font-face {
    font-family: 'ABC Diatype Mono';
    src: url('assets/fonts/ABCDiatypeMono-Regular-Trial.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'ABC Diatype Mono';
    src: url('assets/fonts/ABCDiatypeMono-Medium-Trial.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

:root {
    --color-primary: #692b4d;
    --color-secondary: #004ede;
    --paper-color: #f7f5f0;
    --bg-color: #ffffff;
    --font-main: 'ABC Diatype Mono', 'Space Mono', 'Roboto Mono', monospace;
}

body {
    background-color: var(--bg-color);
    margin: 0;
    max-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 40px;
    font-family: var(--font-main);
    color: var(--color-primary);
    text-transform: uppercase;
    font-weight: 500;
    position: relative;
}

/* Top Right Language Switcher */
.language-switcher.top-right {
    position: absolute;
    top: 40px;
    right: 40px;
    display: flex;
    flex-direction: column;
    /* Vertical alignment */
    align-items: flex-end;
    /* Align to the right */
    gap: 5px;
    /* Tighter gap */
    z-index: 20;
}

.language-switcher button {
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 0.9rem;
    /* Match menu size */
    color: var(--color-secondary);
    /* Blue color */
    opacity: 0.6;
    padding: 5px 0;
    /* Vertical padding */
    text-transform: uppercase;
    transition: opacity 0.3s ease;
}

.language-switcher button:hover,
.language-switcher button.active {
    opacity: 1;
    text-decoration: underline;
    font-weight: bold;
}

/* Side Info Container (Menu + Stamp) */
.side-info {
    position: absolute;
    top: 40px;
    left: 40px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    z-index: 10;
    text-align: left;
}

/* Address Box - Top Left */
.address-info {
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--color-primary);
}

.address-label {
    /* margin-bottom: 10px; */
    display: block;
    color: var(--color-secondary);
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

/* Main Menu Styles */
.main-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-menu li {
    margin-bottom: 12px;
}

.main-menu a {
    text-decoration: none;
    color: var(--color-primary);
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: color 0.2s ease;
    border-bottom: 1px solid transparent;
}

.main-menu a:hover {
    border-bottom-color: var(--color-secondary);
    color: var(--color-secondary);
}

/* Rugged Paper Container */
.paper-container {
    width: 75%;
    height: 85vh;
    padding: 15px;

    /* Beige background with STRONGER noise texture */
    background-color: var(--paper-color);
    background-image:
        url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.3'/%3E%3C/svg%3E"),
        linear-gradient(to bottom right, rgba(255, 255, 255, 0.4), rgba(0, 0, 0, 0.05)),
        radial-gradient(circle at 50% 50%, transparent 80%, rgba(105, 43, 77, 0.03));
    /* Vignette */

    /* Variable border radius for rugged organic shape */
    border-radius: 2px 255px 3px 25px / 255px 5px 225px 3px;

    /* Rough shadow */
    box-shadow:
        20px 20px 60px rgba(0, 0, 0, 0.05),
        10px 10px 20px rgba(0, 0, 0, 0.02);

    position: relative;
    text-align: center;
    border: none;
}

/* Paper Header Layout */
.paper-header {
    position: relative;
}

h1 {
    margin: 0;
}

.hero-svg-container {
    position: absolute;
    top: 10px;
    /* Higher */
    left: 50%;
    transform: translateX(-50%);
    width: 180px;
    /* Even smaller */
    height: 180px;
    /* Even smaller */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
}

.hero-svg {
    width: 100%;
    height: 100%;
    color: var(--color-primary);
    /* Sets fill="currentColor" */
}

/* Corner Positioning */
.date-corner {
    position: absolute;
    top: 45px;
    /* Lower */
    left: 80px;
    /* More centered */
    right: auto;
    font-size: 1rem;
    font-weight: bold;
    color: var(--color-primary);
    text-align: left;
    z-index: 10;
}

.address-corner {
    position: absolute;
    top: 45px;
    /* Lower */
    right: 80px;
    /* More centered */
    left: auto;
    font-size: 1rem;
    font-weight: bold;
    color: var(--color-primary);
    text-align: right;
    width: 200px;
    line-height: 1.4;
    z-index: 10;
}

/* Hide original consolidated styles */
.date,
.location,
.address-info,
.address-label {
    display: none;
}

/* Add an overlay to enhance the texture/stains */
.paper-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: radial-gradient(circle at 20% 30%, rgba(0, 0, 0, 0.01) 0%, transparent 20%),
        radial-gradient(circle at 80% 80%, rgba(0, 0, 0, 0.01) 0%, transparent 20%);
    pointer-events: none;
    z-index: 1;
}

header {
    /* Language switcher moved out */
    display: none;
}

h1 {
    font-size: 2.5rem;
    /* margin: 40px 0 20px; */
    letter-spacing: -1px;
    line-height: 1;
    color: var(--color-primary);
}

p {
    margin: 0;
    line-height: 1.5;
}

#quinta-text,
#date-text {
    width: 200px;
}

.date,
.location {
    color: var(--color-primary);
    /* Main text color now */
    font-size: 1rem;
    margin-bottom: 5px;
}

.lang-content {
    margin-top: 100px;
}

/* Ensure secondary color is used for specific small details if needed, 
   but user asked for blue for small details. */
.lang-content p:last-child {
    margin-top: 50px;
    font-size: 0.75rem;
    color: var(--color-secondary);
    /* Blue for the 'more details' or footer text */
    border-top: 1px solid var(--color-secondary);
    display: inline-block;
    padding-top: 15px;
}

/* Mobile responsiveness for absolute elements */
/* Mobile responsiveness for absolute elements */
@media (max-width: 800px) {
    .side-info {
        position: static;
        text-align: center;
        margin: 30px 0;
        align-items: center;
        width: 100%;
        order: -1;
    }

    .language-switcher.top-right {
        position: static;
        justify-content: center;
        margin-top: 20px;
        width: 100%;
    }

    body {
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 10px;
    }

    .paper-container {
        width: 85%;
        padding: 40px 20px;
        margin-bottom: 40px;
    }
}