/*
    SGA Romania Student Chapter
    Geological Field Journal
    Cold mountains / old timber / mine darkness / mica
*/

:root {
    --mountain: #415866;
    --mountain-light: #74838a;

    --timber: #3b3029;
    --earth: #5a483c;

    --mine: #18211f;
    --mine-soft: #25302d;

    --mica: #786f83;
    --mica-light: #a29aaa;
    --violet: #81718f;
    --deep-blue: #415866;
    --lichen: #78856a;
    --orange: #c8753d;

    --stone: #d8d2c7;
    --paper: #f1eee7;
    --text: #292725;
    --muted: #6d716b;

    --line: rgba(37, 43, 42, 0.14);

    --content-width: 1120px;
}


/* =========================================
   BASE
   ========================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    margin: 0;

    overflow-x: clip;

    min-height: 100vh;

    display: flex;
    flex-direction: column;

    background: var(--paper);
    color: var(--text);

    font-family:
        Inter,
        "Segoe UI",
        Arial,
        sans-serif;

    line-height: 1.7;
}


/* =========================================
   HEADER
   ========================================= */

header {
    position: relative;

    min-height: 350px;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    padding: 4rem max(2rem, 6vw) 7.5rem;

    color: var(--paper);

    background:
        repeating-linear-gradient(
            171deg,
            transparent 0 48px,
            rgba(235, 232, 225, 0.035) 49px 50px
        ),
        linear-gradient(
            165deg,
            var(--mine) 0%,
            #172321 48%,
            var(--mountain) 100%
        );

    overflow: hidden;
}


/*
    Abstract geological planes.

    Nothing here is explicitly a "mountain"
    or a "crystal". It should simply feel
    geological.
*/

header::before {
    content: "";

    position: absolute;

    width: 72vw;
    height: 72vw;

    max-width: 850px;
    max-height: 850px;

    right: -18vw;
    top: -35vw;

    border: 1px solid rgba(235, 232, 225, 0.12);

    transform:
        rotate(31deg)
        skewX(-12deg);

    box-shadow:
        -85px 70px 0 rgba(235, 232, 225, 0.035),
        -170px 140px 0 rgba(120, 106, 145, 0.045);

    pointer-events: none;
}


/*
    A second geological plane, almost like
    a section through rock.
*/

header::after {
    content: "";

    position: absolute;

    left: -10%;
    right: -10%;
    bottom: 0;

    height: 150px;

    background:
        linear-gradient(
            172deg,
            transparent 0 34%,
            rgba(58, 41, 34, 0.75) 35% 60%,
            rgba(42, 34, 30, 0.95) 61%
        );

    clip-path: polygon(
        0 54%,
        14% 45%,
        26% 61%,
        39% 37%,
        51% 55%,
        66% 31%,
        79% 51%,
        91% 39%,
        100% 47%,
        100% 100%,
        0 100%
    );

    opacity: 0.9;
}


/* =========================================
   TITLE
   ========================================= */

header h1 {
    position: relative;
    z-index: 3;

    max-width: 850px;

    margin: 0 auto;

    text-align: center;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: clamp(2.1rem, 4.5vw, 3.9rem);

    font-weight: 400;

    line-height: 0.98;

    letter-spacing: -0.045em;
}


/*
    Tiny mica-like glint.
*/

header h1::after {
    content: "";

    position: absolute;

    width: 7px;
    height: 7px;

    right: 8%;
    top: 14%;

    background: var(--violet);

    transform: rotate(45deg);

    box-shadow:
        0 0 18px rgba(139, 111, 179, 0.45);

    opacity: 0.75;
}


/* =========================================
   NAVIGATION
   ========================================= */

nav {
    position: relative;
    z-index: 5;

    display: flex;
    justify-content: center;
    flex-wrap: wrap;

    gap: 2rem;

    margin-top: 2rem;
}

nav a {
    position: relative;

    color: rgba(235, 232, 225, 0.68);

    text-decoration: none;

    font-size: 0.78rem;
    font-weight: 600;

    letter-spacing: 0.12em;
    text-transform: uppercase;

    transition:
        color 0.25s ease;
}

nav a:hover {
    color: var(--paper);
}

nav a[aria-current="page"] {
    color: var(--paper);
}

nav a::before {
    content: "";

    position: absolute;

    left: 50%;
    bottom: -8px;

    width: 4px;
    height: 4px;

    background: var(--orange);

    transform:
        translateX(-50%)
        rotate(45deg);

    opacity: 0;

    transition:
        opacity 0.2s ease;
}

nav a:hover::before {
    opacity: 1;
}

nav a[aria-current="page"]::before {
    opacity: 1;
}


/* =========================================
   MAIN
   ========================================= */

main {
    position: relative;

    flex: 1;

    overflow: clip;

    width: min(
        var(--content-width),
        calc(100% - 3rem)
    );

    margin: 0 auto;

    padding: 4.5rem 0 5.5rem;
}


/*
    Almost invisible strata behind content.
*/

main::before {
    content: "";

    position: absolute;

    left: calc((100vw - 100%) / -2);
    right: calc((100vw - 100%) / -2);
    top: 0;
    bottom: 0;

    background:
        repeating-linear-gradient(
            171deg,
            transparent 0 48px,
            rgba(52, 75, 90, 0.045) 49px 50px
        );

    pointer-events: none;
}


/* =========================================
   CONTENT PANEL
   ========================================= */

main section {
    position: relative;
    z-index: 2;

    max-width: 900px;

    margin: 0 auto;

    padding: 3.5rem 4.5rem;

    background: rgba(251, 249, 244, 0.78);

    border-top: 1px solid rgba(37, 43, 42, 0.12);
    border-bottom: 1px solid rgba(37, 43, 42, 0.12);

    box-shadow:
        0 25px 70px rgba(17, 24, 23, 0.07);
}

.team-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
}

.contact-layout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem;
}

.team-layout section,
.contact-layout section {
    width: 100%;
    margin: 0;
    max-width: none;
}


/*
    Timber-colored structural edge.
*/

main section::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;
    bottom: 0;

    width: 6px;

    background:
        linear-gradient(
            to bottom,
            var(--deep-blue),
            var(--orange)
        );
}

.events-page {
    width: min(
        var(--content-width),
        calc(100% - 3rem)
    );
}

.events-page > section {
    max-width: 900px;
}

.text-page p {
    max-width: none;
}

.map-frame {
    width: 100%;
    height: 220px;
    margin-top: 2rem;
    border: 1px solid var(--line);
    background: var(--stone);
}

.map-frame iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}


/* =========================================
   TYPOGRAPHY
   ========================================= */

h2 {
    margin: 0 0 2rem;

    color: var(--timber);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: clamp(1.6rem, 2.7vw, 2.3rem);

    font-weight: 400;

    line-height: 1.05;

    letter-spacing: -0.035em;
}


h2::after {
    content: "";

    display: block;

    width: 38px;
    height: 2px;

    margin-top: 1.4rem;

    background: var(--orange);
}


p {
    max-width: 68ch;

    overflow-wrap: anywhere;

    margin: 0 0 1.2rem;

    color: var(--muted);

    font-size: 1rem;
}


/* =========================================
   EVENTS
   ========================================= */

.events-page > section {
    padding: 2.5rem 3rem;
}

ul {
    margin: 1.8rem 0 0;
    padding: 0;

    list-style: none;
}

.events-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.event-years {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.event-year-title {
    margin: 0;
    padding-bottom: 0.6rem;
    color: var(--deep-blue);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1;
}

.event-year {
    padding: 1.1rem;
    border: 1px solid var(--line);
    background: rgba(251, 249, 244, 0.58);
}

li {
    position: relative;

    overflow-wrap: anywhere;

    margin: 0;

    padding: 1rem 0 1rem 1.2rem;

    border-top: 1px solid var(--line);

    color: var(--text);

    line-height: 1.5;

    transition:
        padding-left 0.2s ease,
        color 0.2s ease;
}

li:last-child {
    border-bottom: 1px solid var(--line);
}


/* A geological cut through the row */

li::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;
    bottom: 0;

    width: 2px;

    background: var(--deep-blue);

    transform: scaleY(0.35);

    transform-origin: center;

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

li:hover {
    padding-left: 1.5rem;
}

li:hover::before {
    background: var(--lichen);
    transform: scaleY(1);
}

li a {
    color: var(--deep-blue);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

li a:hover {
    color: var(--lichen);
}

.event-status {
    display: inline-block;

    margin-left: 0.7rem;
    padding: 0.15rem 0.45rem;

    color: var(--paper);

    background: var(--orange);

    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.4;
    text-transform: uppercase;
    vertical-align: middle;
}

.status-confirmed {
    background: #2f5d50;
}

.event-item {
    padding: 1.1rem 1.1rem 1rem;
    border: 1px solid var(--line);
    background: rgba(241, 238, 231, 0.55);
}

.event-image-link {
    display: block;
    margin: 1.25rem 0 0;
    overflow: hidden;
    border: 1px solid var(--line);
    background: var(--mine);
    line-height: 0;
}

.event-image {
    width: 100%;
    max-height: 240px;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.event-image-link:hover .event-image {
    transform: scale(1.02);
}

.event-item::before {
    transform: scaleY(1);
}

.event-item:hover {
    padding-left: 1.5rem;
}

.event-item h4 {
    margin: 0 0 0.55rem;
    color: var(--timber);
    font-family:
        Georgia,
        "Times New Roman",
        serif;
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.15;
}

.event-item p {
    margin-bottom: 0.9rem;
}

.event-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    margin: 0;
}

.event-details div {
    min-width: 110px;
}

.event-details dt {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.event-details dd {
    margin: 0.2rem 0 0;
    color: var(--text);
}

.event-details .event-status {
    margin: 0;
}

.event-signup {
    display: inline-block;
    margin-top: 0.9rem;
    padding-left: 0.55rem;
    border-left: 3px solid var(--violet);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.4;
}

.event-signup.is-pending {
    opacity: 0.9;
}

a:focus-visible {
    outline: 2px solid var(--orange);
    outline-offset: 4px;
}

/* =========================================
   FOOTER
   ========================================= */

@media (max-width: 850px) {

    .team-layout,
    .contact-layout {
        display: block;
    }

    .team-layout section + section,
    .contact-layout section + section {
        margin-top: 2rem;
    }
}

footer {
    position: relative;

    padding: 2.5rem 1rem;

    background-color: var(--mine);

    color: rgba(235, 232, 225, 0.48);

    border-top: 1px solid rgba(235, 232, 225, 0.08);

    text-align: center;

    font-size: 0.78rem;

    letter-spacing: 0.05em;

    background-image:
        repeating-linear-gradient(
            171deg,
            transparent 0 48px,
            rgba(235, 232, 225, 0.035) 49px 50px
        );
}


/*
    One quiet geological line.
*/

footer::before {
    content: "";

    position: absolute;

    left: 50%;
    top: 0;

    width: 90px;
    height: 1px;

    background: var(--mica);

    transform: translateX(-50%);

    opacity: 0.65;
}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 700px) {

    .events-page {
        width: calc(100% - 1rem);
    }

    .events-page > section {
        padding: 2.25rem 1.25rem;
    }

    header {
        min-height: 0;

        padding:
            3rem 1rem
            4rem;
    }

    header h1 {
        font-size: clamp(1.9rem, 8vw, 2.4rem);
    }

    nav {
        gap: 0.7rem;
        margin-top: 1.5rem;
    }

    nav a {
        font-size: 0.68rem;
        letter-spacing: 0.1em;

        overflow-wrap: anywhere;
    }

    main {
        width: calc(100% - 1rem);

        padding:
            2.5rem 0
            3.5rem;
    }

    main section {
        padding: 2.25rem 1.25rem;
    }

    .map-frame {
        height: 200px;
    }

    .team-layout,
    .contact-layout {
        display: block;
    }

    .event-years {
        display: block;
    }

    .event-year + .event-year {
        margin-top: 3rem;
    }

    .team-layout section + section,
    .contact-layout section + section {
        margin-top: 2rem;
    }

    h2 {
        margin-bottom: 1.5rem;
        font-size: 1.75rem;
    }

}
