/* color variables */
:root {
    --log-green: #67288E;
    --log-green-dark: #3F054F;
    --blue: #3F054F;
    --blue-light: #6a4a79;
    --accent-mist: #C1D2DC;
    --page-bg: #f4eeff;
    --card-bg: #ffffff;
    --ink: #111111;
}

/* reset everything */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    background: linear-gradient(180deg, #f8fbfd 0%, var(--page-bg) 65%);
    color: var(--ink);
}

/* navbar */
nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    padding: 14px 22px;
    background: var(--blue);
    border-bottom: 2px solid #67288E;
    box-shadow: 0 3px 10px rgba(63, 5, 79, 0.35);
}

nav .nav-link {
    text-decoration: none;
    color: #f8fbff;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

nav .nav-link:hover {
    background-color: var(--accent-mist);
    color: #3F054F;
}

/* button to add new item */
.new-item {
    border: 2px solid #3F054F;
    background: var(--log-green);
    color: white;
    padding: 8px 14px;
    min-height: 36px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.1;
    font-weight: 600;
    text-transform: lowercase;
    box-shadow: 0 2px 8px rgba(63, 5, 79, 0.4);
    transition: transform 0.15s ease, background 0.2s ease;
}

.new-item:hover {
    background: var(--log-green-dark);
    transform: translateY(-1px);
}

.top-section {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 50px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

/* the purple box at the top */
.top-tagline {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #6a4a79 0%, #573666 100%);
    border: 2px solid #573666;
    padding: 34px 32px;
    flex: 1;
    border-radius: 14px;
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(87, 54, 102, 0.35);
}

/* decorative circles */
.top-tagline::before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    right: -70px;
    top: -90px;
    border-radius: 50%;
    background: rgba(193, 210, 220, 0.28);
}

.top-tagline::after {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    left: -60px;
    bottom: -80px;
    border-radius: 50%;
    background: rgba(193, 210, 220, 0.2);
}

.top-tagline h1 {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: clamp(2rem, 3.6vw, 3.1rem);
    line-height: 1.1;
    letter-spacing: 0.01em;
    font-weight: 800;
    text-wrap: balance;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    max-width: 18ch;
}

/* login form styles */
.login-card {
    background-color: #fafdff;
    border: 2px solid var(--accent-mist);
    border-top: 4px solid #573666;
    padding: 35px 30px;
    width: 340px;
    text-align: center;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(87, 54, 102, 0.2);
}

.login-card label {
    display: block;
    text-align: left;
    margin-top: 12px;
    margin-bottom: 4px;
}

.login-card input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--accent-mist);
    border-radius: 6px;
    background: #f8fbfd;
    font: inherit;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.login-card input:focus {
    border-color: #573666;
    outline: none;
    box-shadow: 0 0 0 3px rgba(193, 210, 220, 0.45);
}

.login-card h2 {
    margin-bottom: 15px;
    font-size: 26px;
    color: #573666;
}

.login-card button {
    margin-top: 20px;
    padding: 12px 40px;
    border: none;
    border-radius: 10px;
    background: #573666;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(87, 54, 102, 0.35);
    transition: transform 0.15s ease, background 0.3s ease;
}

.login-card button:hover {
    background: #43274f;
    transform: translateY(-2px);
}

/* steps section - shows how to use the site */
.steps-section {
    display: flex;
    flex-direction: row;
    gap: 20px;
    padding: 20px 60px 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.step-card {
    background: #fafdff;
    border: 2px solid var(--accent-mist);
    border-top: 4px solid #573666;
    padding: 18px;
    flex: 1;
    border-radius: 12px;
    box-shadow: 0 6px 14px rgba(87, 54, 102, 0.2);
}

.step-label {
    font-weight: bold;
    margin-bottom: 12px;
    color: #573666;
}

/* placeholder for step images */
.step-img {
    background: #e9f1f6;
    border: 1px dashed #573666;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: #573666;
    border-radius: 8px;
    overflow: hidden;
}

.step-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* modal/overlay for item form */
.item-form-panel {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1000;
    padding: 20px;
}

.item-form-panel.is-open {
    display: flex;
}

.item-form {
    position: relative;
    width: min(900px, 100%);
    background: white;
    border: 2px solid #CAA8F5;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(63, 5, 79, 0.2);
    padding: 24px;
}

.item-form h2 {
    margin-bottom: 14px;
    color: #573666;
}

.item-form label {
    display: block;
    margin: 10px 0 6px;
    font-weight: 600;
}

.item-form input,
.item-form select,
.item-form textarea {
    width: 100%;
    border: 2px solid var(--accent-mist);
    border-radius: 8px;
    padding: 10px;
    font: inherit;
    background: #fafdff;
}

.item-form textarea {
    resize: vertical;
}

.item-form button[type="submit"] {
    margin-top: 14px;
    border: 2px solid #43274f;
    border-radius: 8px;
    background: #573666;
    color: white;
    font-size: 15px;
    font-weight: 600;
    padding: 10px 14px;
    cursor: pointer;
}

#item-form-feedback {
    margin-top: 8px;
    min-height: 20px;
    color: #573666;
    font-weight: 600;
}

.close-form {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: 2px solid #CAA8F5;
    background: white;
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

/* main list area */
.list-section {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 60px 60px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    background: linear-gradient(180deg, #f8fbfd 0%, #fbf7ff 100%);
    border: 2px solid var(--accent-mist);
    border-radius: 18px;
    box-shadow: 0 12px 26px rgba(87, 54, 102, 0.08);
}

/* dot pattern background */
.list-section::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 16px;
    pointer-events: none;
    background-image: radial-gradient(rgba(87, 54, 102, 0.07) 1px, transparent 1px);
    background-size: 14px 14px;
    opacity: 0.4;
}

.list-section h1 {
    position: relative;
    grid-column: 1 / -1;
    margin-bottom: 4px;
    color: #573666;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    letter-spacing: 0.01em;
}

.list-subtitle {
    position: relative;
    grid-column: 1 / -1;
    margin-top: -4px;
    margin-bottom: 10px;
    color: #6a4a79;
}

/* form to create a new list */
.create-list-form {
    position: relative;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 10px;
    align-items: end;
    background: #edf4f8;
    border: 2px solid #573666;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(87, 54, 102, 0.1);
}

.create-list-field {
    display: grid;
    gap: 6px;
}

.create-list-form label {
    font-weight: 600;
}

.create-list-form input {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--accent-mist);
    border-radius: 6px;
    background: white;
    color: black;
    font: inherit;
}

.create-list-form input::placeholder {
    color: gray;
}

.create-list-form input:focus {
    outline: none;
    border-color: #573666;
    box-shadow: 0 0 0 3px rgba(193, 210, 220, 0.5);
}

.create-list-form button {
    border: 2px solid #43274f;
    border-radius: 8px;
    background: #573666;
    color: white;
    font-size: 16px;
    font-weight: 600;
    padding: 10px 14px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(87, 54, 102, 0.35);
    transition: background 0.2s ease, transform 0.15s ease;
}

.create-list-form button:hover {
    background: #43274f;
    transform: translateY(-1px);
}

/* shown when no lists exist yet */
.empty-list-state {
    position: relative;
    grid-column: 1 / -1;
    border: 2px dashed #93adbc;
    padding: 18px;
    background: #edf4f8;
    border-radius: 10px;
    color: #43274f;
    font-weight: 600;
}

.list-grid {
    position: relative;
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

/* each list card */
.list-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 180px;
    background: #fafdff;
    border: 2px solid var(--accent-mist);
    border-top: 4px solid #573666;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 6px 14px rgba(87, 54, 102, 0.15);
    transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.list-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(87, 54, 102, 0.2);
}

.list-card h2 {
    margin-bottom: 10px;
    color: #573666;
}

.list-card p {
    flex: 1;
    margin-bottom: 16px;
    line-height: 1.4;
    color: #272463;
}

.list-card button {
    border: 2px solid #573666;
    background: var(--accent-mist);
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 600;
    border-radius: 999px;
    color: #43274f;
}

.list-card button:hover {
    background: #d5e2e9;
}

/* logout button - styled to match nav links */
#logout-button {
    border: none;
    background: transparent;
    color: #f8fbff;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    transition: background-color 0.2s ease;
}

#logout-button:hover {
    background-color: var(--accent-mist);
    color: #3F054F;
}

.item-card {
    width: 150px;
    border: 1px solid var(--accent-mist);
    border-radius: 10px;
    overflow: hidden;
    padding: 10px;
    background: #fafdff;
    box-shadow: 0 4px 12px rgba(63, 5, 79, 0.15);
}

#items-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px;
    padding: 10px 0;
}

.item-image-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 8px;
    overflow: hidden;
}

.item-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-image-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--accent-mist);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #573666;
    font-size: 0.85rem;
}

/* contact page */

main {
    max-width: 680px;
    margin: 0 auto;
    padding: 60px 30px 80px;
}

.eyebrow {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--log-green);
    margin-bottom: 14px;
}

main h1 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: 0.01em;
    color: #3F054F;
    margin-bottom: 16px;
}

main h1 em {
    font-style: italic;
    color: var(--log-green);
}

.subtitle {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #6a4a79;
    max-width: 48ch;
    margin-bottom: 40px;
}

.cards {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 36px;
}

/* contact cards */
.card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #ffffff;
    border: 2px solid var(--accent-mist);
    border-left: 4px solid #573666;
    border-radius: 12px;
    padding: 20px 22px;
    text-decoration: none;
    color: var(--ink);
    box-shadow: 0 6px 14px rgba(87, 54, 102, 0.1);
    transition: transform 0.15s ease, box-shadow 0.2s ease, border-left-color 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(87, 54, 102, 0.18);
    border-left-color: var(--log-green);
}

.card-icon {
    font-size: 28px;
    flex-shrink: 0;
    line-height: 1;
}

.card > div:nth-child(2) {
    flex: 1;
}

.card-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--log-green);
    margin-bottom: 3px;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #3F054F;
    margin-bottom: 2px;
}

.card-desc {
    font-size: 0.875rem;
    color: #6a4a79;
}

.card-arrow {
    flex-shrink: 0;
    color: #573666;
    opacity: 0.5;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.card:hover .card-arrow {
    opacity: 1;
    transform: translateX(3px);
}

/* divider line with text */
.divider {
    text-align: center;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #93adbc;
    position: relative;
    margin-bottom: 14px;
}

.divider::before,
.divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 14%;
    height: 1px;
    background: var(--accent-mist);
}

.divider::before { left: 0; }
.divider::after { right: 0; }

/* for about us page*/
.box {
            background: white;
            padding: 20px;
            margin-bottom: 20px;
            border-radius: 10px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        }
