:root {
    --bg-color: #F9F7F2;
    /* Warm Paper - Premium Heritage */
    --text-color: #1A1A1A;
    /* Deep Ink */
    --accent-color: #D4AF37;
    /* Historical Gold */
    /* Tech Blue - minimal usage */
    --light-gray: #EAE8E0;
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Playfair Display', serif;
    /* Renaissance Touch */
    --header-height: 6rem;
}

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    opacity: 0.9;
    /* Increased for white text visibility */
}

/* Ensure content is above canvas */
main,
footer,
header {
    position: relative;
    z-index: 1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography Scale */
h1 {
    font-family: var(--font-heading);
    font-size: clamp(3.5rem, 8vw, 6.5rem);
    font-weight: 500;
    /* Lighter weight for elegance */
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 2rem;
    color: var(--text-color);
}

h2 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 400;
    line-height: 1.25;
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
    font-style: italic;
    /* Editorial feel */
}

h3 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

p {
    font-size: 1.125rem;
    color: #444;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    max-width: 65ch;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

/* Navigation - Minimal */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.nav {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo img {
    height: 32px;
    filter: grayscale(100%) brightness(0);
    /* Make logo black */
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 500;
    font-style: italic;
    color: var(--text-color);
    letter-spacing: -0.02em;
}

.nav__list {
    display: flex;
    gap: 3rem;
    list-style: none;
}

.nav__link {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
}

.nav__link:hover {
    color: var(--text-color);
}

.nav__actions {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

/* Minimal Buttons */
.button {
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

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

.button--primary:hover {
    background-color: #333;
}

.button--secondary {
    background-color: transparent;
    border: 1px solid #E5E5E5;
    color: var(--text-color);
}

.button--secondary:hover {
    border-color: var(--text-color);
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding-top: var(--header-height);
}

.hero__content {
    max-width: 900px;
}

.hero__subtitle {
    font-size: 1.5rem;
    color: #666;
    margin-bottom: 3rem;
    font-weight: 300;
}

/* Section Styling - Narrative Flow */
.section {
    padding: 8rem 0;
    border-top: 1px solid #F0F0F0;
}

.section--no-border {
    border-top: none;
}

.section__header {
    margin-bottom: 5rem;
    text-align: center;
    /* Centered content */
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.section__header h2 {
    margin-bottom: 2rem;
}

.section__header p {
    margin-left: auto;
    margin-right: auto;
}

/* Feature Grid - Minimalist */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 4rem;
    margin-top: 4rem;
}

.feature-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.feature-item p {
    font-size: 1rem;
    color: #666;
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

/* Contact / Minimal Form */
.contact-section {
    background-color: #FAFAFA;
}

.contact__form {
    max-width: 600px;
    margin-top: 3rem;
}

.form__group {
    margin-bottom: 1.5rem;
}

.form__group input,
.form__group textarea {
    width: 100%;
    padding: 1rem 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid #DDD;
    font-family: var(--font-primary);
    font-size: 1.1rem;
    color: var(--text-color);
    transition: border-color 0.3s;
}

.form__group input:focus,
.form__group textarea:focus {
    outline: none;
    border-bottom-color: var(--text-color);
}

.form__group label {
    display: none;
    /* Minimalist */
}

/* Footer */
.footer {
    padding: 4rem 0;
    border-top: 1px solid #F0F0F0;
}

.footer__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #888;
    font-size: 0.9rem;
}

.footer a {
    color: #888;
}

.footer a:hover {
    color: var(--text-color);
}

/* Utilities */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    .nav__list {
        display: none;
    }

    .hero {
        min-height: 70vh;
    }

    .section {
        padding: 4rem 0;
    }
}

/* ==== Login Modal Styles ==== */
.modal__overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
    z-index: 200;
}

.modal__overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal__content {
    background: var(--bg-color);
    color: var(--text-color);
    padding: 2rem 2.5rem;
    border-radius: 6px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .12);
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.modal__close {
    position: absolute;
    top: .75rem;
    right: .75rem;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--text-color);
    cursor: pointer;
}

/* Ensure form elements inside modal follow minimalist style */
.modal__content .login__form .form__group input,
.modal__content .login__form .form__group textarea {
    border-bottom: 1px solid #DDD;
    background: transparent;
    color: var(--text-color);
}

.modal__content .login__form .form__group input:focus,
.modal__content .login__form .form__group textarea:focus {
    border-bottom-color: var(--text-color);
    outline: none;
}

.password__wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password__wrapper input {
    width: 100%;
    padding-right: 2.5rem; /* Space for the eye icon */
}

.password__toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-color);
    padding: 0.5rem;
}

.login__actions {
    display: flex;
    justify-content: flex-end; /* Align button to the right */
    margin-top: 1.5rem;
}

.login__footer {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #666;
    line-height: 1.4;
}

.login__forgot-link {
    color: var(--text-color);
    text-decoration: underline;
}