@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@500;700&display=swap');
@import './variables.css';

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

body {
    font-family: var(--font-sans);
    background-color: var(--color-surface-pure);
    color: var(--color-text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    animation: fadeIn 0.4s ease-out;
    /* Page Transition */
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-main);
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

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

.layout-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.text-center {
    text-align: center;
}

.text-brand {
    color: var(--color-brand-600);
}

.text-xs {
    font-size: 0.75rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.5rem;
}

.font-medium {
    font-weight: 500;
}

.font-bold {
    font-weight: 700;
}

.hidden {
    display: none !important;
}

/* Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all 0.2s var(--ease-spring);
}

.btn-primary {
    background-color: var(--color-brand-600);
    color: var(--color-text-inverted);
}

.btn-primary:hover {
    background-color: var(--color-brand-700);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-text {
    background-color: transparent;
    color: var(--color-text-main);
    border: 1px solid transparent;
}

.btn-text:hover {
    background-color: var(--color-surface-200);
}

.btn-secondary {
    background-color: var(--color-surface-200);
    color: var(--color-text-main);
    border: 1px solid var(--color-surface-300);
}

.btn-secondary:hover {
    background-color: var(--color-surface-300);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(2px);
}

.modal {
    width: 100%;
    /* Max width is defined inline or via card */
    padding: var(--space-lg);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    background-color: var(--color-surface-100);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-surface-200);
    box-shadow: var(--shadow-sm);
}

/* Form Inputs */
.form-input,
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--color-surface-300);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: var(--color-text-main);
    background: var(--color-surface-pure);
    transition: border-color var(--duration-fast) var(--ease-smooth),
        box-shadow var(--duration-fast) var(--ease-smooth);
    outline: none;
}

.form-input:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--color-brand-500);
    box-shadow: 0 0 0 3px hsla(var(--hue-brand), 80%, 60%, 0.15);
}

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

/* Selection */
::selection {
    background: hsla(var(--hue-brand), 80%, 60%, 0.25);
    color: var(--color-text-main);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--color-surface-300);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-surface-400);
}