:root {
    --primary-bg: #FDFBF7;
    --primary-text: #2D3748;
    --secondary-bg: #EBF8FF;
    --secondary-text: #2C5282;
    --accent-bg: #FAF089;
    --accent-text: #744210;
    --muted-bg: #EDF2F7;
    --muted-text: #4A5568;
    --lavender-bg: #F3E8FF;
    --lavender-text: #553C9A;
    --footer-bg: #1A202C;
    --footer-text: #F7FAFC;
    --font-headings: 'Lora', serif;
    --font-body: 'Inter', sans-serif;
    --base-size: 16px;
    --container-max: 1200px;
    --radius: 0.5rem;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --transition-speed: 0.3s ease-in-out;
}

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

html {
    scroll-behavior: smooth;
    font-size: var(--base-size);
}

body {
    font-family: var(--font-body);
    color: var(--primary-text);
    background-color: var(--primary-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-headings);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover,
a:focus {
    text-decoration: none;
    outline: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    transition: all var(--transition-speed);
}

img {
    max-width: 100%;
    display: block;
    height: auto;
    border-radius: var(--radius);
}

ul,
ol {
    list-style: none;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: 1rem;
}

@media (max-width: 768px) {
    h1 {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }

    h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    h3 {
        font-size: clamp(1.25rem, 5vw, 1.75rem);
    }

    body,
    p,
    a,
    span,
    div,
    input,
    textarea {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

.focus-visible:focus {
    outline: 2px solid var(--secondary-text);
    outline-offset: 2px;
}

/* ===== header ===== */
#main-header {
    font-family: 'Inter', sans-serif;
}

.js-mobile-menu.translate-x-0 {
    transform: translateX(0);
}

.js-mobile-menu.translate-x-full {
    transform: translateX(100%);
}

/* ===== hero_section ===== */
@keyframes heroGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

#hero {
    width: 100%;
    background-image: url('visuals/graphics/hero-background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* ===== featured_article ===== */
#introduction {
    position: relative;
}

.js-cta-btn i {
    transition: transform 0.3s ease;
}

.js-cta-btn:hover i {
    color: var(--accent-text);
}

/* ===== sidebar_content ===== */
#popular {
    width: 100%;
}

.aspect-video {
    aspect-ratio: 16 / 9;
}

/* ===== retirement_thinking ===== */
.js-reveal {
    transition: opacity 1s ease-out, transform 1s ease-out;
}

/* ===== habit_analysis ===== */
#analytics {
    width: 100%;
}

.container {
    position: relative;
    z-index: 1;
}

/* ===== resource_logic ===== */
.budget-section {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.budget-image-container img {
    transition: transform 0.5s ease;
}

.budget-image-container:hover img {
    transform: scale(1.02);
}

.container {
    width: 100%;
}

/* ===== flow_tracking ===== */
#monitoring {
    background-color: var(--primary-bg);
    color: var(--primary-text);
    width: 100%;
}

.monitoring-title {
    color: var(--secondary-text);
}

.monitoring-subtitle {
    color: var(--muted-text);
}

.monitoring-card {
    background-color: var(--muted-bg);
    border-left: 4px solid var(--accent-bg);
    transition: transform 0.3s ease;
}

.monitoring-card:hover {
    transform: translateY(-2px);
}

.monitoring-icon {
    color: var(--lavender-text);
}

.monitoring-text {
    color: var(--primary-text);
}

.monitoring-highlight {
    background-color: var(--lavender-bg);
    border: 1px solid rgba(85, 60, 154, 0.2);
}

.monitoring-text-alt {
    color: var(--lavender-text);
}

/* ===== digital_tools ===== */
#ecosystem .js-share-btn:active {
    transform: scale(0.95);
}

/* ===== decision_management ===== */
#impulsive {
    position: relative;
    width: 100%;
}

#impulsive img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

#impulsive .container {
    max-width: 1200px;
}

/* ===== accumulation_strategy ===== */
#retirement-models {
    overflow: hidden;
}

#retirement-models img {
    transition: transform 0.5s ease;
}

#retirement-models img:hover {
    transform: scale(1.02);
}

/* ===== efficiency_methods ===== */
#optimization {
    width: 100%
}

.js-opt-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease
}

.js-opt-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(85, 60, 154, 0.1)
}

/* ===== app_analysis ===== */
#planning-tools {
    scroll-margin-top: 80px
}

.js-newsletter-form input::placeholder {
    color: var(--muted-text);
    opacity: 0.7
}

/* ===== resilience_model ===== */
#final-system {
    font-family: inherit;
}

.input:focus,
.textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--secondary-bg);
}

/* ===== author_profile ===== */
.js-author-img {
    transition: opacity 0.8s ease-in-out;
}

/* ===== footer ===== */
#footer {
    width: 100%;
    background-color: var(--footer-bg);
    color: var(--footer-text);
}

#footer a {
    text-decoration: none;
}

#footer .js-back-to-top {
    cursor: pointer;
    border: none;
}