:root {
    --primary-bg: #FDFBF7;
    --secondary-bg: #D1D9E0;
    --accent-color: #EBC49F;
    --text-primary: #4A3728;
    --text-secondary: #6B5B4E;
    --button-bg: #4A3728;
    --button-text: #FDFBF7;
    --border-color: #D1D9E0;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    background-color: var(--primary-bg);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    max-width: 100%;
    overflow-x: hidden;
}

html {
    max-width: 100%;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-top: 0;
}

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

a {
    transition: color 0.3s ease, opacity 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

button {
    cursor: pointer;
    border: none;
    background-color: var(--button-bg);
    color: var(--button-text);
    transition: transform 0.2s ease, opacity 0.3s ease;
}

button:hover {
    opacity: 0.9;
}

button:active {
    transform: scale(0.98);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul,
ol {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

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

    .mobile-long-text {
        word-break: break-all;
        font-size: 0.9em;
    }
}

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

/* ===== header_main ===== */
.js-mobile-menu {
    max-height: 0;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
}

.js-mobile-menu.open {
    max-height: 600px;
    opacity: 1;
    visibility: visible;
}

#header {
    font-family: var(--font-body);
}

h1,
h2,
h3,
.font-heading {
    font-family: var(--font-heading);
}

/* ===== hero_section ===== */
#hero_home {
    width: 100%
}

#hero_home .container {
    width: 100%
}

#hero_home h1 {
    font-family: var(--font-heading)
}

#hero_home p {
    font-family: var(--font-body)
}

/* ===== featured_content ===== */
.font-heading {
    font-family: var(--font-heading)
}

.font-body {
    font-family: var(--font-body)
}

#featured-modal::-webkit-scrollbar {
    width: 8px
}

#featured-modal::-webkit-scrollbar-track {
    background: var(--primary-bg)
}

#featured-modal::-webkit-scrollbar-thumb {
    background: var(--secondary-bg);
    border-radius: 10px
}

#featured-modal::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary)
}

/* ===== concept_block ===== */
#concept {
    width: 100%;
}

/* ===== retirement_strategy ===== */
[id="retirement-planning"] {
    font-family: var(--font-body);
}

[id="retirement-planning"] h2 {
    font-family: var(--font-heading);
}

/* ===== habits_analysis ===== */
#evolution {
    width: 100%;
}

/* ===== budgeting_logic ===== */
.font-heading {
    font-family: var(--font-heading)
}

.font-body {
    font-family: var(--font-body)
}

.js-budget-section {
    transition: opacity 0.5s ease-in-out
}

/* ===== tracking_methodology ===== */
.font-heading {
    font-family: var(--font-heading);
}

.font-body {
    font-family: var(--font-body);
}

/* ===== tracking_apps ===== */
#spending-tracker-apps {
    background-color: var(--primary-bg);
}

#spending-tracker-apps .font-heading {
    font-family: var(--font-heading);
}

#spending-tracker-apps .font-body {
    font-family: var(--font-body);
}

/* ===== spending_control ===== */
.bg-custom-primary {
    background-color: var(--primary-bg)
}

.text-custom-title {
    color: var(--text-primary)
}

.text-custom-text {
    color: var(--text-secondary)
}

.text-custom-icon {
    color: var(--button-bg)
}

.bg-custom-accent {
    background-color: var(--accent-color)
}

.border-custom-border {
    border-color: var(--border-color)
}

.font-heading {
    font-family: var(--font-heading)
}

.font-body {
    font-family: var(--font-body)
}

#how-to-stop-overspending {
    scroll-margin-top: 2rem
}

/* ===== savings_strategy ===== */
#how-to-save-for-retirement {
    scroll-margin-top: 80px;
}

.js-animate-section {
    opacity: 0;
}

/* ===== saving_methods ===== */
#best-way-to-save-money {
    width: 100%;
    background-color: var(--secondary-bg);
}

.font-heading {
    font-family: var(--font-heading);
}

.font-body {
    font-family: var(--font-body);
}

/* ===== budgeting_2026 ===== */
.font-heading {
    font-family: var(--font-heading)
}

.font-body {
    font-family: var(--font-body)
}

/* ===== future_scenarios ===== */
#scenarios {
    width: 100%;
    position: relative;
}

.scenario-card {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scenario-card:hover {
    transform: translateX(8px);
}

#scenario-modal {
    width: 100%;
    height: 100%;
}

/* ===== habit_change ===== */
#adjustment {
    width: 100%;
    min-height: 600px;
    display: flex;
    flex-direction: column;
}

.font-heading {
    font-family: var(--font-heading);
}

.font-body {
    font-family: var(--font-body);
}

#adjustment i {
    color: var(--text-primary);
}

/* ===== dynamic_control ===== */
#adaptive .js-adaptive-card {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

#adaptive .js-adaptive-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(74, 55, 40, 0.15);
}

/* ===== final_model ===== */
#integrated {
    background-color: var(--primary-bg);
}

#integrated h2 {
    font-family: var(--font-heading);
}

#integrated p,
#integrated span {
    font-family: var(--font-body);
}

/* ===== contact_section ===== */
#contact-section {
    width: 100%;
    font-family: var(--font-body);
}

.font-heading {
    font-family: var(--font-heading);
}

.js-contact-form.was-validated input:invalid {
    border-color: #e3342f;
}

.js-contact-form.was-validated input:valid {
    border-color: #38c172;
}

/* ===== author_widget ===== */
.js-author-animate {
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s ease-out;
}

.js-author-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== footer ===== */
#footer {
    width: 100%;
}

#footer a {
    text-decoration-thickness: 1px;
}