@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,800;1,400;1,600&family=Karla:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
    --primary: rgba(36, 26, 20, 0.85);
    --primary-hover: rgba(42, 32, 24, 0.9);

    --secondary: #fdf8f3;
    --secondary-hover: #f9f0e6;

    --accent: #1a1412;
    --accent-hover: #0f0b08;

    --terra: #c8553a;
    --terra-light: #e8a090;
    --terra-glow: rgba(200, 85, 58, 0.12);

    --sage: #6b917a;
    --sage-light: #a8c5b4;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Karla', system-ui, sans-serif;
}

::selection {
    background: var(--terra-light);
    color: var(--accent);
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-anchor: none;
    font-family: var(--font-body);

    background: linear-gradient(
        168deg,
        #fdf8f3 0%,
        #fef5ee 35%,
        #fdf8f5 65%,
        #f9f3ed 100%
    );

    background-attachment: fixed;
}

/* HEADER */

header {
    position: fixed;
    top: 0;
    left: 0;

    width: 100%;
    min-width: 10%;

    background: var(--primary);
    backdrop-filter: blur(16px) saturate(1.4);
    -webkit-backdrop-filter: blur(16px) saturate(1.4);

    display: flex;
    justify-content: space-between;
    align-items: center;

    z-index: 1000;
    will-change: transform;

    border-bottom: 1px solid rgba(200, 85, 58, 0.15);
}

header nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px 18px;

    margin-right: 5%;
}

header h1 {
    margin-left: 5%;
    color: #fdf8f3;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.55rem;
    letter-spacing: -0.01em;
}

header nav a {
    color: rgba(253, 248, 243, 0.6);
    margin-left: 0;

    text-decoration: none;
    display: inline-block;

    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;

    transition: color 0.3s ease;
    position: relative;
}

header nav a::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--terra);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 1px;
}

header nav a:hover {
    color: #fdf8f3;
    text-shadow: none;
}

header nav a:hover::after {
    width: 100%;
}

header nav a.active {
    color: #fdf8f3;
    text-decoration: none;
}

header nav a.active::after {
    width: 100%;
    background: var(--terra);
}

/* HERO */

.hero {
    display: flex;
    min-height: 100svh;
    width: 100%;
    overflow: hidden;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;

    padding-top: 60px;
    box-sizing: border-box;

    align-items: center;
    justify-content: center;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;

    background: rgba(36, 26, 20, 0.4);

    z-index: 0;
}

.hero > * {
    position: relative;
    z-index: 1;
}

/* TEXT */

h1.cover, h2.cover, p.cover {
    color: #fdf8f3;
}

h1, h2, p {
    color: var(--accent);
}

h1, h2, h3 {
    font-family: var(--font-display);
}

p {
    opacity: 0.85;
    line-height: 1.75;
    font-size: 0.98rem;
}

/* CONTENT */

.centered-content {
    text-align: center;
    padding: 0 24px;
}

.centered-content h2 {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-bottom: 20px;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.15);
}

.centered-content p {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.12rem);
    max-width: 420px;
    margin: 0 auto 36px;
    line-height: 1.75;
    font-weight: 400;
}

#magazine-name {
    font-family: var(--font-display);
    font-size: clamp(3rem, 7vw, 5rem);
    font-weight: 800;
    color: #fdf8f3;
    letter-spacing: -0.02em;
    line-height: 1.05;
    margin-bottom: 20px;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.15);
}

.description {
    font-family: var(--font-body);
    font-size: clamp(1rem, 2vw, 1.12rem);
    color: #fdf8f3;
    max-width: 420px;
    margin: 0 auto;
    opacity: 0.75;
    line-height: 1.75;
}

.wrapped-centered-content {
    background: rgba(36, 26, 20, 0.6);
    backdrop-filter: blur(10px) saturate(1.3);
    -webkit-backdrop-filter: blur(10px) saturate(1.3);

    width: min(520px, calc(100% - 32px));

    border-radius: 22px;

    border: 1px solid rgba(253, 248, 243, 0.08);

    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);

    box-sizing: border-box;
}

/* BUTTON */

.button {
    display: inline-block;
    padding: 16px 36px;

    background: var(--terra);
    color: white;

    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;

    border: none;
    border-radius: 50px;

    box-shadow: 0 4px 20px rgba(200, 85, 58, 0.35);

    transition: all 0.35s ease;
}

.button:hover {
    background: #b5472f;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(200, 85, 58, 0.45);
}

/* SEPARATOR */

.separator {
    border: none;
    height: 3px;
    margin: 0;
    padding: 0;
    background: linear-gradient(90deg, transparent 0%, var(--terra-light) 30%, var(--sage-light) 70%, transparent 100%);
    opacity: 0.5;
}

main {
    background-color: transparent;
    width: 100%;
    overflow-x: hidden;
}

#magazines, #pages, #staff-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(300px, 1fr));
    gap: 24px;
    padding: 52px 40px;
    margin: 0;
}

.magazine-card, .staff-card {
    display: block;

    padding: 28px 24px 28px 28px;
    border-radius: 16px;

    background: white;
    color: var(--accent);

    text-decoration: none;

    border: none;
    border-left: 4px solid var(--terra);

    transition:
        transform 0.3s ease,
        box-shadow 0.35s ease;

    box-shadow: 0 1px 3px rgba(26, 20, 18, 0.04), 0 4px 16px rgba(26, 20, 18, 0.03);
}

.magazine-card:hover {
    transform: translateY(-4px);
    background: white;
    border-left-color: var(--sage);
    box-shadow: 0 8px 24px rgba(200, 85, 58, 0.08), 0 20px 50px rgba(26, 20, 18, 0.06);
}

.magazine-card h2 {
    margin-top: 0;
    margin-bottom: 8px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.45rem;
    color: var(--accent);
    letter-spacing: -0.01em;
}

.magazine-card p {
    margin: 0;
    color: var(--accent);
    font-size: 0.9rem;
    padding-top: 6px;
    padding-bottom: 6px;
    line-height: 1.65;
}

.category-description {
    padding: 10px 20px;
    opacity: 0.9;
    max-width: 800px;
}

.back-button {
    padding: 12px 24px;

    border: 1.5px solid var(--sage);
    border-radius: 50px;

    background: transparent;
    color: var(--sage);

    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;

    cursor: pointer;

    transition: all 0.3s ease;

    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
}

.back-button:hover {
    background: var(--sage);
    color: white;
    box-shadow: 0 4px 16px rgba(107, 145, 122, 0.25);
}

/* FOOTER */

footer {
    background: var(--accent);

    min-height: 10%;
    width: 100%;

    padding: 5% 0;

    display: flex;
    justify-content: center;

    position: relative;
    overflow: hidden;
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--terra), var(--sage), var(--terra));
    opacity: 0.6;
}

footer span {
    color: rgba(253, 248, 243, 0.4);
    font-family: var(--font-body);
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    position: relative;
    z-index: 1;
}

/* CONTACT */

.contact_main {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;

    padding: 140px 20px 80px;
    background: transparent;
}

.contact_main form {
    width: 100%;
    max-width: 480px;

    display: flex;
    flex-direction: column;
    gap: 14px;

    padding: 44px 40px;
    border-radius: 20px;

    background: white;
    border: none;
    box-shadow: 0 1px 3px rgba(26, 20, 18, 0.04), 0 8px 32px rgba(26, 20, 18, 0.06);

    position: relative;
    overflow: hidden;
}

.contact_main form::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--terra), var(--sage));
}

.contact_main h2 {
    margin: 0;
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.contact_main p {
    margin: 0 0 10px;
    opacity: 0.5;
    color: var(--accent);
    font-size: 0.9rem;
    line-height: 1.65;
}

.contact_main input,
.contact_main textarea {
    width: 100%;
    padding: 14px 16px;

    border: 1.5px solid rgba(26, 20, 18, 0.1);
    border-radius: 10px;

    font: inherit;
    font-size: 0.95rem;
    color: var(--accent);
    background: var(--secondary);

    box-sizing: border-box;

    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact_main input::placeholder,
.contact_main textarea::placeholder {
    color: rgba(26, 20, 18, 0.28);
}

.contact_main textarea {
    min-height: 140px;
    resize: vertical;
}

.contact_main input:focus,
.contact_main textarea:focus {
    outline: none;
    border-color: var(--terra);
    box-shadow: 0 0 0 3px var(--terra-glow);
}

.contact_main button {
    padding: 15px;

    border: none;
    border-radius: 50px;

    background: var(--terra);
    color: white;

    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;

    box-shadow: 0 4px 20px rgba(200, 85, 58, 0.3);
    transition: all 0.3s ease;
}

.contact_main button:hover {
    background: #b5472f;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(200, 85, 58, 0.4);
}

@media (max-width: 700px) {
    .contact_main {
        padding: 120px 16px 60px;
    }

    .contact_main form {
        padding: 32px 24px;
    }
}

/* CATEGORY VIEW */

#categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;

    margin: 20px;
    padding: 28px 20px;
}

#category-view, #staff-view {
    padding: 40px 20px 80px;
    background: transparent;
}

#category-title {
    color: var(--accent);
    margin: 0 auto 30px;
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    position: relative;
    text-align: center;
}

#category-title::after {
    content: "";

    position: absolute;
    bottom: -8px;
    left: 50%;

    width: 48px;
    height: 3px;

    background: var(--terra);

    border-radius: 2px;

    transform: translateX(-50%);
}

/* BACK BUTTON */

#back-button, #staff-back {
    margin-bottom: 25px;

    padding: 10px 22px;

    border: 1.5px solid var(--sage);
    border-radius: 50px;

    background: transparent;
    color: var(--sage);

    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;

    transition: all 0.3s ease;
}

#back-button:hover, #staff-back:hover {
    background: var(--sage);
    color: white;
    border-color: var(--sage);
    transform: none;
    box-shadow: 0 4px 16px rgba(107, 145, 122, 0.25);
}

/* PIECES GRID */

#pieces {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

/* PIECE CARD */

.piece-card {
    background: white;

    border-radius: 16px;
    padding: 24px;

    border: none;

    transition:
        transform 0.3s ease,
        box-shadow 0.35s ease;

    box-shadow: 0 1px 3px rgba(26, 20, 18, 0.04), 0 4px 16px rgba(26, 20, 18, 0.03);
}

.piece-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(200, 85, 58, 0.06), 0 20px 50px rgba(26, 20, 18, 0.06);
}

.piece-card h3 {
    margin-top: 0;
    margin-bottom: 10px;

    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.01em;
}

.piece-card p {
    margin-bottom: 16px;
    line-height: 1.75;
    color: var(--accent);
    opacity: 0.6;
    font-size: 0.92rem;
}

/* MEDIA */

.piece-card img,
.piece-card video,
.piece-card audio {
    width: 100%;
    display: block;

    margin-top: 14px;

    border-radius: 10px;
}

/* IMAGE STYLE */

.piece-card img {
    object-fit: cover;
    max-height: 500px;
}

/* VIDEO STYLE */

.piece-card video {
    background: black;
    border-radius: 10px;
}

/* AUDIO STYLE */

.piece-card audio {
    margin-top: 18px;
}

/* GUIDE */

#guide-section {
    padding: 70px 20px;
    display: flex;
    justify-content: center;
}

#guide-open-button,
#guide-back-button {
    padding: 12px 24px;

    border: 1.5px solid var(--sage);
    border-radius: 50px;

    background: transparent;
    color: var(--sage);

    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;

    cursor: pointer;

    transition: all 0.3s ease;
}

#guide-open-button:hover, #guide-back-button:hover {
    background: var(--sage);
    color: white;
}

#guide-view {
    width: min(720px, 100%);
}

#guide-back-button {
    margin-bottom: 18px;
}

.guide-card {
    background: white;
    padding: 36px 32px;
    border-radius: 20px;
    border-top: 4px solid var(--sage);
    box-shadow: 0 1px 3px rgba(26, 20, 18, 0.04),
                0 8px 32px rgba(26, 20, 18, 0.06);

    text-align: center;
}

.guide-card h2 {
    margin-top: 0;
    margin-bottom: 16px;

    font-size: 2rem;
}

#guide-text {
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
    white-space: normal;
    line-height: 1.8;
    opacity: 0.72;
}

#staff-media {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 20px;
}

#staff-media img {
    max-width: 100%;
    border-radius: 10px;
}

/* STAFF CARD WITH COVER IMAGE */

.staff-card-cover {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border-left: none !important;
    overflow: hidden;
}

.staff-card-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(26, 20, 18, 0.1) 0%,
        rgba(26, 20, 18, 0.65) 100%
    );
    z-index: 0;
    border-radius: inherit;
}

.staff-card-cover h2,
.staff-card-cover p {
    position: relative;
    z-index: 1;
    color: #fdf8f3 !important;
}

.staff-card-cover p {
    opacity: 0.8;
}

.staff-card-cover:hover {
    background-color: transparent;
    background-size: cover;
    background-position: center;
    box-shadow: 0 8px 24px rgba(200, 85, 58, 0.08), 0 20px 50px rgba(26, 20, 18, 0.1);
}

/* MOBILE */

@media (max-width: 700px) {
    header h1 {
        font-size: 1.15rem;
    }

    header nav a {
        font-size: 0.72rem;
        margin-left: 14px;
        letter-spacing: 0.06em;
    }

    #category-view, #staff-view {
        padding: 30px 14px 60px;
    }

    #pieces {
        grid-template-columns: 1fr;
    }

    .centered-content h2,
    #magazine-name {
        font-size: clamp(2.2rem, 5vw, 4rem);
    }
    .magazine-card {
        border-left-width: 3px;
    }

    header {
        flex-direction: column;
        padding: 14px 0;
    }

    header h1 {
        margin: 0;
        text-align: center;
        width: 100%;
    }

    header nav {
        margin: 0;
        width: 100%;
        justify-content: center;
    }

    #categories {
        grid-template-columns: 1fr;
    }

    #magazines, #staff-container, #pages {
        grid-template-columns: 1fr;
        padding: 32px 20px;
    }
}