/* ==========================================
   DOUBLE ARROW HARDSCAPES - GLOBAL BRAND DESIGN SYSTEM
   "The finishing touch that outlasts the garden."
   ========================================== */

/* Font Face Definitions */
@font-face {
    font-family: 'Playfair';
    src: url('/fonts/PlayfairDisplay-VariableFont_wght.ttf') format('truetype');
    font-weight: 800 600;
    font-style: normal;
    font-display: swap;
}

/* ==========================================
   BRAND COLOR SYSTEM
   ========================================== */
:root {
    /* Brand Colors - Double Arrow Hardscapes */
    --brand-charcoal: #3d3d3d;
    --brand-charcoal-dark: #2b2b2b;
    --brand-charcoal-darker: #1f1f1f;
    --brand-gold: #d4af37;
    --brand-gold-light: #e0bb44;
    --brand-gold-dark: #b8941f;
    --brand-beige: #f5f5dc;
    --brand-beige-light: #fefef8;

    /* Typography */
    --font-display: 'Playfair Display', 'Playfair', Georgia, serif;
    --font-body: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Legacy gradients (for compatibility) */
    --app-gradient: linear-gradient(135deg, var(--brand-charcoal) 0%, var(--brand-charcoal-dark) 100%);
    --app-gradient-start: var(--brand-charcoal);
    --app-gradient-end: var(--brand-charcoal-dark);
}

/* ==========================================
   GLOBAL TYPOGRAPHY
   ========================================== */
html, body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--brand-charcoal);
    background: linear-gradient(135deg, rgba(245, 245, 220, 0.3) 0%, rgba(212, 175, 55, 0.05) 100%),
                linear-gradient(to bottom, var(--brand-beige-light) 0%, #f8f8f0 100%);
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.5px;
    color: var(--brand-charcoal);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.625rem; }
h4 { font-size: 1.375rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

.logo-text {
    font-family: var(--font-display);
    font-weight: 900;
    color: var(--brand-gold);
}

/* ==========================================
   LINKS & BUTTONS - BRAND STYLED
   ========================================== */
a {
    color: var(--brand-gold-dark);
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
}

a:hover {
    color: var(--brand-gold);
    text-decoration: none;
}

.btn-link {
    color: var(--brand-gold-dark);
    font-weight: 700;
}

.btn-link:hover {
    color: var(--brand-gold);
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-charcoal) 0%, var(--brand-charcoal-dark) 100%);
    color: var(--brand-gold);
    border: 2px solid var(--brand-gold);
    font-weight: 700;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    font-family: var(--font-body);
}

.btn-primary:hover {
    background: var(--brand-gold);
    color: var(--brand-charcoal);
    border-color: var(--brand-gold-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* ==========================================
   FORM CONTROLS - BRAND STYLED
   ========================================== */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.15rem rgba(212, 175, 55, 0.25);
    border-color: var(--brand-gold);
    outline: none;
}

.form-control {
    border: 2px solid rgba(212, 175, 55, 0.25);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: var(--font-body);
}

.form-control:focus {
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
}

.form-label {
    font-weight: 700;
    color: var(--brand-charcoal);
    text-transform: uppercase;
    font-size: 0.8125rem;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

/* ==========================================
   VALIDATION STYLING
   ========================================== */
.valid.modified:not([type=checkbox]) {
    outline: 2px solid #10b981;
    border-color: #10b981;
}

.invalid {
    outline: 2px solid #dc2626;
    border-color: #dc2626;
}

.validation-message {
    color: #dc2626;
    font-weight: 600;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ==========================================
   CONTENT & LAYOUT
   ========================================== */
.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

/* ==========================================
   ERROR BOUNDARY - BRAND STYLED
   ========================================== */
.blazor-error-boundary {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    border: 3px solid #fca5a5;
    border-left-width: 0;
    border-right-width: 0;
    padding: 1.5rem 1.5rem 1.5rem 4rem;
    color: white;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.3);
    position: relative;
}

.blazor-error-boundary::before {
    content: "⚠";
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: #fef2f2;
}

.blazor-error-boundary::after {
    content: "An error has occurred. Please refresh the page or contact support.";
    font-family: var(--font-body);
}

/* ==========================================
   CHECKBOXES & FORM ELEMENTS
   ========================================== */
.darker-border-checkbox.form-check-input {
    border-color: var(--brand-charcoal);
    border-width: 2px;
}

.form-check-input:checked {
    background-color: var(--brand-gold);
    border-color: var(--brand-gold);
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: #9ca3af;
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.text-brand-gold {
    color: var(--brand-gold) !important;
}

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

.bg-brand-gold {
    background-color: var(--brand-gold) !important;
}

.bg-brand-charcoal {
    background: linear-gradient(135deg, var(--brand-charcoal) 0%, var(--brand-charcoal-dark) 100%) !important;
}

.border-brand-gold {
    border-color: var(--brand-gold) !important;
}

/* ==========================================
   ANIMATIONS
   ========================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.4s ease-out;
}

/* ==========================================
   RESPONSIVE UTILITIES
   ========================================== */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.625rem; }
    h3 { font-size: 1.375rem; }

    .btn-primary {
        width: 100%;
        justify-content: center;
    }
}