@import url('https://fonts.googleapis.com/css2?family=El+Messiri:wght@400..700&family=M+PLUS+Rounded+1c:wght@100;300;400;500;700;800;900&display=swap');

* { margin: 0; line-height: 1.5; }
*, *:before, *:after { box-sizing: border-box; }
img { display: block; max-width: 100%; }

:root {
    --off-white: #fff9ed;
    --green: #5a7b0b;
}

::-webkit-scrollbar {
    display: none;
}

/* ----------------- Header ---------------- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    width: 100%;
    top: 0;
    z-index: 99999;
    background-color: var(--off-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-box {
    padding-left: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;

    #logo {
        width: 48px;
        height: 48px;
    }
}

.header-box-text > * {
    line-height: 1;
}

nav {
    display: flex;
    gap: 1rem;
    margin-right: 1rem;
}

.overview #overview { font-weight: 700; }
.history #history { font-weight: 700; }
.preparation #preparation { font-weight: 700; }

a {
    text-decoration: none;
}

body {
    font-family: "M PLUS Rounded 1c", sans-serif;
    font-weight: 300;
    font-size: 18px;
    background-color: var(--off-white);
}

main {
    width: 75%;
    margin: auto;
}

h1 { 
    text-align: center; 
    font-size: 88px;
}

h2 { font-size: 24px; }

h3 { font-size: 12px; }

h1, h2, h3, h4, a {
    font-family: "El Messiri", sans-serif;
    font-weight: 400;
    color: var(--green);
}

/* ----------------- Overview ---------------- */
.overview .container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.overview #matcha {
    height: 480px;
}

.overview .box {
    width: 33%;
    display: grid;
    place-items: center;
}

/* ----------------- History ---------------- */
.history .timeline {
    display: flex;
    flex-direction: column;
    position: relative;
    gap: 1rem;
    margin-top: 1rem;
}

.history .event {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 50%;

    h4 { position: relative; }
}

.history .image-container {
    display: flex;
    gap: 1rem;

    img {
        height: 150px;
        width: fit-content;
        object-fit: cover;
    }
}

.history .event h4::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--off-white);
    border: 2px solid var(--green);
    transform: rotate(45deg);
    z-index: 3;
    top: 0;
}

.history .event:nth-child(odd) {
    align-self: flex-start;
    text-align: right;
    padding-right: 2rem;

    .image-container { justify-content: flex-end; }
}

.history .event:nth-child(even) {
    align-self: flex-end;
    text-align: left;
    padding-left: 2rem;
}

.history .event:nth-child(odd) h4::after { right: -42px; }
.history .event:nth-child(even) h4::after { left: -42px; }

.history .present {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    position: relative;
    align-items: center;
    margin-top: 3rem;
    margin-bottom: 1rem;
    width: 100%;
}

.history .present h4::after {
    content: none;
}

.history .present::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--off-white);
    border: 2px solid var(--green);
    transform: rotate(45deg);
    top: -2rem;
}

/* ----------------- Preparation ---------------- */
.preparation .main-image-container {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
    margin-bottom: 1rem;

    .main-image {
        height: 360px;
        width: 50%;
        object-fit: cover;
    }
}

.preparation .instructions {
    display: flex;
    justify-content: center;
    align-items: start; 
    gap: 2rem;
    padding-top: 1rem;
    position: relative;

    .step {
        width: 300px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1;
        flex-shrink: 0;
    }

    .diamond {
        text-align: center;
        position: relative;
        width: 100%;
        color: var(--green);
        font-weight: 900;
    }

    .description {
        text-align: center;
        padding: 1rem;
    }
}

.preparation .diamond#middle::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 665px;
    height: 1px;
    background-color: var(--green);
    transform: translate(-50%, -50%);
}

.preparation .equipment-container {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    justify-content: center;
}

.preparation .image-box {
    display: flex;
    flex-direction: column;

    .label { text-align: center; }
}

.preparation .equipment {
    width: 120px;
    height: 120px;
    object-fit: cover;
}