/* Base Styles and Typography - DubnCo */

body {
    font-family: var(--font-family-primary);
    color: var(--text-color);
    background-color: var(--warm-white); /* Warm white background */
    padding-top: 0; /* Remove padding since we no longer have fixed navbar */
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: transform 0.3s ease;
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Enhanced typography with Avenir-style characteristics */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-primary);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.025em;
    margin-bottom: 0.75em;
}

h1 {
    font-weight: 700;
    font-size: 2.5rem;
}

h2 {
    font-weight: 600;
    font-size: 2rem;
}

h3 {
    font-weight: 600;
    font-size: 1.5rem;
}

/* Navigation typography */
.navbar-brand {
    font-family: var(--font-family-primary);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

.navbar-nav .nav-link {
    font-family: var(--font-family-primary);
    font-weight: 500;
    transition: color 0.3s ease;
    letter-spacing: 0.01em;
}

/* Button typography */
.btn {
    font-family: var(--font-family-primary);
    font-weight: 500;
    letter-spacing: 0.025em;
}

/* Form elements */
.form-control, .form-select, .form-check-label {
    font-family: var(--font-family-primary);
}

/* Card typography */
.card-title {
    font-family: var(--font-family-primary);
    font-weight: 600;
    letter-spacing: -0.015em;
}

.card-text {
    font-family: var(--font-family-primary);
    line-height: 1.6;
}

/* Footer typography */
.footer h5, .footer h6 {
    font-family: var(--font-family-primary);
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Custom Bootstrap overrides */
.bg-primary {
    background-color: var(--primary-color) !important;
}

.admin-area .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.admin-area .btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Public site buttons: plain text and a chevron, no background or border.
   Set through Bootstrap's own --bs-btn-* variables so every state
   (hover, active, focus, disabled) stays consistent. */
body:not(.admin-area) .btn-primary,
body:not(.admin-area) .btn-outline-primary,
body:not(.admin-area) .btn-secondary,
body:not(.admin-area) .btn-outline-secondary {
    --bs-btn-color: var(--primary-color);
    --bs-btn-bg: transparent;
    --bs-btn-border-color: transparent;
    --bs-btn-hover-color: var(--primary-color);
    --bs-btn-hover-bg: transparent;
    --bs-btn-hover-border-color: transparent;
    --bs-btn-active-color: var(--primary-color);
    --bs-btn-active-bg: transparent;
    --bs-btn-active-border-color: transparent;
    --bs-btn-disabled-color: var(--primary-color);
    --bs-btn-disabled-bg: transparent;
    --bs-btn-disabled-border-color: transparent;
    --bs-btn-focus-shadow-rgb: 139, 58, 58;
    padding-left: 0;
    padding-right: 0;
    font-weight: 600;
}

/* Secondary actions: same look, quieter */
body:not(.admin-area) .btn-outline-primary,
body:not(.admin-area) .btn-secondary,
body:not(.admin-area) .btn-outline-secondary {
    --bs-btn-color: var(--text-color);
    --bs-btn-hover-color: var(--primary-color);
    --bs-btn-active-color: var(--primary-color);
    font-weight: 500;
}

body:not(.admin-area) .btn-primary::before,
body:not(.admin-area) .btn-outline-primary::before,
body:not(.admin-area) .btn-secondary::before,
body:not(.admin-area) .btn-outline-secondary::before {
    content: '\203A'; /* › */
    display: inline-block;
    /* Twice the text size; line-height 0 keeps it from making the button taller,
       and the small drop re-centres it on the text (em here = the chevron's own size) */
    font-size: 2em;
    line-height: 0;
    vertical-align: -0.125em;
    margin-right: 0.2em;
    transition: transform 0.2s ease;
}

body:not(.admin-area) .btn-primary:hover::before,
body:not(.admin-area) .btn-outline-primary:hover::before,
body:not(.admin-area) .btn-secondary:hover::before,
body:not(.admin-area) .btn-outline-secondary:hover::before {
    transform: translateX(3px);
}

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

/* Update bg-light to use warmer color */
.bg-light {
    background-color: #faf8f3 !important; /* Slightly warmer than default bg-light */
}

/* Footer */
.footer {
    margin-top: auto;
}

.social-links a {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
    color: var(--accent-color) !important;
}

/* Contact form */
.contact-form {
    background: var(--light-color);
    padding: 3rem;
    border-radius: 15px;
}

.form-control {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
}

/* Loading and animations */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utilities */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hover-lift {
    transition: transform 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
}

/* Character Image Utilities */
.character-image {
    border-radius: var(--character-image-border-radius);
    box-shadow: none;
    transition: transform 0.3s ease;
    object-fit: cover;
}

.character-image:hover {
    box-shadow: none;
    transform: scale(1.02);
}

.character-image-loading {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.character-image-loaded {
    opacity: 1;
}

.character-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--character-image-border-radius);
    overflow: hidden;
    position: relative;
}

.character-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}