/* ============== ROOT VARIABLES ============== */
:root {
    --primary: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-darker: #172554;
    --primary-light: #3b82f6;
    --primary-lighter: #60a5fa;
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --success: #10b981;
    --success-light: #d1fae5;
    --error: #ef4444;
    --error-light: #fee2e2;
    --warning: #f59e0b;
    --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.06);
    --shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(15, 23, 42, 0.08), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(15, 23, 42, 0.10), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
    --shadow-xl: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
    --shadow-primary: 0 8px 24px -8px rgba(30, 64, 175, 0.45);
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition: all 0.2s ease;
    --transition-slow: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--gray-900);
    background: var(--white);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

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

input, select, textarea {
    font-family: inherit;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

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

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ============== BUTTONS ============== */
.btn {
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    line-height: 1;
    letter-spacing: 0.01em;
}

.btn:focus-visible {
    outline: 3px solid var(--primary-200);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow-xs);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-primary);
}

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

.btn-outline {
    background: var(--white);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary-50);
    border-color: var(--primary-dark);
}

.btn-large {
    padding: 0.875rem 2rem;
    font-size: 0.95rem;
}

.btn-block {
    width: 100%;
}

/* ============== HEADER ============== */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: saturate(180%) blur(8px);
    background: rgba(255, 255, 255, 0.92);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--gray-900);
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-primary);
    flex-shrink: 0;
}

.logo-icon svg {
    width: 24px;
    height: 24px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-title {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 500;
}

.header-nav {
    display: flex;
    gap: 0.625rem;
    align-items: center;
}

/* ============== HERO ============== */
.hero {
    position: relative;
    background-image: url('assets/hero-sumqayit.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 6rem 0 5.5rem;
    overflow: hidden;
    min-height: 620px;
    display: flex;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.78) 0%, rgba(30, 64, 175, 0.55) 50%, rgba(15, 23, 42, 0.65) 100%);
    z-index: 1;
}

.hero-bg {
    display: none;
}

.hero-shape {
    display: none;
}

.shape-1,
.shape-2 {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 880px;
    text-align: center;
    margin: 0 auto;
    color: var(--white);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--white);
    padding: 0.4375rem 0.875rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: var(--shadow-xs);
}

.badge-dot {
    width: 6px;
    height: 6px;
    background: var(--primary-lighter);
    border-radius: 50%;
    animation: pulse 2s infinite;
    box-shadow: 0 0 8px var(--primary-lighter);
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

.hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    letter-spacing: -0.025em;
    color: var(--white);
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
}

.text-blue {
    color: var(--primary-lighter);
    position: relative;
    display: inline-block;
}

.text-blue::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4px;
    height: 8px;
    background: rgba(96, 165, 250, 0.4);
    z-index: -1;
    border-radius: 4px;
}

.hero p {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.92);
    margin-bottom: 2.75rem;
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.25);
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 720px;
    margin: 0 auto;
}

.stat {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.875rem;
    text-align: left;
    transition: var(--transition);
    color: var(--white);
}

.stat:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    color: var(--white);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 22px;
    height: 22px;
}

.stat-value {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.85);
    margin-top: 0.125rem;
    font-weight: 500;
}

/* ============== APARTMENTS ============== */
.apartments {
    padding: 4.5rem 0;
    background: var(--gray-50);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 0.375rem;
    letter-spacing: -0.02em;
}

.section-header p {
    color: var(--gray-500);
    font-size: 1.05rem;
}

.filter-pills {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pill {
    padding: 0.5rem 1.125rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--gray-700);
    transition: var(--transition);
}

.pill:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.pill.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.apartment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 1.5rem;
}

.apartment-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--gray-200);
    transition: var(--transition-slow);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.apartment-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-200);
}

.apartment-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-100), var(--primary-50));
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.apartment-image::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, transparent 60%, rgba(15, 23, 42, 0.3) 100%);
    pointer-events: none;
}

.apartment-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--white);
    color: var(--primary);
    padding: 0.375rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 0.3125rem;
    z-index: 2;
}

.apartment-badge svg {
    width: 12px;
    height: 12px;
}

.apartment-area-tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    color: var(--white);
    padding: 0.3125rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

.apartment-content {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.apartment-title {
    font-size: 1.1875rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--gray-900);
    letter-spacing: -0.01em;
}

.apartment-location {
    color: var(--gray-500);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.3125rem;
    margin-bottom: 1rem;
}

.apartment-location svg {
    width: 14px;
    height: 14px;
    color: var(--primary);
}

.apartment-features {
    display: flex;
    gap: 0.4375rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.feature {
    background: var(--primary-50);
    color: var(--primary);
    padding: 0.3125rem 0.6875rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3125rem;
}

.feature svg {
    width: 13px;
    height: 13px;
}

.apartment-bottom {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
    gap: 0.75rem;
}

.apartment-price {
    display: flex;
    flex-direction: column;
}

.price-label {
    font-size: 0.6875rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
    margin-bottom: 0.125rem;
}

.price-value {
    font-size: 1.625rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    letter-spacing: -0.02em;
}

.price-period {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-500);
    margin-left: 0.125rem;
}

.apartment-badges {
    display: flex;
    flex-direction: column;
    gap: 0.3125rem;
    align-items: flex-end;
}

.badge-item {
    font-size: 0.6875rem;
    color: var(--success);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-item svg {
    width: 12px;
    height: 12px;
    stroke-width: 2.5;
}

/* ============== FEATURES ============== */
.features {
    padding: 4.5rem 0;
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.feature-item {
    text-align: center;
    padding: 1.75rem 1.25rem;
    border-radius: var(--radius-lg);
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.feature-item:hover {
    background: var(--white);
    border-color: var(--primary-200);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--primary-50);
    color: var(--primary);
    border-radius: 14px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
}

.feature-item h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.feature-item p {
    color: var(--gray-600);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* ============== FOOTER ============== */
.footer {
    background: var(--primary-darker);
    color: var(--gray-300);
    padding: 3.5rem 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2.5rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo .logo-icon {
    box-shadow: none;
}

.footer-logo .logo-title {
    color: var(--white);
}

.footer-logo .logo-subtitle {
    color: var(--primary-300);
}

.footer-desc {
    color: var(--gray-400);
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 380px;
}

.footer h4 {
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 1rem;
}

.footer ul li {
    padding: 0.3125rem 0;
    font-size: 0.9rem;
    color: var(--gray-400);
}

.footer ul li:hover {
    color: var(--white);
}

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.8125rem;
    color: var(--gray-400);
}

/* ============== MODAL ============== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
    animation: fadeIn 0.25s ease;
    overflow-y: auto;
}

.modal-overlay.hidden {
    display: none;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 640px;
    width: 100%;
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-xl);
    animation: modalIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin: auto;
}

.modal::-webkit-scrollbar {
    width: 6px;
}

.modal::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(20px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--gray-100);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.25rem;
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    line-height: 1;
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-900);
    transform: rotate(90deg);
}

.modal-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-50), var(--primary-100));
    color: var(--primary);
    border-radius: 16px;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon svg {
    width: 32px;
    height: 32px;
}

.modal-icon.small {
    width: 56px;
    height: 56px;
    border-radius: 14px;
}

.modal-icon.small svg {
    width: 26px;
    height: 26px;
}

.modal-header {
    margin-bottom: 1.5rem;
}

.modal h2 {
    font-size: 1.625rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

.modal-subtitle {
    color: var(--gray-500);
    font-size: 0.95rem;
}

/* Onboarding modal */
.onboarding-modal {
    text-align: center;
    max-width: 500px;
}

.onboarding-modal h2 {
    margin-bottom: 1rem;
}

.onboarding-modal p {
    color: var(--gray-600);
    margin-bottom: 1.75rem;
    line-height: 1.65;
    font-size: 1rem;
}

.onboarding-modal .btn {
    min-width: 200px;
}

/* ============== FORM ============== */
.form {
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4375rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
}

.req {
    color: var(--error);
    font-weight: 700;
}

.form-group input,
.form-group select {
    padding: 0.6875rem 0.9375rem;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.95rem;
    background: var(--white);
    color: var(--gray-900);
    transition: var(--transition);
    width: 100%;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-group select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px;
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-group input:hover,
.form-group select:hover {
    border-color: var(--gray-400);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-100);
}

.form-group input::placeholder {
    color: var(--gray-400);
}

.form-group input.invalid,
.form-group select.invalid {
    border-color: var(--error);
    box-shadow: 0 0 0 4px var(--error-light);
}

.form-hint {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.series-input {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 0.5rem;
}

.series-input select {
    text-align: center;
    font-weight: 700;
    padding: 0.6875rem 0.5rem;
}

.form-info {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    background: var(--primary-50);
    border: 1px solid var(--primary-100);
    color: var(--primary-dark);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
}

.form-info svg {
    flex-shrink: 0;
    color: var(--primary);
}

/* ============== LOADING ============== */
.loading-modal {
    text-align: center;
    max-width: 400px;
    padding: 2.5rem 2rem;
}

.spinner {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    position: relative;
}

.spinner-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 4px solid transparent;
    border-top-color: var(--primary);
    animation: spin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.spinner-ring:nth-child(2) {
    inset: 8px;
    border-top-color: var(--primary-light);
    animation-duration: 1.5s;
    animation-direction: reverse;
}

.spinner-ring:nth-child(3) {
    inset: 16px;
    border-top-color: var(--primary-lighter);
    animation-duration: 1.8s;
}

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

.loading-modal h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.loading-modal p {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
}

.loading-progress {
    width: 100%;
    height: 6px;
    background: var(--gray-100);
    border-radius: 100px;
    overflow: hidden;
}

.loading-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 100px;
    transition: width 0.1s linear;
}

/* ============== SUCCESS ============== */
.success-modal {
    text-align: center;
    max-width: 480px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success-light);
    color: var(--success);
    border-radius: 50%;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: successPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s backwards;
}

@keyframes successPop {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

.success-icon svg {
    width: 40px;
    height: 40px;
    stroke-width: 2.5;
}

.success-modal h2 {
    margin-bottom: 0.75rem;
}

.success-modal p {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    line-height: 1.65;
}

/* ============== SMALL MODAL (Phone, PIN) ============== */
.small-modal {
    text-align: center;
    max-width: 440px;
}

.small-modal .modal-icon {
    margin-bottom: 1rem;
}

.small-modal h2 {
    margin-bottom: 0.5rem;
}

.small-modal .form {
    text-align: left;
    margin-top: 1.5rem;
}

/* ============== ERROR MODAL ============== */
.error-icon {
    width: 80px;
    height: 80px;
    background: var(--error-light);
    color: var(--error);
    border-radius: 50%;
    margin: 0 auto 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-8px); }
    75% { transform: translateX(8px); }
}

.error-icon svg {
    width: 40px;
    height: 40px;
    stroke-width: 2;
}

.error-modal p {
    color: var(--gray-600);
    margin-bottom: 0.5rem;
    line-height: 1.55;
}

.attempt-count {
    color: var(--gray-500) !important;
    font-size: 0.875rem !important;
    margin-bottom: 1.5rem !important;
    font-weight: 500;
}

.attempt-count span {
    color: var(--error);
    font-weight: 700;
}

/* ============== PIN INPUT ============== */
.pin-input-wrapper {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin: 1rem 0 0.5rem;
}

.pin-digit {
    width: 64px;
    height: 72px;
    text-align: center;
    font-size: 1.875rem;
    font-weight: 700;
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    background: var(--gray-50);
    color: var(--primary);
    transition: var(--transition);
    caret-color: var(--primary);
    padding: 0 !important;
    -moz-appearance: textfield;
}

.pin-digit::-webkit-outer-spin-button,
.pin-digit::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.pin-digit:hover {
    border-color: var(--gray-400);
    background: var(--white);
}

.pin-digit:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 4px var(--primary-100);
}

.pin-digit.filled {
    background: var(--white);
    border-color: var(--primary);
    color: var(--primary);
}

.pin-digit.shake {
    animation: pinShake 0.4s ease;
    border-color: var(--error);
    background: var(--error-light);
}

@keyframes pinShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-6px); }
    75% { transform: translateX(6px); }
}

.pin-input-wrapper .form-hint {
    text-align: center;
    margin-top: 0.75rem;
}

/* ============== RESPONSIVE ============== */
@media (max-width: 968px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    .footer-grid > div:first-child {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .header-container {
        height: 64px;
    }

    .logo-text {
        display: none;
    }

    .header-nav .btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
    }

    .header-nav .btn svg {
        width: 14px;
        height: 14px;
    }

    .hero {
        padding: 3rem 0 2.5rem;
    }

    .hero h1 {
        font-size: 1.875rem;
    }

    .hero p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 0.625rem;
    }

    .stat {
        padding: 0.875rem 1rem;
    }

    .stat-value {
        font-size: 1.125rem;
    }

    .apartments,
    .features {
        padding: 3rem 0;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }

    .section-header h2 {
        font-size: 1.625rem;
    }

    .section-header p {
        font-size: 0.95rem;
    }

    .apartment-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .series-input {
        grid-template-columns: 80px 1fr;
    }

    .modal {
        padding: 1.5rem;
        max-height: calc(100vh - 1rem);
    }

    .modal h2 {
        font-size: 1.25rem;
    }

    .modal-icon {
        width: 56px;
        height: 56px;
    }

    .modal-icon svg {
        width: 28px;
        height: 28px;
    }

    .pin-digit {
        width: 52px;
        height: 60px;
        font-size: 1.5rem;
    }

    .pin-input-wrapper {
        gap: 0.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 380px) {
    .header-nav {
        gap: 0.5rem;
    }
    .header-nav .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }
    .pin-digit {
        width: 44px;
        height: 56px;
        font-size: 1.25rem;
    }
}
