/* ========================================
   EVERWYN
   Main Stylesheet
======================================== */


/* ========================================
   FONT
======================================== */

@font-face {
    font-family: "Sour Gummy";
    src: url("/fonts/SourGummy-VariableFont_wdth,wght.ttf") format("truetype");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}


/* ========================================
   DESIGN TOKENS
======================================== */

:root {

    /* =====================================================
       EVERWYN COLOR KEY

       Base       = Brown
       Surface    = Cream
       Primary    = Green
       Secondary  = Terracotta
       Accent 1   = Sage
       Accent 2   = Mustard
       Accent 3   = Dusty Blue
       Accent 4   = Dusty Lavender
       ===================================================== */

    --color-base-dark: #563d2d;
    --color-base: #6b4f3a;
    --color-base-light: #80604a;

    --color-surface: #faf6ed;
    --color-surface-dark: #f2eadc;

    --color-primary-dark: #5f8145;
    --color-primary: #789b5a;
    --color-primary-light: #91b86b;
    --color-primary-soft: #eaf5df;

    --color-secondary-dark: #ad684d;
    --color-secondary: #c98262;
    --color-secondary-light: #dda184;
    --color-secondary-soft: #f5dfd4;

    --color-accent-1-dark: #7d936b;
    --color-accent-1: #9baf87;
    --color-accent-1-light: #b8c8a8;
    --color-accent-1-soft: #e8eee2;

    --color-accent-2-dark: #a88947;
    --color-accent-2: #c9a85d;
    --color-accent-2-light: #dbc27f;
    --color-accent-2-soft: #f4ecd5;

    --color-accent-3-dark: #668592;
    --color-accent-3: #7f9eaa;
    --color-accent-3-light: #a5bac2;
    --color-accent-3-soft: #e4edf0;

    --color-accent-4-dark: #89748d;
    --color-accent-4: #a58fa8;
    --color-accent-4-light: #c0b2c2;
    --color-accent-4-soft: #eee9ef;

    --color-text: #514033;
    --color-text-soft: #746052;
    --color-white: #ffffff;

    --content-width: 1150px;
    --radius-small: 12px;
    --radius-medium: 20px;
    --radius-large: 30px;

    --shadow-soft:
        0 8px 25px rgba(107, 79, 58, 0.10);

    --shadow-card:
        0 10px 30px rgba(107, 79, 58, 0.12);
}


/* ========================================
   RESET
======================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

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

    font-family: "Sour Gummy", sans-serif;
    font-size: 18px;
    line-height: 1.5;
}


/* ========================================
   SITE BACKGROUND
======================================== */

body::before {
    content: "";

    position: fixed;
    inset: -12px;

    z-index: -1;

    background:
        linear-gradient(
            rgba(250, 246, 237, 0.78),
            rgba(250, 246, 237, 0.78)
        ),
        url("/images/site/background.png");

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

    filter: blur(4px);
}

img {
    max-width: 100%;
}

a {
    color: inherit;
}


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

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    line-height: 1.1;
}

h1 {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(2rem, 4vw, 3.2rem);
}

h3 {
    font-size: 1.8rem;
}

.eyebrow {
    margin-bottom: 10px;

    color: var(--color-base-dark);

    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}


/* ========================================
   SHARED LAYOUT
======================================== */

.site-header-inner,
.hero-content,
.features-section,
.welcome-section {
    width: min(
        calc(100% - 40px),
        var(--content-width)
    );

    margin: 0 auto;
}


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

.site-header {
    position: relative;

    background: var(--color-base);

    border-bottom: 3px solid var(--color-base-dark);
}

.site-header-inner {
    min-height: 82px;

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

    gap: 30px;
}

.site-logo {
    color: var(--color-white);

    font-size: 2.2rem;
    font-weight: 700;

    text-decoration: none;
}

.site-nav {
    display: flex;
    align-items: center;

    gap: 8px;
}

.site-nav a {
    padding: 9px 14px;

    border-radius: var(--radius-small);

    color: var(--color-white);

    font-weight: 600;

    text-decoration: none;

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

.site-nav a:hover {
    background: var(--color-primary);
    color: var(--color-white);

    transform: translateY(-1px);
}

.site-nav .nav-button {
    background: var(--color-primary);
    color: var(--color-white);

    margin-left: 6px;
}

.site-nav .nav-button:hover {
    background: var(--color-primary-dark);
}


/* ========================================
   BUTTONS
======================================== */

.button {
    display: inline-block;

    padding: 13px 22px;

    border-radius: 14px;

    font-weight: 700;

    text-decoration: none;

    font-family: inherit;

    font-size: 1.1rem;

    border: none;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background-color 0.2s ease;
}

.button:hover {
    transform: translateY(-2px);

    box-shadow: var(--shadow-soft);
}

.button-primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.button-primary:hover {
    background: var(--color-primary-dark);
}

.button-secondary {
    background: var(--color-secondary-soft);
    color: var(--color-secondary-dark);
}

.button-secondary:hover {
    background: var(--color-secondary-light);
}


/* ========================================
   HERO
======================================== */

.hero-section {
    padding: 100px 0 110px;

    background:
        linear-gradient(
            135deg,
            var(--color-accent-4-soft),
            var(--color-secondary-soft)
        );
}

.hero-content {
    text-align: center;
}

.hero-content h1 {
    margin-bottom: 25px;

    color: var(--color-base-dark);
}

.hero-text {
    max-width: 650px;

    margin: 0 auto 30px;

    color: var(--color-text-soft);

    font-size: 1.25rem;
}

.hero-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;

    gap: 12px;
}


/* ========================================
   FEATURES
======================================== */

.features-section {
    padding: 100px 0;
}

.section-heading {
    max-width: 700px;

    margin-bottom: 45px;
}

.section-heading h2 {
    margin-bottom: 15px;

    color: var(--color-base-dark);
}

.section-heading > p:last-child {
    color: var(--color-text-soft);
}

.feature-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 22px;
}

.feature-card {
    display: block;

    padding: 32px;

    border-radius: var(--radius-large);

    text-decoration: none;

    box-shadow: var(--shadow-card);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-5px);

    box-shadow:
        0 15px 35px rgba(107, 79, 58, 0.16);
}

.feature-card h3 {
    margin-bottom: 10px;
}

.feature-card p {
    margin-bottom: 20px;

    color: var(--color-text-soft);
}

.feature-icon {
    width: 52px;
    height: 52px;

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

    margin-bottom: 20px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.65);

    font-size: 1.8rem;
}

.feature-link {
    font-weight: 700;
}


/* ========================================
   FEATURE CARD COLORS
======================================== */

.feature-card-purple,
.feature-card-pink,
.feature-card-blue,
.feature-card-green,
.feature-card-yellow {
    background: var(--color-surface);
}


/* ========================================
   ACCOUNT / WELCOME
======================================== */

.welcome-section {
    padding-bottom: 100px;
}

.welcome-card {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;

    padding: 45px;

    border-radius: var(--radius-large);

    background:
        linear-gradient(
            135deg,
            var(--color-accent-2-soft),
            var(--color-primary-soft)
        );

    box-shadow: var(--shadow-card);
}

.welcome-card h2 {
    margin-bottom: 15px;

    color: var(--color-base-dark);
}

.welcome-card p:last-child {
    max-width: 650px;

    margin-bottom: 0;

    color: var(--color-text-soft);
}


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

.site-footer {
    padding: 35px 20px;

    background: var(--color-base);

    color: var(--color-white);

    text-align: center;
}

.site-footer p {
    margin-bottom: 5px;
}

.site-footer p:last-child {
    margin-bottom: 0;

    opacity: 0.8;
}


/* ========================================
   ERROR PAGE
======================================== */

.error-page {
    min-height: 100vh;
    margin: 0;
    padding: 30px;

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

    background: transparent;
}

.error-container {
    width: 100%;
    max-width: 800px;

    text-align: center;
}

.error-container img.error-image {
    display: block;

    width: 500px;
    max-width: 100%;
    height: auto;

    margin: 0 auto 20px;
}

.error-button {
    display: inline-block;

    padding: 12px 24px;

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

    border-radius: 12px;

    font-weight: 700;

    text-decoration: none;

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

.error-button:hover {
    opacity: 0.9;

    transform: translateY(-2px);
}


/* ========================================
   UNDER CONSTRUCTION HOMEPAGE
======================================== */

main.construction-page {
    min-height: calc(100vh - 150px);

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

    padding: 50px 30px;

    box-sizing: border-box;
}

.construction-content {
    width: 100%;
    max-width: 700px;

    padding: 30px;

    text-align: center;

    background: rgba(255, 255, 255, 0.35);

    border-radius: 24px;

    box-shadow: var(--shadow-card);

    box-sizing: border-box;
}

.construction-image {
    display: block;

    width: 100%;
    max-width: 600px;

    height: auto;

    margin: 0 auto 25px;

    border-radius: 24px;
}

.construction-content p {
    max-width: 700px;

    margin: 0 auto 10px;

    color: var(--color-text-soft);

    font-size: 1.1rem;
}

.construction-content p:last-child {
    margin-bottom: 0;

    font-weight: 700;
}


/* ========================================
   RESPONSIVE
======================================== */

@media (max-width: 800px) {

    .site-header-inner {
        flex-direction: column;

        padding: 18px 0;
    }

    .site-nav {
        flex-wrap: wrap;

        justify-content: center;
    }

    .hero-section {
        padding: 70px 0 80px;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .welcome-card {
        flex-direction: column;

        align-items: flex-start;

        padding: 32px;
    }

}


@media (max-width: 600px) {

    body {
        font-size: 16px;
    }

    .site-header-inner,
    .hero-content,
    .features-section,
    .welcome-section {
        width: min(
            calc(100% - 30px),
            var(--content-width)
        );
    }

    .site-nav {
        gap: 3px;
    }

    .site-nav a {
        padding: 7px 9px;
    }

    .hero-section {
        padding: 55px 0 65px;
    }

    .feature-card {
        padding: 25px;
    }

    .welcome-card {
        padding: 25px;
    }

    .error-page {
        padding: 20px;
    }

    .error-container img.error-image {
        width: 450px;
    }

    main.construction-page {
        min-height: calc(100vh - 140px);
        padding: 30px 20px;
    }

    .construction-image {
        margin-bottom: 20px;
        border-radius: 18px;
    }

    .construction-content p {
        font-size: 1rem;
    }

}

/* ========================================
   LOGOUT MODAL
======================================== */

.logout-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;

    width: 100vw !important;
    height: 100vh !important;

    z-index: 9999 !important;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;
}

.logout-modal.is-visible {
    display: flex !important;
}

.logout-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background: rgba(107, 79, 58, 0.65) !important;
}

.logout-modal-box {
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 480px;

    padding: 35px;

    text-align: center;

    background: var(--color-white) !important;
    color: var(--color-text);

    border-radius: 24px;

    box-shadow:
        0 15px 50px
        rgba(107, 79, 58, 0.3);
}

.logout-modal-image {
    display: block;

    width: 100%;
    max-width: 260px;
    height: auto;

    margin: 0 auto 15px;
}

.logout-modal-box h2 {
    margin: 0 0 8px;
}

.logout-modal-box p {
    margin: 0 0 25px;
}

.logout-modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.logout-modal-actions .button {
    min-width: 110px;
}

@media (max-width: 500px) {

    .logout-modal-box {
        padding: 25px;
    }

    .logout-modal-actions {
        flex-direction: column;
    }

    .logout-modal-actions .button {
        width: 100%;
    }

}

