/* Brand and shared styles for HRKiller public website */

:root {
    --brand-accent: #FF5F1F;
    --brand-accent-strong: #D94D13;
    --brand-accent-soft: #FFE4D6;
    --brand-bg: #FCFCF8;
    --brand-surface: #FFFFFF;
    --brand-surface-soft: #FFF8F3;
    --brand-text: #1E1713;
    --brand-muted: #6D625C;
    --brand-border: rgba(45, 25, 14, 0.14);
    --brand-shadow: 0 16px 30px rgba(45, 25, 14, 0.12);
    --brand-radius: 18px;
}

html[data-theme="dark"] {
    --brand-bg: #14110F;
    --brand-surface: #1D1815;
    --brand-surface-soft: #261E19;
    --brand-text: #F5E8DF;
    --brand-muted: #D7BFB0;
    --brand-border: rgba(255, 197, 163, 0.22);
    --brand-shadow: 0 18px 36px rgba(0, 0, 0, 0.36);
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
    scrollbar-color: #FF5F1F #2A1A12;
    scrollbar-width: thin;
}

body.site-body {
    background:
        radial-gradient(1000px 420px at 100% -15%, rgba(255, 95, 31, 0.14), transparent 62%),
        radial-gradient(780px 300px at 0% 108%, rgba(255, 140, 88, 0.1), transparent 62%),
        var(--brand-bg);
    color: var(--brand-text);
    font-family: "Unbounded", "Segoe UI", sans-serif;
    font-weight: 400;
    letter-spacing: -0.006em;
    transition: background-color 0.28s ease, color 0.28s ease;
}

.site-body main p,
.site-body main li,
.site-body main dd,
.site-body main dt {
    font-weight: 300;
}

body.site-body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0));
    z-index: -1;
}

html[data-theme="dark"] body.site-body::before {
    background: linear-gradient(180deg, rgba(255, 190, 150, 0.08), rgba(0, 0, 0, 0));
}

.site-header {
    border-bottom: 1px solid var(--brand-border);
    background-color: rgba(252, 252, 248, 0.88);
    backdrop-filter: blur(8px);
}

.site-header nav a,
.site-header nav button,
.site-header nav span {
    font-family: "Unbounded", "Segoe UI", sans-serif;
    letter-spacing: -0.015em;
}

@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
    .main-nav-link {
        display: inline-block;
        transform-origin: center;
        transition: transform 0.24s ease, color 0.24s ease, text-shadow 0.24s ease;
        will-change: transform;
    }

    .main-nav-link:hover,
    .main-nav-link:focus-visible {
        transform: scale(1.08);
        text-shadow: 0 8px 16px rgba(255, 95, 31, 0.2);
    }

    .main-nav-link:active {
        transform: scale(1.03);
    }

    .main-nav-link--tariffs:hover,
    .main-nav-link--tariffs:focus-visible {
        transform: scale(1.11);
    }
}

#mobileMenu {
    background: rgba(252, 252, 248, 0.94);
    backdrop-filter: blur(8px);
}

#mobileMenu a {
    padding: 0.1rem 0;
}

html[data-theme="dark"] .site-header {
    background-color: rgba(20, 17, 15, 0.88);
}

html[data-theme="dark"] #mobileMenu {
    background: rgba(20, 17, 15, 0.94);
    border-color: rgba(255, 197, 163, 0.22);
}

html[data-theme="dark"] #mobileMenu a {
    color: #F6EADF;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--brand-surface);
    color: var(--brand-text);
    border-radius: 14px / 11px;
    min-width: 96px;
    justify-content: center;
}

.theme-toggle:hover {
    border-color: rgba(255, 95, 31, 0.45);
    color: var(--brand-accent);
    box-shadow: 0 10px 24px rgba(255, 95, 31, 0.15);
}

.site-body main .rounded-lg {
    border-radius: 18px / 14px !important;
}

.site-body main .rounded-xl {
    border-radius: 24px / 18px !important;
}

.site-body main .rounded-2xl {
    border-radius: 30px / 22px !important;
}

/* Active nav item */
nav a.active {
    color: var(--brand-accent) !important;
    font-weight: 700;
}

#mobileMenu a.active {
    color: var(--brand-accent) !important;
    font-weight: 700;
}

footer {
    border-top: 1px solid var(--brand-border);
}

footer.bg-gray-900 {
    background: linear-gradient(145deg, #1B120D 0%, #2D1A11 46%, #4A2714 100%) !important;
}

html[data-theme="dark"] footer {
    background: linear-gradient(145deg, #0E0B09 0%, #1A100B 45%, #2B170D 100%) !important;
}

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

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

[data-plan-period].period-enter {
    animation: tariffSwitchIn 0.38s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform, opacity;
}

@keyframes tariffSwitchIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Button hover effects */
.btn-hover {
    transition: all 0.3s ease;
}

.btn-hover:hover {
    transform: translateY(-2px);
    box-shadow: var(--brand-shadow);
}

/* Card hover */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: var(--brand-shadow);
}

/* Gradient backgrounds */
.gradient-blue {
    background: linear-gradient(135deg, #FF5F1F 0%, #D94D13 100%);
}

.gradient-green {
    background: linear-gradient(135deg, #FF7E45 0%, #F0591C 100%);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #F3EFEA;
}

::-webkit-scrollbar-thumb {
    background: #FF5F1F;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #D94D13;
}

/* Loading spinner */
.spinner {
    border: 4px solid #F3F3F3;
    border-top: 4px solid #FF5F1F;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive utilities */
@media (max-width: 768px) {
    .mobile-hidden {
        display: none !important;
    }
}

/* Details/Summary styling */
details summary {
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
}

details summary:hover {
    color: var(--brand-accent);
}

details[open] summary {
    margin-bottom: 1rem;
}

/* Code blocks */
code {
    font-family: "Courier New", monospace;
    background-color: #F4EEE7;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

/* Form focus styles */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 95, 31, 0.28);
    border-color: rgba(255, 95, 31, 0.6);
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #1F2937;
    color: #FFFFFF;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* Progress bar */
.progress-bar {
    height: 8px;
    background: #E8E0D8;
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FF5F1F 0%, #D94D13 100%);
    transition: width 0.3s ease;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.badge-blue {
    background: #FFE5D8;
    color: #9B3D16;
}

.badge-green {
    background: #FFEFE3;
    color: #8D3511;
}

.badge-red {
    background: #FDE3D8;
    color: #8D3511;
}

/* Skeleton loading */
.skeleton {
    background: linear-gradient(90deg, #F5EFE9 25%, #EBDDCE 50%, #F5EFE9 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Modal overlay */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--brand-surface);
    color: var(--brand-text);
    border-radius: 12px;
    padding: 24px;
    max-width: 500px;
    width: 90%;
    box-shadow: var(--brand-shadow);
    border: 1px solid var(--brand-border);
}

/* Dark mode treatment for frequently used Tailwind classes */
html[data-theme="dark"] .bg-white {
    background-color: var(--brand-surface) !important;
}

html[data-theme="dark"] .bg-gray-50 {
    background-color: #171310 !important;
}

html[data-theme="dark"] .bg-gray-100 {
    background-color: #221B17 !important;
}

html[data-theme="dark"] .text-gray-900 {
    color: #F6EADF !important;
}

html[data-theme="dark"] .text-gray-800 {
    color: #F1DFD2 !important;
}

html[data-theme="dark"] .text-gray-700,
html[data-theme="dark"] .text-gray-600,
html[data-theme="dark"] .text-gray-500 {
    color: #D9BFAF !important;
}

html[data-theme="dark"] .border-gray-200,
html[data-theme="dark"] .border-gray-300 {
    border-color: rgba(255, 197, 163, 0.22) !important;
}

html[data-theme="dark"] .shadow-lg,
html[data-theme="dark"] .shadow-xl,
html[data-theme="dark"] .shadow-2xl {
    box-shadow: var(--brand-shadow) !important;
}
